diff --git a/.github/reusable-steps/cleanup/action.yml b/.github/reusable-steps/cleanup/action.yml new file mode 100644 index 00000000..142b9592 --- /dev/null +++ b/.github/reusable-steps/cleanup/action.yml @@ -0,0 +1,8 @@ +name: Run Quickstart cleanup +description: Runs ./quickstart.sh -d +runs: + using: composite + steps: + - shell: bash + run: | + ./quickstart.sh -d diff --git a/.github/reusable-steps/download-quickstart-script/action.yml b/.github/reusable-steps/download-quickstart-script/action.yml new file mode 100644 index 00000000..8d9040a5 --- /dev/null +++ b/.github/reusable-steps/download-quickstart-script/action.yml @@ -0,0 +1,10 @@ +name: Download Quickstart script +description: Downloads https://get.konghq.com/quickstart +runs: + using: composite + steps: + - name: Donwload script + shell: bash + run: | + curl -Ls get.konghq.com/quickstart -o quickstart.sh + chmod +x quickstart.sh diff --git a/.github/reusable-steps/install-deps/action.yml b/.github/reusable-steps/install-deps/action.yml new file mode 100644 index 00000000..3b076a1d --- /dev/null +++ b/.github/reusable-steps/install-deps/action.yml @@ -0,0 +1,9 @@ +name: Install deps +runs: + using: composite + steps: + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: .ruby-version + bundler-cache: true diff --git a/.github/reusable-steps/run-kong-ee/action.yml b/.github/reusable-steps/run-kong-ee/action.yml new file mode 100644 index 00000000..ec69f601 --- /dev/null +++ b/.github/reusable-steps/run-kong-ee/action.yml @@ -0,0 +1,31 @@ +name: Run Kong EE +inputs: + op-token: + required: true + kong-image-tag: + required: true + description: | + Kong Docker image tag to run, 3.6.1.4. + kong-image-name: + description: | + Kong Docker image name to use, e.g. kong-gateway, kong-gateway-dev. + +runs: + using: composite + steps: + - name: Download quickstart script + uses: ./.github/reusable-steps/download-quickstart-script + - name: Download Kong License + uses: Kong/kong-license@master + id: getLicense + with: + op-token: ${{ inputs.op-token }} + - name: Run Kong + shell: bash + env: + KONG_PLUGINS: 'bundled,app-dynamics' + KONG_LICENSE_DATA: ${{ steps.getLicense.outputs.license }} + KONG_IMAGE_TAG: ${{ inputs.kong-image-tag }} + KONG_IMAGE_NAME: ${{ inputs.kong-image-name }} + run: | + ./quickstart.sh -e "KONG_LICENSE_DATA" -e "KONG_PLUGINS" -e "KONG_IMAGE_TAG" -e "KONG_IMAGE_NAME" diff --git a/.github/reusable-steps/run-kong-oss/action.yml b/.github/reusable-steps/run-kong-oss/action.yml new file mode 100644 index 00000000..681a2067 --- /dev/null +++ b/.github/reusable-steps/run-kong-oss/action.yml @@ -0,0 +1,23 @@ +name: Run Kong OSS +inputs: + kong-image-tag: + required: true + description: | + Kong Docker image tag to run, 3.6.1. + kong-image-name: + description: | + Kong Docker image name to use, e.g. kong-gateway, kong-gateway-dev. + +runs: + using: composite + steps: + - name: Download quickstart script + uses: ./.github/reusable-steps/download-quickstart-script + - name: Run Kong + shell: bash + env: + KONG_PLUGINS: 'bundled' + KONG_IMAGE_TAG: ${{ inputs.kong-image-tag }} + KONG_IMAGE_NAME: ${{ inputs.kong-image-name || 'kong' }} + run: | + ./quickstart.sh -e "KONG_PLUGINS" -e "KONG_IMAGE_TAG" -e "KONG_IMAGE_NAME" diff --git a/.github/workflows/copy-data-files.yml b/.github/workflows/copy-data-files.yml new file mode 100644 index 00000000..2911031c --- /dev/null +++ b/.github/workflows/copy-data-files.yml @@ -0,0 +1,32 @@ +name: Copy Latest Data Files +on: + workflow_dispatch: + inputs: + version: + required: true + type: string + description: | + Kong Gateway release, e.x. 3.4.x. + Used by some commands for storing files in the corresponding folder. + +jobs: + copy-data-files: + runs-on: ubuntu-latest + steps: + - name: Check out repo + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - name: Install dependencies + uses: ./.github/reusable-steps/install-deps + - name: Run copy_data_files + run: | + bundle exec ./plugins copy_data_files --version=${{ github.event.inputs.version }} + - name: Create Pull Request + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7 + with: + token: ${{ secrets.PAT }} + title: "Copy latest data files to ${{ github.event.inputs.version }}" + branch: copy-latest-data-files + commit-message: "Copy latest data files to ${{ github.event.inputs.version }}" + delete-branch: true + add-paths: | + ./data/* diff --git a/.github/workflows/copy-examples.yml b/.github/workflows/copy-examples.yml new file mode 100644 index 00000000..f653f11a --- /dev/null +++ b/.github/workflows/copy-examples.yml @@ -0,0 +1,32 @@ +name: Copy Latest Examples +on: + workflow_dispatch: + inputs: + version: + required: true + type: string + description: | + Kong Gateway release, e.x. 3.4.x. + Used by some commands for storing files in the corresponding folder. + +jobs: + copy-examples: + runs-on: ubuntu-latest + steps: + - name: Check out repo + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - name: Install dependencies + uses: ./.github/reusable-steps/install-deps + - name: Run copy_examples + run: | + bundle exec ./plugins copy_examples --version=${{ github.event.inputs.version }} --plugins $(ls ./schemas) --verbose + - name: Create Pull Request + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7 + with: + token: ${{ secrets.PAT }} + title: "Copy latest examples to ${{ github.event.inputs.version }}" + branch: copy-latest-examples + commit-message: "Copy latest examples to ${{ github.event.inputs.version }}" + delete-branch: true + add-paths: | + ./examples/* diff --git a/.github/workflows/copy-schemas.yml b/.github/workflows/copy-schemas.yml new file mode 100644 index 00000000..fdd67d52 --- /dev/null +++ b/.github/workflows/copy-schemas.yml @@ -0,0 +1,32 @@ +name: Copy Latest Schemas +on: + workflow_dispatch: + inputs: + version: + required: true + type: string + description: | + Kong Gateway release, e.x. 3.4.x. + Used by some commands for storing files in the corresponding folder. + +jobs: + copy-schemas: + runs-on: ubuntu-latest + steps: + - name: Check out repo + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - name: Install dependencies + uses: ./.github/reusable-steps/install-deps + - name: Run copy_schemas + run: | + bundle exec ./plugins copy_schemas --version=${{ github.event.inputs.version }} --plugins $(ls ./schemas) --verbose + - name: Create Pull Request + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7 + with: + token: ${{ secrets.PAT }} + title: "Copy latest schemas to ${{ github.event.inputs.version }}" + branch: copy-latest-schemas + commit-message: "Copy latest schemas to ${{ github.event.inputs.version }}" + delete-branch: true + add-paths: | + ./schemas/* diff --git a/.github/workflows/download-schemas.yml b/.github/workflows/download-schemas.yml new file mode 100644 index 00000000..da4d6976 --- /dev/null +++ b/.github/workflows/download-schemas.yml @@ -0,0 +1,53 @@ +name: Download Schemas +on: + workflow_dispatch: + inputs: + kong-image-tag: + required: true + type: string + description: | + Kong Docker image tag to run, 3.6.1.4. + version: + required: true + type: string + description: | + Kong Gateway release, e.x. 3.4.x. + Used by some commands for storing files in the corresponding folder. + kong-image-name: + type: choice + description: | + Kong Docker image name to use, e.g. kong-gateway, kong-gateway-dev. + options: + - kong-gateway + - kong-gateway-dev + +jobs: + download-schemas: + runs-on: ubuntu-latest + steps: + - name: Check out repo + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - name: Install dependencies + uses: ./.github/reusable-steps/install-deps + - name: Run Kong EE + uses: ./.github/reusable-steps/run-kong-ee + with: + op-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} + kong-image-tag: ${{ github.event.inputs.kong-image-tag }} + kong-image-name: ${{ github.event.inputs.kong-image-name }} + - name: Run download_schemas + run: | + bundle exec ./plugins download_schemas --version=${{ github.event.inputs.version }} --plugins $(ls ./schemas) --verbose + - name: Create Pull Request + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7 + with: + token: ${{ secrets.PAT }} + title: "Download Schemas for ${{ github.event.inputs.version }}" + branch: download-schemas + commit-message: "Download Schemas for ${{ github.event.inputs.version }}" + delete-branch: true + add-paths: | + ./schemas/* + - name: Cleanup + if: always() + uses: ./.github/reusable-steps/cleanup diff --git a/.github/workflows/generate-json-schemas.yml b/.github/workflows/generate-json-schemas.yml new file mode 100644 index 00000000..50f08d7f --- /dev/null +++ b/.github/workflows/generate-json-schemas.yml @@ -0,0 +1,32 @@ +name: Generate json schemas +on: + workflow_dispatch: + inputs: + version: + required: true + type: string + description: | + Kong Gateway release, e.x. 3.4.x. + Used by some commands for storing files in the corresponding folder. + +jobs: + generate-json-schemas: + runs-on: ubuntu-latest + steps: + - name: Check out repo + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - name: Install dependencies + uses: ./.github/reusable-steps/install-deps + - name: Run convert_json_schema + run: | + bundle exec ./plugins convert_json_schema --version=${{ github.event.inputs.version }} --plugins $(ls ./schemas) --verbose + - name: Create Pull Request + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7 + with: + token: ${{ secrets.PAT }} + title: "Generate JSON Schemas for ${{ github.event.inputs.version }}" + branch: generate-json-schemas + commit-message: "JSON Schemas for ${{ github.event.inputs.version }}" + delete-branch: true + add-paths: | + ./json_schemas/* diff --git a/.github/workflows/generate-plugin-priorities.yml b/.github/workflows/generate-plugin-priorities.yml new file mode 100644 index 00000000..45eaecdc --- /dev/null +++ b/.github/workflows/generate-plugin-priorities.yml @@ -0,0 +1,68 @@ +name: Generate Plugin Priorities +on: + workflow_dispatch: + inputs: + kong-image-tag: + required: true + type: string + description: | + Kong Docker image tag to run, 3.6.1.4. + version: + required: true + type: string + description: | + Kong Gateway release, e.x. 3.4.x. + Used by some commands for storing files in the corresponding folder. + kong-edition: + required: true + type: choice + options: + - oss + - ee + description: Whether the API running is the OSS or Enterprise version + kong-image-name: + type: choice + description: | + Kong Docker image name to use, e.g. kong-gateway, kong-gateway-dev. + options: + - kong-gateway + - kong-gateway-dev + - kong + +jobs: + generate-plugin-priorities: + runs-on: ubuntu-latest + steps: + - name: Check out repo + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - name: Install dependencies + uses: ./.github/reusable-steps/install-deps + - name: Run Kong EE + if: ${{ github.event.inputs.kong-edition == 'ee' }} + uses: ./.github/reusable-steps/run-kong-ee + with: + op-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} + kong-image-tag: ${{ github.event.inputs.kong-image-tag }} + kong-image-name: ${{ github.event.inputs.kong-image-name }} + - name: Run Kong OSS + if: ${{ github.event.inputs.kong-edition == 'oss' }} + uses: ./.github/reusable-steps/run-kong-oss + with: + kong-image-tag: ${{ github.event.inputs.kong-image-tag }} + kong-image-name: ${{ github.event.inputs.kong-image-name }} + - name: Run generate_plugin_priorities + run: | + bundle exec ./plugins generate_plugin_priorities --type=${{ github.event.inputs.kong-edition }} --version=${{ github.event.inputs.version }} --verbose + - name: Create Pull Request + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7 + with: + token: ${{ secrets.PAT }} + title: "Plugin Priorities for ${{ github.event.inputs.version }}" + branch: plugin-priorities + commit-message: "Plugin Priorities for ${{ github.event.inputs.version }}" + delete-branch: true + add-paths: | + ./data/priorities/* + - name: Cleanup + if: always() + uses: ./.github/reusable-steps/cleanup diff --git a/.github/workflows/generate-referenceable-fields.yml b/.github/workflows/generate-referenceable-fields.yml new file mode 100644 index 00000000..d09e6c51 --- /dev/null +++ b/.github/workflows/generate-referenceable-fields.yml @@ -0,0 +1,53 @@ +name: Generate Referenceable Fields +on: + workflow_dispatch: + inputs: + kong-image-tag: + required: true + type: string + description: | + Kong Docker image tag to run, 3.6.1.4. + version: + required: true + type: string + description: | + Kong Gateway release, e.x. 3.4.x. + Used by some commands for storing files in the corresponding folder. + kong-image-name: + type: choice + description: | + Kong Docker image name to use, e.g. kong-gateway, kong-gateway-dev. + options: + - kong-gateway + - kong-gateway-dev + +jobs: + generate-referenceable-fields: + runs-on: ubuntu-latest + steps: + - name: Check out repo + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - name: Install dependencies + uses: ./.github/reusable-steps/install-deps + - name: Run Kong EE + uses: ./.github/reusable-steps/run-kong-ee + with: + op-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} + kong-image-tag: ${{ github.event.inputs.kong-image-tag }} + kong-image-name: ${{ github.event.inputs.kong-image-name }} + - name: Run generate_referenceable_fields_list + run: | + bundle exec ./plugins generate_referenceable_fields_list --version=${{ github.event.inputs.version }} --plugins $(ls ./schemas) --verbose + - name: Create Pull Request + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7 + with: + token: ${{ secrets.PAT }} + title: "Referenceable fields for ${{ github.event.inputs.version }}" + branch: referenceable-fields + commit-message: "Referenceable fields for ${{ github.event.inputs.version }}" + delete-branch: true + add-paths: | + ./data/referenceable_fields/* + - name: Cleanup + if: always() + uses: ./.github/reusable-steps/cleanup diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml new file mode 100644 index 00000000..1397617b --- /dev/null +++ b/.github/workflows/security.yaml @@ -0,0 +1,15 @@ +on: push + +name: Security + +jobs: + ensure-pinned-actions: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - name: Ensure SHA pinned actions + uses: zgosalvez/github-actions-ensure-sha-pinned-actions@25ed13d0628a1601b4b44048e63cc4328ed03633 # v3 + with: + allowlist: | + Kong/ diff --git a/.github/workflows/sync-docs.yml b/.github/workflows/sync-docs.yml new file mode 100644 index 00000000..9adf5925 --- /dev/null +++ b/.github/workflows/sync-docs.yml @@ -0,0 +1,23 @@ +name: Sync submodule in docs +on: + push: + branches: + - 'main' + +jobs: + sync-repo: + name: Sync submodule in docs + runs-on: ubuntu-latest + steps: + - name: Repository Dispatch + uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3 + with: + token: ${{ secrets.PAT }} + repository: Kong/docs.konghq.com + event-type: PLUGINS_UPDATED + - name: Repository Dispatch + uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3 + with: + token: ${{ secrets.PAT }} + repository: Kong/developer.konghq.com + event-type: PLUGINS_UPDATED diff --git a/.github/workflows/validate_examples.yml b/.github/workflows/validate_examples.yml new file mode 100644 index 00000000..39399ad3 --- /dev/null +++ b/.github/workflows/validate_examples.yml @@ -0,0 +1,43 @@ +name: Validate Examples +on: + workflow_dispatch: + inputs: + kong-image-tag: + required: true + type: string + description: | + Kong Docker image tag to run, 3.6.1.4. + version: + required: true + type: string + description: | + Kong Gateway release, e.x. 3.4.x. + Used by some commands for storing files in the corresponding folder. + kong-image-name: + type: choice + description: | + Kong Docker image name to use, e.g. kong-gateway, kong-gateway-dev. + options: + - kong-gateway + - kong-gateway-dev + +jobs: + validate-examples: + runs-on: ubuntu-latest + steps: + - name: Check out repo + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - name: Install dependencies + uses: ./.github/reusable-steps/install-deps + - name: Run Kong EE + uses: ./.github/reusable-steps/run-kong-ee + with: + op-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} + kong-image-tag: ${{ github.event.inputs.kong-image-tag }} + kong-image-name: ${{ github.event.inputs.kong-image-name }} + - name: Run validate_examples + run: | + bundle exec ./plugins validate_examples --version=${{ github.event.inputs.version }} --plugins $(ls ./schemas) --verbose + - name: Cleanup + if: always() + uses: ./.github/reusable-steps/cleanup diff --git a/.ruby-version b/.ruby-version index ef538c28..4f5e6973 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.1.2 +3.4.5 diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..27967881 --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source 'https://rubygems.org' + +gem 'thor' +gem 'deepsort' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000..642112fd --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,16 @@ +GEM + remote: https://rubygems.org/ + specs: + deepsort (0.5.0) + thor (1.4.0) + +PLATFORMS + arm64-darwin-23 + ruby + +DEPENDENCIES + deepsort + thor + +BUNDLED WITH + 2.5.9 diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..617a0717 --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +admin-spec: + ./plugins convert_json_schema --plugins $$(ls schemas/) --version 3.11.x --skip-custom-annotations --allow-auto-fields; cp -r json_schemas/* ../kong-admin-spec-generator/data/plugins \ No newline at end of file diff --git a/README.md b/README.md index f45c17e9..f14794e3 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,165 @@ gem install thor ## Usage +This toolkit requires an instance of [Kong Gateway Admin API](https://docs.konghq.com/gateway/latest/admin-api/) to be up and running (make sure you are running the Enterprise version). Most of the commands generate requests under the hood against the API. + +### Running different versions of Kong Gateway Admin API locally +The easiest way to run a specific version of the Admin API is with [Gojira](https://github.com/Kong/gojira/tree/master). It provides several [options](https://github.com/Kong/gojira/blob/master/docs/manual.md), but using [kong images](https://github.com/Kong/gojira/blob/master/docs/manual.md#using-kong-release-images-with-gojira) is probably the safest one. + +Note: By default, `Gojira` binds ports to random available ones on the host, so you probably want to [bind them to specific ports](https://github.com/Kong/gojira/blob/master/docs/manual.md#bind-ports-on-the-host). By default, the `toolkit` expects `host` to be `localhost` and `port` `8001`. + +### Demo https://user-images.githubusercontent.com/715229/220340450-5006aefe-e7e4-4b45-9272-d0e8b4543878.mov +## Commands + +Before running any of the commands, make sure you have the right version of Kong Gateway Admin API running. + +### Download Schemas + +Downloads the schemas in json format for the specified list of plugins and writes them into disk. Each schema will be stored under `//.json` + +| Options | Descriptions | +|--------------------------- |-----| +| `version` | **Required**. Kong Gateway release version, e.g. `3.3.x`. | +| `plugins` | **Required**. Space separated list of plugins for which the schemas will be downloaded, .e.g. `acme acl`. Setting it to `$(ls ./schemas)` will download the schemas for all the plugins. | +| `host` | Name of the host in which the API is running. Default: `localhost`. | +| `port` | Port in which the API is listening. Default: `8001`. | +| `destination` | Path to the root folder in which the schemas will be stored. Default: `./schemas` | + +Downloading the schema for `acme`: +```bash +./plugins download_schemas --version=3.3.x --plugins acme +``` + +Downloading schemas for all the plugins: +```bash +./plugins download_schemas --version=3.3.x --plugins $(ls ./schemas) +``` + +### Validate Examples + +Validates plugin examples config against the plugin schema using the [Admin API](https://docs.konghq.com/gateway/latest/admin-api/#validate-a-plugin-configuration-against-the-schema). It will iterate over the specified list of plugins and check whether the example for the specified version is valid. + +| Options | Descriptions | +|--------------------------- |-----| +| `version` | **Required**. Kong Gateway release version, e.g. `3.3.x`. | +| `plugins` | **Required**. Space separated list of plugins to use, .e.g. `acme acl`. | +| `host` | Name of the host in which the API is running. Default: `localhost`. | +| `port` | Port in which the API is listening. Default: `8001`. | +| `source` | Path to the root folder containing the examples. Default: `./examples`. | + +For example, running: +``` +./plugins validate_examples --version 3.4.x --plugins acme --verbose +``` +reads the file `./examples/acme/_3.4.x.yaml` and validates it against the schema using the API. + + +### Copy Examples + +Copies the last (ordered by version) example file stored in `//` and writes it to `//`. + +| Options | Descriptions | +|--------------------------- |-----| +| `version` | **Required**. Kong Gateway release version, e.g. `3.3.x`. The new example file is named after it. | +| `plugins` | **Required**. Space separated list of plugins to use, .e.g. `acme acl`. | +| `source` | Path to the root folder containing the exisitng examples. Default: `./examples`. | + +For example, running: +```bash +./plugins copy_examples --version 3.5.x --plugins acme +``` +copies the previous example (assuming the previous version is `3.4.x`, it copies `./examples/acme/_3.4.x.yaml`) and generates a new file `./examples/acme/_3.5.x.yaml` + +### Generate Referenceable Fields List + +| Options | Descriptions | +|--------------------------- |-----| +| `version` | **Required**. Kong Gateway release version, e.g. `3.3.x`. | +| `plugins` | **Required**. Space separated list of plugins to use, .e.g. `acme acl`. | +| `source` | Path to the folder containing the plugin schemas. Default: `./schemas`. | +| `destination` | Path to the root folder in which the file will be stored. Default: `./data` | + +For example, running: +```bash +./plugins generate_referenceable_fields_list --version 3.4.x --plugins $(ls ./schemas) +``` +generates a file `./data/referenceable_fields/3.4.x.json` containing a list of plugins that have referenceable fields, and their corresponding referenceable fields. + +### Generate Plugin Priorities + +| Options | Descriptions | +|--------------------------- |-----| +| `version` | **Required**. Kong Gateway release version, e.g. `3.3.x`. | +| `host` | Name of the host in which the API is running. Default: `localhost`. | +| `port` | Port in which the API is listening. Default: `8001`. | +| `type` | Whether the API is running the `Enterprise` or `OSS` edition. Enum: `oss` or `ee`. | +| `destination` | Path to the root folder in which the file will be stored. Default: `./data` | + +NOTE: when generating priorities for enterprise, make sure the appdynamics plugin is installed + +For example, running: +```bash +./plugins generate_plugin_priorities --type=ee --version 3.4.x +``` +generates a file `./data/priorities/ee/3.4.x.json` containing a list of plugins and their corresponded priorities order by priority (desc). + +### Copy Schemas + +Copies the last (ordered by version) schema file stored in `//` and writes it to `//`. + +| Options | Descriptions | +|--------------------------- |-----| +| `version` | **Required**. Kong Gateway release version, e.g. `3.3.x`. The new example file is named after it. | +| `plugins` | **Required**. Space separated list of plugins to use, .e.g. `acme acl`. | +| `source` | Path to the root folder containing the exisitng examples. Default: `./schemas`. | + +For example, running: +```bash +./plugins copy_schemas --version 3.5.x --plugins acme +``` +copies the previous schema (assuming the previous version is `3.4.x`, it copies `./schemas/acme/3.4.x.json`) and generates a new file `./schemas/acme/3.5.x.json` + +### Copy Data files + +Copies the last (ordered by version) data files file stored in `.//**/*/` and writes it to `.//**/*/`. + +| Options | Descriptions | +|--------------------------- |-----| +| `version` | **Required**. Kong Gateway release version, e.g. `3.3.x`. The new data file is named after it. | +| `source` | Path to the root folder containing the exisitng examples. Default: `./data`. | + +Example: +```bash +./plugins copy_data_files --version 3.5.x +``` + +### Generate JSON Schemas + +Converts schemas into JSON schemas. + +| Options | Descriptions | +|--------------------------- |-----| +| `version` | **Required**. Kong Gateway release version, e.g. `3.3.x`. The new example file is named after it. | +| `plugins` | **Required**. Space separated list of plugins to use, .e.g. `acme acl`. | +| `source` | Path to the root folder containing the exisiting schemas. Default: `./schemas`. | + +For example, running: +```bash +./plugins convert_json_schema --version 3.9.x --plugins acme +``` +converts `./schemas/acme/3.9.x.json` into a valid JSON schema and writes it to `./json_schemas/acme/3.9.json`. + +## Updating the repo after a new release + +Whenever a new version of Kong Gateway is released, we need run the following commands in order. For all of them, specify all the plugins `--plugins $(ls ./schemas)` + +1. Download Schemas - specify the new version `x.x.x` +1. Copy Examples - specify the previous version `x.x.y` of the example that gets copied +1. Validate Examples - specify the new version `x.x.x` +1. Generate Referenceable Fields List - specify the new version `x.x.x` +1. Generate Priorities List - for `oss` and `ee` and specify the new version `x.x.x` +1. Copy Data files +1. Generate JSON Schemas diff --git a/config/descriptions.yaml b/config/descriptions.yaml new file mode 100644 index 00000000..5c36ecff --- /dev/null +++ b/config/descriptions.yaml @@ -0,0 +1 @@ +protocols: "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls." diff --git a/config/foreign_keys.yaml b/config/foreign_keys.yaml new file mode 100644 index 00000000..6648c961 --- /dev/null +++ b/config/foreign_keys.yaml @@ -0,0 +1,28 @@ +consumer: + additionalProperties: false + description: 'If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.' + properties: + id: + type: string + type: object +consumer_group: + additionalProperties: false + description: If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups + properties: + id: + type: string + type: object +route: + additionalProperties: false + description: 'If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.' + properties: + id: + type: string + type: object +service: + additionalProperties: false + description: 'If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.' + properties: + id: + type: string + type: object diff --git a/data/priorities/ee/2.6.x.json b/data/priorities/ee/2.6.x.json new file mode 100644 index 00000000..bf3c8d63 --- /dev/null +++ b/data/priorities/ee/2.6.x.json @@ -0,0 +1,44 @@ +{ + "pre-function": 1000000, + "bot-detection": 2500, + "route-by-header": 2000, + "cors": 2000, + "session": 1900, + "oauth2-introspection": 1700, + "acme": 1007, + "jwt": 1005, + "oauth2": 1004, + "key-auth": 1003, + "ldap-auth": 1002, + "basic-auth": 1001, + "hmac-auth": 1000, + "grpc-gateway": 998, + "application-registration": 995, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "rate-limiting": 901, + "response-ratelimiting": 900, + "request-transformer-advanced": 802, + "response-transformer": 800, + "response-transformer-advanced": 800, + "aws-lambda": 750, + "proxy-cache": 100, + "proxy-cache-advanced": 100, + "forward-proxy": 50, + "canary": 13, + "prometheus": 13, + "http-log": 12, + "statsd-advanced": 11, + "statsd": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "correlation-id": 1, + "post-function": -1000 +} diff --git a/data/priorities/ee/2.7.x.json b/data/priorities/ee/2.7.x.json new file mode 100644 index 00000000..6c03c832 --- /dev/null +++ b/data/priorities/ee/2.7.x.json @@ -0,0 +1,66 @@ +{ + "pre-function": 1000000, + "zipkin": 100000, + "exit-transformer": 9999, + "bot-detection": 2500, + "cors": 2000, + "route-by-header": 2000, + "session": 1900, + "oauth2-introspection": 1700, + "acme": 1007, + "mtls-auth": 1006, + "degraphql": 1005, + "jwt": 1005, + "oauth2": 1004, + "key-auth-enc": 1003, + "vault-auth": 1003, + "key-auth": 1003, + "ldap-auth-advanced": 1002, + "ldap-auth": 1002, + "basic-auth": 1001, + "openid-connect": 1000, + "hmac-auth": 1000, + "jwt-signer": 999, + "request-validator": 999, + "grpc-gateway": 998, + "application-registration": 995, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "opa": 920, + "graphql-rate-limiting-advanced": 902, + "rate-limiting-advanced": 902, + "rate-limiting": 901, + "response-ratelimiting": 900, + "jq": 811, + "request-transformer-advanced": 802, + "request-transformer": 801, + "response-transformer": 800, + "response-transformer-advanced": 800, + "route-transformer-advanced": 800, + "kafka-upstream": 751, + "aws-lambda": 750, + "azure-functions": 749, + "upstream-timeout": 400, + "proxy-cache": 100, + "proxy-cache-advanced": 100, + "graphql-proxy-cache-advanced": 100, + "forward-proxy": 50, + "canary": 13, + "prometheus": 13, + "http-log": 12, + "statsd-advanced": 11, + "statsd": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "kafka-log": 5, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "correlation-id": 1, + "mocking": -1, + "post-function": -1000 +} diff --git a/data/priorities/ee/2.8.x.json b/data/priorities/ee/2.8.x.json new file mode 100644 index 00000000..6c03c832 --- /dev/null +++ b/data/priorities/ee/2.8.x.json @@ -0,0 +1,66 @@ +{ + "pre-function": 1000000, + "zipkin": 100000, + "exit-transformer": 9999, + "bot-detection": 2500, + "cors": 2000, + "route-by-header": 2000, + "session": 1900, + "oauth2-introspection": 1700, + "acme": 1007, + "mtls-auth": 1006, + "degraphql": 1005, + "jwt": 1005, + "oauth2": 1004, + "key-auth-enc": 1003, + "vault-auth": 1003, + "key-auth": 1003, + "ldap-auth-advanced": 1002, + "ldap-auth": 1002, + "basic-auth": 1001, + "openid-connect": 1000, + "hmac-auth": 1000, + "jwt-signer": 999, + "request-validator": 999, + "grpc-gateway": 998, + "application-registration": 995, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "opa": 920, + "graphql-rate-limiting-advanced": 902, + "rate-limiting-advanced": 902, + "rate-limiting": 901, + "response-ratelimiting": 900, + "jq": 811, + "request-transformer-advanced": 802, + "request-transformer": 801, + "response-transformer": 800, + "response-transformer-advanced": 800, + "route-transformer-advanced": 800, + "kafka-upstream": 751, + "aws-lambda": 750, + "azure-functions": 749, + "upstream-timeout": 400, + "proxy-cache": 100, + "proxy-cache-advanced": 100, + "graphql-proxy-cache-advanced": 100, + "forward-proxy": 50, + "canary": 13, + "prometheus": 13, + "http-log": 12, + "statsd-advanced": 11, + "statsd": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "kafka-log": 5, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "correlation-id": 1, + "mocking": -1, + "post-function": -1000 +} diff --git a/data/priorities/ee/3.0.x.json b/data/priorities/ee/3.0.x.json new file mode 100644 index 00000000..957bae5b --- /dev/null +++ b/data/priorities/ee/3.0.x.json @@ -0,0 +1,71 @@ +{ + "pre-function": 1000000, + "correlation-id": 100001, + "zipkin": 100000, + "exit-transformer": 9999, + "bot-detection": 2500, + "cors": 2000, + "session": 1900, + "acme": 1705, + "oauth2-introspection": 1700, + "mtls-auth": 1600, + "degraphql": 1500, + "jwt": 1450, + "oauth2": 1400, + "vault-auth": 1350, + "key-auth": 1250, + "key-auth-enc": 1250, + "ldap-auth-advanced": 1200, + "ldap-auth": 1200, + "basic-auth": 1100, + "openid-connect": 1050, + "hmac-auth": 1030, + "jwt-signer": 1020, + "websocket-size-limit": 999, + "websocket-validator": 999, + "request-validator": 999, + "grpc-gateway": 998, + "tls-handshake-modifier": 997, + "tls-metadata-headers": 996, + "application-registration": 995, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "opa": 920, + "rate-limiting": 910, + "rate-limiting-advanced": 910, + "graphql-rate-limiting-advanced": 902, + "response-ratelimiting": 900, + "route-by-header": 850, + "jq": 811, + "request-transformer-advanced": 802, + "request-transformer": 801, + "response-transformer-advanced": 800, + "response-transformer": 800, + "route-transformer-advanced": 780, + "kafka-upstream": 751, + "aws-lambda": 750, + "azure-functions": 749, + "upstream-timeout": 400, + "proxy-cache-advanced": 100, + "proxy-cache": 100, + "graphql-proxy-cache-advanced": 99, + "forward-proxy": 50, + "canary": 20, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "statsd-advanced": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "kafka-log": 5, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "mocking": -1, + "post-function": -1000 +} diff --git a/data/priorities/ee/3.1.x.json b/data/priorities/ee/3.1.x.json new file mode 100644 index 00000000..e0ff31f9 --- /dev/null +++ b/data/priorities/ee/3.1.x.json @@ -0,0 +1,76 @@ +{ + "pre-function": 1000000, + "app-dynamics": 999999, + "correlation-id": 100001, + "zipkin": 100000, + "exit-transformer": 9999, + "bot-detection": 2500, + "cors": 2000, + "jwe-decrypt": 1999, + "session": 1900, + "acme": 1705, + "oauth2-introspection": 1700, + "mtls-auth": 1600, + "degraphql": 1500, + "jwt": 1450, + "oauth2": 1400, + "vault-auth": 1350, + "key-auth-enc": 1250, + "key-auth": 1250, + "ldap-auth-advanced": 1200, + "ldap-auth": 1200, + "basic-auth": 1100, + "openid-connect": 1050, + "hmac-auth": 1030, + "jwt-signer": 1020, + "xml-threat-protection": 999, + "websocket-validator": 999, + "websocket-size-limit": 999, + "request-validator": 999, + "grpc-gateway": 998, + "tls-handshake-modifier": 997, + "tls-metadata-headers": 996, + "application-registration": 995, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "opa": 920, + "rate-limiting-advanced": 910, + "rate-limiting": 910, + "graphql-rate-limiting-advanced": 902, + "response-ratelimiting": 900, + "saml": 900, + "route-by-header": 850, + "oas-validation": 850, + "jq": 811, + "request-transformer-advanced": 802, + "request-transformer": 801, + "response-transformer-advanced": 800, + "response-transformer": 800, + "route-transformer-advanced": 780, + "kafka-upstream": 751, + "aws-lambda": 750, + "azure-functions": 749, + "upstream-timeout": 400, + "proxy-cache": 100, + "proxy-cache-advanced": 100, + "graphql-proxy-cache-advanced": 99, + "forward-proxy": 50, + "canary": 20, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd-advanced": 11, + "statsd": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "kafka-log": 5, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "mocking": -1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/ee/3.10.x.json b/data/priorities/ee/3.10.x.json new file mode 100644 index 00000000..bf765560 --- /dev/null +++ b/data/priorities/ee/3.10.x.json @@ -0,0 +1,99 @@ +{ + "pre-function": 1000000, + "app-dynamics": 999999, + "correlation-id": 100001, + "zipkin": 100000, + "exit-transformer": 9999, + "bot-detection": 2500, + "cors": 2000, + "jwe-decrypt": 1999, + "session": 1900, + "acme": 1705, + "oauth2-introspection": 1700, + "mtls-auth": 1600, + "degraphql": 1500, + "jwt": 1450, + "oauth2": 1400, + "vault-auth": 1350, + "key-auth": 1250, + "key-auth-enc": 1250, + "ldap-auth": 1200, + "ldap-auth-advanced": 1200, + "basic-auth": 1100, + "openid-connect": 1050, + "hmac-auth": 1030, + "jwt-signer": 1020, + "saml": 1010, + "header-cert-auth": 1009, + "json-threat-protection": 1009, + "xml-threat-protection": 1008, + "injection-protection": 1007, + "websocket-validator": 1006, + "websocket-size-limit": 1003, + "request-validator": 999, + "grpc-gateway": 998, + "tls-handshake-modifier": 997, + "tls-metadata-headers": 996, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "opa": 920, + "service-protection": 915, + "rate-limiting": 910, + "rate-limiting-advanced": 910, + "ai-rate-limiting-advanced": 905, + "graphql-rate-limiting-advanced": 902, + "response-ratelimiting": 900, + "route-by-header": 850, + "oas-validation": 840, + "request-callout": 812, + "jq": 811, + "request-transformer-advanced": 802, + "request-transformer": 801, + "response-transformer": 800, + "response-transformer-advanced": 800, + "route-transformer-advanced": 780, + "redirect": 779, + "ai-rag-injector": 778, + "ai-request-transformer": 777, + "ai-sanitizer": 776, + "ai-semantic-prompt-guard": 775, + "ai-azure-content-safety": 774, + "ai-prompt-template": 773, + "ai-prompt-decorator": 772, + "ai-prompt-guard": 771, + "ai-proxy": 770, + "ai-proxy-advanced": 770, + "ai-response-transformer": 768, + "ai-semantic-cache": 765, + "standard-webhooks": 760, + "upstream-oauth": 760, + "confluent-consume": 754, + "kafka-consume": 753, + "confluent": 752, + "kafka-upstream": 751, + "aws-lambda": 750, + "azure-functions": 749, + "upstream-timeout": 400, + "proxy-cache": 100, + "proxy-cache-advanced": 100, + "graphql-proxy-cache-advanced": 99, + "forward-proxy": 50, + "canary": 20, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "statsd-advanced": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "kafka-log": 5, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "mocking": -1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/ee/3.11.x.json b/data/priorities/ee/3.11.x.json new file mode 100644 index 00000000..5086815f --- /dev/null +++ b/data/priorities/ee/3.11.x.json @@ -0,0 +1,103 @@ +{ + "pre-function": 1000000, + "app-dynamics": 999999, + "correlation-id": 100001, + "zipkin": 100000, + "exit-transformer": 9999, + "bot-detection": 2500, + "cors": 2000, + "jwe-decrypt": 1999, + "session": 1900, + "acme": 1705, + "oauth2-introspection": 1700, + "mtls-auth": 1600, + "degraphql": 1500, + "jwt": 1450, + "oauth2": 1400, + "vault-auth": 1350, + "key-auth": 1250, + "key-auth-enc": 1250, + "ldap-auth": 1200, + "ldap-auth-advanced": 1200, + "basic-auth": 1100, + "openid-connect": 1050, + "hmac-auth": 1030, + "jwt-signer": 1020, + "saml": 1010, + "header-cert-auth": 1009, + "json-threat-protection": 1009, + "xml-threat-protection": 1008, + "injection-protection": 1007, + "websocket-validator": 1006, + "websocket-size-limit": 1003, + "request-validator": 999, + "grpc-gateway": 998, + "tls-handshake-modifier": 997, + "tls-metadata-headers": 996, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "opa": 920, + "service-protection": 915, + "rate-limiting": 910, + "rate-limiting-advanced": 910, + "ai-rate-limiting-advanced": 905, + "graphql-rate-limiting-advanced": 902, + "response-ratelimiting": 900, + "route-by-header": 850, + "oas-validation": 840, + "request-callout": 812, + "jq": 811, + "datakit": 810, + "request-transformer-advanced": 802, + "request-transformer": 801, + "response-transformer": 800, + "response-transformer-advanced": 800, + "ai-aws-guardrails": 781, + "route-transformer-advanced": 780, + "redirect": 779, + "ai-rag-injector": 778, + "ai-request-transformer": 777, + "ai-sanitizer": 776, + "ai-semantic-prompt-guard": 775, + "ai-azure-content-safety": 774, + "ai-prompt-template": 773, + "ai-prompt-decorator": 772, + "ai-prompt-guard": 771, + "ai-proxy": 770, + "ai-proxy-advanced": 770, + "ai-prompt-compressor": 769, + "ai-response-transformer": 768, + "ai-semantic-cache": 765, + "standard-webhooks": 760, + "upstream-oauth": 760, + "solace-upstream": 755, + "confluent-consume": 754, + "kafka-consume": 753, + "confluent": 752, + "kafka-upstream": 751, + "aws-lambda": 750, + "azure-functions": 749, + "upstream-timeout": 400, + "proxy-cache": 100, + "proxy-cache-advanced": 100, + "graphql-proxy-cache-advanced": 99, + "forward-proxy": 50, + "canary": 20, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "statsd-advanced": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "kafka-log": 5, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "mocking": -1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/ee/3.2.x.json b/data/priorities/ee/3.2.x.json new file mode 100644 index 00000000..df26515a --- /dev/null +++ b/data/priorities/ee/3.2.x.json @@ -0,0 +1,76 @@ +{ + "pre-function": 1000000, + "app-dynamics": 999999, + "correlation-id": 100001, + "zipkin": 100000, + "exit-transformer": 9999, + "bot-detection": 2500, + "cors": 2000, + "jwe-decrypt": 1999, + "session": 1900, + "acme": 1705, + "oauth2-introspection": 1700, + "mtls-auth": 1600, + "degraphql": 1500, + "jwt": 1450, + "oauth2": 1400, + "vault-auth": 1350, + "key-auth": 1250, + "key-auth-enc": 1250, + "ldap-auth-advanced": 1200, + "ldap-auth": 1200, + "basic-auth": 1100, + "openid-connect": 1050, + "hmac-auth": 1030, + "jwt-signer": 1020, + "request-validator": 999, + "xml-threat-protection": 999, + "websocket-size-limit": 999, + "websocket-validator": 999, + "grpc-gateway": 998, + "tls-handshake-modifier": 997, + "tls-metadata-headers": 996, + "application-registration": 995, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "opa": 920, + "rate-limiting-advanced": 910, + "rate-limiting": 910, + "graphql-rate-limiting-advanced": 902, + "saml": 900, + "response-ratelimiting": 900, + "oas-validation": 850, + "route-by-header": 850, + "jq": 811, + "request-transformer-advanced": 802, + "request-transformer": 801, + "response-transformer": 800, + "response-transformer-advanced": 800, + "route-transformer-advanced": 780, + "kafka-upstream": 751, + "aws-lambda": 750, + "azure-functions": 749, + "upstream-timeout": 400, + "proxy-cache": 100, + "proxy-cache-advanced": 100, + "graphql-proxy-cache-advanced": 99, + "forward-proxy": 50, + "canary": 20, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "statsd-advanced": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "kafka-log": 5, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "mocking": -1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/ee/3.3.x.json b/data/priorities/ee/3.3.x.json new file mode 100644 index 00000000..1b89b4ec --- /dev/null +++ b/data/priorities/ee/3.3.x.json @@ -0,0 +1,76 @@ +{ + "pre-function": 1000000, + "app-dynamics": 999999, + "correlation-id": 100001, + "zipkin": 100000, + "exit-transformer": 9999, + "bot-detection": 2500, + "cors": 2000, + "jwe-decrypt": 1999, + "session": 1900, + "acme": 1705, + "oauth2-introspection": 1700, + "mtls-auth": 1600, + "degraphql": 1500, + "jwt": 1450, + "oauth2": 1400, + "vault-auth": 1350, + "key-auth": 1250, + "key-auth-enc": 1250, + "ldap-auth-advanced": 1200, + "ldap-auth": 1200, + "basic-auth": 1100, + "openid-connect": 1050, + "hmac-auth": 1030, + "jwt-signer": 1020, + "websocket-validator": 999, + "websocket-size-limit": 999, + "xml-threat-protection": 999, + "request-validator": 999, + "grpc-gateway": 998, + "tls-handshake-modifier": 997, + "tls-metadata-headers": 996, + "application-registration": 995, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "opa": 920, + "rate-limiting-advanced": 910, + "rate-limiting": 910, + "graphql-rate-limiting-advanced": 902, + "saml": 900, + "response-ratelimiting": 900, + "oas-validation": 850, + "route-by-header": 850, + "jq": 811, + "request-transformer-advanced": 802, + "request-transformer": 801, + "response-transformer-advanced": 800, + "response-transformer": 800, + "route-transformer-advanced": 780, + "kafka-upstream": 751, + "aws-lambda": 750, + "azure-functions": 749, + "upstream-timeout": 400, + "proxy-cache": 100, + "proxy-cache-advanced": 100, + "graphql-proxy-cache-advanced": 99, + "forward-proxy": 50, + "canary": 20, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "statsd-advanced": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "kafka-log": 5, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "mocking": -1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/ee/3.4.x.json b/data/priorities/ee/3.4.x.json new file mode 100644 index 00000000..627c04f8 --- /dev/null +++ b/data/priorities/ee/3.4.x.json @@ -0,0 +1,76 @@ +{ + "pre-function": 1000000, + "app-dynamics": 999999, + "correlation-id": 100001, + "zipkin": 100000, + "exit-transformer": 9999, + "bot-detection": 2500, + "cors": 2000, + "jwe-decrypt": 1999, + "session": 1900, + "acme": 1705, + "oauth2-introspection": 1700, + "mtls-auth": 1600, + "degraphql": 1500, + "jwt": 1450, + "oauth2": 1400, + "vault-auth": 1350, + "key-auth": 1250, + "key-auth-enc": 1250, + "ldap-auth": 1200, + "ldap-auth-advanced": 1200, + "basic-auth": 1100, + "openid-connect": 1050, + "hmac-auth": 1030, + "jwt-signer": 1020, + "saml": 1010, + "xml-threat-protection": 1008, + "websocket-validator": 1006, + "websocket-size-limit": 1003, + "request-validator": 999, + "grpc-gateway": 998, + "tls-handshake-modifier": 997, + "tls-metadata-headers": 996, + "application-registration": 995, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "opa": 920, + "rate-limiting": 910, + "rate-limiting-advanced": 910, + "graphql-rate-limiting-advanced": 902, + "response-ratelimiting": 900, + "route-by-header": 850, + "oas-validation": 840, + "jq": 811, + "request-transformer-advanced": 802, + "request-transformer": 801, + "response-transformer": 800, + "response-transformer-advanced": 800, + "route-transformer-advanced": 780, + "kafka-upstream": 751, + "aws-lambda": 750, + "azure-functions": 749, + "upstream-timeout": 400, + "proxy-cache": 100, + "proxy-cache-advanced": 100, + "graphql-proxy-cache-advanced": 99, + "forward-proxy": 50, + "canary": 20, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "statsd-advanced": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "kafka-log": 5, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "mocking": -1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/ee/3.5.x.json b/data/priorities/ee/3.5.x.json new file mode 100644 index 00000000..627c04f8 --- /dev/null +++ b/data/priorities/ee/3.5.x.json @@ -0,0 +1,76 @@ +{ + "pre-function": 1000000, + "app-dynamics": 999999, + "correlation-id": 100001, + "zipkin": 100000, + "exit-transformer": 9999, + "bot-detection": 2500, + "cors": 2000, + "jwe-decrypt": 1999, + "session": 1900, + "acme": 1705, + "oauth2-introspection": 1700, + "mtls-auth": 1600, + "degraphql": 1500, + "jwt": 1450, + "oauth2": 1400, + "vault-auth": 1350, + "key-auth": 1250, + "key-auth-enc": 1250, + "ldap-auth": 1200, + "ldap-auth-advanced": 1200, + "basic-auth": 1100, + "openid-connect": 1050, + "hmac-auth": 1030, + "jwt-signer": 1020, + "saml": 1010, + "xml-threat-protection": 1008, + "websocket-validator": 1006, + "websocket-size-limit": 1003, + "request-validator": 999, + "grpc-gateway": 998, + "tls-handshake-modifier": 997, + "tls-metadata-headers": 996, + "application-registration": 995, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "opa": 920, + "rate-limiting": 910, + "rate-limiting-advanced": 910, + "graphql-rate-limiting-advanced": 902, + "response-ratelimiting": 900, + "route-by-header": 850, + "oas-validation": 840, + "jq": 811, + "request-transformer-advanced": 802, + "request-transformer": 801, + "response-transformer": 800, + "response-transformer-advanced": 800, + "route-transformer-advanced": 780, + "kafka-upstream": 751, + "aws-lambda": 750, + "azure-functions": 749, + "upstream-timeout": 400, + "proxy-cache": 100, + "proxy-cache-advanced": 100, + "graphql-proxy-cache-advanced": 99, + "forward-proxy": 50, + "canary": 20, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "statsd-advanced": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "kafka-log": 5, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "mocking": -1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/ee/3.6.x.json b/data/priorities/ee/3.6.x.json new file mode 100644 index 00000000..9374139f --- /dev/null +++ b/data/priorities/ee/3.6.x.json @@ -0,0 +1,81 @@ +{ + "pre-function": 1000000, + "correlation-id": 100001, + "zipkin": 100000, + "exit-transformer": 9999, + "bot-detection": 2500, + "cors": 2000, + "jwe-decrypt": 1999, + "session": 1900, + "acme": 1705, + "oauth2-introspection": 1700, + "mtls-auth": 1600, + "degraphql": 1500, + "jwt": 1450, + "oauth2": 1400, + "vault-auth": 1350, + "key-auth": 1250, + "key-auth-enc": 1250, + "ldap-auth": 1200, + "ldap-auth-advanced": 1200, + "basic-auth": 1100, + "openid-connect": 1050, + "hmac-auth": 1030, + "jwt-signer": 1020, + "saml": 1010, + "xml-threat-protection": 1008, + "websocket-validator": 1006, + "websocket-size-limit": 1003, + "request-validator": 999, + "grpc-gateway": 998, + "tls-handshake-modifier": 997, + "tls-metadata-headers": 996, + "application-registration": 995, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "opa": 920, + "rate-limiting": 910, + "rate-limiting-advanced": 910, + "graphql-rate-limiting-advanced": 902, + "response-ratelimiting": 900, + "route-by-header": 850, + "oas-validation": 840, + "jq": 811, + "request-transformer-advanced": 802, + "request-transformer": 801, + "response-transformer": 800, + "response-transformer-advanced": 800, + "route-transformer-advanced": 780, + "ai-request-transformer": 777, + "ai-prompt-template": 773, + "ai-prompt-decorator": 772, + "ai-prompt-guard": 771, + "ai-proxy": 770, + "ai-response-transformer": 769, + "kafka-upstream": 751, + "aws-lambda": 750, + "azure-functions": 749, + "upstream-timeout": 400, + "proxy-cache": 100, + "proxy-cache-advanced": 100, + "graphql-proxy-cache-advanced": 99, + "forward-proxy": 50, + "canary": 20, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "statsd-advanced": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "kafka-log": 5, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "mocking": -1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/ee/3.7.x.json b/data/priorities/ee/3.7.x.json new file mode 100644 index 00000000..83411a74 --- /dev/null +++ b/data/priorities/ee/3.7.x.json @@ -0,0 +1,83 @@ +{ + "pre-function": 1000000, + "correlation-id": 100001, + "zipkin": 100000, + "exit-transformer": 9999, + "bot-detection": 2500, + "cors": 2000, + "jwe-decrypt": 1999, + "session": 1900, + "acme": 1705, + "oauth2-introspection": 1700, + "mtls-auth": 1600, + "degraphql": 1500, + "jwt": 1450, + "oauth2": 1400, + "vault-auth": 1350, + "key-auth": 1250, + "key-auth-enc": 1250, + "ldap-auth": 1200, + "ldap-auth-advanced": 1200, + "basic-auth": 1100, + "openid-connect": 1050, + "hmac-auth": 1030, + "jwt-signer": 1020, + "saml": 1010, + "xml-threat-protection": 1008, + "websocket-validator": 1006, + "websocket-size-limit": 1003, + "request-validator": 999, + "grpc-gateway": 998, + "tls-handshake-modifier": 997, + "tls-metadata-headers": 996, + "application-registration": 995, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "opa": 920, + "rate-limiting": 910, + "rate-limiting-advanced": 910, + "ai-rate-limiting-advanced": 905, + "graphql-rate-limiting-advanced": 902, + "response-ratelimiting": 900, + "route-by-header": 850, + "oas-validation": 840, + "jq": 811, + "request-transformer-advanced": 802, + "request-transformer": 801, + "response-transformer": 800, + "response-transformer-advanced": 800, + "route-transformer-advanced": 780, + "ai-request-transformer": 777, + "ai-azure-content-safety": 774, + "ai-prompt-template": 773, + "ai-prompt-decorator": 772, + "ai-prompt-guard": 771, + "ai-proxy": 770, + "ai-response-transformer": 769, + "kafka-upstream": 751, + "aws-lambda": 750, + "azure-functions": 749, + "upstream-timeout": 400, + "proxy-cache": 100, + "proxy-cache-advanced": 100, + "graphql-proxy-cache-advanced": 99, + "forward-proxy": 50, + "canary": 20, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "statsd-advanced": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "kafka-log": 5, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "mocking": -1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/ee/3.8.x.json b/data/priorities/ee/3.8.x.json new file mode 100644 index 00000000..b51f6e2a --- /dev/null +++ b/data/priorities/ee/3.8.x.json @@ -0,0 +1,91 @@ +{ + "pre-function": 1000000, + "app-dynamics": 999999, + "correlation-id": 100001, + "zipkin": 100000, + "exit-transformer": 9999, + "bot-detection": 2500, + "cors": 2000, + "jwe-decrypt": 1999, + "session": 1900, + "acme": 1705, + "oauth2-introspection": 1700, + "mtls-auth": 1600, + "degraphql": 1500, + "jwt": 1450, + "oauth2": 1400, + "vault-auth": 1350, + "key-auth": 1250, + "key-auth-enc": 1250, + "ldap-auth": 1200, + "ldap-auth-advanced": 1200, + "basic-auth": 1100, + "openid-connect": 1050, + "hmac-auth": 1030, + "jwt-signer": 1020, + "saml": 1010, + "header-cert-auth": 1009, + "json-threat-protection": 1009, + "xml-threat-protection": 1008, + "websocket-validator": 1006, + "websocket-size-limit": 1003, + "request-validator": 999, + "grpc-gateway": 998, + "tls-handshake-modifier": 997, + "tls-metadata-headers": 996, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "opa": 920, + "rate-limiting": 910, + "rate-limiting-advanced": 910, + "ai-rate-limiting-advanced": 905, + "graphql-rate-limiting-advanced": 902, + "response-ratelimiting": 900, + "route-by-header": 850, + "oas-validation": 840, + "jq": 811, + "request-transformer-advanced": 802, + "request-transformer": 801, + "response-transformer": 800, + "response-transformer-advanced": 800, + "route-transformer-advanced": 780, + "ai-request-transformer": 777, + "ai-semantic-prompt-guard": 775, + "ai-azure-content-safety": 774, + "ai-prompt-template": 773, + "ai-prompt-decorator": 772, + "ai-prompt-guard": 771, + "ai-proxy": 770, + "ai-proxy-advanced": 770, + "ai-response-transformer": 769, + "ai-semantic-cache": 765, + "standard-webhooks": 760, + "upstream-oauth": 760, + "confluent": 752, + "kafka-upstream": 751, + "aws-lambda": 750, + "azure-functions": 749, + "upstream-timeout": 400, + "proxy-cache": 100, + "proxy-cache-advanced": 100, + "graphql-proxy-cache-advanced": 99, + "forward-proxy": 50, + "canary": 20, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "statsd-advanced": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "kafka-log": 5, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "mocking": -1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/ee/3.9.x.json b/data/priorities/ee/3.9.x.json new file mode 100644 index 00000000..75c7cb74 --- /dev/null +++ b/data/priorities/ee/3.9.x.json @@ -0,0 +1,94 @@ +{ + "pre-function": 1000000, + "app-dynamics": 999999, + "correlation-id": 100001, + "zipkin": 100000, + "exit-transformer": 9999, + "bot-detection": 2500, + "cors": 2000, + "jwe-decrypt": 1999, + "session": 1900, + "acme": 1705, + "oauth2-introspection": 1700, + "mtls-auth": 1600, + "degraphql": 1500, + "jwt": 1450, + "oauth2": 1400, + "vault-auth": 1350, + "key-auth": 1250, + "key-auth-enc": 1250, + "ldap-auth": 1200, + "ldap-auth-advanced": 1200, + "basic-auth": 1100, + "openid-connect": 1050, + "hmac-auth": 1030, + "jwt-signer": 1020, + "saml": 1010, + "header-cert-auth": 1009, + "json-threat-protection": 1009, + "xml-threat-protection": 1008, + "injection-protection": 1007, + "websocket-validator": 1006, + "websocket-size-limit": 1003, + "request-validator": 999, + "grpc-gateway": 998, + "tls-handshake-modifier": 997, + "tls-metadata-headers": 996, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "opa": 920, + "service-protection": 915, + "rate-limiting": 910, + "rate-limiting-advanced": 910, + "ai-rate-limiting-advanced": 905, + "graphql-rate-limiting-advanced": 902, + "response-ratelimiting": 900, + "route-by-header": 850, + "oas-validation": 840, + "jq": 811, + "request-transformer-advanced": 802, + "request-transformer": 801, + "response-transformer": 800, + "response-transformer-advanced": 800, + "route-transformer-advanced": 780, + "redirect": 779, + "ai-request-transformer": 777, + "ai-semantic-prompt-guard": 775, + "ai-azure-content-safety": 774, + "ai-prompt-template": 773, + "ai-prompt-decorator": 772, + "ai-prompt-guard": 771, + "ai-proxy": 770, + "ai-proxy-advanced": 770, + "ai-response-transformer": 768, + "ai-semantic-cache": 765, + "standard-webhooks": 760, + "upstream-oauth": 760, + "confluent": 752, + "kafka-upstream": 751, + "aws-lambda": 750, + "azure-functions": 749, + "upstream-timeout": 400, + "proxy-cache": 100, + "proxy-cache-advanced": 100, + "graphql-proxy-cache-advanced": 99, + "forward-proxy": 50, + "canary": 20, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "statsd-advanced": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "kafka-log": 5, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "mocking": -1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/oss/2.6.x.json b/data/priorities/oss/2.6.x.json new file mode 100644 index 00000000..fc638e1b --- /dev/null +++ b/data/priorities/oss/2.6.x.json @@ -0,0 +1,35 @@ +{ + "pre-function": 1000000, + "bot-detection": 2500, + "cors": 2000, + "session": 1900, + "acme": 1007, + "jwt": 1005, + "oauth2": 1004, + "key-auth": 1003, + "ldap-auth": 1002, + "basic-auth": 1001, + "hmac-auth": 1000, + "grpc-gateway": 998, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "rate-limiting": 901, + "response-ratelimiting": 900, + "response-transformer": 800, + "aws-lambda": 750, + "proxy-cache": 100, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "correlation-id": 1, + "post-function": -1000 +} diff --git a/data/priorities/oss/2.7.x.json b/data/priorities/oss/2.7.x.json new file mode 100644 index 00000000..96da224e --- /dev/null +++ b/data/priorities/oss/2.7.x.json @@ -0,0 +1,38 @@ +{ + "pre-function": 1000000, + "zipkin": 100000, + "bot-detection": 2500, + "cors": 2000, + "session": 1900, + "acme": 1007, + "jwt": 1005, + "oauth2": 1004, + "key-auth": 1003, + "ldap-auth": 1002, + "basic-auth": 1001, + "hmac-auth": 1000, + "grpc-gateway": 998, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "rate-limiting": 901, + "response-ratelimiting": 900, + "request-transformer": 801, + "response-transformer": 800, + "aws-lambda": 750, + "azure-functions": 749, + "proxy-cache": 100, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "correlation-id": 1, + "post-function": -1000 +} diff --git a/data/priorities/oss/2.8.x.json b/data/priorities/oss/2.8.x.json new file mode 100644 index 00000000..96da224e --- /dev/null +++ b/data/priorities/oss/2.8.x.json @@ -0,0 +1,38 @@ +{ + "pre-function": 1000000, + "zipkin": 100000, + "bot-detection": 2500, + "cors": 2000, + "session": 1900, + "acme": 1007, + "jwt": 1005, + "oauth2": 1004, + "key-auth": 1003, + "ldap-auth": 1002, + "basic-auth": 1001, + "hmac-auth": 1000, + "grpc-gateway": 998, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "rate-limiting": 901, + "response-ratelimiting": 900, + "request-transformer": 801, + "response-transformer": 800, + "aws-lambda": 750, + "azure-functions": 749, + "proxy-cache": 100, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "correlation-id": 1, + "post-function": -1000 +} diff --git a/data/priorities/oss/3.0.x.json b/data/priorities/oss/3.0.x.json new file mode 100644 index 00000000..273152dd --- /dev/null +++ b/data/priorities/oss/3.0.x.json @@ -0,0 +1,39 @@ +{ + "pre-function": 1000000, + "zipkin": 100000, + "bot-detection": 2500, + "cors": 2000, + "session": 1900, + "acme": 1705, + "jwt": 1450, + "oauth2": 1400, + "key-auth": 1250, + "ldap-auth": 1200, + "basic-auth": 1100, + "hmac-auth": 1030, + "grpc-gateway": 998, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "rate-limiting": 910, + "response-ratelimiting": 900, + "request-transformer": 801, + "response-transformer": 800, + "aws-lambda": 750, + "azure-functions": 749, + "proxy-cache": 100, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "correlation-id": 1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/oss/3.1.x.json b/data/priorities/oss/3.1.x.json new file mode 100644 index 00000000..273152dd --- /dev/null +++ b/data/priorities/oss/3.1.x.json @@ -0,0 +1,39 @@ +{ + "pre-function": 1000000, + "zipkin": 100000, + "bot-detection": 2500, + "cors": 2000, + "session": 1900, + "acme": 1705, + "jwt": 1450, + "oauth2": 1400, + "key-auth": 1250, + "ldap-auth": 1200, + "basic-auth": 1100, + "hmac-auth": 1030, + "grpc-gateway": 998, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "rate-limiting": 910, + "response-ratelimiting": 900, + "request-transformer": 801, + "response-transformer": 800, + "aws-lambda": 750, + "azure-functions": 749, + "proxy-cache": 100, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "correlation-id": 1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/oss/3.10.x.json b/data/priorities/oss/3.10.x.json new file mode 100644 index 00000000..b5b4aa12 --- /dev/null +++ b/data/priorities/oss/3.10.x.json @@ -0,0 +1,47 @@ +{ + "pre-function": 1000000, + "correlation-id": 100001, + "zipkin": 100000, + "bot-detection": 2500, + "cors": 2000, + "session": 1900, + "acme": 1705, + "jwt": 1450, + "oauth2": 1400, + "key-auth": 1250, + "ldap-auth": 1200, + "basic-auth": 1100, + "hmac-auth": 1030, + "grpc-gateway": 998, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "rate-limiting": 910, + "response-ratelimiting": 900, + "request-transformer": 801, + "response-transformer": 800, + "redirect": 779, + "ai-request-transformer": 777, + "ai-prompt-template": 773, + "ai-prompt-decorator": 772, + "ai-prompt-guard": 771, + "ai-proxy": 770, + "ai-response-transformer": 768, + "standard-webhooks": 760, + "aws-lambda": 750, + "azure-functions": 749, + "proxy-cache": 100, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/oss/3.11.x.json b/data/priorities/oss/3.11.x.json new file mode 100644 index 00000000..b5b4aa12 --- /dev/null +++ b/data/priorities/oss/3.11.x.json @@ -0,0 +1,47 @@ +{ + "pre-function": 1000000, + "correlation-id": 100001, + "zipkin": 100000, + "bot-detection": 2500, + "cors": 2000, + "session": 1900, + "acme": 1705, + "jwt": 1450, + "oauth2": 1400, + "key-auth": 1250, + "ldap-auth": 1200, + "basic-auth": 1100, + "hmac-auth": 1030, + "grpc-gateway": 998, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "rate-limiting": 910, + "response-ratelimiting": 900, + "request-transformer": 801, + "response-transformer": 800, + "redirect": 779, + "ai-request-transformer": 777, + "ai-prompt-template": 773, + "ai-prompt-decorator": 772, + "ai-prompt-guard": 771, + "ai-proxy": 770, + "ai-response-transformer": 768, + "standard-webhooks": 760, + "aws-lambda": 750, + "azure-functions": 749, + "proxy-cache": 100, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/oss/3.2.x.json b/data/priorities/oss/3.2.x.json new file mode 100644 index 00000000..273152dd --- /dev/null +++ b/data/priorities/oss/3.2.x.json @@ -0,0 +1,39 @@ +{ + "pre-function": 1000000, + "zipkin": 100000, + "bot-detection": 2500, + "cors": 2000, + "session": 1900, + "acme": 1705, + "jwt": 1450, + "oauth2": 1400, + "key-auth": 1250, + "ldap-auth": 1200, + "basic-auth": 1100, + "hmac-auth": 1030, + "grpc-gateway": 998, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "rate-limiting": 910, + "response-ratelimiting": 900, + "request-transformer": 801, + "response-transformer": 800, + "aws-lambda": 750, + "azure-functions": 749, + "proxy-cache": 100, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "correlation-id": 1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/oss/3.3.x.json b/data/priorities/oss/3.3.x.json new file mode 100644 index 00000000..273152dd --- /dev/null +++ b/data/priorities/oss/3.3.x.json @@ -0,0 +1,39 @@ +{ + "pre-function": 1000000, + "zipkin": 100000, + "bot-detection": 2500, + "cors": 2000, + "session": 1900, + "acme": 1705, + "jwt": 1450, + "oauth2": 1400, + "key-auth": 1250, + "ldap-auth": 1200, + "basic-auth": 1100, + "hmac-auth": 1030, + "grpc-gateway": 998, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "rate-limiting": 910, + "response-ratelimiting": 900, + "request-transformer": 801, + "response-transformer": 800, + "aws-lambda": 750, + "azure-functions": 749, + "proxy-cache": 100, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "correlation-id": 1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/oss/3.4.x.json b/data/priorities/oss/3.4.x.json new file mode 100644 index 00000000..273152dd --- /dev/null +++ b/data/priorities/oss/3.4.x.json @@ -0,0 +1,39 @@ +{ + "pre-function": 1000000, + "zipkin": 100000, + "bot-detection": 2500, + "cors": 2000, + "session": 1900, + "acme": 1705, + "jwt": 1450, + "oauth2": 1400, + "key-auth": 1250, + "ldap-auth": 1200, + "basic-auth": 1100, + "hmac-auth": 1030, + "grpc-gateway": 998, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "rate-limiting": 910, + "response-ratelimiting": 900, + "request-transformer": 801, + "response-transformer": 800, + "aws-lambda": 750, + "azure-functions": 749, + "proxy-cache": 100, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "correlation-id": 1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/oss/3.5.x.json b/data/priorities/oss/3.5.x.json new file mode 100644 index 00000000..273152dd --- /dev/null +++ b/data/priorities/oss/3.5.x.json @@ -0,0 +1,39 @@ +{ + "pre-function": 1000000, + "zipkin": 100000, + "bot-detection": 2500, + "cors": 2000, + "session": 1900, + "acme": 1705, + "jwt": 1450, + "oauth2": 1400, + "key-auth": 1250, + "ldap-auth": 1200, + "basic-auth": 1100, + "hmac-auth": 1030, + "grpc-gateway": 998, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "rate-limiting": 910, + "response-ratelimiting": 900, + "request-transformer": 801, + "response-transformer": 800, + "aws-lambda": 750, + "azure-functions": 749, + "proxy-cache": 100, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "correlation-id": 1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/oss/3.6.x.json b/data/priorities/oss/3.6.x.json new file mode 100644 index 00000000..f1d4cd82 --- /dev/null +++ b/data/priorities/oss/3.6.x.json @@ -0,0 +1,45 @@ +{ + "pre-function": 1000000, + "zipkin": 100000, + "bot-detection": 2500, + "cors": 2000, + "session": 1900, + "acme": 1705, + "jwt": 1450, + "oauth2": 1400, + "key-auth": 1250, + "ldap-auth": 1200, + "basic-auth": 1100, + "hmac-auth": 1030, + "grpc-gateway": 998, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "rate-limiting": 910, + "response-ratelimiting": 900, + "request-transformer": 801, + "response-transformer": 800, + "ai-request-transformer": 777, + "ai-prompt-template": 773, + "ai-prompt-decorator": 772, + "ai-prompt-guard": 771, + "ai-proxy": 770, + "ai-response-transformer": 769, + "aws-lambda": 750, + "azure-functions": 749, + "proxy-cache": 100, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "correlation-id": 1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/oss/3.7.x.json b/data/priorities/oss/3.7.x.json new file mode 100644 index 00000000..f1d4cd82 --- /dev/null +++ b/data/priorities/oss/3.7.x.json @@ -0,0 +1,45 @@ +{ + "pre-function": 1000000, + "zipkin": 100000, + "bot-detection": 2500, + "cors": 2000, + "session": 1900, + "acme": 1705, + "jwt": 1450, + "oauth2": 1400, + "key-auth": 1250, + "ldap-auth": 1200, + "basic-auth": 1100, + "hmac-auth": 1030, + "grpc-gateway": 998, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "rate-limiting": 910, + "response-ratelimiting": 900, + "request-transformer": 801, + "response-transformer": 800, + "ai-request-transformer": 777, + "ai-prompt-template": 773, + "ai-prompt-decorator": 772, + "ai-prompt-guard": 771, + "ai-proxy": 770, + "ai-response-transformer": 769, + "aws-lambda": 750, + "azure-functions": 749, + "proxy-cache": 100, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "correlation-id": 1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/oss/3.8.x.json b/data/priorities/oss/3.8.x.json new file mode 100644 index 00000000..039222ef --- /dev/null +++ b/data/priorities/oss/3.8.x.json @@ -0,0 +1,46 @@ +{ + "pre-function": 1000000, + "zipkin": 100000, + "bot-detection": 2500, + "cors": 2000, + "session": 1900, + "acme": 1705, + "jwt": 1450, + "oauth2": 1400, + "key-auth": 1250, + "ldap-auth": 1200, + "basic-auth": 1100, + "hmac-auth": 1030, + "grpc-gateway": 998, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "rate-limiting": 910, + "response-ratelimiting": 900, + "request-transformer": 801, + "response-transformer": 800, + "ai-request-transformer": 777, + "ai-prompt-template": 773, + "ai-prompt-decorator": 772, + "ai-prompt-guard": 771, + "ai-proxy": 770, + "ai-response-transformer": 769, + "standard-webhooks": 760, + "aws-lambda": 750, + "azure-functions": 749, + "proxy-cache": 100, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "correlation-id": 1, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/priorities/oss/3.9.x.json b/data/priorities/oss/3.9.x.json new file mode 100644 index 00000000..b5b4aa12 --- /dev/null +++ b/data/priorities/oss/3.9.x.json @@ -0,0 +1,47 @@ +{ + "pre-function": 1000000, + "correlation-id": 100001, + "zipkin": 100000, + "bot-detection": 2500, + "cors": 2000, + "session": 1900, + "acme": 1705, + "jwt": 1450, + "oauth2": 1400, + "key-auth": 1250, + "ldap-auth": 1200, + "basic-auth": 1100, + "hmac-auth": 1030, + "grpc-gateway": 998, + "ip-restriction": 990, + "request-size-limiting": 951, + "acl": 950, + "rate-limiting": 910, + "response-ratelimiting": 900, + "request-transformer": 801, + "response-transformer": 800, + "redirect": 779, + "ai-request-transformer": 777, + "ai-prompt-template": 773, + "ai-prompt-decorator": 772, + "ai-prompt-guard": 771, + "ai-proxy": 770, + "ai-response-transformer": 768, + "standard-webhooks": 760, + "aws-lambda": 750, + "azure-functions": 749, + "proxy-cache": 100, + "opentelemetry": 14, + "prometheus": 13, + "http-log": 12, + "statsd": 11, + "datadog": 10, + "file-log": 9, + "udp-log": 8, + "tcp-log": 7, + "loggly": 6, + "syslog": 4, + "grpc-web": 3, + "request-termination": 2, + "post-function": -1000 +} \ No newline at end of file diff --git a/data/referenceable_fields/3.10.x.json b/data/referenceable_fields/3.10.x.json new file mode 100644 index 00000000..63994128 --- /dev/null +++ b/data/referenceable_fields/3.10.x.json @@ -0,0 +1,358 @@ +{ + "acme": [ + "config.account_email", + "config.eab_kid", + "config.eab_hmac_key", + "config.storage_config.redis.username", + "config.storage_config.redis.password", + "config.storage_config.consul.token", + "config.storage_config.vault.token" + ], + "ai-azure-content-safety": [ + "config.content_safety_url", + "config.content_safety_key" + ], + "ai-proxy": [ + "config.auth.header_name", + "config.auth.header_value", + "config.auth.param_name", + "config.auth.param_value", + "config.auth.azure_client_id", + "config.auth.azure_client_secret", + "config.auth.azure_tenant_id", + "config.auth.gcp_service_account_json", + "config.auth.aws_access_key_id", + "config.auth.aws_secret_access_key" + ], + "ai-proxy-advanced": [ + "config.embeddings.auth.header_name", + "config.embeddings.auth.header_value", + "config.embeddings.auth.param_name", + "config.embeddings.auth.param_value", + "config.embeddings.auth.azure_client_id", + "config.embeddings.auth.azure_client_secret", + "config.embeddings.auth.azure_tenant_id", + "config.embeddings.auth.gcp_service_account_json", + "config.embeddings.auth.aws_access_key_id", + "config.embeddings.auth.aws_secret_access_key", + "config.vectordb.redis.username", + "config.vectordb.redis.password", + "config.vectordb.redis.sentinel_username", + "config.vectordb.redis.sentinel_password", + "config.vectordb.pgvector.user", + "config.vectordb.pgvector.password", + "config.targets.auth.header_name", + "config.targets.auth.header_value", + "config.targets.auth.param_name", + "config.targets.auth.param_value", + "config.targets.auth.azure_client_id", + "config.targets.auth.azure_client_secret", + "config.targets.auth.azure_tenant_id", + "config.targets.auth.gcp_service_account_json", + "config.targets.auth.aws_access_key_id", + "config.targets.auth.aws_secret_access_key" + ], + "ai-rag-injector": [ + "config.embeddings.auth.header_name", + "config.embeddings.auth.header_value", + "config.embeddings.auth.param_name", + "config.embeddings.auth.param_value", + "config.embeddings.auth.azure_client_id", + "config.embeddings.auth.azure_client_secret", + "config.embeddings.auth.azure_tenant_id", + "config.embeddings.auth.gcp_service_account_json", + "config.embeddings.auth.aws_access_key_id", + "config.embeddings.auth.aws_secret_access_key", + "config.vectordb.redis.username", + "config.vectordb.redis.password", + "config.vectordb.redis.sentinel_username", + "config.vectordb.redis.sentinel_password", + "config.vectordb.pgvector.user", + "config.vectordb.pgvector.password" + ], + "ai-rate-limiting-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "ai-request-transformer": [ + "config.llm.auth.header_name", + "config.llm.auth.header_value", + "config.llm.auth.param_name", + "config.llm.auth.param_value", + "config.llm.auth.azure_client_id", + "config.llm.auth.azure_client_secret", + "config.llm.auth.azure_tenant_id", + "config.llm.auth.gcp_service_account_json", + "config.llm.auth.aws_access_key_id", + "config.llm.auth.aws_secret_access_key" + ], + "ai-response-transformer": [ + "config.llm.auth.header_name", + "config.llm.auth.header_value", + "config.llm.auth.param_name", + "config.llm.auth.param_value", + "config.llm.auth.azure_client_id", + "config.llm.auth.azure_client_secret", + "config.llm.auth.azure_tenant_id", + "config.llm.auth.gcp_service_account_json", + "config.llm.auth.aws_access_key_id", + "config.llm.auth.aws_secret_access_key" + ], + "ai-semantic-cache": [ + "config.embeddings.auth.header_name", + "config.embeddings.auth.header_value", + "config.embeddings.auth.param_name", + "config.embeddings.auth.param_value", + "config.embeddings.auth.azure_client_id", + "config.embeddings.auth.azure_client_secret", + "config.embeddings.auth.azure_tenant_id", + "config.embeddings.auth.gcp_service_account_json", + "config.embeddings.auth.aws_access_key_id", + "config.embeddings.auth.aws_secret_access_key", + "config.vectordb.redis.username", + "config.vectordb.redis.password", + "config.vectordb.redis.sentinel_username", + "config.vectordb.redis.sentinel_password", + "config.vectordb.pgvector.user", + "config.vectordb.pgvector.password" + ], + "ai-semantic-prompt-guard": [ + "config.embeddings.auth.header_name", + "config.embeddings.auth.header_value", + "config.embeddings.auth.param_name", + "config.embeddings.auth.param_value", + "config.embeddings.auth.azure_client_id", + "config.embeddings.auth.azure_client_secret", + "config.embeddings.auth.azure_tenant_id", + "config.embeddings.auth.gcp_service_account_json", + "config.embeddings.auth.aws_access_key_id", + "config.embeddings.auth.aws_secret_access_key", + "config.vectordb.redis.username", + "config.vectordb.redis.password", + "config.vectordb.redis.sentinel_username", + "config.vectordb.redis.sentinel_password", + "config.vectordb.pgvector.user", + "config.vectordb.pgvector.password" + ], + "aws-lambda": [ + "config.aws_key", + "config.aws_secret", + "config.aws_assume_role_arn" + ], + "azure-functions": [ + "config.apikey", + "config.clientid" + ], + "confluent": [ + "config.cluster_api_key", + "config.cluster_api_secret", + "config.confluent_cloud_api_key", + "config.confluent_cloud_api_secret" + ], + "confluent-consume": [ + "config.cluster_api_key", + "config.cluster_api_secret", + "config.confluent_cloud_api_key", + "config.confluent_cloud_api_secret" + ], + "datadog": [ + "config.host" + ], + "datadog-tracing": [ + "config.endpoint" + ], + "forward-proxy": [ + "config.auth_username", + "config.auth_password" + ], + "graphql-proxy-cache-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "graphql-rate-limiting-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "http-log": [ + "config.http_endpoint", + "config.headers" + ], + "jwt-signer": [ + "config.access_token_keyset_client_username", + "config.access_token_keyset_client_password", + "config.access_token_jwks_uri_client_username", + "config.access_token_jwks_uri_client_password", + "config.channel_token_keyset_client_username", + "config.channel_token_keyset_client_password", + "config.channel_token_jwks_uri_client_username", + "config.channel_token_jwks_uri_client_password" + ], + "kafka-consume": [ + "config.authentication.user", + "config.authentication.password" + ], + "kafka-log": [ + "config.authentication.user", + "config.authentication.password" + ], + "kafka-upstream": [ + "config.authentication.user", + "config.authentication.password" + ], + "konnect-application-auth": [ + "config.v2_strategies.openid_connect.config.client_id", + "config.v2_strategies.openid_connect.config.client_secret", + "config.v2_strategies.openid_connect.config.client_jwk.k", + "config.v2_strategies.openid_connect.config.client_jwk.d", + "config.v2_strategies.openid_connect.config.client_jwk.p", + "config.v2_strategies.openid_connect.config.client_jwk.q", + "config.v2_strategies.openid_connect.config.client_jwk.dp", + "config.v2_strategies.openid_connect.config.client_jwk.dq", + "config.v2_strategies.openid_connect.config.client_jwk.qi", + "config.v2_strategies.openid_connect.config.client_jwk.oth", + "config.v2_strategies.openid_connect.config.client_jwk.r", + "config.v2_strategies.openid_connect.config.client_jwk.t", + "config.v2_strategies.openid_connect.config.login_redirect_uri", + "config.v2_strategies.openid_connect.config.logout_redirect_uri", + "config.v2_strategies.openid_connect.config.scopes", + "config.v2_strategies.openid_connect.config.introspection_headers_values", + "config.v2_strategies.openid_connect.config.session_secret", + "config.v2_strategies.openid_connect.config.redis.username", + "config.v2_strategies.openid_connect.config.redis.password", + "config.v2_strategies.openid_connect.config.redis.sentinel_username", + "config.v2_strategies.openid_connect.config.redis.sentinel_password", + "config.v2_strategies.openid_connect.config.http_proxy_authorization", + "config.v2_strategies.openid_connect.config.https_proxy_authorization", + "config.v2_strategies.openid_connect.config.cluster_cache_redis.username", + "config.v2_strategies.openid_connect.config.cluster_cache_redis.password", + "config.v2_strategies.openid_connect.config.cluster_cache_redis.sentinel_username", + "config.v2_strategies.openid_connect.config.cluster_cache_redis.sentinel_password" + ], + "ldap-auth-advanced": [ + "config.ldap_password", + "config.bind_dn" + ], + "loggly": [ + "config.key" + ], + "oauth2-introspection": [ + "config.authorization_value" + ], + "openid-connect": [ + "config.client_id", + "config.client_secret", + "config.client_jwk.k", + "config.client_jwk.d", + "config.client_jwk.p", + "config.client_jwk.q", + "config.client_jwk.dp", + "config.client_jwk.dq", + "config.client_jwk.qi", + "config.client_jwk.oth", + "config.client_jwk.r", + "config.client_jwk.t", + "config.login_redirect_uri", + "config.logout_redirect_uri", + "config.scopes", + "config.introspection_headers_values", + "config.session_secret", + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password", + "config.http_proxy_authorization", + "config.https_proxy_authorization", + "config.cluster_cache_redis.username", + "config.cluster_cache_redis.password", + "config.cluster_cache_redis.sentinel_username", + "config.cluster_cache_redis.sentinel_password" + ], + "opentelemetry": [ + "config.traces_endpoint", + "config.logs_endpoint", + "config.headers" + ], + "proxy-cache-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "rate-limiting": [ + "config.redis.username", + "config.redis.password" + ], + "rate-limiting-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "request-callout": [ + "config.callouts.request.http_opts.proxy.auth_username", + "config.callouts.request.http_opts.proxy.auth_password", + "config.cache.redis.username", + "config.cache.redis.password", + "config.cache.redis.sentinel_username", + "config.cache.redis.sentinel_password" + ], + "request-transformer-advanced": [ + "config.rename.body", + "config.rename.headers", + "config.rename.querystring", + "config.replace.body", + "config.replace.headers", + "config.replace.querystring", + "config.add.body", + "config.add.headers", + "config.add.querystring", + "config.append.body", + "config.append.headers", + "config.append.querystring" + ], + "response-ratelimiting": [ + "config.redis.username", + "config.redis.password" + ], + "saml": [ + "config.idp_certificate", + "config.response_encryption_key", + "config.request_signing_key", + "config.request_signing_certificate", + "config.session_secret", + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "service-protection": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "session": [ + "config.secret" + ], + "standard-webhooks": [ + "config.secret_v1" + ], + "upstream-oauth": [ + "config.oauth.token_headers", + "config.oauth.token_post_args", + "config.oauth.client_id", + "config.oauth.client_secret", + "config.oauth.username", + "config.oauth.password", + "config.cache.redis.username", + "config.cache.redis.password", + "config.cache.redis.sentinel_username", + "config.cache.redis.sentinel_password" + ] +} \ No newline at end of file diff --git a/data/referenceable_fields/3.11.x.json b/data/referenceable_fields/3.11.x.json new file mode 100644 index 00000000..d74a28ee --- /dev/null +++ b/data/referenceable_fields/3.11.x.json @@ -0,0 +1,316 @@ +{ + "acme": [ + "config.account_email", + "config.eab_kid", + "config.eab_hmac_key", + "config.storage_config.redis.username", + "config.storage_config.redis.password", + "config.storage_config.consul.token", + "config.storage_config.vault.token" + ], + "ai-azure-content-safety": [ + "config.content_safety_url", + "config.content_safety_key" + ], + "ai-proxy": [ + "config.auth.header_name", + "config.auth.header_value", + "config.auth.param_name", + "config.auth.param_value", + "config.auth.azure_client_id", + "config.auth.azure_client_secret", + "config.auth.azure_tenant_id", + "config.auth.gcp_service_account_json", + "config.auth.aws_access_key_id", + "config.auth.aws_secret_access_key" + ], + "ai-proxy-advanced": [ + "config.embeddings.auth.header_name", + "config.embeddings.auth.header_value", + "config.embeddings.auth.param_name", + "config.embeddings.auth.param_value", + "config.embeddings.auth.azure_client_id", + "config.embeddings.auth.azure_client_secret", + "config.embeddings.auth.azure_tenant_id", + "config.embeddings.auth.gcp_service_account_json", + "config.embeddings.auth.aws_access_key_id", + "config.embeddings.auth.aws_secret_access_key", + "config.vectordb.redis.username", + "config.vectordb.redis.password", + "config.vectordb.redis.sentinel_username", + "config.vectordb.redis.sentinel_password", + "config.targets.auth.header_name", + "config.targets.auth.header_value", + "config.targets.auth.param_name", + "config.targets.auth.param_value", + "config.targets.auth.azure_client_id", + "config.targets.auth.azure_client_secret", + "config.targets.auth.azure_tenant_id", + "config.targets.auth.gcp_service_account_json", + "config.targets.auth.aws_access_key_id", + "config.targets.auth.aws_secret_access_key" + ], + "ai-rate-limiting-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "ai-request-transformer": [ + "config.llm.auth.header_name", + "config.llm.auth.header_value", + "config.llm.auth.param_name", + "config.llm.auth.param_value", + "config.llm.auth.azure_client_id", + "config.llm.auth.azure_client_secret", + "config.llm.auth.azure_tenant_id", + "config.llm.auth.gcp_service_account_json", + "config.llm.auth.aws_access_key_id", + "config.llm.auth.aws_secret_access_key" + ], + "ai-response-transformer": [ + "config.llm.auth.header_name", + "config.llm.auth.header_value", + "config.llm.auth.param_name", + "config.llm.auth.param_value", + "config.llm.auth.azure_client_id", + "config.llm.auth.azure_client_secret", + "config.llm.auth.azure_tenant_id", + "config.llm.auth.gcp_service_account_json", + "config.llm.auth.aws_access_key_id", + "config.llm.auth.aws_secret_access_key" + ], + "ai-semantic-cache": [ + "config.embeddings.auth.header_name", + "config.embeddings.auth.header_value", + "config.embeddings.auth.param_name", + "config.embeddings.auth.param_value", + "config.embeddings.auth.azure_client_id", + "config.embeddings.auth.azure_client_secret", + "config.embeddings.auth.azure_tenant_id", + "config.embeddings.auth.gcp_service_account_json", + "config.embeddings.auth.aws_access_key_id", + "config.embeddings.auth.aws_secret_access_key", + "config.vectordb.redis.username", + "config.vectordb.redis.password", + "config.vectordb.redis.sentinel_username", + "config.vectordb.redis.sentinel_password" + ], + "ai-semantic-prompt-guard": [ + "config.embeddings.auth.header_name", + "config.embeddings.auth.header_value", + "config.embeddings.auth.param_name", + "config.embeddings.auth.param_value", + "config.embeddings.auth.azure_client_id", + "config.embeddings.auth.azure_client_secret", + "config.embeddings.auth.azure_tenant_id", + "config.embeddings.auth.gcp_service_account_json", + "config.embeddings.auth.aws_access_key_id", + "config.embeddings.auth.aws_secret_access_key", + "config.vectordb.redis.username", + "config.vectordb.redis.password", + "config.vectordb.redis.sentinel_username", + "config.vectordb.redis.sentinel_password" + ], + "aws-lambda": [ + "config.aws_key", + "config.aws_secret", + "config.aws_assume_role_arn" + ], + "azure-functions": [ + "config.apikey", + "config.clientid" + ], + "confluent": [ + "config.cluster_api_key", + "config.cluster_api_secret", + "config.confluent_cloud_api_key", + "config.confluent_cloud_api_secret" + ], + "datadog": [ + "config.host" + ], + "datadog-tracing": [ + "config.endpoint" + ], + "forward-proxy": [ + "config.auth_username", + "config.auth_password" + ], + "graphql-proxy-cache-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "graphql-rate-limiting-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "http-log": [ + "config.http_endpoint", + "config.headers" + ], + "jwt-signer": [ + "config.access_token_keyset_client_username", + "config.access_token_keyset_client_password", + "config.access_token_jwks_uri_client_username", + "config.access_token_jwks_uri_client_password", + "config.channel_token_keyset_client_username", + "config.channel_token_keyset_client_password", + "config.channel_token_jwks_uri_client_username", + "config.channel_token_jwks_uri_client_password" + ], + "kafka-log": [ + "config.authentication.user", + "config.authentication.password" + ], + "kafka-upstream": [ + "config.authentication.user", + "config.authentication.password" + ], + "konnect-application-auth": [ + "config.v2_strategies.openid_connect.config.client_id", + "config.v2_strategies.openid_connect.config.client_secret", + "config.v2_strategies.openid_connect.config.client_jwk.k", + "config.v2_strategies.openid_connect.config.client_jwk.d", + "config.v2_strategies.openid_connect.config.client_jwk.p", + "config.v2_strategies.openid_connect.config.client_jwk.q", + "config.v2_strategies.openid_connect.config.client_jwk.dp", + "config.v2_strategies.openid_connect.config.client_jwk.dq", + "config.v2_strategies.openid_connect.config.client_jwk.qi", + "config.v2_strategies.openid_connect.config.client_jwk.oth", + "config.v2_strategies.openid_connect.config.client_jwk.r", + "config.v2_strategies.openid_connect.config.client_jwk.t", + "config.v2_strategies.openid_connect.config.login_redirect_uri", + "config.v2_strategies.openid_connect.config.logout_redirect_uri", + "config.v2_strategies.openid_connect.config.scopes", + "config.v2_strategies.openid_connect.config.introspection_headers_values", + "config.v2_strategies.openid_connect.config.session_secret", + "config.v2_strategies.openid_connect.config.redis.username", + "config.v2_strategies.openid_connect.config.redis.password", + "config.v2_strategies.openid_connect.config.redis.sentinel_username", + "config.v2_strategies.openid_connect.config.redis.sentinel_password", + "config.v2_strategies.openid_connect.config.http_proxy_authorization", + "config.v2_strategies.openid_connect.config.https_proxy_authorization", + "config.v2_strategies.openid_connect.config.cluster_cache_redis.username", + "config.v2_strategies.openid_connect.config.cluster_cache_redis.password", + "config.v2_strategies.openid_connect.config.cluster_cache_redis.sentinel_username", + "config.v2_strategies.openid_connect.config.cluster_cache_redis.sentinel_password" + ], + "ldap-auth-advanced": [ + "config.ldap_password", + "config.bind_dn" + ], + "loggly": [ + "config.key" + ], + "oauth2-introspection": [ + "config.authorization_value" + ], + "openid-connect": [ + "config.client_id", + "config.client_secret", + "config.client_jwk.k", + "config.client_jwk.d", + "config.client_jwk.p", + "config.client_jwk.q", + "config.client_jwk.dp", + "config.client_jwk.dq", + "config.client_jwk.qi", + "config.client_jwk.oth", + "config.client_jwk.r", + "config.client_jwk.t", + "config.login_redirect_uri", + "config.logout_redirect_uri", + "config.scopes", + "config.introspection_headers_values", + "config.session_secret", + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password", + "config.http_proxy_authorization", + "config.https_proxy_authorization", + "config.cluster_cache_redis.username", + "config.cluster_cache_redis.password", + "config.cluster_cache_redis.sentinel_username", + "config.cluster_cache_redis.sentinel_password" + ], + "opentelemetry": [ + "config.traces_endpoint", + "config.logs_endpoint", + "config.headers" + ], + "proxy-cache-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "rate-limiting": [ + "config.redis.username", + "config.redis.password" + ], + "rate-limiting-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "request-transformer-advanced": [ + "config.rename.body", + "config.rename.headers", + "config.rename.querystring", + "config.replace.body", + "config.replace.headers", + "config.replace.querystring", + "config.add.body", + "config.add.headers", + "config.add.querystring", + "config.append.body", + "config.append.headers", + "config.append.querystring" + ], + "response-ratelimiting": [ + "config.redis.username", + "config.redis.password" + ], + "saml": [ + "config.idp_certificate", + "config.response_encryption_key", + "config.request_signing_key", + "config.request_signing_certificate", + "config.session_secret", + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "service-protection": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "session": [ + "config.secret" + ], + "standard-webhooks": [ + "config.secret_v1" + ], + "upstream-oauth": [ + "config.oauth.token_headers", + "config.oauth.token_post_args", + "config.oauth.client_id", + "config.oauth.client_secret", + "config.oauth.username", + "config.oauth.password", + "config.cache.redis.username", + "config.cache.redis.password", + "config.cache.redis.sentinel_username", + "config.cache.redis.sentinel_password" + ] +} \ No newline at end of file diff --git a/data/referenceable_fields/3.4.x.json b/data/referenceable_fields/3.4.x.json index 9922651b..93298c02 100644 --- a/data/referenceable_fields/3.4.x.json +++ b/data/referenceable_fields/3.4.x.json @@ -1,4 +1,24 @@ { + "acme": [ + "config.account_email", + "config.eab_kid", + "config.eab_hmac_key", + "config.storage_config.redis.auth", + "config.storage_config.consul.token", + "config.storage_config.vault.token" + ], + "aws-lambda": [ + "config.aws_key", + "config.aws_secret", + "config.aws_assume_role_arn" + ], + "azure-functions": [ + "config.apikey", + "config.clientid" + ], + "datadog": [ + "config.host" + ], "forward-proxy": [ "config.auth_username", "config.auth_password" @@ -9,6 +29,10 @@ "config.redis.sentinel_username", "config.redis.sentinel_password" ], + "http-log": [ + "config.http_endpoint", + "config.headers" + ], "kafka-log": [ "config.authentication.user", "config.authentication.password" @@ -21,6 +45,12 @@ "config.ldap_password", "config.bind_dn" ], + "loggly": [ + "config.key" + ], + "oauth2-introspection": [ + "config.authorization_value" + ], "openid-connect": [ "config.client_id", "config.client_secret", @@ -34,16 +64,28 @@ "config.client_jwk.oth", "config.client_jwk.r", "config.client_jwk.t", + "config.login_redirect_uri", + "config.logout_redirect_uri", + "config.scopes", + "config.introspection_headers_values", "config.session_secret", "config.session_redis_username", "config.session_redis_password" ], + "opentelemetry": [ + "config.endpoint", + "config.headers" + ], "proxy-cache-advanced": [ "config.redis.username", "config.redis.password", "config.redis.sentinel_username", "config.redis.sentinel_password" ], + "rate-limiting": [ + "config.redis_password", + "config.redis_username" + ], "rate-limiting-advanced": [ "config.redis.username", "config.redis.password", @@ -64,6 +106,10 @@ "config.append.headers", "config.append.querystring" ], + "response-ratelimiting": [ + "config.redis_password", + "config.redis_username" + ], "saml": [ "config.idp_certificate", "config.response_encryption_key", @@ -73,44 +119,6 @@ "config.session_redis_username", "config.session_redis_password" ], - "acme": [ - "config.account_email", - "config.eab_kid", - "config.eab_hmac_key", - "config.storage_config.redis.auth", - "config.storage_config.consul.token", - "config.storage_config.vault.token" - ], - "aws-lambda": [ - "config.aws_key", - "config.aws_secret", - "config.aws_assume_role_arn" - ], - "azure-functions": [ - "config.apikey", - "config.clientid" - ], - "datadog": [ - "config.host" - ], - "http-log": [ - "config.http_endpoint", - "config.headers" - ], - "loggly": [ - "config.key" - ], - "opentelemetry": [ - "config.headers" - ], - "rate-limiting": [ - "config.redis_password", - "config.redis_username" - ], - "response-ratelimiting": [ - "config.redis_password", - "config.redis_username" - ], "session": [ "config.secret" ] diff --git a/data/referenceable_fields/3.5.x.json b/data/referenceable_fields/3.5.x.json new file mode 100644 index 00000000..ed1c3d41 --- /dev/null +++ b/data/referenceable_fields/3.5.x.json @@ -0,0 +1,118 @@ +{ + "acme": [ + "config.account_email", + "config.eab_kid", + "config.eab_hmac_key", + "config.storage_config.redis.auth", + "config.storage_config.consul.token", + "config.storage_config.vault.token" + ], + "aws-lambda": [ + "config.aws_key", + "config.aws_secret", + "config.aws_assume_role_arn" + ], + "azure-functions": [ + "config.apikey", + "config.clientid" + ], + "datadog": [ + "config.host" + ], + "forward-proxy": [ + "config.auth_username", + "config.auth_password" + ], + "graphql-rate-limiting-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "http-log": [ + "config.http_endpoint", + "config.headers" + ], + "kafka-log": [ + "config.authentication.user", + "config.authentication.password" + ], + "kafka-upstream": [ + "config.authentication.user", + "config.authentication.password" + ], + "ldap-auth-advanced": [ + "config.ldap_password", + "config.bind_dn" + ], + "loggly": [ + "config.key" + ], + "openid-connect": [ + "config.client_id", + "config.client_secret", + "config.client_jwk.k", + "config.client_jwk.d", + "config.client_jwk.p", + "config.client_jwk.q", + "config.client_jwk.dp", + "config.client_jwk.dq", + "config.client_jwk.qi", + "config.client_jwk.oth", + "config.client_jwk.r", + "config.client_jwk.t", + "config.session_secret", + "config.session_redis_username", + "config.session_redis_password" + ], + "opentelemetry": [ + "config.endpoint", + "config.headers" + ], + "proxy-cache-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "rate-limiting": [ + "config.redis_password", + "config.redis_username" + ], + "rate-limiting-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "request-transformer-advanced": [ + "config.rename.body", + "config.rename.headers", + "config.rename.querystring", + "config.replace.body", + "config.replace.headers", + "config.replace.querystring", + "config.add.body", + "config.add.headers", + "config.add.querystring", + "config.append.body", + "config.append.headers", + "config.append.querystring" + ], + "response-ratelimiting": [ + "config.redis_password", + "config.redis_username" + ], + "saml": [ + "config.idp_certificate", + "config.response_encryption_key", + "config.request_signing_key", + "config.request_signing_certificate", + "config.session_secret", + "config.session_redis_username", + "config.session_redis_password" + ], + "session": [ + "config.secret" + ] +} \ No newline at end of file diff --git a/data/referenceable_fields/3.6.x.json b/data/referenceable_fields/3.6.x.json new file mode 100644 index 00000000..9727279e --- /dev/null +++ b/data/referenceable_fields/3.6.x.json @@ -0,0 +1,144 @@ +{ + "acme": [ + "config.account_email", + "config.eab_kid", + "config.eab_hmac_key", + "config.storage_config.redis.username", + "config.storage_config.redis.password", + "config.storage_config.consul.token", + "config.storage_config.vault.token" + ], + "ai-proxy": [ + "config.auth.header_name", + "config.auth.header_value", + "config.auth.param_name", + "config.auth.param_value" + ], + "ai-request-transformer": [ + "config.llm.auth.header_name", + "config.llm.auth.header_value", + "config.llm.auth.param_name", + "config.llm.auth.param_value" + ], + "ai-response-transformer": [ + "config.llm.auth.header_name", + "config.llm.auth.header_value", + "config.llm.auth.param_name", + "config.llm.auth.param_value" + ], + "aws-lambda": [ + "config.aws_key", + "config.aws_secret", + "config.aws_assume_role_arn" + ], + "azure-functions": [ + "config.apikey", + "config.clientid" + ], + "datadog": [ + "config.host" + ], + "forward-proxy": [ + "config.auth_username", + "config.auth_password" + ], + "graphql-rate-limiting-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "http-log": [ + "config.http_endpoint", + "config.headers" + ], + "kafka-log": [ + "config.authentication.user", + "config.authentication.password" + ], + "kafka-upstream": [ + "config.authentication.user", + "config.authentication.password" + ], + "ldap-auth-advanced": [ + "config.ldap_password", + "config.bind_dn" + ], + "loggly": [ + "config.key" + ], + "oauth2-introspection": [ + "config.authorization_value" + ], + "openid-connect": [ + "config.client_id", + "config.client_secret", + "config.client_jwk.k", + "config.client_jwk.d", + "config.client_jwk.p", + "config.client_jwk.q", + "config.client_jwk.dp", + "config.client_jwk.dq", + "config.client_jwk.qi", + "config.client_jwk.oth", + "config.client_jwk.r", + "config.client_jwk.t", + "config.login_redirect_uri", + "config.logout_redirect_uri", + "config.scopes", + "config.introspection_headers_values", + "config.session_secret", + "config.session_redis_username", + "config.session_redis_password" + ], + "opentelemetry": [ + "config.endpoint", + "config.headers" + ], + "proxy-cache-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "rate-limiting": [ + "config.redis.username", + "config.redis.password" + ], + "rate-limiting-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "request-transformer-advanced": [ + "config.rename.body", + "config.rename.headers", + "config.rename.querystring", + "config.replace.body", + "config.replace.headers", + "config.replace.querystring", + "config.add.body", + "config.add.headers", + "config.add.querystring", + "config.append.body", + "config.append.headers", + "config.append.querystring" + ], + "response-ratelimiting": [ + "config.redis.username", + "config.redis.password" + ], + "saml": [ + "config.idp_certificate", + "config.response_encryption_key", + "config.request_signing_key", + "config.request_signing_certificate", + "config.session_secret", + "config.session_redis_username", + "config.session_redis_password" + ], + "session": [ + "config.secret" + ] +} \ No newline at end of file diff --git a/data/referenceable_fields/3.7.x.json b/data/referenceable_fields/3.7.x.json new file mode 100644 index 00000000..f59fcd74 --- /dev/null +++ b/data/referenceable_fields/3.7.x.json @@ -0,0 +1,179 @@ +{ + "acme": [ + "config.account_email", + "config.eab_kid", + "config.eab_hmac_key", + "config.storage_config.redis.username", + "config.storage_config.redis.password", + "config.storage_config.consul.token", + "config.storage_config.vault.token" + ], + "ai-azure-content-safety": [ + "config.content_safety_url", + "config.content_safety_key" + ], + "ai-proxy": [ + "config.auth.header_name", + "config.auth.header_value", + "config.auth.param_name", + "config.auth.param_value", + "config.auth.azure_client_id", + "config.auth.azure_client_secret", + "config.auth.azure_tenant_id" + ], + "ai-rate-limiting-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "ai-request-transformer": [ + "config.llm.auth.header_name", + "config.llm.auth.header_value", + "config.llm.auth.param_name", + "config.llm.auth.param_value", + "config.llm.auth.azure_client_id", + "config.llm.auth.azure_client_secret", + "config.llm.auth.azure_tenant_id" + ], + "ai-response-transformer": [ + "config.llm.auth.header_name", + "config.llm.auth.header_value", + "config.llm.auth.param_name", + "config.llm.auth.param_value", + "config.llm.auth.azure_client_id", + "config.llm.auth.azure_client_secret", + "config.llm.auth.azure_tenant_id" + ], + "aws-lambda": [ + "config.aws_key", + "config.aws_secret", + "config.aws_assume_role_arn" + ], + "azure-functions": [ + "config.apikey", + "config.clientid" + ], + "datadog": [ + "config.host" + ], + "forward-proxy": [ + "config.auth_username", + "config.auth_password" + ], + "graphql-proxy-cache-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "graphql-rate-limiting-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "http-log": [ + "config.http_endpoint", + "config.headers" + ], + "jwt-signer": [ + "config.access_token_keyset_client_username", + "config.access_token_keyset_client_password", + "config.access_token_jwks_uri_client_username", + "config.access_token_jwks_uri_client_password", + "config.channel_token_keyset_client_username", + "config.channel_token_keyset_client_password", + "config.channel_token_jwks_uri_client_username", + "config.channel_token_jwks_uri_client_password" + ], + "kafka-log": [ + "config.authentication.user", + "config.authentication.password" + ], + "kafka-upstream": [ + "config.authentication.user", + "config.authentication.password" + ], + "ldap-auth-advanced": [ + "config.ldap_password", + "config.bind_dn" + ], + "loggly": [ + "config.key" + ], + "oauth2-introspection": [ + "config.authorization_value" + ], + "openid-connect": [ + "config.client_id", + "config.client_secret", + "config.client_jwk.k", + "config.client_jwk.d", + "config.client_jwk.p", + "config.client_jwk.q", + "config.client_jwk.dp", + "config.client_jwk.dq", + "config.client_jwk.qi", + "config.client_jwk.oth", + "config.client_jwk.r", + "config.client_jwk.t", + "config.login_redirect_uri", + "config.logout_redirect_uri", + "config.scopes", + "config.introspection_headers_values", + "config.session_secret", + "config.session_redis_username", + "config.session_redis_password" + ], + "opentelemetry": [ + "config.endpoint", + "config.headers" + ], + "proxy-cache-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "rate-limiting": [ + "config.redis.username", + "config.redis.password" + ], + "rate-limiting-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "request-transformer-advanced": [ + "config.rename.body", + "config.rename.headers", + "config.rename.querystring", + "config.replace.body", + "config.replace.headers", + "config.replace.querystring", + "config.add.body", + "config.add.headers", + "config.add.querystring", + "config.append.body", + "config.append.headers", + "config.append.querystring" + ], + "response-ratelimiting": [ + "config.redis.username", + "config.redis.password" + ], + "saml": [ + "config.idp_certificate", + "config.response_encryption_key", + "config.request_signing_key", + "config.request_signing_certificate", + "config.session_secret", + "config.session_redis_username", + "config.session_redis_password" + ], + "session": [ + "config.secret" + ] +} \ No newline at end of file diff --git a/data/referenceable_fields/3.8.x.json b/data/referenceable_fields/3.8.x.json new file mode 100644 index 00000000..dfc72c2a --- /dev/null +++ b/data/referenceable_fields/3.8.x.json @@ -0,0 +1,306 @@ +{ + "acme": [ + "config.account_email", + "config.eab_kid", + "config.eab_hmac_key", + "config.storage_config.redis.username", + "config.storage_config.redis.password", + "config.storage_config.consul.token", + "config.storage_config.vault.token" + ], + "ai-azure-content-safety": [ + "config.content_safety_url", + "config.content_safety_key" + ], + "ai-proxy": [ + "config.auth.header_name", + "config.auth.header_value", + "config.auth.param_name", + "config.auth.param_value", + "config.auth.azure_client_id", + "config.auth.azure_client_secret", + "config.auth.azure_tenant_id", + "config.auth.gcp_service_account_json", + "config.auth.aws_access_key_id", + "config.auth.aws_secret_access_key" + ], + "ai-proxy-advanced": [ + "config.embeddings.auth.header_name", + "config.embeddings.auth.header_value", + "config.embeddings.auth.param_name", + "config.embeddings.auth.param_value", + "config.embeddings.auth.azure_client_id", + "config.embeddings.auth.azure_client_secret", + "config.embeddings.auth.azure_tenant_id", + "config.embeddings.auth.gcp_service_account_json", + "config.embeddings.auth.aws_access_key_id", + "config.embeddings.auth.aws_secret_access_key", + "config.vectordb.redis.username", + "config.vectordb.redis.password", + "config.vectordb.redis.sentinel_username", + "config.vectordb.redis.sentinel_password", + "config.targets.auth.header_name", + "config.targets.auth.header_value", + "config.targets.auth.param_name", + "config.targets.auth.param_value", + "config.targets.auth.azure_client_id", + "config.targets.auth.azure_client_secret", + "config.targets.auth.azure_tenant_id", + "config.targets.auth.gcp_service_account_json", + "config.targets.auth.aws_access_key_id", + "config.targets.auth.aws_secret_access_key" + ], + "ai-rate-limiting-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "ai-request-transformer": [ + "config.llm.auth.header_name", + "config.llm.auth.header_value", + "config.llm.auth.param_name", + "config.llm.auth.param_value", + "config.llm.auth.azure_client_id", + "config.llm.auth.azure_client_secret", + "config.llm.auth.azure_tenant_id", + "config.llm.auth.gcp_service_account_json", + "config.llm.auth.aws_access_key_id", + "config.llm.auth.aws_secret_access_key" + ], + "ai-response-transformer": [ + "config.llm.auth.header_name", + "config.llm.auth.header_value", + "config.llm.auth.param_name", + "config.llm.auth.param_value", + "config.llm.auth.azure_client_id", + "config.llm.auth.azure_client_secret", + "config.llm.auth.azure_tenant_id", + "config.llm.auth.gcp_service_account_json", + "config.llm.auth.aws_access_key_id", + "config.llm.auth.aws_secret_access_key" + ], + "ai-semantic-cache": [ + "config.embeddings.auth.header_name", + "config.embeddings.auth.header_value", + "config.embeddings.auth.param_name", + "config.embeddings.auth.param_value", + "config.embeddings.auth.azure_client_id", + "config.embeddings.auth.azure_client_secret", + "config.embeddings.auth.azure_tenant_id", + "config.embeddings.auth.gcp_service_account_json", + "config.embeddings.auth.aws_access_key_id", + "config.embeddings.auth.aws_secret_access_key", + "config.vectordb.redis.username", + "config.vectordb.redis.password", + "config.vectordb.redis.sentinel_username", + "config.vectordb.redis.sentinel_password" + ], + "ai-semantic-prompt-guard": [ + "config.embeddings.auth.header_name", + "config.embeddings.auth.header_value", + "config.embeddings.auth.param_name", + "config.embeddings.auth.param_value", + "config.embeddings.auth.azure_client_id", + "config.embeddings.auth.azure_client_secret", + "config.embeddings.auth.azure_tenant_id", + "config.embeddings.auth.gcp_service_account_json", + "config.embeddings.auth.aws_access_key_id", + "config.embeddings.auth.aws_secret_access_key", + "config.vectordb.redis.username", + "config.vectordb.redis.password", + "config.vectordb.redis.sentinel_username", + "config.vectordb.redis.sentinel_password" + ], + "aws-lambda": [ + "config.aws_key", + "config.aws_secret", + "config.aws_assume_role_arn" + ], + "azure-functions": [ + "config.apikey", + "config.clientid" + ], + "confluent": [ + "config.cluster_api_key", + "config.cluster_api_secret", + "config.confluent_cloud_api_key", + "config.confluent_cloud_api_secret" + ], + "datadog": [ + "config.host" + ], + "datadog-tracing": [ + "config.endpoint" + ], + "forward-proxy": [ + "config.auth_username", + "config.auth_password" + ], + "graphql-proxy-cache-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "graphql-rate-limiting-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "http-log": [ + "config.http_endpoint", + "config.headers" + ], + "jwt-signer": [ + "config.access_token_keyset_client_username", + "config.access_token_keyset_client_password", + "config.access_token_jwks_uri_client_username", + "config.access_token_jwks_uri_client_password", + "config.channel_token_keyset_client_username", + "config.channel_token_keyset_client_password", + "config.channel_token_jwks_uri_client_username", + "config.channel_token_jwks_uri_client_password" + ], + "kafka-log": [ + "config.authentication.user", + "config.authentication.password" + ], + "kafka-upstream": [ + "config.authentication.user", + "config.authentication.password" + ], + "konnect-application-auth": [ + "config.v2_strategies.openid_connect.config.client_id", + "config.v2_strategies.openid_connect.config.client_secret", + "config.v2_strategies.openid_connect.config.client_jwk.k", + "config.v2_strategies.openid_connect.config.client_jwk.d", + "config.v2_strategies.openid_connect.config.client_jwk.p", + "config.v2_strategies.openid_connect.config.client_jwk.q", + "config.v2_strategies.openid_connect.config.client_jwk.dp", + "config.v2_strategies.openid_connect.config.client_jwk.dq", + "config.v2_strategies.openid_connect.config.client_jwk.qi", + "config.v2_strategies.openid_connect.config.client_jwk.oth", + "config.v2_strategies.openid_connect.config.client_jwk.r", + "config.v2_strategies.openid_connect.config.client_jwk.t", + "config.v2_strategies.openid_connect.config.login_redirect_uri", + "config.v2_strategies.openid_connect.config.logout_redirect_uri", + "config.v2_strategies.openid_connect.config.scopes", + "config.v2_strategies.openid_connect.config.introspection_headers_values", + "config.v2_strategies.openid_connect.config.session_secret", + "config.v2_strategies.openid_connect.config.redis.username", + "config.v2_strategies.openid_connect.config.redis.password", + "config.v2_strategies.openid_connect.config.redis.sentinel_username", + "config.v2_strategies.openid_connect.config.redis.sentinel_password", + "config.v2_strategies.openid_connect.config.cluster_cache_redis.username", + "config.v2_strategies.openid_connect.config.cluster_cache_redis.password", + "config.v2_strategies.openid_connect.config.cluster_cache_redis.sentinel_username", + "config.v2_strategies.openid_connect.config.cluster_cache_redis.sentinel_password" + ], + "ldap-auth-advanced": [ + "config.ldap_password", + "config.bind_dn" + ], + "loggly": [ + "config.key" + ], + "oauth2-introspection": [ + "config.authorization_value" + ], + "openid-connect": [ + "config.client_id", + "config.client_secret", + "config.client_jwk.k", + "config.client_jwk.d", + "config.client_jwk.p", + "config.client_jwk.q", + "config.client_jwk.dp", + "config.client_jwk.dq", + "config.client_jwk.qi", + "config.client_jwk.oth", + "config.client_jwk.r", + "config.client_jwk.t", + "config.login_redirect_uri", + "config.logout_redirect_uri", + "config.scopes", + "config.introspection_headers_values", + "config.session_secret", + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password", + "config.cluster_cache_redis.username", + "config.cluster_cache_redis.password", + "config.cluster_cache_redis.sentinel_username", + "config.cluster_cache_redis.sentinel_password" + ], + "opentelemetry": [ + "config.traces_endpoint", + "config.logs_endpoint", + "config.headers" + ], + "proxy-cache-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "rate-limiting": [ + "config.redis.username", + "config.redis.password" + ], + "rate-limiting-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "request-transformer-advanced": [ + "config.rename.body", + "config.rename.headers", + "config.rename.querystring", + "config.replace.body", + "config.replace.headers", + "config.replace.querystring", + "config.add.body", + "config.add.headers", + "config.add.querystring", + "config.append.body", + "config.append.headers", + "config.append.querystring" + ], + "response-ratelimiting": [ + "config.redis.username", + "config.redis.password" + ], + "saml": [ + "config.idp_certificate", + "config.response_encryption_key", + "config.request_signing_key", + "config.request_signing_certificate", + "config.session_secret", + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "session": [ + "config.secret" + ], + "standard-webhooks": [ + "config.secret_v1" + ], + "upstream-oauth": [ + "config.oauth.token_headers", + "config.oauth.token_post_args", + "config.oauth.client_id", + "config.oauth.client_secret", + "config.oauth.username", + "config.oauth.password", + "config.cache.redis.username", + "config.cache.redis.password", + "config.cache.redis.sentinel_username", + "config.cache.redis.sentinel_password" + ] +} \ No newline at end of file diff --git a/data/referenceable_fields/3.9.x.json b/data/referenceable_fields/3.9.x.json new file mode 100644 index 00000000..d74a28ee --- /dev/null +++ b/data/referenceable_fields/3.9.x.json @@ -0,0 +1,316 @@ +{ + "acme": [ + "config.account_email", + "config.eab_kid", + "config.eab_hmac_key", + "config.storage_config.redis.username", + "config.storage_config.redis.password", + "config.storage_config.consul.token", + "config.storage_config.vault.token" + ], + "ai-azure-content-safety": [ + "config.content_safety_url", + "config.content_safety_key" + ], + "ai-proxy": [ + "config.auth.header_name", + "config.auth.header_value", + "config.auth.param_name", + "config.auth.param_value", + "config.auth.azure_client_id", + "config.auth.azure_client_secret", + "config.auth.azure_tenant_id", + "config.auth.gcp_service_account_json", + "config.auth.aws_access_key_id", + "config.auth.aws_secret_access_key" + ], + "ai-proxy-advanced": [ + "config.embeddings.auth.header_name", + "config.embeddings.auth.header_value", + "config.embeddings.auth.param_name", + "config.embeddings.auth.param_value", + "config.embeddings.auth.azure_client_id", + "config.embeddings.auth.azure_client_secret", + "config.embeddings.auth.azure_tenant_id", + "config.embeddings.auth.gcp_service_account_json", + "config.embeddings.auth.aws_access_key_id", + "config.embeddings.auth.aws_secret_access_key", + "config.vectordb.redis.username", + "config.vectordb.redis.password", + "config.vectordb.redis.sentinel_username", + "config.vectordb.redis.sentinel_password", + "config.targets.auth.header_name", + "config.targets.auth.header_value", + "config.targets.auth.param_name", + "config.targets.auth.param_value", + "config.targets.auth.azure_client_id", + "config.targets.auth.azure_client_secret", + "config.targets.auth.azure_tenant_id", + "config.targets.auth.gcp_service_account_json", + "config.targets.auth.aws_access_key_id", + "config.targets.auth.aws_secret_access_key" + ], + "ai-rate-limiting-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "ai-request-transformer": [ + "config.llm.auth.header_name", + "config.llm.auth.header_value", + "config.llm.auth.param_name", + "config.llm.auth.param_value", + "config.llm.auth.azure_client_id", + "config.llm.auth.azure_client_secret", + "config.llm.auth.azure_tenant_id", + "config.llm.auth.gcp_service_account_json", + "config.llm.auth.aws_access_key_id", + "config.llm.auth.aws_secret_access_key" + ], + "ai-response-transformer": [ + "config.llm.auth.header_name", + "config.llm.auth.header_value", + "config.llm.auth.param_name", + "config.llm.auth.param_value", + "config.llm.auth.azure_client_id", + "config.llm.auth.azure_client_secret", + "config.llm.auth.azure_tenant_id", + "config.llm.auth.gcp_service_account_json", + "config.llm.auth.aws_access_key_id", + "config.llm.auth.aws_secret_access_key" + ], + "ai-semantic-cache": [ + "config.embeddings.auth.header_name", + "config.embeddings.auth.header_value", + "config.embeddings.auth.param_name", + "config.embeddings.auth.param_value", + "config.embeddings.auth.azure_client_id", + "config.embeddings.auth.azure_client_secret", + "config.embeddings.auth.azure_tenant_id", + "config.embeddings.auth.gcp_service_account_json", + "config.embeddings.auth.aws_access_key_id", + "config.embeddings.auth.aws_secret_access_key", + "config.vectordb.redis.username", + "config.vectordb.redis.password", + "config.vectordb.redis.sentinel_username", + "config.vectordb.redis.sentinel_password" + ], + "ai-semantic-prompt-guard": [ + "config.embeddings.auth.header_name", + "config.embeddings.auth.header_value", + "config.embeddings.auth.param_name", + "config.embeddings.auth.param_value", + "config.embeddings.auth.azure_client_id", + "config.embeddings.auth.azure_client_secret", + "config.embeddings.auth.azure_tenant_id", + "config.embeddings.auth.gcp_service_account_json", + "config.embeddings.auth.aws_access_key_id", + "config.embeddings.auth.aws_secret_access_key", + "config.vectordb.redis.username", + "config.vectordb.redis.password", + "config.vectordb.redis.sentinel_username", + "config.vectordb.redis.sentinel_password" + ], + "aws-lambda": [ + "config.aws_key", + "config.aws_secret", + "config.aws_assume_role_arn" + ], + "azure-functions": [ + "config.apikey", + "config.clientid" + ], + "confluent": [ + "config.cluster_api_key", + "config.cluster_api_secret", + "config.confluent_cloud_api_key", + "config.confluent_cloud_api_secret" + ], + "datadog": [ + "config.host" + ], + "datadog-tracing": [ + "config.endpoint" + ], + "forward-proxy": [ + "config.auth_username", + "config.auth_password" + ], + "graphql-proxy-cache-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "graphql-rate-limiting-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "http-log": [ + "config.http_endpoint", + "config.headers" + ], + "jwt-signer": [ + "config.access_token_keyset_client_username", + "config.access_token_keyset_client_password", + "config.access_token_jwks_uri_client_username", + "config.access_token_jwks_uri_client_password", + "config.channel_token_keyset_client_username", + "config.channel_token_keyset_client_password", + "config.channel_token_jwks_uri_client_username", + "config.channel_token_jwks_uri_client_password" + ], + "kafka-log": [ + "config.authentication.user", + "config.authentication.password" + ], + "kafka-upstream": [ + "config.authentication.user", + "config.authentication.password" + ], + "konnect-application-auth": [ + "config.v2_strategies.openid_connect.config.client_id", + "config.v2_strategies.openid_connect.config.client_secret", + "config.v2_strategies.openid_connect.config.client_jwk.k", + "config.v2_strategies.openid_connect.config.client_jwk.d", + "config.v2_strategies.openid_connect.config.client_jwk.p", + "config.v2_strategies.openid_connect.config.client_jwk.q", + "config.v2_strategies.openid_connect.config.client_jwk.dp", + "config.v2_strategies.openid_connect.config.client_jwk.dq", + "config.v2_strategies.openid_connect.config.client_jwk.qi", + "config.v2_strategies.openid_connect.config.client_jwk.oth", + "config.v2_strategies.openid_connect.config.client_jwk.r", + "config.v2_strategies.openid_connect.config.client_jwk.t", + "config.v2_strategies.openid_connect.config.login_redirect_uri", + "config.v2_strategies.openid_connect.config.logout_redirect_uri", + "config.v2_strategies.openid_connect.config.scopes", + "config.v2_strategies.openid_connect.config.introspection_headers_values", + "config.v2_strategies.openid_connect.config.session_secret", + "config.v2_strategies.openid_connect.config.redis.username", + "config.v2_strategies.openid_connect.config.redis.password", + "config.v2_strategies.openid_connect.config.redis.sentinel_username", + "config.v2_strategies.openid_connect.config.redis.sentinel_password", + "config.v2_strategies.openid_connect.config.http_proxy_authorization", + "config.v2_strategies.openid_connect.config.https_proxy_authorization", + "config.v2_strategies.openid_connect.config.cluster_cache_redis.username", + "config.v2_strategies.openid_connect.config.cluster_cache_redis.password", + "config.v2_strategies.openid_connect.config.cluster_cache_redis.sentinel_username", + "config.v2_strategies.openid_connect.config.cluster_cache_redis.sentinel_password" + ], + "ldap-auth-advanced": [ + "config.ldap_password", + "config.bind_dn" + ], + "loggly": [ + "config.key" + ], + "oauth2-introspection": [ + "config.authorization_value" + ], + "openid-connect": [ + "config.client_id", + "config.client_secret", + "config.client_jwk.k", + "config.client_jwk.d", + "config.client_jwk.p", + "config.client_jwk.q", + "config.client_jwk.dp", + "config.client_jwk.dq", + "config.client_jwk.qi", + "config.client_jwk.oth", + "config.client_jwk.r", + "config.client_jwk.t", + "config.login_redirect_uri", + "config.logout_redirect_uri", + "config.scopes", + "config.introspection_headers_values", + "config.session_secret", + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password", + "config.http_proxy_authorization", + "config.https_proxy_authorization", + "config.cluster_cache_redis.username", + "config.cluster_cache_redis.password", + "config.cluster_cache_redis.sentinel_username", + "config.cluster_cache_redis.sentinel_password" + ], + "opentelemetry": [ + "config.traces_endpoint", + "config.logs_endpoint", + "config.headers" + ], + "proxy-cache-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "rate-limiting": [ + "config.redis.username", + "config.redis.password" + ], + "rate-limiting-advanced": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "request-transformer-advanced": [ + "config.rename.body", + "config.rename.headers", + "config.rename.querystring", + "config.replace.body", + "config.replace.headers", + "config.replace.querystring", + "config.add.body", + "config.add.headers", + "config.add.querystring", + "config.append.body", + "config.append.headers", + "config.append.querystring" + ], + "response-ratelimiting": [ + "config.redis.username", + "config.redis.password" + ], + "saml": [ + "config.idp_certificate", + "config.response_encryption_key", + "config.request_signing_key", + "config.request_signing_certificate", + "config.session_secret", + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "service-protection": [ + "config.redis.username", + "config.redis.password", + "config.redis.sentinel_username", + "config.redis.sentinel_password" + ], + "session": [ + "config.secret" + ], + "standard-webhooks": [ + "config.secret_v1" + ], + "upstream-oauth": [ + "config.oauth.token_headers", + "config.oauth.token_post_args", + "config.oauth.client_id", + "config.oauth.client_secret", + "config.oauth.username", + "config.oauth.password", + "config.cache.redis.username", + "config.cache.redis.password", + "config.cache.redis.sentinel_username", + "config.cache.redis.sentinel_password" + ] +} \ No newline at end of file diff --git a/examples/acl/_3.10.x.yaml b/examples/acl/_3.10.x.yaml new file mode 100644 index 00000000..a76559c0 --- /dev/null +++ b/examples/acl/_3.10.x.yaml @@ -0,0 +1,6 @@ +name: acl +config: + allow: + - group1 + - group2 + hide_groups_header: true diff --git a/examples/acl/_3.11.x.yaml b/examples/acl/_3.11.x.yaml new file mode 100644 index 00000000..a76559c0 --- /dev/null +++ b/examples/acl/_3.11.x.yaml @@ -0,0 +1,6 @@ +name: acl +config: + allow: + - group1 + - group2 + hide_groups_header: true diff --git a/examples/acl/_3.5.x.yaml b/examples/acl/_3.5.x.yaml new file mode 100644 index 00000000..a76559c0 --- /dev/null +++ b/examples/acl/_3.5.x.yaml @@ -0,0 +1,6 @@ +name: acl +config: + allow: + - group1 + - group2 + hide_groups_header: true diff --git a/examples/acl/_3.6.x.yaml b/examples/acl/_3.6.x.yaml new file mode 100644 index 00000000..a76559c0 --- /dev/null +++ b/examples/acl/_3.6.x.yaml @@ -0,0 +1,6 @@ +name: acl +config: + allow: + - group1 + - group2 + hide_groups_header: true diff --git a/examples/acl/_3.7.x.yaml b/examples/acl/_3.7.x.yaml new file mode 100644 index 00000000..a76559c0 --- /dev/null +++ b/examples/acl/_3.7.x.yaml @@ -0,0 +1,6 @@ +name: acl +config: + allow: + - group1 + - group2 + hide_groups_header: true diff --git a/examples/acl/_3.8.x.yaml b/examples/acl/_3.8.x.yaml new file mode 100644 index 00000000..a76559c0 --- /dev/null +++ b/examples/acl/_3.8.x.yaml @@ -0,0 +1,6 @@ +name: acl +config: + allow: + - group1 + - group2 + hide_groups_header: true diff --git a/examples/acl/_3.9.x.yaml b/examples/acl/_3.9.x.yaml new file mode 100644 index 00000000..a76559c0 --- /dev/null +++ b/examples/acl/_3.9.x.yaml @@ -0,0 +1,6 @@ +name: acl +config: + allow: + - group1 + - group2 + hide_groups_header: true diff --git a/examples/acme/_3.10.x.yaml b/examples/acme/_3.10.x.yaml new file mode 100644 index 00000000..6b35cddc --- /dev/null +++ b/examples/acme/_3.10.x.yaml @@ -0,0 +1,3 @@ +name: acme +config: + account_email: example@example.com diff --git a/examples/acme/_3.11.x.yaml b/examples/acme/_3.11.x.yaml new file mode 100644 index 00000000..6b35cddc --- /dev/null +++ b/examples/acme/_3.11.x.yaml @@ -0,0 +1,3 @@ +name: acme +config: + account_email: example@example.com diff --git a/examples/acme/_3.5.x.yaml b/examples/acme/_3.5.x.yaml new file mode 100644 index 00000000..6b35cddc --- /dev/null +++ b/examples/acme/_3.5.x.yaml @@ -0,0 +1,3 @@ +name: acme +config: + account_email: example@example.com diff --git a/examples/acme/_3.6.x.yaml b/examples/acme/_3.6.x.yaml new file mode 100644 index 00000000..6b35cddc --- /dev/null +++ b/examples/acme/_3.6.x.yaml @@ -0,0 +1,3 @@ +name: acme +config: + account_email: example@example.com diff --git a/examples/acme/_3.7.x.yaml b/examples/acme/_3.7.x.yaml new file mode 100644 index 00000000..6b35cddc --- /dev/null +++ b/examples/acme/_3.7.x.yaml @@ -0,0 +1,3 @@ +name: acme +config: + account_email: example@example.com diff --git a/examples/acme/_3.8.x.yaml b/examples/acme/_3.8.x.yaml new file mode 100644 index 00000000..6b35cddc --- /dev/null +++ b/examples/acme/_3.8.x.yaml @@ -0,0 +1,3 @@ +name: acme +config: + account_email: example@example.com diff --git a/examples/acme/_3.9.x.yaml b/examples/acme/_3.9.x.yaml new file mode 100644 index 00000000..6b35cddc --- /dev/null +++ b/examples/acme/_3.9.x.yaml @@ -0,0 +1,3 @@ +name: acme +config: + account_email: example@example.com diff --git a/examples/ai-azure-content-safety/_3.10.x.yaml b/examples/ai-azure-content-safety/_3.10.x.yaml new file mode 100644 index 00000000..75f6cffb --- /dev/null +++ b/examples/ai-azure-content-safety/_3.10.x.yaml @@ -0,0 +1,9 @@ +name: ai-azure-content-safety +config: + content_safety_url: http//: + azure_use_managed_identity: false + reveal_failure_reason: true + content_safety_key: anything + categories: + - { name: "Hate", rejection_level: 2 } + - { name: "Violence", rejection_level: 2 } diff --git a/examples/ai-azure-content-safety/_3.11.x.yaml b/examples/ai-azure-content-safety/_3.11.x.yaml new file mode 100644 index 00000000..75f6cffb --- /dev/null +++ b/examples/ai-azure-content-safety/_3.11.x.yaml @@ -0,0 +1,9 @@ +name: ai-azure-content-safety +config: + content_safety_url: http//: + azure_use_managed_identity: false + reveal_failure_reason: true + content_safety_key: anything + categories: + - { name: "Hate", rejection_level: 2 } + - { name: "Violence", rejection_level: 2 } diff --git a/examples/ai-azure-content-safety/_3.7.x.yaml b/examples/ai-azure-content-safety/_3.7.x.yaml new file mode 100644 index 00000000..025407dc --- /dev/null +++ b/examples/ai-azure-content-safety/_3.7.x.yaml @@ -0,0 +1,9 @@ +name: ai-azure-content-safety +config: + content_safety_url: http//: + azure_use_managed_identity: false + reveal_failure_reason: true + content_safety_key: anything + categories: + - "Hate" + - "Violence" \ No newline at end of file diff --git a/examples/ai-azure-content-safety/_3.8.x.yaml b/examples/ai-azure-content-safety/_3.8.x.yaml new file mode 100644 index 00000000..025407dc --- /dev/null +++ b/examples/ai-azure-content-safety/_3.8.x.yaml @@ -0,0 +1,9 @@ +name: ai-azure-content-safety +config: + content_safety_url: http//: + azure_use_managed_identity: false + reveal_failure_reason: true + content_safety_key: anything + categories: + - "Hate" + - "Violence" \ No newline at end of file diff --git a/examples/ai-azure-content-safety/_3.9.x.yaml b/examples/ai-azure-content-safety/_3.9.x.yaml new file mode 100644 index 00000000..75f6cffb --- /dev/null +++ b/examples/ai-azure-content-safety/_3.9.x.yaml @@ -0,0 +1,9 @@ +name: ai-azure-content-safety +config: + content_safety_url: http//: + azure_use_managed_identity: false + reveal_failure_reason: true + content_safety_key: anything + categories: + - { name: "Hate", rejection_level: 2 } + - { name: "Violence", rejection_level: 2 } diff --git a/examples/ai-prompt-decorator/_3.10.x.yaml b/examples/ai-prompt-decorator/_3.10.x.yaml new file mode 100644 index 00000000..50a84994 --- /dev/null +++ b/examples/ai-prompt-decorator/_3.10.x.yaml @@ -0,0 +1,13 @@ +name: ai-prompt-decorator +config: + prompts: + prepend: + - role: "system" + content: "You are data scientist, specialising in survey analytics." + - role: "user" + content: "Classify this test result set as positive, negative, or neutral." + - role: "assistant" + content: "These tests are NEUTRAL." + append: + - role: "user" + content: "Do not mention any real participants name in your justification." diff --git a/examples/ai-prompt-decorator/_3.11.x.yaml b/examples/ai-prompt-decorator/_3.11.x.yaml new file mode 100644 index 00000000..50a84994 --- /dev/null +++ b/examples/ai-prompt-decorator/_3.11.x.yaml @@ -0,0 +1,13 @@ +name: ai-prompt-decorator +config: + prompts: + prepend: + - role: "system" + content: "You are data scientist, specialising in survey analytics." + - role: "user" + content: "Classify this test result set as positive, negative, or neutral." + - role: "assistant" + content: "These tests are NEUTRAL." + append: + - role: "user" + content: "Do not mention any real participants name in your justification." diff --git a/examples/ai-prompt-decorator/_3.6.x.yaml b/examples/ai-prompt-decorator/_3.6.x.yaml new file mode 100644 index 00000000..50a84994 --- /dev/null +++ b/examples/ai-prompt-decorator/_3.6.x.yaml @@ -0,0 +1,13 @@ +name: ai-prompt-decorator +config: + prompts: + prepend: + - role: "system" + content: "You are data scientist, specialising in survey analytics." + - role: "user" + content: "Classify this test result set as positive, negative, or neutral." + - role: "assistant" + content: "These tests are NEUTRAL." + append: + - role: "user" + content: "Do not mention any real participants name in your justification." diff --git a/examples/ai-prompt-decorator/_3.7.x.yaml b/examples/ai-prompt-decorator/_3.7.x.yaml new file mode 100644 index 00000000..50a84994 --- /dev/null +++ b/examples/ai-prompt-decorator/_3.7.x.yaml @@ -0,0 +1,13 @@ +name: ai-prompt-decorator +config: + prompts: + prepend: + - role: "system" + content: "You are data scientist, specialising in survey analytics." + - role: "user" + content: "Classify this test result set as positive, negative, or neutral." + - role: "assistant" + content: "These tests are NEUTRAL." + append: + - role: "user" + content: "Do not mention any real participants name in your justification." diff --git a/examples/ai-prompt-decorator/_3.8.x.yaml b/examples/ai-prompt-decorator/_3.8.x.yaml new file mode 100644 index 00000000..50a84994 --- /dev/null +++ b/examples/ai-prompt-decorator/_3.8.x.yaml @@ -0,0 +1,13 @@ +name: ai-prompt-decorator +config: + prompts: + prepend: + - role: "system" + content: "You are data scientist, specialising in survey analytics." + - role: "user" + content: "Classify this test result set as positive, negative, or neutral." + - role: "assistant" + content: "These tests are NEUTRAL." + append: + - role: "user" + content: "Do not mention any real participants name in your justification." diff --git a/examples/ai-prompt-decorator/_3.9.x.yaml b/examples/ai-prompt-decorator/_3.9.x.yaml new file mode 100644 index 00000000..50a84994 --- /dev/null +++ b/examples/ai-prompt-decorator/_3.9.x.yaml @@ -0,0 +1,13 @@ +name: ai-prompt-decorator +config: + prompts: + prepend: + - role: "system" + content: "You are data scientist, specialising in survey analytics." + - role: "user" + content: "Classify this test result set as positive, negative, or neutral." + - role: "assistant" + content: "These tests are NEUTRAL." + append: + - role: "user" + content: "Do not mention any real participants name in your justification." diff --git a/examples/ai-prompt-guard/_3.10.x.yaml b/examples/ai-prompt-guard/_3.10.x.yaml new file mode 100644 index 00000000..bd724506 --- /dev/null +++ b/examples/ai-prompt-guard/_3.10.x.yaml @@ -0,0 +1,9 @@ +name: ai-prompt-guard +config: + allow_all_conversation_history: true + allow_patterns: + - ".*(P|p)ears.*" + - ".*(P|p)eaches.*" + deny_patterns: + - ".*(A|a)pples.*" + - ".*(O|o)ranges.*" diff --git a/examples/ai-prompt-guard/_3.11.x.yaml b/examples/ai-prompt-guard/_3.11.x.yaml new file mode 100644 index 00000000..bd724506 --- /dev/null +++ b/examples/ai-prompt-guard/_3.11.x.yaml @@ -0,0 +1,9 @@ +name: ai-prompt-guard +config: + allow_all_conversation_history: true + allow_patterns: + - ".*(P|p)ears.*" + - ".*(P|p)eaches.*" + deny_patterns: + - ".*(A|a)pples.*" + - ".*(O|o)ranges.*" diff --git a/examples/ai-prompt-guard/_3.6.x.yaml b/examples/ai-prompt-guard/_3.6.x.yaml new file mode 100644 index 00000000..bd724506 --- /dev/null +++ b/examples/ai-prompt-guard/_3.6.x.yaml @@ -0,0 +1,9 @@ +name: ai-prompt-guard +config: + allow_all_conversation_history: true + allow_patterns: + - ".*(P|p)ears.*" + - ".*(P|p)eaches.*" + deny_patterns: + - ".*(A|a)pples.*" + - ".*(O|o)ranges.*" diff --git a/examples/ai-prompt-guard/_3.7.x.yaml b/examples/ai-prompt-guard/_3.7.x.yaml new file mode 100644 index 00000000..bd724506 --- /dev/null +++ b/examples/ai-prompt-guard/_3.7.x.yaml @@ -0,0 +1,9 @@ +name: ai-prompt-guard +config: + allow_all_conversation_history: true + allow_patterns: + - ".*(P|p)ears.*" + - ".*(P|p)eaches.*" + deny_patterns: + - ".*(A|a)pples.*" + - ".*(O|o)ranges.*" diff --git a/examples/ai-prompt-guard/_3.8.x.yaml b/examples/ai-prompt-guard/_3.8.x.yaml new file mode 100644 index 00000000..bd724506 --- /dev/null +++ b/examples/ai-prompt-guard/_3.8.x.yaml @@ -0,0 +1,9 @@ +name: ai-prompt-guard +config: + allow_all_conversation_history: true + allow_patterns: + - ".*(P|p)ears.*" + - ".*(P|p)eaches.*" + deny_patterns: + - ".*(A|a)pples.*" + - ".*(O|o)ranges.*" diff --git a/examples/ai-prompt-guard/_3.9.x.yaml b/examples/ai-prompt-guard/_3.9.x.yaml new file mode 100644 index 00000000..bd724506 --- /dev/null +++ b/examples/ai-prompt-guard/_3.9.x.yaml @@ -0,0 +1,9 @@ +name: ai-prompt-guard +config: + allow_all_conversation_history: true + allow_patterns: + - ".*(P|p)ears.*" + - ".*(P|p)eaches.*" + deny_patterns: + - ".*(A|a)pples.*" + - ".*(O|o)ranges.*" diff --git a/examples/ai-prompt-template/_3.10.x.yaml b/examples/ai-prompt-template/_3.10.x.yaml new file mode 100644 index 00000000..1ed007fc --- /dev/null +++ b/examples/ai-prompt-template/_3.10.x.yaml @@ -0,0 +1,23 @@ +name: ai-prompt-template +config: + allow_untemplated_requests: true + templates: + - name: "developer-chat" + template: |- + { + "messages": [ + { + "role": "system", + "content": "You are a {{program}} expert, in {{language}} programming language." + }, + { + "role": "user", + "content": "Write me a {{program}} program." + } + ] + } + - name: "summarize-prompt" + template: |- + { + "prompt": "Summarize the following text for me: {{text}}" + } diff --git a/examples/ai-prompt-template/_3.11.x.yaml b/examples/ai-prompt-template/_3.11.x.yaml new file mode 100644 index 00000000..1ed007fc --- /dev/null +++ b/examples/ai-prompt-template/_3.11.x.yaml @@ -0,0 +1,23 @@ +name: ai-prompt-template +config: + allow_untemplated_requests: true + templates: + - name: "developer-chat" + template: |- + { + "messages": [ + { + "role": "system", + "content": "You are a {{program}} expert, in {{language}} programming language." + }, + { + "role": "user", + "content": "Write me a {{program}} program." + } + ] + } + - name: "summarize-prompt" + template: |- + { + "prompt": "Summarize the following text for me: {{text}}" + } diff --git a/examples/ai-prompt-template/_3.6.x.yaml b/examples/ai-prompt-template/_3.6.x.yaml new file mode 100644 index 00000000..1ed007fc --- /dev/null +++ b/examples/ai-prompt-template/_3.6.x.yaml @@ -0,0 +1,23 @@ +name: ai-prompt-template +config: + allow_untemplated_requests: true + templates: + - name: "developer-chat" + template: |- + { + "messages": [ + { + "role": "system", + "content": "You are a {{program}} expert, in {{language}} programming language." + }, + { + "role": "user", + "content": "Write me a {{program}} program." + } + ] + } + - name: "summarize-prompt" + template: |- + { + "prompt": "Summarize the following text for me: {{text}}" + } diff --git a/examples/ai-prompt-template/_3.7.x.yaml b/examples/ai-prompt-template/_3.7.x.yaml new file mode 100644 index 00000000..1ed007fc --- /dev/null +++ b/examples/ai-prompt-template/_3.7.x.yaml @@ -0,0 +1,23 @@ +name: ai-prompt-template +config: + allow_untemplated_requests: true + templates: + - name: "developer-chat" + template: |- + { + "messages": [ + { + "role": "system", + "content": "You are a {{program}} expert, in {{language}} programming language." + }, + { + "role": "user", + "content": "Write me a {{program}} program." + } + ] + } + - name: "summarize-prompt" + template: |- + { + "prompt": "Summarize the following text for me: {{text}}" + } diff --git a/examples/ai-prompt-template/_3.8.x.yaml b/examples/ai-prompt-template/_3.8.x.yaml new file mode 100644 index 00000000..1ed007fc --- /dev/null +++ b/examples/ai-prompt-template/_3.8.x.yaml @@ -0,0 +1,23 @@ +name: ai-prompt-template +config: + allow_untemplated_requests: true + templates: + - name: "developer-chat" + template: |- + { + "messages": [ + { + "role": "system", + "content": "You are a {{program}} expert, in {{language}} programming language." + }, + { + "role": "user", + "content": "Write me a {{program}} program." + } + ] + } + - name: "summarize-prompt" + template: |- + { + "prompt": "Summarize the following text for me: {{text}}" + } diff --git a/examples/ai-prompt-template/_3.9.x.yaml b/examples/ai-prompt-template/_3.9.x.yaml new file mode 100644 index 00000000..1ed007fc --- /dev/null +++ b/examples/ai-prompt-template/_3.9.x.yaml @@ -0,0 +1,23 @@ +name: ai-prompt-template +config: + allow_untemplated_requests: true + templates: + - name: "developer-chat" + template: |- + { + "messages": [ + { + "role": "system", + "content": "You are a {{program}} expert, in {{language}} programming language." + }, + { + "role": "user", + "content": "Write me a {{program}} program." + } + ] + } + - name: "summarize-prompt" + template: |- + { + "prompt": "Summarize the following text for me: {{text}}" + } diff --git a/examples/ai-proxy-advanced/_3.10.x.yaml b/examples/ai-proxy-advanced/_3.10.x.yaml new file mode 100644 index 00000000..54acb74f --- /dev/null +++ b/examples/ai-proxy-advanced/_3.10.x.yaml @@ -0,0 +1,15 @@ +name: ai-proxy-advanced +config: + targets: + - route_type: llm/v1/chat + auth: + header_name: Authorization + header_value: Bearer token + model: + provider: openai + - route_type: llm/v1/chat + model: + provider: llama2 + options: + llama2_format: openai + upstream_url: http://httpbin diff --git a/examples/ai-proxy-advanced/_3.11.x.yaml b/examples/ai-proxy-advanced/_3.11.x.yaml new file mode 100644 index 00000000..54acb74f --- /dev/null +++ b/examples/ai-proxy-advanced/_3.11.x.yaml @@ -0,0 +1,15 @@ +name: ai-proxy-advanced +config: + targets: + - route_type: llm/v1/chat + auth: + header_name: Authorization + header_value: Bearer token + model: + provider: openai + - route_type: llm/v1/chat + model: + provider: llama2 + options: + llama2_format: openai + upstream_url: http://httpbin diff --git a/examples/ai-proxy-advanced/_3.8.x.yaml b/examples/ai-proxy-advanced/_3.8.x.yaml new file mode 100644 index 00000000..54acb74f --- /dev/null +++ b/examples/ai-proxy-advanced/_3.8.x.yaml @@ -0,0 +1,15 @@ +name: ai-proxy-advanced +config: + targets: + - route_type: llm/v1/chat + auth: + header_name: Authorization + header_value: Bearer token + model: + provider: openai + - route_type: llm/v1/chat + model: + provider: llama2 + options: + llama2_format: openai + upstream_url: http://httpbin diff --git a/examples/ai-proxy-advanced/_3.9.x.yaml b/examples/ai-proxy-advanced/_3.9.x.yaml new file mode 100644 index 00000000..54acb74f --- /dev/null +++ b/examples/ai-proxy-advanced/_3.9.x.yaml @@ -0,0 +1,15 @@ +name: ai-proxy-advanced +config: + targets: + - route_type: llm/v1/chat + auth: + header_name: Authorization + header_value: Bearer token + model: + provider: openai + - route_type: llm/v1/chat + model: + provider: llama2 + options: + llama2_format: openai + upstream_url: http://httpbin diff --git a/examples/ai-proxy/_3.10.x.yaml b/examples/ai-proxy/_3.10.x.yaml new file mode 100644 index 00000000..a16a3dd4 --- /dev/null +++ b/examples/ai-proxy/_3.10.x.yaml @@ -0,0 +1,12 @@ +name: ai-proxy +config: + route_type: "llm/v1/chat" + auth: + header_name: "Authorization" + header_value: "Bearer " + model: + provider: "openai" + name: "gpt-4" + options: + max_tokens: 512 + temperature: 1.0 diff --git a/examples/ai-proxy/_3.11.x.yaml b/examples/ai-proxy/_3.11.x.yaml new file mode 100644 index 00000000..a16a3dd4 --- /dev/null +++ b/examples/ai-proxy/_3.11.x.yaml @@ -0,0 +1,12 @@ +name: ai-proxy +config: + route_type: "llm/v1/chat" + auth: + header_name: "Authorization" + header_value: "Bearer " + model: + provider: "openai" + name: "gpt-4" + options: + max_tokens: 512 + temperature: 1.0 diff --git a/examples/ai-proxy/_3.6.x.yaml b/examples/ai-proxy/_3.6.x.yaml new file mode 100644 index 00000000..a16a3dd4 --- /dev/null +++ b/examples/ai-proxy/_3.6.x.yaml @@ -0,0 +1,12 @@ +name: ai-proxy +config: + route_type: "llm/v1/chat" + auth: + header_name: "Authorization" + header_value: "Bearer " + model: + provider: "openai" + name: "gpt-4" + options: + max_tokens: 512 + temperature: 1.0 diff --git a/examples/ai-proxy/_3.7.x.yaml b/examples/ai-proxy/_3.7.x.yaml new file mode 100644 index 00000000..a16a3dd4 --- /dev/null +++ b/examples/ai-proxy/_3.7.x.yaml @@ -0,0 +1,12 @@ +name: ai-proxy +config: + route_type: "llm/v1/chat" + auth: + header_name: "Authorization" + header_value: "Bearer " + model: + provider: "openai" + name: "gpt-4" + options: + max_tokens: 512 + temperature: 1.0 diff --git a/examples/ai-proxy/_3.8.x.yaml b/examples/ai-proxy/_3.8.x.yaml new file mode 100644 index 00000000..a16a3dd4 --- /dev/null +++ b/examples/ai-proxy/_3.8.x.yaml @@ -0,0 +1,12 @@ +name: ai-proxy +config: + route_type: "llm/v1/chat" + auth: + header_name: "Authorization" + header_value: "Bearer " + model: + provider: "openai" + name: "gpt-4" + options: + max_tokens: 512 + temperature: 1.0 diff --git a/examples/ai-proxy/_3.9.x.yaml b/examples/ai-proxy/_3.9.x.yaml new file mode 100644 index 00000000..a16a3dd4 --- /dev/null +++ b/examples/ai-proxy/_3.9.x.yaml @@ -0,0 +1,12 @@ +name: ai-proxy +config: + route_type: "llm/v1/chat" + auth: + header_name: "Authorization" + header_value: "Bearer " + model: + provider: "openai" + name: "gpt-4" + options: + max_tokens: 512 + temperature: 1.0 diff --git a/examples/ai-rag-injector/_3.10.x.yaml b/examples/ai-rag-injector/_3.10.x.yaml new file mode 100644 index 00000000..b463e8d0 --- /dev/null +++ b/examples/ai-rag-injector/_3.10.x.yaml @@ -0,0 +1,20 @@ +name: ai-rag-injector +config: + inject_template: | + Only use the following information surrounded by to and your existing knowledge to provide the best possible answer to the user. + + User's question: + embeddings: + auth: + header_name: Authorization + header_value: Bearer + model: + provider: openai + name: text-embedding-3-large + vectordb: + strategy: redis + redis: + host: exampleredis.com + port: 80 + distance_metric: cosine + dimensions: 76 diff --git a/examples/ai-rag-injector/_3.11.x.yaml b/examples/ai-rag-injector/_3.11.x.yaml new file mode 100644 index 00000000..b463e8d0 --- /dev/null +++ b/examples/ai-rag-injector/_3.11.x.yaml @@ -0,0 +1,20 @@ +name: ai-rag-injector +config: + inject_template: | + Only use the following information surrounded by to and your existing knowledge to provide the best possible answer to the user. + + User's question: + embeddings: + auth: + header_name: Authorization + header_value: Bearer + model: + provider: openai + name: text-embedding-3-large + vectordb: + strategy: redis + redis: + host: exampleredis.com + port: 80 + distance_metric: cosine + dimensions: 76 diff --git a/examples/ai-rate-limiting-advanced/_3.10.x.yaml b/examples/ai-rate-limiting-advanced/_3.10.x.yaml new file mode 100644 index 00000000..c5fb1a98 --- /dev/null +++ b/examples/ai-rate-limiting-advanced/_3.10.x.yaml @@ -0,0 +1,9 @@ +name: ai-rate-limiting-advanced +config: + llm_providers: + - name: openai + limit: [100, 1000] + window_size: [60, 3600] + - name: mistral + limit: [1, 100] + window_size: [1, 60] diff --git a/examples/ai-rate-limiting-advanced/_3.11.x.yaml b/examples/ai-rate-limiting-advanced/_3.11.x.yaml new file mode 100644 index 00000000..c5fb1a98 --- /dev/null +++ b/examples/ai-rate-limiting-advanced/_3.11.x.yaml @@ -0,0 +1,9 @@ +name: ai-rate-limiting-advanced +config: + llm_providers: + - name: openai + limit: [100, 1000] + window_size: [60, 3600] + - name: mistral + limit: [1, 100] + window_size: [1, 60] diff --git a/examples/ai-rate-limiting-advanced/_3.7.x.yaml b/examples/ai-rate-limiting-advanced/_3.7.x.yaml new file mode 100644 index 00000000..9831356c --- /dev/null +++ b/examples/ai-rate-limiting-advanced/_3.7.x.yaml @@ -0,0 +1,9 @@ +name: ai-rate-limiting-advanced +config: + llm_providers: + - name: openai + limit: 1000 + window_size: 3600 + - name: mistral + limit: 100 + window_size: 60 diff --git a/examples/ai-rate-limiting-advanced/_3.8.x.yaml b/examples/ai-rate-limiting-advanced/_3.8.x.yaml new file mode 100644 index 00000000..9831356c --- /dev/null +++ b/examples/ai-rate-limiting-advanced/_3.8.x.yaml @@ -0,0 +1,9 @@ +name: ai-rate-limiting-advanced +config: + llm_providers: + - name: openai + limit: 1000 + window_size: 3600 + - name: mistral + limit: 100 + window_size: 60 diff --git a/examples/ai-rate-limiting-advanced/_3.9.x.yaml b/examples/ai-rate-limiting-advanced/_3.9.x.yaml new file mode 100644 index 00000000..9831356c --- /dev/null +++ b/examples/ai-rate-limiting-advanced/_3.9.x.yaml @@ -0,0 +1,9 @@ +name: ai-rate-limiting-advanced +config: + llm_providers: + - name: openai + limit: 1000 + window_size: 3600 + - name: mistral + limit: 100 + window_size: 60 diff --git a/examples/ai-request-transformer/_3.10.x.yaml b/examples/ai-request-transformer/_3.10.x.yaml new file mode 100644 index 00000000..b8275ac7 --- /dev/null +++ b/examples/ai-request-transformer/_3.10.x.yaml @@ -0,0 +1,18 @@ +name: ai-request-transformer +config: + prompt: "Mask any credit card numbers in my JSON message. Reply with only the JSON result." + transformation_extract_pattern: '\\{((.|\n)*)\\}' + llm: + route_type: "llm/v1/chat" + auth: + header_name: "Authorization" + header_value: "Bearer " + logging: + log_statistics: true + log_payloads: false + model: + provider: "openai" + name: "gpt-4" + options: + max_tokens: 1024 + temperature: 1.0 diff --git a/examples/ai-request-transformer/_3.11.x.yaml b/examples/ai-request-transformer/_3.11.x.yaml new file mode 100644 index 00000000..b8275ac7 --- /dev/null +++ b/examples/ai-request-transformer/_3.11.x.yaml @@ -0,0 +1,18 @@ +name: ai-request-transformer +config: + prompt: "Mask any credit card numbers in my JSON message. Reply with only the JSON result." + transformation_extract_pattern: '\\{((.|\n)*)\\}' + llm: + route_type: "llm/v1/chat" + auth: + header_name: "Authorization" + header_value: "Bearer " + logging: + log_statistics: true + log_payloads: false + model: + provider: "openai" + name: "gpt-4" + options: + max_tokens: 1024 + temperature: 1.0 diff --git a/examples/ai-request-transformer/_3.6.x.yaml b/examples/ai-request-transformer/_3.6.x.yaml new file mode 100644 index 00000000..b8275ac7 --- /dev/null +++ b/examples/ai-request-transformer/_3.6.x.yaml @@ -0,0 +1,18 @@ +name: ai-request-transformer +config: + prompt: "Mask any credit card numbers in my JSON message. Reply with only the JSON result." + transformation_extract_pattern: '\\{((.|\n)*)\\}' + llm: + route_type: "llm/v1/chat" + auth: + header_name: "Authorization" + header_value: "Bearer " + logging: + log_statistics: true + log_payloads: false + model: + provider: "openai" + name: "gpt-4" + options: + max_tokens: 1024 + temperature: 1.0 diff --git a/examples/ai-request-transformer/_3.7.x.yaml b/examples/ai-request-transformer/_3.7.x.yaml new file mode 100644 index 00000000..b8275ac7 --- /dev/null +++ b/examples/ai-request-transformer/_3.7.x.yaml @@ -0,0 +1,18 @@ +name: ai-request-transformer +config: + prompt: "Mask any credit card numbers in my JSON message. Reply with only the JSON result." + transformation_extract_pattern: '\\{((.|\n)*)\\}' + llm: + route_type: "llm/v1/chat" + auth: + header_name: "Authorization" + header_value: "Bearer " + logging: + log_statistics: true + log_payloads: false + model: + provider: "openai" + name: "gpt-4" + options: + max_tokens: 1024 + temperature: 1.0 diff --git a/examples/ai-request-transformer/_3.8.x.yaml b/examples/ai-request-transformer/_3.8.x.yaml new file mode 100644 index 00000000..b8275ac7 --- /dev/null +++ b/examples/ai-request-transformer/_3.8.x.yaml @@ -0,0 +1,18 @@ +name: ai-request-transformer +config: + prompt: "Mask any credit card numbers in my JSON message. Reply with only the JSON result." + transformation_extract_pattern: '\\{((.|\n)*)\\}' + llm: + route_type: "llm/v1/chat" + auth: + header_name: "Authorization" + header_value: "Bearer " + logging: + log_statistics: true + log_payloads: false + model: + provider: "openai" + name: "gpt-4" + options: + max_tokens: 1024 + temperature: 1.0 diff --git a/examples/ai-request-transformer/_3.9.x.yaml b/examples/ai-request-transformer/_3.9.x.yaml new file mode 100644 index 00000000..b8275ac7 --- /dev/null +++ b/examples/ai-request-transformer/_3.9.x.yaml @@ -0,0 +1,18 @@ +name: ai-request-transformer +config: + prompt: "Mask any credit card numbers in my JSON message. Reply with only the JSON result." + transformation_extract_pattern: '\\{((.|\n)*)\\}' + llm: + route_type: "llm/v1/chat" + auth: + header_name: "Authorization" + header_value: "Bearer " + logging: + log_statistics: true + log_payloads: false + model: + provider: "openai" + name: "gpt-4" + options: + max_tokens: 1024 + temperature: 1.0 diff --git a/examples/ai-response-transformer/_3.10.x.yaml b/examples/ai-response-transformer/_3.10.x.yaml new file mode 100644 index 00000000..4c62a8e2 --- /dev/null +++ b/examples/ai-response-transformer/_3.10.x.yaml @@ -0,0 +1,21 @@ +name: ai-response-transformer +config: + prompt: "For any city name, put the country that it's in, in brackets next to it. Reply with only the JSON result." + transformation_extract_pattern: '\\{((.|\n)*)\\}' + parse_llm_response_json_instructions: false + llm: + route_type: "llm/v1/chat" + auth: + header_name: "api-key" + header_value: "" + logging: + log_statistics: true + log_payloads: false + model: + provider: "azure" + name: "gpt-35-turbo" + options: + max_tokens: 1024 + temperature: 1.0 + azure_instance: "azure-openai-instance-name" + azure_deployment_id: "gpt-3-5-deployment" diff --git a/examples/ai-response-transformer/_3.11.x.yaml b/examples/ai-response-transformer/_3.11.x.yaml new file mode 100644 index 00000000..4c62a8e2 --- /dev/null +++ b/examples/ai-response-transformer/_3.11.x.yaml @@ -0,0 +1,21 @@ +name: ai-response-transformer +config: + prompt: "For any city name, put the country that it's in, in brackets next to it. Reply with only the JSON result." + transformation_extract_pattern: '\\{((.|\n)*)\\}' + parse_llm_response_json_instructions: false + llm: + route_type: "llm/v1/chat" + auth: + header_name: "api-key" + header_value: "" + logging: + log_statistics: true + log_payloads: false + model: + provider: "azure" + name: "gpt-35-turbo" + options: + max_tokens: 1024 + temperature: 1.0 + azure_instance: "azure-openai-instance-name" + azure_deployment_id: "gpt-3-5-deployment" diff --git a/examples/ai-response-transformer/_3.6.x.yaml b/examples/ai-response-transformer/_3.6.x.yaml new file mode 100644 index 00000000..4c62a8e2 --- /dev/null +++ b/examples/ai-response-transformer/_3.6.x.yaml @@ -0,0 +1,21 @@ +name: ai-response-transformer +config: + prompt: "For any city name, put the country that it's in, in brackets next to it. Reply with only the JSON result." + transformation_extract_pattern: '\\{((.|\n)*)\\}' + parse_llm_response_json_instructions: false + llm: + route_type: "llm/v1/chat" + auth: + header_name: "api-key" + header_value: "" + logging: + log_statistics: true + log_payloads: false + model: + provider: "azure" + name: "gpt-35-turbo" + options: + max_tokens: 1024 + temperature: 1.0 + azure_instance: "azure-openai-instance-name" + azure_deployment_id: "gpt-3-5-deployment" diff --git a/examples/ai-response-transformer/_3.7.x.yaml b/examples/ai-response-transformer/_3.7.x.yaml new file mode 100644 index 00000000..4c62a8e2 --- /dev/null +++ b/examples/ai-response-transformer/_3.7.x.yaml @@ -0,0 +1,21 @@ +name: ai-response-transformer +config: + prompt: "For any city name, put the country that it's in, in brackets next to it. Reply with only the JSON result." + transformation_extract_pattern: '\\{((.|\n)*)\\}' + parse_llm_response_json_instructions: false + llm: + route_type: "llm/v1/chat" + auth: + header_name: "api-key" + header_value: "" + logging: + log_statistics: true + log_payloads: false + model: + provider: "azure" + name: "gpt-35-turbo" + options: + max_tokens: 1024 + temperature: 1.0 + azure_instance: "azure-openai-instance-name" + azure_deployment_id: "gpt-3-5-deployment" diff --git a/examples/ai-response-transformer/_3.8.x.yaml b/examples/ai-response-transformer/_3.8.x.yaml new file mode 100644 index 00000000..4c62a8e2 --- /dev/null +++ b/examples/ai-response-transformer/_3.8.x.yaml @@ -0,0 +1,21 @@ +name: ai-response-transformer +config: + prompt: "For any city name, put the country that it's in, in brackets next to it. Reply with only the JSON result." + transformation_extract_pattern: '\\{((.|\n)*)\\}' + parse_llm_response_json_instructions: false + llm: + route_type: "llm/v1/chat" + auth: + header_name: "api-key" + header_value: "" + logging: + log_statistics: true + log_payloads: false + model: + provider: "azure" + name: "gpt-35-turbo" + options: + max_tokens: 1024 + temperature: 1.0 + azure_instance: "azure-openai-instance-name" + azure_deployment_id: "gpt-3-5-deployment" diff --git a/examples/ai-response-transformer/_3.9.x.yaml b/examples/ai-response-transformer/_3.9.x.yaml new file mode 100644 index 00000000..4c62a8e2 --- /dev/null +++ b/examples/ai-response-transformer/_3.9.x.yaml @@ -0,0 +1,21 @@ +name: ai-response-transformer +config: + prompt: "For any city name, put the country that it's in, in brackets next to it. Reply with only the JSON result." + transformation_extract_pattern: '\\{((.|\n)*)\\}' + parse_llm_response_json_instructions: false + llm: + route_type: "llm/v1/chat" + auth: + header_name: "api-key" + header_value: "" + logging: + log_statistics: true + log_payloads: false + model: + provider: "azure" + name: "gpt-35-turbo" + options: + max_tokens: 1024 + temperature: 1.0 + azure_instance: "azure-openai-instance-name" + azure_deployment_id: "gpt-3-5-deployment" diff --git a/examples/ai-sanitizer/_3.10.x.yaml b/examples/ai-sanitizer/_3.10.x.yaml new file mode 100644 index 00000000..d7085a54 --- /dev/null +++ b/examples/ai-sanitizer/_3.10.x.yaml @@ -0,0 +1,8 @@ +name: ai-sanitizer +config: + port: 9000 + anonymize: + - phone + - general + recover_redacted: false + redact_type: synthetic diff --git a/examples/ai-sanitizer/_3.11.x.yaml b/examples/ai-sanitizer/_3.11.x.yaml new file mode 100644 index 00000000..d7085a54 --- /dev/null +++ b/examples/ai-sanitizer/_3.11.x.yaml @@ -0,0 +1,8 @@ +name: ai-sanitizer +config: + port: 9000 + anonymize: + - phone + - general + recover_redacted: false + redact_type: synthetic diff --git a/examples/ai-semantic-cache/_3.10.x.yaml b/examples/ai-semantic-cache/_3.10.x.yaml new file mode 100644 index 00000000..e273c72f --- /dev/null +++ b/examples/ai-semantic-cache/_3.10.x.yaml @@ -0,0 +1,14 @@ +name: ai-semantic-cache +config: + embeddings: + model: + provider: openai + name: text-embedding-3-large + vectordb: + strategy: redis + dimensions: 3072 + threshold: 0.1 + distance_metric: cosine + redis: + host: exampleredis.com + port: 80 diff --git a/examples/ai-semantic-cache/_3.11.x.yaml b/examples/ai-semantic-cache/_3.11.x.yaml new file mode 100644 index 00000000..e273c72f --- /dev/null +++ b/examples/ai-semantic-cache/_3.11.x.yaml @@ -0,0 +1,14 @@ +name: ai-semantic-cache +config: + embeddings: + model: + provider: openai + name: text-embedding-3-large + vectordb: + strategy: redis + dimensions: 3072 + threshold: 0.1 + distance_metric: cosine + redis: + host: exampleredis.com + port: 80 diff --git a/examples/ai-semantic-cache/_3.8.x.yaml b/examples/ai-semantic-cache/_3.8.x.yaml new file mode 100644 index 00000000..e273c72f --- /dev/null +++ b/examples/ai-semantic-cache/_3.8.x.yaml @@ -0,0 +1,14 @@ +name: ai-semantic-cache +config: + embeddings: + model: + provider: openai + name: text-embedding-3-large + vectordb: + strategy: redis + dimensions: 3072 + threshold: 0.1 + distance_metric: cosine + redis: + host: exampleredis.com + port: 80 diff --git a/examples/ai-semantic-cache/_3.9.x.yaml b/examples/ai-semantic-cache/_3.9.x.yaml new file mode 100644 index 00000000..e273c72f --- /dev/null +++ b/examples/ai-semantic-cache/_3.9.x.yaml @@ -0,0 +1,14 @@ +name: ai-semantic-cache +config: + embeddings: + model: + provider: openai + name: text-embedding-3-large + vectordb: + strategy: redis + dimensions: 3072 + threshold: 0.1 + distance_metric: cosine + redis: + host: exampleredis.com + port: 80 diff --git a/examples/ai-semantic-prompt-guard/_3.10.x.yaml b/examples/ai-semantic-prompt-guard/_3.10.x.yaml new file mode 100644 index 00000000..8cbb9571 --- /dev/null +++ b/examples/ai-semantic-prompt-guard/_3.10.x.yaml @@ -0,0 +1,23 @@ +name: ai-semantic-prompt-guard +config: + embeddings: + auth: + header_name: Authorization + header_value: Bearer + model: + name: text-embedding-3-small + provider: openai + search: + threshold: 0.7 + vectordb: + strategy: redis + distance_metric: cosine + threshold: 0.5 + dimensions: 1024 + redis: + host: localhost + port: 6379 + rules: + match_all_conversation_history: true + allow_prompts: + - Questions about Kong \ No newline at end of file diff --git a/examples/ai-semantic-prompt-guard/_3.11.x.yaml b/examples/ai-semantic-prompt-guard/_3.11.x.yaml new file mode 100644 index 00000000..8cbb9571 --- /dev/null +++ b/examples/ai-semantic-prompt-guard/_3.11.x.yaml @@ -0,0 +1,23 @@ +name: ai-semantic-prompt-guard +config: + embeddings: + auth: + header_name: Authorization + header_value: Bearer + model: + name: text-embedding-3-small + provider: openai + search: + threshold: 0.7 + vectordb: + strategy: redis + distance_metric: cosine + threshold: 0.5 + dimensions: 1024 + redis: + host: localhost + port: 6379 + rules: + match_all_conversation_history: true + allow_prompts: + - Questions about Kong \ No newline at end of file diff --git a/examples/ai-semantic-prompt-guard/_3.8.x.yaml b/examples/ai-semantic-prompt-guard/_3.8.x.yaml new file mode 100644 index 00000000..8cbb9571 --- /dev/null +++ b/examples/ai-semantic-prompt-guard/_3.8.x.yaml @@ -0,0 +1,23 @@ +name: ai-semantic-prompt-guard +config: + embeddings: + auth: + header_name: Authorization + header_value: Bearer + model: + name: text-embedding-3-small + provider: openai + search: + threshold: 0.7 + vectordb: + strategy: redis + distance_metric: cosine + threshold: 0.5 + dimensions: 1024 + redis: + host: localhost + port: 6379 + rules: + match_all_conversation_history: true + allow_prompts: + - Questions about Kong \ No newline at end of file diff --git a/examples/ai-semantic-prompt-guard/_3.9.x.yaml b/examples/ai-semantic-prompt-guard/_3.9.x.yaml new file mode 100644 index 00000000..8cbb9571 --- /dev/null +++ b/examples/ai-semantic-prompt-guard/_3.9.x.yaml @@ -0,0 +1,23 @@ +name: ai-semantic-prompt-guard +config: + embeddings: + auth: + header_name: Authorization + header_value: Bearer + model: + name: text-embedding-3-small + provider: openai + search: + threshold: 0.7 + vectordb: + strategy: redis + distance_metric: cosine + threshold: 0.5 + dimensions: 1024 + redis: + host: localhost + port: 6379 + rules: + match_all_conversation_history: true + allow_prompts: + - Questions about Kong \ No newline at end of file diff --git a/examples/app-dynamics/_3.10.x.yaml b/examples/app-dynamics/_3.10.x.yaml new file mode 100644 index 00000000..fb73f97b --- /dev/null +++ b/examples/app-dynamics/_3.10.x.yaml @@ -0,0 +1,2 @@ +name: app-dynamics +config: {} diff --git a/examples/app-dynamics/_3.11.x.yaml b/examples/app-dynamics/_3.11.x.yaml new file mode 100644 index 00000000..fb73f97b --- /dev/null +++ b/examples/app-dynamics/_3.11.x.yaml @@ -0,0 +1,2 @@ +name: app-dynamics +config: {} diff --git a/examples/app-dynamics/_3.5.x.yaml b/examples/app-dynamics/_3.5.x.yaml new file mode 100644 index 00000000..fb73f97b --- /dev/null +++ b/examples/app-dynamics/_3.5.x.yaml @@ -0,0 +1,2 @@ +name: app-dynamics +config: {} diff --git a/examples/app-dynamics/_3.6.x.yaml b/examples/app-dynamics/_3.6.x.yaml new file mode 100644 index 00000000..fb73f97b --- /dev/null +++ b/examples/app-dynamics/_3.6.x.yaml @@ -0,0 +1,2 @@ +name: app-dynamics +config: {} diff --git a/examples/app-dynamics/_3.7.x.yaml b/examples/app-dynamics/_3.7.x.yaml new file mode 100644 index 00000000..fb73f97b --- /dev/null +++ b/examples/app-dynamics/_3.7.x.yaml @@ -0,0 +1,2 @@ +name: app-dynamics +config: {} diff --git a/examples/app-dynamics/_3.8.x.yaml b/examples/app-dynamics/_3.8.x.yaml new file mode 100644 index 00000000..fb73f97b --- /dev/null +++ b/examples/app-dynamics/_3.8.x.yaml @@ -0,0 +1,2 @@ +name: app-dynamics +config: {} diff --git a/examples/app-dynamics/_3.9.x.yaml b/examples/app-dynamics/_3.9.x.yaml new file mode 100644 index 00000000..fb73f97b --- /dev/null +++ b/examples/app-dynamics/_3.9.x.yaml @@ -0,0 +1,2 @@ +name: app-dynamics +config: {} diff --git a/examples/application-registration/_3.10.x.yaml b/examples/application-registration/_3.10.x.yaml new file mode 100644 index 00000000..a52184fb --- /dev/null +++ b/examples/application-registration/_3.10.x.yaml @@ -0,0 +1,7 @@ +name: application-registration +service: SERVICE_NAME +config: + auto_approve: false + description: + display_name: + show_issuer: false diff --git a/examples/application-registration/_3.11.x.yaml b/examples/application-registration/_3.11.x.yaml new file mode 100644 index 00000000..a52184fb --- /dev/null +++ b/examples/application-registration/_3.11.x.yaml @@ -0,0 +1,7 @@ +name: application-registration +service: SERVICE_NAME +config: + auto_approve: false + description: + display_name: + show_issuer: false diff --git a/examples/application-registration/_3.5.x.yaml b/examples/application-registration/_3.5.x.yaml new file mode 100644 index 00000000..a52184fb --- /dev/null +++ b/examples/application-registration/_3.5.x.yaml @@ -0,0 +1,7 @@ +name: application-registration +service: SERVICE_NAME +config: + auto_approve: false + description: + display_name: + show_issuer: false diff --git a/examples/application-registration/_3.6.x.yaml b/examples/application-registration/_3.6.x.yaml new file mode 100644 index 00000000..a52184fb --- /dev/null +++ b/examples/application-registration/_3.6.x.yaml @@ -0,0 +1,7 @@ +name: application-registration +service: SERVICE_NAME +config: + auto_approve: false + description: + display_name: + show_issuer: false diff --git a/examples/application-registration/_3.7.x.yaml b/examples/application-registration/_3.7.x.yaml new file mode 100644 index 00000000..a52184fb --- /dev/null +++ b/examples/application-registration/_3.7.x.yaml @@ -0,0 +1,7 @@ +name: application-registration +service: SERVICE_NAME +config: + auto_approve: false + description: + display_name: + show_issuer: false diff --git a/examples/application-registration/_3.8.x.yaml b/examples/application-registration/_3.8.x.yaml new file mode 100644 index 00000000..a52184fb --- /dev/null +++ b/examples/application-registration/_3.8.x.yaml @@ -0,0 +1,7 @@ +name: application-registration +service: SERVICE_NAME +config: + auto_approve: false + description: + display_name: + show_issuer: false diff --git a/examples/application-registration/_3.9.x.yaml b/examples/application-registration/_3.9.x.yaml new file mode 100644 index 00000000..a52184fb --- /dev/null +++ b/examples/application-registration/_3.9.x.yaml @@ -0,0 +1,7 @@ +name: application-registration +service: SERVICE_NAME +config: + auto_approve: false + description: + display_name: + show_issuer: false diff --git a/examples/aws-lambda/_3.10.x.yaml b/examples/aws-lambda/_3.10.x.yaml new file mode 100644 index 00000000..5eddd18d --- /dev/null +++ b/examples/aws-lambda/_3.10.x.yaml @@ -0,0 +1,9 @@ +name: aws-lambda +config: + aws_key: + aws_secret: + aws_region: + aws_assume_role_arn: + aws_role_session_name: + function_name: + proxy_url: http://my-proxy-server:3128 diff --git a/examples/aws-lambda/_3.11.x.yaml b/examples/aws-lambda/_3.11.x.yaml new file mode 100644 index 00000000..5eddd18d --- /dev/null +++ b/examples/aws-lambda/_3.11.x.yaml @@ -0,0 +1,9 @@ +name: aws-lambda +config: + aws_key: + aws_secret: + aws_region: + aws_assume_role_arn: + aws_role_session_name: + function_name: + proxy_url: http://my-proxy-server:3128 diff --git a/examples/aws-lambda/_3.5.x.yaml b/examples/aws-lambda/_3.5.x.yaml new file mode 100644 index 00000000..5eddd18d --- /dev/null +++ b/examples/aws-lambda/_3.5.x.yaml @@ -0,0 +1,9 @@ +name: aws-lambda +config: + aws_key: + aws_secret: + aws_region: + aws_assume_role_arn: + aws_role_session_name: + function_name: + proxy_url: http://my-proxy-server:3128 diff --git a/examples/aws-lambda/_3.6.x.yaml b/examples/aws-lambda/_3.6.x.yaml new file mode 100644 index 00000000..5eddd18d --- /dev/null +++ b/examples/aws-lambda/_3.6.x.yaml @@ -0,0 +1,9 @@ +name: aws-lambda +config: + aws_key: + aws_secret: + aws_region: + aws_assume_role_arn: + aws_role_session_name: + function_name: + proxy_url: http://my-proxy-server:3128 diff --git a/examples/aws-lambda/_3.7.x.yaml b/examples/aws-lambda/_3.7.x.yaml new file mode 100644 index 00000000..5eddd18d --- /dev/null +++ b/examples/aws-lambda/_3.7.x.yaml @@ -0,0 +1,9 @@ +name: aws-lambda +config: + aws_key: + aws_secret: + aws_region: + aws_assume_role_arn: + aws_role_session_name: + function_name: + proxy_url: http://my-proxy-server:3128 diff --git a/examples/aws-lambda/_3.8.x.yaml b/examples/aws-lambda/_3.8.x.yaml new file mode 100644 index 00000000..5eddd18d --- /dev/null +++ b/examples/aws-lambda/_3.8.x.yaml @@ -0,0 +1,9 @@ +name: aws-lambda +config: + aws_key: + aws_secret: + aws_region: + aws_assume_role_arn: + aws_role_session_name: + function_name: + proxy_url: http://my-proxy-server:3128 diff --git a/examples/aws-lambda/_3.9.x.yaml b/examples/aws-lambda/_3.9.x.yaml new file mode 100644 index 00000000..5eddd18d --- /dev/null +++ b/examples/aws-lambda/_3.9.x.yaml @@ -0,0 +1,9 @@ +name: aws-lambda +config: + aws_key: + aws_secret: + aws_region: + aws_assume_role_arn: + aws_role_session_name: + function_name: + proxy_url: http://my-proxy-server:3128 diff --git a/examples/azure-functions/_3.10.x.yaml b/examples/azure-functions/_3.10.x.yaml new file mode 100644 index 00000000..00f73c86 --- /dev/null +++ b/examples/azure-functions/_3.10.x.yaml @@ -0,0 +1,6 @@ +name: azure-functions +config: + functionname: + appname: + hostdomain: azurewebsites.net + apikey: diff --git a/examples/azure-functions/_3.11.x.yaml b/examples/azure-functions/_3.11.x.yaml new file mode 100644 index 00000000..00f73c86 --- /dev/null +++ b/examples/azure-functions/_3.11.x.yaml @@ -0,0 +1,6 @@ +name: azure-functions +config: + functionname: + appname: + hostdomain: azurewebsites.net + apikey: diff --git a/examples/azure-functions/_3.5.x.yaml b/examples/azure-functions/_3.5.x.yaml new file mode 100644 index 00000000..00f73c86 --- /dev/null +++ b/examples/azure-functions/_3.5.x.yaml @@ -0,0 +1,6 @@ +name: azure-functions +config: + functionname: + appname: + hostdomain: azurewebsites.net + apikey: diff --git a/examples/azure-functions/_3.6.x.yaml b/examples/azure-functions/_3.6.x.yaml new file mode 100644 index 00000000..00f73c86 --- /dev/null +++ b/examples/azure-functions/_3.6.x.yaml @@ -0,0 +1,6 @@ +name: azure-functions +config: + functionname: + appname: + hostdomain: azurewebsites.net + apikey: diff --git a/examples/azure-functions/_3.7.x.yaml b/examples/azure-functions/_3.7.x.yaml new file mode 100644 index 00000000..00f73c86 --- /dev/null +++ b/examples/azure-functions/_3.7.x.yaml @@ -0,0 +1,6 @@ +name: azure-functions +config: + functionname: + appname: + hostdomain: azurewebsites.net + apikey: diff --git a/examples/azure-functions/_3.8.x.yaml b/examples/azure-functions/_3.8.x.yaml new file mode 100644 index 00000000..00f73c86 --- /dev/null +++ b/examples/azure-functions/_3.8.x.yaml @@ -0,0 +1,6 @@ +name: azure-functions +config: + functionname: + appname: + hostdomain: azurewebsites.net + apikey: diff --git a/examples/azure-functions/_3.9.x.yaml b/examples/azure-functions/_3.9.x.yaml new file mode 100644 index 00000000..00f73c86 --- /dev/null +++ b/examples/azure-functions/_3.9.x.yaml @@ -0,0 +1,6 @@ +name: azure-functions +config: + functionname: + appname: + hostdomain: azurewebsites.net + apikey: diff --git a/examples/basic-auth/_3.10.x.yaml b/examples/basic-auth/_3.10.x.yaml new file mode 100644 index 00000000..40fcf8c2 --- /dev/null +++ b/examples/basic-auth/_3.10.x.yaml @@ -0,0 +1,3 @@ +name: basic-auth +config: + hide_credentials: true diff --git a/examples/basic-auth/_3.11.x.yaml b/examples/basic-auth/_3.11.x.yaml new file mode 100644 index 00000000..40fcf8c2 --- /dev/null +++ b/examples/basic-auth/_3.11.x.yaml @@ -0,0 +1,3 @@ +name: basic-auth +config: + hide_credentials: true diff --git a/examples/basic-auth/_3.5.x.yaml b/examples/basic-auth/_3.5.x.yaml new file mode 100644 index 00000000..40fcf8c2 --- /dev/null +++ b/examples/basic-auth/_3.5.x.yaml @@ -0,0 +1,3 @@ +name: basic-auth +config: + hide_credentials: true diff --git a/examples/basic-auth/_3.6.x.yaml b/examples/basic-auth/_3.6.x.yaml new file mode 100644 index 00000000..40fcf8c2 --- /dev/null +++ b/examples/basic-auth/_3.6.x.yaml @@ -0,0 +1,3 @@ +name: basic-auth +config: + hide_credentials: true diff --git a/examples/basic-auth/_3.7.x.yaml b/examples/basic-auth/_3.7.x.yaml new file mode 100644 index 00000000..40fcf8c2 --- /dev/null +++ b/examples/basic-auth/_3.7.x.yaml @@ -0,0 +1,3 @@ +name: basic-auth +config: + hide_credentials: true diff --git a/examples/basic-auth/_3.8.x.yaml b/examples/basic-auth/_3.8.x.yaml new file mode 100644 index 00000000..40fcf8c2 --- /dev/null +++ b/examples/basic-auth/_3.8.x.yaml @@ -0,0 +1,3 @@ +name: basic-auth +config: + hide_credentials: true diff --git a/examples/basic-auth/_3.9.x.yaml b/examples/basic-auth/_3.9.x.yaml new file mode 100644 index 00000000..40fcf8c2 --- /dev/null +++ b/examples/basic-auth/_3.9.x.yaml @@ -0,0 +1,3 @@ +name: basic-auth +config: + hide_credentials: true diff --git a/examples/bot-detection/_3.10.x.yaml b/examples/bot-detection/_3.10.x.yaml new file mode 100644 index 00000000..e4f2eb24 --- /dev/null +++ b/examples/bot-detection/_3.10.x.yaml @@ -0,0 +1,4 @@ +name: bot-detection +config: + deny: + - helloworld diff --git a/examples/bot-detection/_3.11.x.yaml b/examples/bot-detection/_3.11.x.yaml new file mode 100644 index 00000000..e4f2eb24 --- /dev/null +++ b/examples/bot-detection/_3.11.x.yaml @@ -0,0 +1,4 @@ +name: bot-detection +config: + deny: + - helloworld diff --git a/examples/bot-detection/_3.5.x.yaml b/examples/bot-detection/_3.5.x.yaml new file mode 100644 index 00000000..e4f2eb24 --- /dev/null +++ b/examples/bot-detection/_3.5.x.yaml @@ -0,0 +1,4 @@ +name: bot-detection +config: + deny: + - helloworld diff --git a/examples/bot-detection/_3.6.x.yaml b/examples/bot-detection/_3.6.x.yaml new file mode 100644 index 00000000..e4f2eb24 --- /dev/null +++ b/examples/bot-detection/_3.6.x.yaml @@ -0,0 +1,4 @@ +name: bot-detection +config: + deny: + - helloworld diff --git a/examples/bot-detection/_3.7.x.yaml b/examples/bot-detection/_3.7.x.yaml new file mode 100644 index 00000000..e4f2eb24 --- /dev/null +++ b/examples/bot-detection/_3.7.x.yaml @@ -0,0 +1,4 @@ +name: bot-detection +config: + deny: + - helloworld diff --git a/examples/bot-detection/_3.8.x.yaml b/examples/bot-detection/_3.8.x.yaml new file mode 100644 index 00000000..e4f2eb24 --- /dev/null +++ b/examples/bot-detection/_3.8.x.yaml @@ -0,0 +1,4 @@ +name: bot-detection +config: + deny: + - helloworld diff --git a/examples/bot-detection/_3.9.x.yaml b/examples/bot-detection/_3.9.x.yaml new file mode 100644 index 00000000..e4f2eb24 --- /dev/null +++ b/examples/bot-detection/_3.9.x.yaml @@ -0,0 +1,4 @@ +name: bot-detection +config: + deny: + - helloworld diff --git a/examples/canary/_3.10.x.yaml b/examples/canary/_3.10.x.yaml new file mode 100644 index 00000000..928424f8 --- /dev/null +++ b/examples/canary/_3.10.x.yaml @@ -0,0 +1,5 @@ +name: canary +config: + percentage: 50 + upstream_host: example.com + upstream_port: 80 diff --git a/examples/canary/_3.11.x.yaml b/examples/canary/_3.11.x.yaml new file mode 100644 index 00000000..928424f8 --- /dev/null +++ b/examples/canary/_3.11.x.yaml @@ -0,0 +1,5 @@ +name: canary +config: + percentage: 50 + upstream_host: example.com + upstream_port: 80 diff --git a/examples/canary/_3.5.x.yaml b/examples/canary/_3.5.x.yaml new file mode 100644 index 00000000..928424f8 --- /dev/null +++ b/examples/canary/_3.5.x.yaml @@ -0,0 +1,5 @@ +name: canary +config: + percentage: 50 + upstream_host: example.com + upstream_port: 80 diff --git a/examples/canary/_3.6.x.yaml b/examples/canary/_3.6.x.yaml new file mode 100644 index 00000000..928424f8 --- /dev/null +++ b/examples/canary/_3.6.x.yaml @@ -0,0 +1,5 @@ +name: canary +config: + percentage: 50 + upstream_host: example.com + upstream_port: 80 diff --git a/examples/canary/_3.7.x.yaml b/examples/canary/_3.7.x.yaml new file mode 100644 index 00000000..928424f8 --- /dev/null +++ b/examples/canary/_3.7.x.yaml @@ -0,0 +1,5 @@ +name: canary +config: + percentage: 50 + upstream_host: example.com + upstream_port: 80 diff --git a/examples/canary/_3.8.x.yaml b/examples/canary/_3.8.x.yaml new file mode 100644 index 00000000..928424f8 --- /dev/null +++ b/examples/canary/_3.8.x.yaml @@ -0,0 +1,5 @@ +name: canary +config: + percentage: 50 + upstream_host: example.com + upstream_port: 80 diff --git a/examples/canary/_3.9.x.yaml b/examples/canary/_3.9.x.yaml new file mode 100644 index 00000000..928424f8 --- /dev/null +++ b/examples/canary/_3.9.x.yaml @@ -0,0 +1,5 @@ +name: canary +config: + percentage: 50 + upstream_host: example.com + upstream_port: 80 diff --git a/examples/confluent-consume/_3.10.x.yaml b/examples/confluent-consume/_3.10.x.yaml new file mode 100644 index 00000000..38774ad5 --- /dev/null +++ b/examples/confluent-consume/_3.10.x.yaml @@ -0,0 +1,12 @@ +name: confluent-consume +config: + bootstrap_servers: + - host: YOUR_BOOTSTRAP_SERVER + port: 9092 + topics: + - name: my-topic + mode: http-get + message_deserializer: json + auto_offset_reset: latest + cluster_api_key: YOUR_API_KEY + cluster_api_secret: YOUR_API_SECRET \ No newline at end of file diff --git a/examples/confluent-consume/_3.11.x.yaml b/examples/confluent-consume/_3.11.x.yaml new file mode 100644 index 00000000..38774ad5 --- /dev/null +++ b/examples/confluent-consume/_3.11.x.yaml @@ -0,0 +1,12 @@ +name: confluent-consume +config: + bootstrap_servers: + - host: YOUR_BOOTSTRAP_SERVER + port: 9092 + topics: + - name: my-topic + mode: http-get + message_deserializer: json + auto_offset_reset: latest + cluster_api_key: YOUR_API_KEY + cluster_api_secret: YOUR_API_SECRET \ No newline at end of file diff --git a/examples/confluent/_3.10.x.yaml b/examples/confluent/_3.10.x.yaml new file mode 100644 index 00000000..d4bd8e82 --- /dev/null +++ b/examples/confluent/_3.10.x.yaml @@ -0,0 +1,9 @@ +name: confluent +config: + bootstrap_servers: + - host: example.com + port: 80 + producer_async: false + topic: 'kong-test' + cluster_api_key: CONFLUENT_CLUSTER_API_KEY + cluster_api_secret: CONFLUENT_CLUSTER_API_SECRET \ No newline at end of file diff --git a/examples/confluent/_3.11.x.yaml b/examples/confluent/_3.11.x.yaml new file mode 100644 index 00000000..d4bd8e82 --- /dev/null +++ b/examples/confluent/_3.11.x.yaml @@ -0,0 +1,9 @@ +name: confluent +config: + bootstrap_servers: + - host: example.com + port: 80 + producer_async: false + topic: 'kong-test' + cluster_api_key: CONFLUENT_CLUSTER_API_KEY + cluster_api_secret: CONFLUENT_CLUSTER_API_SECRET \ No newline at end of file diff --git a/examples/confluent/_3.8.x.yaml b/examples/confluent/_3.8.x.yaml new file mode 100644 index 00000000..d4bd8e82 --- /dev/null +++ b/examples/confluent/_3.8.x.yaml @@ -0,0 +1,9 @@ +name: confluent +config: + bootstrap_servers: + - host: example.com + port: 80 + producer_async: false + topic: 'kong-test' + cluster_api_key: CONFLUENT_CLUSTER_API_KEY + cluster_api_secret: CONFLUENT_CLUSTER_API_SECRET \ No newline at end of file diff --git a/examples/confluent/_3.9.x.yaml b/examples/confluent/_3.9.x.yaml new file mode 100644 index 00000000..d4bd8e82 --- /dev/null +++ b/examples/confluent/_3.9.x.yaml @@ -0,0 +1,9 @@ +name: confluent +config: + bootstrap_servers: + - host: example.com + port: 80 + producer_async: false + topic: 'kong-test' + cluster_api_key: CONFLUENT_CLUSTER_API_KEY + cluster_api_secret: CONFLUENT_CLUSTER_API_SECRET \ No newline at end of file diff --git a/examples/correlation-id/_3.10.x.yaml b/examples/correlation-id/_3.10.x.yaml new file mode 100644 index 00000000..31240989 --- /dev/null +++ b/examples/correlation-id/_3.10.x.yaml @@ -0,0 +1,5 @@ +name: correlation-id +config: + header_name: Kong-Request-ID + generator: uuid#counter + echo_downstream: false diff --git a/examples/correlation-id/_3.11.x.yaml b/examples/correlation-id/_3.11.x.yaml new file mode 100644 index 00000000..31240989 --- /dev/null +++ b/examples/correlation-id/_3.11.x.yaml @@ -0,0 +1,5 @@ +name: correlation-id +config: + header_name: Kong-Request-ID + generator: uuid#counter + echo_downstream: false diff --git a/examples/correlation-id/_3.5.x.yaml b/examples/correlation-id/_3.5.x.yaml new file mode 100644 index 00000000..31240989 --- /dev/null +++ b/examples/correlation-id/_3.5.x.yaml @@ -0,0 +1,5 @@ +name: correlation-id +config: + header_name: Kong-Request-ID + generator: uuid#counter + echo_downstream: false diff --git a/examples/correlation-id/_3.6.x.yaml b/examples/correlation-id/_3.6.x.yaml new file mode 100644 index 00000000..31240989 --- /dev/null +++ b/examples/correlation-id/_3.6.x.yaml @@ -0,0 +1,5 @@ +name: correlation-id +config: + header_name: Kong-Request-ID + generator: uuid#counter + echo_downstream: false diff --git a/examples/correlation-id/_3.7.x.yaml b/examples/correlation-id/_3.7.x.yaml new file mode 100644 index 00000000..31240989 --- /dev/null +++ b/examples/correlation-id/_3.7.x.yaml @@ -0,0 +1,5 @@ +name: correlation-id +config: + header_name: Kong-Request-ID + generator: uuid#counter + echo_downstream: false diff --git a/examples/correlation-id/_3.8.x.yaml b/examples/correlation-id/_3.8.x.yaml new file mode 100644 index 00000000..31240989 --- /dev/null +++ b/examples/correlation-id/_3.8.x.yaml @@ -0,0 +1,5 @@ +name: correlation-id +config: + header_name: Kong-Request-ID + generator: uuid#counter + echo_downstream: false diff --git a/examples/correlation-id/_3.9.x.yaml b/examples/correlation-id/_3.9.x.yaml new file mode 100644 index 00000000..31240989 --- /dev/null +++ b/examples/correlation-id/_3.9.x.yaml @@ -0,0 +1,5 @@ +name: correlation-id +config: + header_name: Kong-Request-ID + generator: uuid#counter + echo_downstream: false diff --git a/examples/cors/_3.10.x.yaml b/examples/cors/_3.10.x.yaml new file mode 100644 index 00000000..c2046281 --- /dev/null +++ b/examples/cors/_3.10.x.yaml @@ -0,0 +1,19 @@ +name: cors +config: + origins: + - http://mockbin.com + methods: + - GET + - POST + headers: + - Accept + - Accept-Version + - Content-Length + - Content-MD5 + - Content-Type + - Date + - X-Auth-Token + exposed_headers: + - X-Auth-Token + credentials: true + max_age: 3600 diff --git a/examples/cors/_3.11.x.yaml b/examples/cors/_3.11.x.yaml new file mode 100644 index 00000000..c2046281 --- /dev/null +++ b/examples/cors/_3.11.x.yaml @@ -0,0 +1,19 @@ +name: cors +config: + origins: + - http://mockbin.com + methods: + - GET + - POST + headers: + - Accept + - Accept-Version + - Content-Length + - Content-MD5 + - Content-Type + - Date + - X-Auth-Token + exposed_headers: + - X-Auth-Token + credentials: true + max_age: 3600 diff --git a/examples/cors/_3.5.x.yaml b/examples/cors/_3.5.x.yaml new file mode 100644 index 00000000..c2046281 --- /dev/null +++ b/examples/cors/_3.5.x.yaml @@ -0,0 +1,19 @@ +name: cors +config: + origins: + - http://mockbin.com + methods: + - GET + - POST + headers: + - Accept + - Accept-Version + - Content-Length + - Content-MD5 + - Content-Type + - Date + - X-Auth-Token + exposed_headers: + - X-Auth-Token + credentials: true + max_age: 3600 diff --git a/examples/cors/_3.6.x.yaml b/examples/cors/_3.6.x.yaml new file mode 100644 index 00000000..c2046281 --- /dev/null +++ b/examples/cors/_3.6.x.yaml @@ -0,0 +1,19 @@ +name: cors +config: + origins: + - http://mockbin.com + methods: + - GET + - POST + headers: + - Accept + - Accept-Version + - Content-Length + - Content-MD5 + - Content-Type + - Date + - X-Auth-Token + exposed_headers: + - X-Auth-Token + credentials: true + max_age: 3600 diff --git a/examples/cors/_3.7.x.yaml b/examples/cors/_3.7.x.yaml new file mode 100644 index 00000000..c2046281 --- /dev/null +++ b/examples/cors/_3.7.x.yaml @@ -0,0 +1,19 @@ +name: cors +config: + origins: + - http://mockbin.com + methods: + - GET + - POST + headers: + - Accept + - Accept-Version + - Content-Length + - Content-MD5 + - Content-Type + - Date + - X-Auth-Token + exposed_headers: + - X-Auth-Token + credentials: true + max_age: 3600 diff --git a/examples/cors/_3.8.x.yaml b/examples/cors/_3.8.x.yaml new file mode 100644 index 00000000..c2046281 --- /dev/null +++ b/examples/cors/_3.8.x.yaml @@ -0,0 +1,19 @@ +name: cors +config: + origins: + - http://mockbin.com + methods: + - GET + - POST + headers: + - Accept + - Accept-Version + - Content-Length + - Content-MD5 + - Content-Type + - Date + - X-Auth-Token + exposed_headers: + - X-Auth-Token + credentials: true + max_age: 3600 diff --git a/examples/cors/_3.9.x.yaml b/examples/cors/_3.9.x.yaml new file mode 100644 index 00000000..c2046281 --- /dev/null +++ b/examples/cors/_3.9.x.yaml @@ -0,0 +1,19 @@ +name: cors +config: + origins: + - http://mockbin.com + methods: + - GET + - POST + headers: + - Accept + - Accept-Version + - Content-Length + - Content-MD5 + - Content-Type + - Date + - X-Auth-Token + exposed_headers: + - X-Auth-Token + credentials: true + max_age: 3600 diff --git a/examples/datadog/_3.10.x.yaml b/examples/datadog/_3.10.x.yaml new file mode 100644 index 00000000..957e300c --- /dev/null +++ b/examples/datadog/_3.10.x.yaml @@ -0,0 +1,6 @@ +name: datadog +config: + host: 127.0.0.1 + port: 8125 + flush_timeout: 2 + retry_count: 10 diff --git a/examples/datadog/_3.11.x.yaml b/examples/datadog/_3.11.x.yaml new file mode 100644 index 00000000..957e300c --- /dev/null +++ b/examples/datadog/_3.11.x.yaml @@ -0,0 +1,6 @@ +name: datadog +config: + host: 127.0.0.1 + port: 8125 + flush_timeout: 2 + retry_count: 10 diff --git a/examples/datadog/_3.5.x.yaml b/examples/datadog/_3.5.x.yaml new file mode 100644 index 00000000..957e300c --- /dev/null +++ b/examples/datadog/_3.5.x.yaml @@ -0,0 +1,6 @@ +name: datadog +config: + host: 127.0.0.1 + port: 8125 + flush_timeout: 2 + retry_count: 10 diff --git a/examples/datadog/_3.6.x.yaml b/examples/datadog/_3.6.x.yaml new file mode 100644 index 00000000..957e300c --- /dev/null +++ b/examples/datadog/_3.6.x.yaml @@ -0,0 +1,6 @@ +name: datadog +config: + host: 127.0.0.1 + port: 8125 + flush_timeout: 2 + retry_count: 10 diff --git a/examples/datadog/_3.7.x.yaml b/examples/datadog/_3.7.x.yaml new file mode 100644 index 00000000..957e300c --- /dev/null +++ b/examples/datadog/_3.7.x.yaml @@ -0,0 +1,6 @@ +name: datadog +config: + host: 127.0.0.1 + port: 8125 + flush_timeout: 2 + retry_count: 10 diff --git a/examples/datadog/_3.8.x.yaml b/examples/datadog/_3.8.x.yaml new file mode 100644 index 00000000..957e300c --- /dev/null +++ b/examples/datadog/_3.8.x.yaml @@ -0,0 +1,6 @@ +name: datadog +config: + host: 127.0.0.1 + port: 8125 + flush_timeout: 2 + retry_count: 10 diff --git a/examples/datadog/_3.9.x.yaml b/examples/datadog/_3.9.x.yaml new file mode 100644 index 00000000..957e300c --- /dev/null +++ b/examples/datadog/_3.9.x.yaml @@ -0,0 +1,6 @@ +name: datadog +config: + host: 127.0.0.1 + port: 8125 + flush_timeout: 2 + retry_count: 10 diff --git a/examples/degraphql/_3.10.x.yaml b/examples/degraphql/_3.10.x.yaml new file mode 100644 index 00000000..84443323 --- /dev/null +++ b/examples/degraphql/_3.10.x.yaml @@ -0,0 +1,3 @@ +name: degraphql +config: + graphql_server_path: '/graphql' diff --git a/examples/degraphql/_3.11.x.yaml b/examples/degraphql/_3.11.x.yaml new file mode 100644 index 00000000..84443323 --- /dev/null +++ b/examples/degraphql/_3.11.x.yaml @@ -0,0 +1,3 @@ +name: degraphql +config: + graphql_server_path: '/graphql' diff --git a/examples/degraphql/_3.5.x.yaml b/examples/degraphql/_3.5.x.yaml new file mode 100644 index 00000000..84443323 --- /dev/null +++ b/examples/degraphql/_3.5.x.yaml @@ -0,0 +1,3 @@ +name: degraphql +config: + graphql_server_path: '/graphql' diff --git a/examples/degraphql/_3.6.x.yaml b/examples/degraphql/_3.6.x.yaml new file mode 100644 index 00000000..84443323 --- /dev/null +++ b/examples/degraphql/_3.6.x.yaml @@ -0,0 +1,3 @@ +name: degraphql +config: + graphql_server_path: '/graphql' diff --git a/examples/degraphql/_3.7.x.yaml b/examples/degraphql/_3.7.x.yaml new file mode 100644 index 00000000..84443323 --- /dev/null +++ b/examples/degraphql/_3.7.x.yaml @@ -0,0 +1,3 @@ +name: degraphql +config: + graphql_server_path: '/graphql' diff --git a/examples/degraphql/_3.8.x.yaml b/examples/degraphql/_3.8.x.yaml new file mode 100644 index 00000000..84443323 --- /dev/null +++ b/examples/degraphql/_3.8.x.yaml @@ -0,0 +1,3 @@ +name: degraphql +config: + graphql_server_path: '/graphql' diff --git a/examples/degraphql/_3.9.x.yaml b/examples/degraphql/_3.9.x.yaml new file mode 100644 index 00000000..84443323 --- /dev/null +++ b/examples/degraphql/_3.9.x.yaml @@ -0,0 +1,3 @@ +name: degraphql +config: + graphql_server_path: '/graphql' diff --git a/examples/exit-transformer/_2.4.x.yaml b/examples/exit-transformer/_2.4.x.yaml index 68893d04..c7f0c5d4 100644 --- a/examples/exit-transformer/_2.4.x.yaml +++ b/examples/exit-transformer/_2.4.x.yaml @@ -1,4 +1,4 @@ name: exit-transformer config: functions: - - "return function(status, body, header) return status, body, headers end" + - "return function(status, body, headers) return status, body, headers end" diff --git a/examples/exit-transformer/_2.5.x.yaml b/examples/exit-transformer/_2.5.x.yaml index 68893d04..c7f0c5d4 100644 --- a/examples/exit-transformer/_2.5.x.yaml +++ b/examples/exit-transformer/_2.5.x.yaml @@ -1,4 +1,4 @@ name: exit-transformer config: functions: - - "return function(status, body, header) return status, body, headers end" + - "return function(status, body, headers) return status, body, headers end" diff --git a/examples/exit-transformer/_2.6.x.yaml b/examples/exit-transformer/_2.6.x.yaml index 68893d04..c7f0c5d4 100644 --- a/examples/exit-transformer/_2.6.x.yaml +++ b/examples/exit-transformer/_2.6.x.yaml @@ -1,4 +1,4 @@ name: exit-transformer config: functions: - - "return function(status, body, header) return status, body, headers end" + - "return function(status, body, headers) return status, body, headers end" diff --git a/examples/exit-transformer/_2.7.x.yaml b/examples/exit-transformer/_2.7.x.yaml index 68893d04..c7f0c5d4 100644 --- a/examples/exit-transformer/_2.7.x.yaml +++ b/examples/exit-transformer/_2.7.x.yaml @@ -1,4 +1,4 @@ name: exit-transformer config: functions: - - "return function(status, body, header) return status, body, headers end" + - "return function(status, body, headers) return status, body, headers end" diff --git a/examples/exit-transformer/_2.8.x.yaml b/examples/exit-transformer/_2.8.x.yaml index 68893d04..c7f0c5d4 100644 --- a/examples/exit-transformer/_2.8.x.yaml +++ b/examples/exit-transformer/_2.8.x.yaml @@ -1,4 +1,4 @@ name: exit-transformer config: functions: - - "return function(status, body, header) return status, body, headers end" + - "return function(status, body, headers) return status, body, headers end" diff --git a/examples/exit-transformer/_3.0.x.yaml b/examples/exit-transformer/_3.0.x.yaml index 68893d04..c7f0c5d4 100644 --- a/examples/exit-transformer/_3.0.x.yaml +++ b/examples/exit-transformer/_3.0.x.yaml @@ -1,4 +1,4 @@ name: exit-transformer config: functions: - - "return function(status, body, header) return status, body, headers end" + - "return function(status, body, headers) return status, body, headers end" diff --git a/examples/exit-transformer/_3.1.x.yaml b/examples/exit-transformer/_3.1.x.yaml index 68893d04..c7f0c5d4 100644 --- a/examples/exit-transformer/_3.1.x.yaml +++ b/examples/exit-transformer/_3.1.x.yaml @@ -1,4 +1,4 @@ name: exit-transformer config: functions: - - "return function(status, body, header) return status, body, headers end" + - "return function(status, body, headers) return status, body, headers end" diff --git a/examples/exit-transformer/_3.10.x.yaml b/examples/exit-transformer/_3.10.x.yaml new file mode 100644 index 00000000..c7f0c5d4 --- /dev/null +++ b/examples/exit-transformer/_3.10.x.yaml @@ -0,0 +1,4 @@ +name: exit-transformer +config: + functions: + - "return function(status, body, headers) return status, body, headers end" diff --git a/examples/exit-transformer/_3.11.x.yaml b/examples/exit-transformer/_3.11.x.yaml new file mode 100644 index 00000000..c7f0c5d4 --- /dev/null +++ b/examples/exit-transformer/_3.11.x.yaml @@ -0,0 +1,4 @@ +name: exit-transformer +config: + functions: + - "return function(status, body, headers) return status, body, headers end" diff --git a/examples/exit-transformer/_3.2.x.yaml b/examples/exit-transformer/_3.2.x.yaml index 68893d04..c7f0c5d4 100644 --- a/examples/exit-transformer/_3.2.x.yaml +++ b/examples/exit-transformer/_3.2.x.yaml @@ -1,4 +1,4 @@ name: exit-transformer config: functions: - - "return function(status, body, header) return status, body, headers end" + - "return function(status, body, headers) return status, body, headers end" diff --git a/examples/exit-transformer/_3.3.x.yaml b/examples/exit-transformer/_3.3.x.yaml index 68893d04..c7f0c5d4 100644 --- a/examples/exit-transformer/_3.3.x.yaml +++ b/examples/exit-transformer/_3.3.x.yaml @@ -1,4 +1,4 @@ name: exit-transformer config: functions: - - "return function(status, body, header) return status, body, headers end" + - "return function(status, body, headers) return status, body, headers end" diff --git a/examples/exit-transformer/_3.4.x.yaml b/examples/exit-transformer/_3.4.x.yaml index 68893d04..c7f0c5d4 100644 --- a/examples/exit-transformer/_3.4.x.yaml +++ b/examples/exit-transformer/_3.4.x.yaml @@ -1,4 +1,4 @@ name: exit-transformer config: functions: - - "return function(status, body, header) return status, body, headers end" + - "return function(status, body, headers) return status, body, headers end" diff --git a/examples/exit-transformer/_3.5.x.yaml b/examples/exit-transformer/_3.5.x.yaml new file mode 100644 index 00000000..c7f0c5d4 --- /dev/null +++ b/examples/exit-transformer/_3.5.x.yaml @@ -0,0 +1,4 @@ +name: exit-transformer +config: + functions: + - "return function(status, body, headers) return status, body, headers end" diff --git a/examples/exit-transformer/_3.6.x.yaml b/examples/exit-transformer/_3.6.x.yaml new file mode 100644 index 00000000..c7f0c5d4 --- /dev/null +++ b/examples/exit-transformer/_3.6.x.yaml @@ -0,0 +1,4 @@ +name: exit-transformer +config: + functions: + - "return function(status, body, headers) return status, body, headers end" diff --git a/examples/exit-transformer/_3.7.x.yaml b/examples/exit-transformer/_3.7.x.yaml new file mode 100644 index 00000000..c7f0c5d4 --- /dev/null +++ b/examples/exit-transformer/_3.7.x.yaml @@ -0,0 +1,4 @@ +name: exit-transformer +config: + functions: + - "return function(status, body, headers) return status, body, headers end" diff --git a/examples/exit-transformer/_3.8.x.yaml b/examples/exit-transformer/_3.8.x.yaml new file mode 100644 index 00000000..c7f0c5d4 --- /dev/null +++ b/examples/exit-transformer/_3.8.x.yaml @@ -0,0 +1,4 @@ +name: exit-transformer +config: + functions: + - "return function(status, body, headers) return status, body, headers end" diff --git a/examples/exit-transformer/_3.9.x.yaml b/examples/exit-transformer/_3.9.x.yaml new file mode 100644 index 00000000..c7f0c5d4 --- /dev/null +++ b/examples/exit-transformer/_3.9.x.yaml @@ -0,0 +1,4 @@ +name: exit-transformer +config: + functions: + - "return function(status, body, headers) return status, body, headers end" diff --git a/examples/file-log/_3.10.x.yaml b/examples/file-log/_3.10.x.yaml new file mode 100644 index 00000000..aefd2bdc --- /dev/null +++ b/examples/file-log/_3.10.x.yaml @@ -0,0 +1,3 @@ +name: file-log +config: + path: /tmp/file.log diff --git a/examples/file-log/_3.11.x.yaml b/examples/file-log/_3.11.x.yaml new file mode 100644 index 00000000..aefd2bdc --- /dev/null +++ b/examples/file-log/_3.11.x.yaml @@ -0,0 +1,3 @@ +name: file-log +config: + path: /tmp/file.log diff --git a/examples/file-log/_3.5.x.yaml b/examples/file-log/_3.5.x.yaml new file mode 100644 index 00000000..aefd2bdc --- /dev/null +++ b/examples/file-log/_3.5.x.yaml @@ -0,0 +1,3 @@ +name: file-log +config: + path: /tmp/file.log diff --git a/examples/file-log/_3.6.x.yaml b/examples/file-log/_3.6.x.yaml new file mode 100644 index 00000000..aefd2bdc --- /dev/null +++ b/examples/file-log/_3.6.x.yaml @@ -0,0 +1,3 @@ +name: file-log +config: + path: /tmp/file.log diff --git a/examples/file-log/_3.7.x.yaml b/examples/file-log/_3.7.x.yaml new file mode 100644 index 00000000..aefd2bdc --- /dev/null +++ b/examples/file-log/_3.7.x.yaml @@ -0,0 +1,3 @@ +name: file-log +config: + path: /tmp/file.log diff --git a/examples/file-log/_3.8.x.yaml b/examples/file-log/_3.8.x.yaml new file mode 100644 index 00000000..aefd2bdc --- /dev/null +++ b/examples/file-log/_3.8.x.yaml @@ -0,0 +1,3 @@ +name: file-log +config: + path: /tmp/file.log diff --git a/examples/file-log/_3.9.x.yaml b/examples/file-log/_3.9.x.yaml new file mode 100644 index 00000000..aefd2bdc --- /dev/null +++ b/examples/file-log/_3.9.x.yaml @@ -0,0 +1,3 @@ +name: file-log +config: + path: /tmp/file.log diff --git a/examples/forward-proxy/_3.10.x.yaml b/examples/forward-proxy/_3.10.x.yaml new file mode 100644 index 00000000..7fb797ca --- /dev/null +++ b/examples/forward-proxy/_3.10.x.yaml @@ -0,0 +1,9 @@ +name: forward-proxy +config: + http_proxy_host: example.com + http_proxy_port: 80 + proxy_scheme: http + auth_username: example_user + auth_password: example_pass + https_verify: false + x_headers: transparent diff --git a/examples/forward-proxy/_3.11.x.yaml b/examples/forward-proxy/_3.11.x.yaml new file mode 100644 index 00000000..7fb797ca --- /dev/null +++ b/examples/forward-proxy/_3.11.x.yaml @@ -0,0 +1,9 @@ +name: forward-proxy +config: + http_proxy_host: example.com + http_proxy_port: 80 + proxy_scheme: http + auth_username: example_user + auth_password: example_pass + https_verify: false + x_headers: transparent diff --git a/examples/forward-proxy/_3.5.x.yaml b/examples/forward-proxy/_3.5.x.yaml new file mode 100644 index 00000000..7fb797ca --- /dev/null +++ b/examples/forward-proxy/_3.5.x.yaml @@ -0,0 +1,9 @@ +name: forward-proxy +config: + http_proxy_host: example.com + http_proxy_port: 80 + proxy_scheme: http + auth_username: example_user + auth_password: example_pass + https_verify: false + x_headers: transparent diff --git a/examples/forward-proxy/_3.6.x.yaml b/examples/forward-proxy/_3.6.x.yaml new file mode 100644 index 00000000..7fb797ca --- /dev/null +++ b/examples/forward-proxy/_3.6.x.yaml @@ -0,0 +1,9 @@ +name: forward-proxy +config: + http_proxy_host: example.com + http_proxy_port: 80 + proxy_scheme: http + auth_username: example_user + auth_password: example_pass + https_verify: false + x_headers: transparent diff --git a/examples/forward-proxy/_3.7.x.yaml b/examples/forward-proxy/_3.7.x.yaml new file mode 100644 index 00000000..7fb797ca --- /dev/null +++ b/examples/forward-proxy/_3.7.x.yaml @@ -0,0 +1,9 @@ +name: forward-proxy +config: + http_proxy_host: example.com + http_proxy_port: 80 + proxy_scheme: http + auth_username: example_user + auth_password: example_pass + https_verify: false + x_headers: transparent diff --git a/examples/forward-proxy/_3.8.x.yaml b/examples/forward-proxy/_3.8.x.yaml new file mode 100644 index 00000000..7fb797ca --- /dev/null +++ b/examples/forward-proxy/_3.8.x.yaml @@ -0,0 +1,9 @@ +name: forward-proxy +config: + http_proxy_host: example.com + http_proxy_port: 80 + proxy_scheme: http + auth_username: example_user + auth_password: example_pass + https_verify: false + x_headers: transparent diff --git a/examples/forward-proxy/_3.9.x.yaml b/examples/forward-proxy/_3.9.x.yaml new file mode 100644 index 00000000..7fb797ca --- /dev/null +++ b/examples/forward-proxy/_3.9.x.yaml @@ -0,0 +1,9 @@ +name: forward-proxy +config: + http_proxy_host: example.com + http_proxy_port: 80 + proxy_scheme: http + auth_username: example_user + auth_password: example_pass + https_verify: false + x_headers: transparent diff --git a/examples/graphql-proxy-cache-advanced/_3.10.x.yaml b/examples/graphql-proxy-cache-advanced/_3.10.x.yaml new file mode 100644 index 00000000..e1ce637b --- /dev/null +++ b/examples/graphql-proxy-cache-advanced/_3.10.x.yaml @@ -0,0 +1,3 @@ +name: graphql-proxy-cache-advanced +config: + strategy: memory diff --git a/examples/graphql-proxy-cache-advanced/_3.11.x.yaml b/examples/graphql-proxy-cache-advanced/_3.11.x.yaml new file mode 100644 index 00000000..e1ce637b --- /dev/null +++ b/examples/graphql-proxy-cache-advanced/_3.11.x.yaml @@ -0,0 +1,3 @@ +name: graphql-proxy-cache-advanced +config: + strategy: memory diff --git a/examples/graphql-proxy-cache-advanced/_3.5.x.yaml b/examples/graphql-proxy-cache-advanced/_3.5.x.yaml new file mode 100644 index 00000000..e1ce637b --- /dev/null +++ b/examples/graphql-proxy-cache-advanced/_3.5.x.yaml @@ -0,0 +1,3 @@ +name: graphql-proxy-cache-advanced +config: + strategy: memory diff --git a/examples/graphql-proxy-cache-advanced/_3.6.x.yaml b/examples/graphql-proxy-cache-advanced/_3.6.x.yaml new file mode 100644 index 00000000..e1ce637b --- /dev/null +++ b/examples/graphql-proxy-cache-advanced/_3.6.x.yaml @@ -0,0 +1,3 @@ +name: graphql-proxy-cache-advanced +config: + strategy: memory diff --git a/examples/graphql-proxy-cache-advanced/_3.7.x.yaml b/examples/graphql-proxy-cache-advanced/_3.7.x.yaml new file mode 100644 index 00000000..e1ce637b --- /dev/null +++ b/examples/graphql-proxy-cache-advanced/_3.7.x.yaml @@ -0,0 +1,3 @@ +name: graphql-proxy-cache-advanced +config: + strategy: memory diff --git a/examples/graphql-proxy-cache-advanced/_3.8.x.yaml b/examples/graphql-proxy-cache-advanced/_3.8.x.yaml new file mode 100644 index 00000000..e1ce637b --- /dev/null +++ b/examples/graphql-proxy-cache-advanced/_3.8.x.yaml @@ -0,0 +1,3 @@ +name: graphql-proxy-cache-advanced +config: + strategy: memory diff --git a/examples/graphql-proxy-cache-advanced/_3.9.x.yaml b/examples/graphql-proxy-cache-advanced/_3.9.x.yaml new file mode 100644 index 00000000..e1ce637b --- /dev/null +++ b/examples/graphql-proxy-cache-advanced/_3.9.x.yaml @@ -0,0 +1,3 @@ +name: graphql-proxy-cache-advanced +config: + strategy: memory diff --git a/examples/graphql-rate-limiting-advanced/_3.10.x.yaml b/examples/graphql-rate-limiting-advanced/_3.10.x.yaml new file mode 100644 index 00000000..10985f83 --- /dev/null +++ b/examples/graphql-rate-limiting-advanced/_3.10.x.yaml @@ -0,0 +1,9 @@ +name: graphql-rate-limiting-advanced +config: + limit: + - 5 + window_size: + - 30 + sync_rate: -1 + namespace: example_namespace + strategy: cluster diff --git a/examples/graphql-rate-limiting-advanced/_3.11.x.yaml b/examples/graphql-rate-limiting-advanced/_3.11.x.yaml new file mode 100644 index 00000000..10985f83 --- /dev/null +++ b/examples/graphql-rate-limiting-advanced/_3.11.x.yaml @@ -0,0 +1,9 @@ +name: graphql-rate-limiting-advanced +config: + limit: + - 5 + window_size: + - 30 + sync_rate: -1 + namespace: example_namespace + strategy: cluster diff --git a/examples/graphql-rate-limiting-advanced/_3.5.x.yaml b/examples/graphql-rate-limiting-advanced/_3.5.x.yaml new file mode 100644 index 00000000..10985f83 --- /dev/null +++ b/examples/graphql-rate-limiting-advanced/_3.5.x.yaml @@ -0,0 +1,9 @@ +name: graphql-rate-limiting-advanced +config: + limit: + - 5 + window_size: + - 30 + sync_rate: -1 + namespace: example_namespace + strategy: cluster diff --git a/examples/graphql-rate-limiting-advanced/_3.6.x.yaml b/examples/graphql-rate-limiting-advanced/_3.6.x.yaml new file mode 100644 index 00000000..10985f83 --- /dev/null +++ b/examples/graphql-rate-limiting-advanced/_3.6.x.yaml @@ -0,0 +1,9 @@ +name: graphql-rate-limiting-advanced +config: + limit: + - 5 + window_size: + - 30 + sync_rate: -1 + namespace: example_namespace + strategy: cluster diff --git a/examples/graphql-rate-limiting-advanced/_3.7.x.yaml b/examples/graphql-rate-limiting-advanced/_3.7.x.yaml new file mode 100644 index 00000000..10985f83 --- /dev/null +++ b/examples/graphql-rate-limiting-advanced/_3.7.x.yaml @@ -0,0 +1,9 @@ +name: graphql-rate-limiting-advanced +config: + limit: + - 5 + window_size: + - 30 + sync_rate: -1 + namespace: example_namespace + strategy: cluster diff --git a/examples/graphql-rate-limiting-advanced/_3.8.x.yaml b/examples/graphql-rate-limiting-advanced/_3.8.x.yaml new file mode 100644 index 00000000..10985f83 --- /dev/null +++ b/examples/graphql-rate-limiting-advanced/_3.8.x.yaml @@ -0,0 +1,9 @@ +name: graphql-rate-limiting-advanced +config: + limit: + - 5 + window_size: + - 30 + sync_rate: -1 + namespace: example_namespace + strategy: cluster diff --git a/examples/graphql-rate-limiting-advanced/_3.9.x.yaml b/examples/graphql-rate-limiting-advanced/_3.9.x.yaml new file mode 100644 index 00000000..10985f83 --- /dev/null +++ b/examples/graphql-rate-limiting-advanced/_3.9.x.yaml @@ -0,0 +1,9 @@ +name: graphql-rate-limiting-advanced +config: + limit: + - 5 + window_size: + - 30 + sync_rate: -1 + namespace: example_namespace + strategy: cluster diff --git a/examples/grpc-gateway/_3.10.x.yaml b/examples/grpc-gateway/_3.10.x.yaml new file mode 100644 index 00000000..36b576ea --- /dev/null +++ b/examples/grpc-gateway/_3.10.x.yaml @@ -0,0 +1,3 @@ +name: grpc-gateway +config: + proto: path/to/hello.proto diff --git a/examples/grpc-gateway/_3.11.x.yaml b/examples/grpc-gateway/_3.11.x.yaml new file mode 100644 index 00000000..36b576ea --- /dev/null +++ b/examples/grpc-gateway/_3.11.x.yaml @@ -0,0 +1,3 @@ +name: grpc-gateway +config: + proto: path/to/hello.proto diff --git a/examples/grpc-gateway/_3.5.x.yaml b/examples/grpc-gateway/_3.5.x.yaml new file mode 100644 index 00000000..36b576ea --- /dev/null +++ b/examples/grpc-gateway/_3.5.x.yaml @@ -0,0 +1,3 @@ +name: grpc-gateway +config: + proto: path/to/hello.proto diff --git a/examples/grpc-gateway/_3.6.x.yaml b/examples/grpc-gateway/_3.6.x.yaml new file mode 100644 index 00000000..36b576ea --- /dev/null +++ b/examples/grpc-gateway/_3.6.x.yaml @@ -0,0 +1,3 @@ +name: grpc-gateway +config: + proto: path/to/hello.proto diff --git a/examples/grpc-gateway/_3.7.x.yaml b/examples/grpc-gateway/_3.7.x.yaml new file mode 100644 index 00000000..36b576ea --- /dev/null +++ b/examples/grpc-gateway/_3.7.x.yaml @@ -0,0 +1,3 @@ +name: grpc-gateway +config: + proto: path/to/hello.proto diff --git a/examples/grpc-gateway/_3.8.x.yaml b/examples/grpc-gateway/_3.8.x.yaml new file mode 100644 index 00000000..36b576ea --- /dev/null +++ b/examples/grpc-gateway/_3.8.x.yaml @@ -0,0 +1,3 @@ +name: grpc-gateway +config: + proto: path/to/hello.proto diff --git a/examples/grpc-gateway/_3.9.x.yaml b/examples/grpc-gateway/_3.9.x.yaml new file mode 100644 index 00000000..36b576ea --- /dev/null +++ b/examples/grpc-gateway/_3.9.x.yaml @@ -0,0 +1,3 @@ +name: grpc-gateway +config: + proto: path/to/hello.proto diff --git a/examples/grpc-web/_3.10.x.yaml b/examples/grpc-web/_3.10.x.yaml new file mode 100644 index 00000000..e4f2c597 --- /dev/null +++ b/examples/grpc-web/_3.10.x.yaml @@ -0,0 +1,3 @@ +name: grpc-web +config: + proto: path/to/hello.proto diff --git a/examples/grpc-web/_3.11.x.yaml b/examples/grpc-web/_3.11.x.yaml new file mode 100644 index 00000000..e4f2c597 --- /dev/null +++ b/examples/grpc-web/_3.11.x.yaml @@ -0,0 +1,3 @@ +name: grpc-web +config: + proto: path/to/hello.proto diff --git a/examples/grpc-web/_3.5.x.yaml b/examples/grpc-web/_3.5.x.yaml new file mode 100644 index 00000000..e4f2c597 --- /dev/null +++ b/examples/grpc-web/_3.5.x.yaml @@ -0,0 +1,3 @@ +name: grpc-web +config: + proto: path/to/hello.proto diff --git a/examples/grpc-web/_3.6.x.yaml b/examples/grpc-web/_3.6.x.yaml new file mode 100644 index 00000000..e4f2c597 --- /dev/null +++ b/examples/grpc-web/_3.6.x.yaml @@ -0,0 +1,3 @@ +name: grpc-web +config: + proto: path/to/hello.proto diff --git a/examples/grpc-web/_3.7.x.yaml b/examples/grpc-web/_3.7.x.yaml new file mode 100644 index 00000000..e4f2c597 --- /dev/null +++ b/examples/grpc-web/_3.7.x.yaml @@ -0,0 +1,3 @@ +name: grpc-web +config: + proto: path/to/hello.proto diff --git a/examples/grpc-web/_3.8.x.yaml b/examples/grpc-web/_3.8.x.yaml new file mode 100644 index 00000000..e4f2c597 --- /dev/null +++ b/examples/grpc-web/_3.8.x.yaml @@ -0,0 +1,3 @@ +name: grpc-web +config: + proto: path/to/hello.proto diff --git a/examples/grpc-web/_3.9.x.yaml b/examples/grpc-web/_3.9.x.yaml new file mode 100644 index 00000000..e4f2c597 --- /dev/null +++ b/examples/grpc-web/_3.9.x.yaml @@ -0,0 +1,3 @@ +name: grpc-web +config: + proto: path/to/hello.proto diff --git a/examples/header-cert-auth/_3.10.x.yaml b/examples/header-cert-auth/_3.10.x.yaml new file mode 100644 index 00000000..0bbd7799 --- /dev/null +++ b/examples/header-cert-auth/_3.10.x.yaml @@ -0,0 +1,7 @@ +name: header-cert-auth +config: + ca_certificates: + - "0D769DE8-7CC0-4541-989B-F9C23E20054C" + certificate_header_name: ssl-client-cert + certificate_header_format: base64_encoded + secure_source: false \ No newline at end of file diff --git a/examples/header-cert-auth/_3.11.x.yaml b/examples/header-cert-auth/_3.11.x.yaml new file mode 100644 index 00000000..0bbd7799 --- /dev/null +++ b/examples/header-cert-auth/_3.11.x.yaml @@ -0,0 +1,7 @@ +name: header-cert-auth +config: + ca_certificates: + - "0D769DE8-7CC0-4541-989B-F9C23E20054C" + certificate_header_name: ssl-client-cert + certificate_header_format: base64_encoded + secure_source: false \ No newline at end of file diff --git a/examples/header-cert-auth/_3.8.x.yaml b/examples/header-cert-auth/_3.8.x.yaml new file mode 100644 index 00000000..0bbd7799 --- /dev/null +++ b/examples/header-cert-auth/_3.8.x.yaml @@ -0,0 +1,7 @@ +name: header-cert-auth +config: + ca_certificates: + - "0D769DE8-7CC0-4541-989B-F9C23E20054C" + certificate_header_name: ssl-client-cert + certificate_header_format: base64_encoded + secure_source: false \ No newline at end of file diff --git a/examples/header-cert-auth/_3.9.x.yaml b/examples/header-cert-auth/_3.9.x.yaml new file mode 100644 index 00000000..0bbd7799 --- /dev/null +++ b/examples/header-cert-auth/_3.9.x.yaml @@ -0,0 +1,7 @@ +name: header-cert-auth +config: + ca_certificates: + - "0D769DE8-7CC0-4541-989B-F9C23E20054C" + certificate_header_name: ssl-client-cert + certificate_header_format: base64_encoded + secure_source: false \ No newline at end of file diff --git a/examples/hmac-auth/_3.10.x.yaml b/examples/hmac-auth/_3.10.x.yaml new file mode 100644 index 00000000..ba1ae19d --- /dev/null +++ b/examples/hmac-auth/_3.10.x.yaml @@ -0,0 +1,3 @@ +name: hmac-auth +config: + hide_credentials: false diff --git a/examples/hmac-auth/_3.11.x.yaml b/examples/hmac-auth/_3.11.x.yaml new file mode 100644 index 00000000..ba1ae19d --- /dev/null +++ b/examples/hmac-auth/_3.11.x.yaml @@ -0,0 +1,3 @@ +name: hmac-auth +config: + hide_credentials: false diff --git a/examples/hmac-auth/_3.5.x.yaml b/examples/hmac-auth/_3.5.x.yaml new file mode 100644 index 00000000..ba1ae19d --- /dev/null +++ b/examples/hmac-auth/_3.5.x.yaml @@ -0,0 +1,3 @@ +name: hmac-auth +config: + hide_credentials: false diff --git a/examples/hmac-auth/_3.6.x.yaml b/examples/hmac-auth/_3.6.x.yaml new file mode 100644 index 00000000..ba1ae19d --- /dev/null +++ b/examples/hmac-auth/_3.6.x.yaml @@ -0,0 +1,3 @@ +name: hmac-auth +config: + hide_credentials: false diff --git a/examples/hmac-auth/_3.7.x.yaml b/examples/hmac-auth/_3.7.x.yaml new file mode 100644 index 00000000..ba1ae19d --- /dev/null +++ b/examples/hmac-auth/_3.7.x.yaml @@ -0,0 +1,3 @@ +name: hmac-auth +config: + hide_credentials: false diff --git a/examples/hmac-auth/_3.8.x.yaml b/examples/hmac-auth/_3.8.x.yaml new file mode 100644 index 00000000..ba1ae19d --- /dev/null +++ b/examples/hmac-auth/_3.8.x.yaml @@ -0,0 +1,3 @@ +name: hmac-auth +config: + hide_credentials: false diff --git a/examples/hmac-auth/_3.9.x.yaml b/examples/hmac-auth/_3.9.x.yaml new file mode 100644 index 00000000..ba1ae19d --- /dev/null +++ b/examples/hmac-auth/_3.9.x.yaml @@ -0,0 +1,3 @@ +name: hmac-auth +config: + hide_credentials: false diff --git a/examples/http-log/_3.10.x.yaml b/examples/http-log/_3.10.x.yaml new file mode 100644 index 00000000..dd88c67c --- /dev/null +++ b/examples/http-log/_3.10.x.yaml @@ -0,0 +1,8 @@ +name: http-log +config: + http_endpoint: http://mockbin.org/bin/:id + method: POST + timeout: 1000 + keepalive: 1000 + flush_timeout: 2 + retry_count: 15 diff --git a/examples/http-log/_3.11.x.yaml b/examples/http-log/_3.11.x.yaml new file mode 100644 index 00000000..dd88c67c --- /dev/null +++ b/examples/http-log/_3.11.x.yaml @@ -0,0 +1,8 @@ +name: http-log +config: + http_endpoint: http://mockbin.org/bin/:id + method: POST + timeout: 1000 + keepalive: 1000 + flush_timeout: 2 + retry_count: 15 diff --git a/examples/http-log/_3.5.x.yaml b/examples/http-log/_3.5.x.yaml new file mode 100644 index 00000000..dd88c67c --- /dev/null +++ b/examples/http-log/_3.5.x.yaml @@ -0,0 +1,8 @@ +name: http-log +config: + http_endpoint: http://mockbin.org/bin/:id + method: POST + timeout: 1000 + keepalive: 1000 + flush_timeout: 2 + retry_count: 15 diff --git a/examples/http-log/_3.6.x.yaml b/examples/http-log/_3.6.x.yaml new file mode 100644 index 00000000..dd88c67c --- /dev/null +++ b/examples/http-log/_3.6.x.yaml @@ -0,0 +1,8 @@ +name: http-log +config: + http_endpoint: http://mockbin.org/bin/:id + method: POST + timeout: 1000 + keepalive: 1000 + flush_timeout: 2 + retry_count: 15 diff --git a/examples/http-log/_3.7.x.yaml b/examples/http-log/_3.7.x.yaml new file mode 100644 index 00000000..dd88c67c --- /dev/null +++ b/examples/http-log/_3.7.x.yaml @@ -0,0 +1,8 @@ +name: http-log +config: + http_endpoint: http://mockbin.org/bin/:id + method: POST + timeout: 1000 + keepalive: 1000 + flush_timeout: 2 + retry_count: 15 diff --git a/examples/http-log/_3.8.x.yaml b/examples/http-log/_3.8.x.yaml new file mode 100644 index 00000000..dd88c67c --- /dev/null +++ b/examples/http-log/_3.8.x.yaml @@ -0,0 +1,8 @@ +name: http-log +config: + http_endpoint: http://mockbin.org/bin/:id + method: POST + timeout: 1000 + keepalive: 1000 + flush_timeout: 2 + retry_count: 15 diff --git a/examples/http-log/_3.9.x.yaml b/examples/http-log/_3.9.x.yaml new file mode 100644 index 00000000..dd88c67c --- /dev/null +++ b/examples/http-log/_3.9.x.yaml @@ -0,0 +1,8 @@ +name: http-log +config: + http_endpoint: http://mockbin.org/bin/:id + method: POST + timeout: 1000 + keepalive: 1000 + flush_timeout: 2 + retry_count: 15 diff --git a/examples/injection-protection/_3.10.x.yaml b/examples/injection-protection/_3.10.x.yaml new file mode 100644 index 00000000..9e7e487e --- /dev/null +++ b/examples/injection-protection/_3.10.x.yaml @@ -0,0 +1,9 @@ +name: injection-protection +config: + injection_types: + - "sql" + locations: + - "path_and_query" + enforcement_mode: block + error_status_code: 400 + error_message: Bad Request diff --git a/examples/injection-protection/_3.11.x.yaml b/examples/injection-protection/_3.11.x.yaml new file mode 100644 index 00000000..9e7e487e --- /dev/null +++ b/examples/injection-protection/_3.11.x.yaml @@ -0,0 +1,9 @@ +name: injection-protection +config: + injection_types: + - "sql" + locations: + - "path_and_query" + enforcement_mode: block + error_status_code: 400 + error_message: Bad Request diff --git a/examples/injection-protection/_3.9.x.yaml b/examples/injection-protection/_3.9.x.yaml new file mode 100644 index 00000000..9e7e487e --- /dev/null +++ b/examples/injection-protection/_3.9.x.yaml @@ -0,0 +1,9 @@ +name: injection-protection +config: + injection_types: + - "sql" + locations: + - "path_and_query" + enforcement_mode: block + error_status_code: 400 + error_message: Bad Request diff --git a/examples/ip-restriction/_3.10.x.yaml b/examples/ip-restriction/_3.10.x.yaml new file mode 100644 index 00000000..4ca5298d --- /dev/null +++ b/examples/ip-restriction/_3.10.x.yaml @@ -0,0 +1,5 @@ +name: ip-restriction +config: + allow: + - 54.13.21.1 + - 143.1.0.0/24 diff --git a/examples/ip-restriction/_3.11.x.yaml b/examples/ip-restriction/_3.11.x.yaml new file mode 100644 index 00000000..4ca5298d --- /dev/null +++ b/examples/ip-restriction/_3.11.x.yaml @@ -0,0 +1,5 @@ +name: ip-restriction +config: + allow: + - 54.13.21.1 + - 143.1.0.0/24 diff --git a/examples/ip-restriction/_3.5.x.yaml b/examples/ip-restriction/_3.5.x.yaml new file mode 100644 index 00000000..4ca5298d --- /dev/null +++ b/examples/ip-restriction/_3.5.x.yaml @@ -0,0 +1,5 @@ +name: ip-restriction +config: + allow: + - 54.13.21.1 + - 143.1.0.0/24 diff --git a/examples/ip-restriction/_3.6.x.yaml b/examples/ip-restriction/_3.6.x.yaml new file mode 100644 index 00000000..4ca5298d --- /dev/null +++ b/examples/ip-restriction/_3.6.x.yaml @@ -0,0 +1,5 @@ +name: ip-restriction +config: + allow: + - 54.13.21.1 + - 143.1.0.0/24 diff --git a/examples/ip-restriction/_3.7.x.yaml b/examples/ip-restriction/_3.7.x.yaml new file mode 100644 index 00000000..4ca5298d --- /dev/null +++ b/examples/ip-restriction/_3.7.x.yaml @@ -0,0 +1,5 @@ +name: ip-restriction +config: + allow: + - 54.13.21.1 + - 143.1.0.0/24 diff --git a/examples/ip-restriction/_3.8.x.yaml b/examples/ip-restriction/_3.8.x.yaml new file mode 100644 index 00000000..4ca5298d --- /dev/null +++ b/examples/ip-restriction/_3.8.x.yaml @@ -0,0 +1,5 @@ +name: ip-restriction +config: + allow: + - 54.13.21.1 + - 143.1.0.0/24 diff --git a/examples/ip-restriction/_3.9.x.yaml b/examples/ip-restriction/_3.9.x.yaml new file mode 100644 index 00000000..4ca5298d --- /dev/null +++ b/examples/ip-restriction/_3.9.x.yaml @@ -0,0 +1,5 @@ +name: ip-restriction +config: + allow: + - 54.13.21.1 + - 143.1.0.0/24 diff --git a/examples/jq/_3.10.x.yaml b/examples/jq/_3.10.x.yaml new file mode 100644 index 00000000..d69ce58d --- /dev/null +++ b/examples/jq/_3.10.x.yaml @@ -0,0 +1,3 @@ +name: jq +config: + request_jq_program: .[0] diff --git a/examples/jq/_3.11.x.yaml b/examples/jq/_3.11.x.yaml new file mode 100644 index 00000000..d69ce58d --- /dev/null +++ b/examples/jq/_3.11.x.yaml @@ -0,0 +1,3 @@ +name: jq +config: + request_jq_program: .[0] diff --git a/examples/jq/_3.5.x.yaml b/examples/jq/_3.5.x.yaml new file mode 100644 index 00000000..d69ce58d --- /dev/null +++ b/examples/jq/_3.5.x.yaml @@ -0,0 +1,3 @@ +name: jq +config: + request_jq_program: .[0] diff --git a/examples/jq/_3.6.x.yaml b/examples/jq/_3.6.x.yaml new file mode 100644 index 00000000..d69ce58d --- /dev/null +++ b/examples/jq/_3.6.x.yaml @@ -0,0 +1,3 @@ +name: jq +config: + request_jq_program: .[0] diff --git a/examples/jq/_3.7.x.yaml b/examples/jq/_3.7.x.yaml new file mode 100644 index 00000000..d69ce58d --- /dev/null +++ b/examples/jq/_3.7.x.yaml @@ -0,0 +1,3 @@ +name: jq +config: + request_jq_program: .[0] diff --git a/examples/jq/_3.8.x.yaml b/examples/jq/_3.8.x.yaml new file mode 100644 index 00000000..d69ce58d --- /dev/null +++ b/examples/jq/_3.8.x.yaml @@ -0,0 +1,3 @@ +name: jq +config: + request_jq_program: .[0] diff --git a/examples/jq/_3.9.x.yaml b/examples/jq/_3.9.x.yaml new file mode 100644 index 00000000..d69ce58d --- /dev/null +++ b/examples/jq/_3.9.x.yaml @@ -0,0 +1,3 @@ +name: jq +config: + request_jq_program: .[0] diff --git a/examples/json-threat-protection/_3.10.x.yaml b/examples/json-threat-protection/_3.10.x.yaml new file mode 100644 index 00000000..787fdad7 --- /dev/null +++ b/examples/json-threat-protection/_3.10.x.yaml @@ -0,0 +1,11 @@ +name: json-threat-protection +config: + max_body_size: 10 + max_container_depth: 1 + max_object_entry_count: 2 + max_object_entry_name_length: 3 + max_array_element_count: 4 + max_string_value_length: 5 + enforcement_mode: block + error_status_code: 400 + error_message: BadRequest \ No newline at end of file diff --git a/examples/json-threat-protection/_3.11.x.yaml b/examples/json-threat-protection/_3.11.x.yaml new file mode 100644 index 00000000..787fdad7 --- /dev/null +++ b/examples/json-threat-protection/_3.11.x.yaml @@ -0,0 +1,11 @@ +name: json-threat-protection +config: + max_body_size: 10 + max_container_depth: 1 + max_object_entry_count: 2 + max_object_entry_name_length: 3 + max_array_element_count: 4 + max_string_value_length: 5 + enforcement_mode: block + error_status_code: 400 + error_message: BadRequest \ No newline at end of file diff --git a/examples/json-threat-protection/_3.8.x.yaml b/examples/json-threat-protection/_3.8.x.yaml new file mode 100644 index 00000000..787fdad7 --- /dev/null +++ b/examples/json-threat-protection/_3.8.x.yaml @@ -0,0 +1,11 @@ +name: json-threat-protection +config: + max_body_size: 10 + max_container_depth: 1 + max_object_entry_count: 2 + max_object_entry_name_length: 3 + max_array_element_count: 4 + max_string_value_length: 5 + enforcement_mode: block + error_status_code: 400 + error_message: BadRequest \ No newline at end of file diff --git a/examples/json-threat-protection/_3.9.x.yaml b/examples/json-threat-protection/_3.9.x.yaml new file mode 100644 index 00000000..787fdad7 --- /dev/null +++ b/examples/json-threat-protection/_3.9.x.yaml @@ -0,0 +1,11 @@ +name: json-threat-protection +config: + max_body_size: 10 + max_container_depth: 1 + max_object_entry_count: 2 + max_object_entry_name_length: 3 + max_array_element_count: 4 + max_string_value_length: 5 + enforcement_mode: block + error_status_code: 400 + error_message: BadRequest \ No newline at end of file diff --git a/examples/jwe-decrypt/_3.10.x.yaml b/examples/jwe-decrypt/_3.10.x.yaml new file mode 100644 index 00000000..f413b0e5 --- /dev/null +++ b/examples/jwe-decrypt/_3.10.x.yaml @@ -0,0 +1,4 @@ +name: jwe-decrypt +config: + key_sets: + - dummyID diff --git a/examples/jwe-decrypt/_3.11.x.yaml b/examples/jwe-decrypt/_3.11.x.yaml new file mode 100644 index 00000000..f413b0e5 --- /dev/null +++ b/examples/jwe-decrypt/_3.11.x.yaml @@ -0,0 +1,4 @@ +name: jwe-decrypt +config: + key_sets: + - dummyID diff --git a/examples/jwe-decrypt/_3.5.x.yaml b/examples/jwe-decrypt/_3.5.x.yaml new file mode 100644 index 00000000..f413b0e5 --- /dev/null +++ b/examples/jwe-decrypt/_3.5.x.yaml @@ -0,0 +1,4 @@ +name: jwe-decrypt +config: + key_sets: + - dummyID diff --git a/examples/jwe-decrypt/_3.6.x.yaml b/examples/jwe-decrypt/_3.6.x.yaml new file mode 100644 index 00000000..f413b0e5 --- /dev/null +++ b/examples/jwe-decrypt/_3.6.x.yaml @@ -0,0 +1,4 @@ +name: jwe-decrypt +config: + key_sets: + - dummyID diff --git a/examples/jwe-decrypt/_3.7.x.yaml b/examples/jwe-decrypt/_3.7.x.yaml new file mode 100644 index 00000000..f413b0e5 --- /dev/null +++ b/examples/jwe-decrypt/_3.7.x.yaml @@ -0,0 +1,4 @@ +name: jwe-decrypt +config: + key_sets: + - dummyID diff --git a/examples/jwe-decrypt/_3.8.x.yaml b/examples/jwe-decrypt/_3.8.x.yaml new file mode 100644 index 00000000..f413b0e5 --- /dev/null +++ b/examples/jwe-decrypt/_3.8.x.yaml @@ -0,0 +1,4 @@ +name: jwe-decrypt +config: + key_sets: + - dummyID diff --git a/examples/jwe-decrypt/_3.9.x.yaml b/examples/jwe-decrypt/_3.9.x.yaml new file mode 100644 index 00000000..f413b0e5 --- /dev/null +++ b/examples/jwe-decrypt/_3.9.x.yaml @@ -0,0 +1,4 @@ +name: jwe-decrypt +config: + key_sets: + - dummyID diff --git a/examples/jwt-signer/_3.10.x.yaml b/examples/jwt-signer/_3.10.x.yaml new file mode 100644 index 00000000..71443348 --- /dev/null +++ b/examples/jwt-signer/_3.10.x.yaml @@ -0,0 +1,4 @@ +name: jwt-signer +config: + access_token_introspection_scopes_claim: + - scope diff --git a/examples/jwt-signer/_3.11.x.yaml b/examples/jwt-signer/_3.11.x.yaml new file mode 100644 index 00000000..71443348 --- /dev/null +++ b/examples/jwt-signer/_3.11.x.yaml @@ -0,0 +1,4 @@ +name: jwt-signer +config: + access_token_introspection_scopes_claim: + - scope diff --git a/examples/jwt-signer/_3.5.x.yaml b/examples/jwt-signer/_3.5.x.yaml new file mode 100644 index 00000000..71443348 --- /dev/null +++ b/examples/jwt-signer/_3.5.x.yaml @@ -0,0 +1,4 @@ +name: jwt-signer +config: + access_token_introspection_scopes_claim: + - scope diff --git a/examples/jwt-signer/_3.6.x.yaml b/examples/jwt-signer/_3.6.x.yaml new file mode 100644 index 00000000..71443348 --- /dev/null +++ b/examples/jwt-signer/_3.6.x.yaml @@ -0,0 +1,4 @@ +name: jwt-signer +config: + access_token_introspection_scopes_claim: + - scope diff --git a/examples/jwt-signer/_3.7.x.yaml b/examples/jwt-signer/_3.7.x.yaml new file mode 100644 index 00000000..71443348 --- /dev/null +++ b/examples/jwt-signer/_3.7.x.yaml @@ -0,0 +1,4 @@ +name: jwt-signer +config: + access_token_introspection_scopes_claim: + - scope diff --git a/examples/jwt-signer/_3.8.x.yaml b/examples/jwt-signer/_3.8.x.yaml new file mode 100644 index 00000000..71443348 --- /dev/null +++ b/examples/jwt-signer/_3.8.x.yaml @@ -0,0 +1,4 @@ +name: jwt-signer +config: + access_token_introspection_scopes_claim: + - scope diff --git a/examples/jwt-signer/_3.9.x.yaml b/examples/jwt-signer/_3.9.x.yaml new file mode 100644 index 00000000..71443348 --- /dev/null +++ b/examples/jwt-signer/_3.9.x.yaml @@ -0,0 +1,4 @@ +name: jwt-signer +config: + access_token_introspection_scopes_claim: + - scope diff --git a/examples/jwt/_3.10.x.yaml b/examples/jwt/_3.10.x.yaml new file mode 100644 index 00000000..60fd478d --- /dev/null +++ b/examples/jwt/_3.10.x.yaml @@ -0,0 +1,4 @@ +name: jwt +config: + uri_param_names: + - paramName_2.2.x diff --git a/examples/jwt/_3.11.x.yaml b/examples/jwt/_3.11.x.yaml new file mode 100644 index 00000000..60fd478d --- /dev/null +++ b/examples/jwt/_3.11.x.yaml @@ -0,0 +1,4 @@ +name: jwt +config: + uri_param_names: + - paramName_2.2.x diff --git a/examples/jwt/_3.5.x.yaml b/examples/jwt/_3.5.x.yaml new file mode 100644 index 00000000..60fd478d --- /dev/null +++ b/examples/jwt/_3.5.x.yaml @@ -0,0 +1,4 @@ +name: jwt +config: + uri_param_names: + - paramName_2.2.x diff --git a/examples/jwt/_3.6.x.yaml b/examples/jwt/_3.6.x.yaml new file mode 100644 index 00000000..60fd478d --- /dev/null +++ b/examples/jwt/_3.6.x.yaml @@ -0,0 +1,4 @@ +name: jwt +config: + uri_param_names: + - paramName_2.2.x diff --git a/examples/jwt/_3.7.x.yaml b/examples/jwt/_3.7.x.yaml new file mode 100644 index 00000000..60fd478d --- /dev/null +++ b/examples/jwt/_3.7.x.yaml @@ -0,0 +1,4 @@ +name: jwt +config: + uri_param_names: + - paramName_2.2.x diff --git a/examples/jwt/_3.8.x.yaml b/examples/jwt/_3.8.x.yaml new file mode 100644 index 00000000..60fd478d --- /dev/null +++ b/examples/jwt/_3.8.x.yaml @@ -0,0 +1,4 @@ +name: jwt +config: + uri_param_names: + - paramName_2.2.x diff --git a/examples/jwt/_3.9.x.yaml b/examples/jwt/_3.9.x.yaml new file mode 100644 index 00000000..60fd478d --- /dev/null +++ b/examples/jwt/_3.9.x.yaml @@ -0,0 +1,4 @@ +name: jwt +config: + uri_param_names: + - paramName_2.2.x diff --git a/examples/kafka-consume/_3.10.x.yaml b/examples/kafka-consume/_3.10.x.yaml new file mode 100644 index 00000000..72499f2d --- /dev/null +++ b/examples/kafka-consume/_3.10.x.yaml @@ -0,0 +1,11 @@ +name: kafka-consume +config: + bootstrap_servers: + - host: localhost + port: 9092 + topics: + - name: my-topic + mode: http-get + message_deserializer: json + auto_offset_reset: latest + commit_strategy: auto \ No newline at end of file diff --git a/examples/kafka-consume/_3.11.x.yaml b/examples/kafka-consume/_3.11.x.yaml new file mode 100644 index 00000000..72499f2d --- /dev/null +++ b/examples/kafka-consume/_3.11.x.yaml @@ -0,0 +1,11 @@ +name: kafka-consume +config: + bootstrap_servers: + - host: localhost + port: 9092 + topics: + - name: my-topic + mode: http-get + message_deserializer: json + auto_offset_reset: latest + commit_strategy: auto \ No newline at end of file diff --git a/examples/kafka-log/_3.10.x.yaml b/examples/kafka-log/_3.10.x.yaml new file mode 100644 index 00000000..efb1efa7 --- /dev/null +++ b/examples/kafka-log/_3.10.x.yaml @@ -0,0 +1,3 @@ +name: kafka-log +config: + topic: TOPIC diff --git a/examples/kafka-log/_3.11.x.yaml b/examples/kafka-log/_3.11.x.yaml new file mode 100644 index 00000000..efb1efa7 --- /dev/null +++ b/examples/kafka-log/_3.11.x.yaml @@ -0,0 +1,3 @@ +name: kafka-log +config: + topic: TOPIC diff --git a/examples/kafka-log/_3.5.x.yaml b/examples/kafka-log/_3.5.x.yaml new file mode 100644 index 00000000..efb1efa7 --- /dev/null +++ b/examples/kafka-log/_3.5.x.yaml @@ -0,0 +1,3 @@ +name: kafka-log +config: + topic: TOPIC diff --git a/examples/kafka-log/_3.6.x.yaml b/examples/kafka-log/_3.6.x.yaml new file mode 100644 index 00000000..efb1efa7 --- /dev/null +++ b/examples/kafka-log/_3.6.x.yaml @@ -0,0 +1,3 @@ +name: kafka-log +config: + topic: TOPIC diff --git a/examples/kafka-log/_3.7.x.yaml b/examples/kafka-log/_3.7.x.yaml new file mode 100644 index 00000000..efb1efa7 --- /dev/null +++ b/examples/kafka-log/_3.7.x.yaml @@ -0,0 +1,3 @@ +name: kafka-log +config: + topic: TOPIC diff --git a/examples/kafka-log/_3.8.x.yaml b/examples/kafka-log/_3.8.x.yaml new file mode 100644 index 00000000..efb1efa7 --- /dev/null +++ b/examples/kafka-log/_3.8.x.yaml @@ -0,0 +1,3 @@ +name: kafka-log +config: + topic: TOPIC diff --git a/examples/kafka-log/_3.9.x.yaml b/examples/kafka-log/_3.9.x.yaml new file mode 100644 index 00000000..efb1efa7 --- /dev/null +++ b/examples/kafka-log/_3.9.x.yaml @@ -0,0 +1,3 @@ +name: kafka-log +config: + topic: TOPIC diff --git a/examples/kafka-upstream/_3.10.x.yaml b/examples/kafka-upstream/_3.10.x.yaml new file mode 100644 index 00000000..64ff19e5 --- /dev/null +++ b/examples/kafka-upstream/_3.10.x.yaml @@ -0,0 +1,3 @@ +name: kafka-upstream +config: + topic: TOPIC diff --git a/examples/kafka-upstream/_3.11.x.yaml b/examples/kafka-upstream/_3.11.x.yaml new file mode 100644 index 00000000..64ff19e5 --- /dev/null +++ b/examples/kafka-upstream/_3.11.x.yaml @@ -0,0 +1,3 @@ +name: kafka-upstream +config: + topic: TOPIC diff --git a/examples/kafka-upstream/_3.5.x.yaml b/examples/kafka-upstream/_3.5.x.yaml new file mode 100644 index 00000000..64ff19e5 --- /dev/null +++ b/examples/kafka-upstream/_3.5.x.yaml @@ -0,0 +1,3 @@ +name: kafka-upstream +config: + topic: TOPIC diff --git a/examples/kafka-upstream/_3.6.x.yaml b/examples/kafka-upstream/_3.6.x.yaml new file mode 100644 index 00000000..64ff19e5 --- /dev/null +++ b/examples/kafka-upstream/_3.6.x.yaml @@ -0,0 +1,3 @@ +name: kafka-upstream +config: + topic: TOPIC diff --git a/examples/kafka-upstream/_3.7.x.yaml b/examples/kafka-upstream/_3.7.x.yaml new file mode 100644 index 00000000..64ff19e5 --- /dev/null +++ b/examples/kafka-upstream/_3.7.x.yaml @@ -0,0 +1,3 @@ +name: kafka-upstream +config: + topic: TOPIC diff --git a/examples/kafka-upstream/_3.8.x.yaml b/examples/kafka-upstream/_3.8.x.yaml new file mode 100644 index 00000000..64ff19e5 --- /dev/null +++ b/examples/kafka-upstream/_3.8.x.yaml @@ -0,0 +1,3 @@ +name: kafka-upstream +config: + topic: TOPIC diff --git a/examples/kafka-upstream/_3.9.x.yaml b/examples/kafka-upstream/_3.9.x.yaml new file mode 100644 index 00000000..64ff19e5 --- /dev/null +++ b/examples/kafka-upstream/_3.9.x.yaml @@ -0,0 +1,3 @@ +name: kafka-upstream +config: + topic: TOPIC diff --git a/examples/key-auth-enc/_3.10.x.yaml b/examples/key-auth-enc/_3.10.x.yaml new file mode 100644 index 00000000..9f1a6093 --- /dev/null +++ b/examples/key-auth-enc/_3.10.x.yaml @@ -0,0 +1,4 @@ +name: key-auth-enc +config: + key_names: + - apikey diff --git a/examples/key-auth-enc/_3.11.x.yaml b/examples/key-auth-enc/_3.11.x.yaml new file mode 100644 index 00000000..9f1a6093 --- /dev/null +++ b/examples/key-auth-enc/_3.11.x.yaml @@ -0,0 +1,4 @@ +name: key-auth-enc +config: + key_names: + - apikey diff --git a/examples/key-auth-enc/_3.5.x.yaml b/examples/key-auth-enc/_3.5.x.yaml new file mode 100644 index 00000000..9f1a6093 --- /dev/null +++ b/examples/key-auth-enc/_3.5.x.yaml @@ -0,0 +1,4 @@ +name: key-auth-enc +config: + key_names: + - apikey diff --git a/examples/key-auth-enc/_3.6.x.yaml b/examples/key-auth-enc/_3.6.x.yaml new file mode 100644 index 00000000..9f1a6093 --- /dev/null +++ b/examples/key-auth-enc/_3.6.x.yaml @@ -0,0 +1,4 @@ +name: key-auth-enc +config: + key_names: + - apikey diff --git a/examples/key-auth-enc/_3.7.x.yaml b/examples/key-auth-enc/_3.7.x.yaml new file mode 100644 index 00000000..9f1a6093 --- /dev/null +++ b/examples/key-auth-enc/_3.7.x.yaml @@ -0,0 +1,4 @@ +name: key-auth-enc +config: + key_names: + - apikey diff --git a/examples/key-auth-enc/_3.8.x.yaml b/examples/key-auth-enc/_3.8.x.yaml new file mode 100644 index 00000000..9f1a6093 --- /dev/null +++ b/examples/key-auth-enc/_3.8.x.yaml @@ -0,0 +1,4 @@ +name: key-auth-enc +config: + key_names: + - apikey diff --git a/examples/key-auth-enc/_3.9.x.yaml b/examples/key-auth-enc/_3.9.x.yaml new file mode 100644 index 00000000..9f1a6093 --- /dev/null +++ b/examples/key-auth-enc/_3.9.x.yaml @@ -0,0 +1,4 @@ +name: key-auth-enc +config: + key_names: + - apikey diff --git a/examples/key-auth/_3.10.x.yaml b/examples/key-auth/_3.10.x.yaml new file mode 100644 index 00000000..f8ef72c5 --- /dev/null +++ b/examples/key-auth/_3.10.x.yaml @@ -0,0 +1,4 @@ +name: key-auth +config: + key_names: + - apikey diff --git a/examples/key-auth/_3.11.x.yaml b/examples/key-auth/_3.11.x.yaml new file mode 100644 index 00000000..f8ef72c5 --- /dev/null +++ b/examples/key-auth/_3.11.x.yaml @@ -0,0 +1,4 @@ +name: key-auth +config: + key_names: + - apikey diff --git a/examples/key-auth/_3.5.x.yaml b/examples/key-auth/_3.5.x.yaml new file mode 100644 index 00000000..f8ef72c5 --- /dev/null +++ b/examples/key-auth/_3.5.x.yaml @@ -0,0 +1,4 @@ +name: key-auth +config: + key_names: + - apikey diff --git a/examples/key-auth/_3.6.x.yaml b/examples/key-auth/_3.6.x.yaml new file mode 100644 index 00000000..f8ef72c5 --- /dev/null +++ b/examples/key-auth/_3.6.x.yaml @@ -0,0 +1,4 @@ +name: key-auth +config: + key_names: + - apikey diff --git a/examples/key-auth/_3.7.x.yaml b/examples/key-auth/_3.7.x.yaml new file mode 100644 index 00000000..f8ef72c5 --- /dev/null +++ b/examples/key-auth/_3.7.x.yaml @@ -0,0 +1,4 @@ +name: key-auth +config: + key_names: + - apikey diff --git a/examples/key-auth/_3.8.x.yaml b/examples/key-auth/_3.8.x.yaml new file mode 100644 index 00000000..f8ef72c5 --- /dev/null +++ b/examples/key-auth/_3.8.x.yaml @@ -0,0 +1,4 @@ +name: key-auth +config: + key_names: + - apikey diff --git a/examples/key-auth/_3.9.x.yaml b/examples/key-auth/_3.9.x.yaml new file mode 100644 index 00000000..f8ef72c5 --- /dev/null +++ b/examples/key-auth/_3.9.x.yaml @@ -0,0 +1,4 @@ +name: key-auth +config: + key_names: + - apikey diff --git a/examples/konnect-application-auth/_3.10.x.yaml b/examples/konnect-application-auth/_3.10.x.yaml new file mode 100644 index 00000000..e54993e5 --- /dev/null +++ b/examples/konnect-application-auth/_3.10.x.yaml @@ -0,0 +1,3 @@ +name: konnect-application-auth +config: + scope: 'uuid' diff --git a/examples/konnect-application-auth/_3.11.x.yaml b/examples/konnect-application-auth/_3.11.x.yaml new file mode 100644 index 00000000..e54993e5 --- /dev/null +++ b/examples/konnect-application-auth/_3.11.x.yaml @@ -0,0 +1,3 @@ +name: konnect-application-auth +config: + scope: 'uuid' diff --git a/examples/konnect-application-auth/_3.5.x.yaml b/examples/konnect-application-auth/_3.5.x.yaml new file mode 100644 index 00000000..e54993e5 --- /dev/null +++ b/examples/konnect-application-auth/_3.5.x.yaml @@ -0,0 +1,3 @@ +name: konnect-application-auth +config: + scope: 'uuid' diff --git a/examples/konnect-application-auth/_3.6.x.yaml b/examples/konnect-application-auth/_3.6.x.yaml new file mode 100644 index 00000000..e54993e5 --- /dev/null +++ b/examples/konnect-application-auth/_3.6.x.yaml @@ -0,0 +1,3 @@ +name: konnect-application-auth +config: + scope: 'uuid' diff --git a/examples/konnect-application-auth/_3.7.x.yaml b/examples/konnect-application-auth/_3.7.x.yaml new file mode 100644 index 00000000..e54993e5 --- /dev/null +++ b/examples/konnect-application-auth/_3.7.x.yaml @@ -0,0 +1,3 @@ +name: konnect-application-auth +config: + scope: 'uuid' diff --git a/examples/konnect-application-auth/_3.8.x.yaml b/examples/konnect-application-auth/_3.8.x.yaml new file mode 100644 index 00000000..e54993e5 --- /dev/null +++ b/examples/konnect-application-auth/_3.8.x.yaml @@ -0,0 +1,3 @@ +name: konnect-application-auth +config: + scope: 'uuid' diff --git a/examples/konnect-application-auth/_3.9.x.yaml b/examples/konnect-application-auth/_3.9.x.yaml new file mode 100644 index 00000000..e54993e5 --- /dev/null +++ b/examples/konnect-application-auth/_3.9.x.yaml @@ -0,0 +1,3 @@ +name: konnect-application-auth +config: + scope: 'uuid' diff --git a/examples/ldap-auth-advanced/_3.10.x.yaml b/examples/ldap-auth-advanced/_3.10.x.yaml new file mode 100644 index 00000000..5396d6cf --- /dev/null +++ b/examples/ldap-auth-advanced/_3.10.x.yaml @@ -0,0 +1,10 @@ +name: ldap-auth-advanced +config: + ldap_host: ldap.example.com + ldap_port: 389 + start_tls: true + base_dn: dc=example,dc=com + verify_ldap_host: false + attribute: cn + cache_ttl: 60 + header_type: ldap diff --git a/examples/ldap-auth-advanced/_3.11.x.yaml b/examples/ldap-auth-advanced/_3.11.x.yaml new file mode 100644 index 00000000..5396d6cf --- /dev/null +++ b/examples/ldap-auth-advanced/_3.11.x.yaml @@ -0,0 +1,10 @@ +name: ldap-auth-advanced +config: + ldap_host: ldap.example.com + ldap_port: 389 + start_tls: true + base_dn: dc=example,dc=com + verify_ldap_host: false + attribute: cn + cache_ttl: 60 + header_type: ldap diff --git a/examples/ldap-auth-advanced/_3.5.x.yaml b/examples/ldap-auth-advanced/_3.5.x.yaml new file mode 100644 index 00000000..5396d6cf --- /dev/null +++ b/examples/ldap-auth-advanced/_3.5.x.yaml @@ -0,0 +1,10 @@ +name: ldap-auth-advanced +config: + ldap_host: ldap.example.com + ldap_port: 389 + start_tls: true + base_dn: dc=example,dc=com + verify_ldap_host: false + attribute: cn + cache_ttl: 60 + header_type: ldap diff --git a/examples/ldap-auth-advanced/_3.6.x.yaml b/examples/ldap-auth-advanced/_3.6.x.yaml new file mode 100644 index 00000000..5396d6cf --- /dev/null +++ b/examples/ldap-auth-advanced/_3.6.x.yaml @@ -0,0 +1,10 @@ +name: ldap-auth-advanced +config: + ldap_host: ldap.example.com + ldap_port: 389 + start_tls: true + base_dn: dc=example,dc=com + verify_ldap_host: false + attribute: cn + cache_ttl: 60 + header_type: ldap diff --git a/examples/ldap-auth-advanced/_3.7.x.yaml b/examples/ldap-auth-advanced/_3.7.x.yaml new file mode 100644 index 00000000..5396d6cf --- /dev/null +++ b/examples/ldap-auth-advanced/_3.7.x.yaml @@ -0,0 +1,10 @@ +name: ldap-auth-advanced +config: + ldap_host: ldap.example.com + ldap_port: 389 + start_tls: true + base_dn: dc=example,dc=com + verify_ldap_host: false + attribute: cn + cache_ttl: 60 + header_type: ldap diff --git a/examples/ldap-auth-advanced/_3.8.x.yaml b/examples/ldap-auth-advanced/_3.8.x.yaml new file mode 100644 index 00000000..5396d6cf --- /dev/null +++ b/examples/ldap-auth-advanced/_3.8.x.yaml @@ -0,0 +1,10 @@ +name: ldap-auth-advanced +config: + ldap_host: ldap.example.com + ldap_port: 389 + start_tls: true + base_dn: dc=example,dc=com + verify_ldap_host: false + attribute: cn + cache_ttl: 60 + header_type: ldap diff --git a/examples/ldap-auth-advanced/_3.9.x.yaml b/examples/ldap-auth-advanced/_3.9.x.yaml new file mode 100644 index 00000000..5396d6cf --- /dev/null +++ b/examples/ldap-auth-advanced/_3.9.x.yaml @@ -0,0 +1,10 @@ +name: ldap-auth-advanced +config: + ldap_host: ldap.example.com + ldap_port: 389 + start_tls: true + base_dn: dc=example,dc=com + verify_ldap_host: false + attribute: cn + cache_ttl: 60 + header_type: ldap diff --git a/examples/ldap-auth/_3.10.x.yaml b/examples/ldap-auth/_3.10.x.yaml new file mode 100644 index 00000000..fe95f595 --- /dev/null +++ b/examples/ldap-auth/_3.10.x.yaml @@ -0,0 +1,8 @@ +name: ldap-auth +config: + hide_credentials: true + ldap_host: ldap.example.com + ldap_port: 389 + base_dn: dc=example,dc=com + attribute: cn + header_type: ldap diff --git a/examples/ldap-auth/_3.11.x.yaml b/examples/ldap-auth/_3.11.x.yaml new file mode 100644 index 00000000..fe95f595 --- /dev/null +++ b/examples/ldap-auth/_3.11.x.yaml @@ -0,0 +1,8 @@ +name: ldap-auth +config: + hide_credentials: true + ldap_host: ldap.example.com + ldap_port: 389 + base_dn: dc=example,dc=com + attribute: cn + header_type: ldap diff --git a/examples/ldap-auth/_3.5.x.yaml b/examples/ldap-auth/_3.5.x.yaml new file mode 100644 index 00000000..fe95f595 --- /dev/null +++ b/examples/ldap-auth/_3.5.x.yaml @@ -0,0 +1,8 @@ +name: ldap-auth +config: + hide_credentials: true + ldap_host: ldap.example.com + ldap_port: 389 + base_dn: dc=example,dc=com + attribute: cn + header_type: ldap diff --git a/examples/ldap-auth/_3.6.x.yaml b/examples/ldap-auth/_3.6.x.yaml new file mode 100644 index 00000000..fe95f595 --- /dev/null +++ b/examples/ldap-auth/_3.6.x.yaml @@ -0,0 +1,8 @@ +name: ldap-auth +config: + hide_credentials: true + ldap_host: ldap.example.com + ldap_port: 389 + base_dn: dc=example,dc=com + attribute: cn + header_type: ldap diff --git a/examples/ldap-auth/_3.7.x.yaml b/examples/ldap-auth/_3.7.x.yaml new file mode 100644 index 00000000..fe95f595 --- /dev/null +++ b/examples/ldap-auth/_3.7.x.yaml @@ -0,0 +1,8 @@ +name: ldap-auth +config: + hide_credentials: true + ldap_host: ldap.example.com + ldap_port: 389 + base_dn: dc=example,dc=com + attribute: cn + header_type: ldap diff --git a/examples/ldap-auth/_3.8.x.yaml b/examples/ldap-auth/_3.8.x.yaml new file mode 100644 index 00000000..fe95f595 --- /dev/null +++ b/examples/ldap-auth/_3.8.x.yaml @@ -0,0 +1,8 @@ +name: ldap-auth +config: + hide_credentials: true + ldap_host: ldap.example.com + ldap_port: 389 + base_dn: dc=example,dc=com + attribute: cn + header_type: ldap diff --git a/examples/ldap-auth/_3.9.x.yaml b/examples/ldap-auth/_3.9.x.yaml new file mode 100644 index 00000000..fe95f595 --- /dev/null +++ b/examples/ldap-auth/_3.9.x.yaml @@ -0,0 +1,8 @@ +name: ldap-auth +config: + hide_credentials: true + ldap_host: ldap.example.com + ldap_port: 389 + base_dn: dc=example,dc=com + attribute: cn + header_type: ldap diff --git a/examples/loggly/_3.10.x.yaml b/examples/loggly/_3.10.x.yaml new file mode 100644 index 00000000..186454f8 --- /dev/null +++ b/examples/loggly/_3.10.x.yaml @@ -0,0 +1,3 @@ +name: loggly +config: + key: YOUR_LOGGLY_SERVICE_TOKEN diff --git a/examples/loggly/_3.11.x.yaml b/examples/loggly/_3.11.x.yaml new file mode 100644 index 00000000..186454f8 --- /dev/null +++ b/examples/loggly/_3.11.x.yaml @@ -0,0 +1,3 @@ +name: loggly +config: + key: YOUR_LOGGLY_SERVICE_TOKEN diff --git a/examples/loggly/_3.5.x.yaml b/examples/loggly/_3.5.x.yaml new file mode 100644 index 00000000..186454f8 --- /dev/null +++ b/examples/loggly/_3.5.x.yaml @@ -0,0 +1,3 @@ +name: loggly +config: + key: YOUR_LOGGLY_SERVICE_TOKEN diff --git a/examples/loggly/_3.6.x.yaml b/examples/loggly/_3.6.x.yaml new file mode 100644 index 00000000..186454f8 --- /dev/null +++ b/examples/loggly/_3.6.x.yaml @@ -0,0 +1,3 @@ +name: loggly +config: + key: YOUR_LOGGLY_SERVICE_TOKEN diff --git a/examples/loggly/_3.7.x.yaml b/examples/loggly/_3.7.x.yaml new file mode 100644 index 00000000..186454f8 --- /dev/null +++ b/examples/loggly/_3.7.x.yaml @@ -0,0 +1,3 @@ +name: loggly +config: + key: YOUR_LOGGLY_SERVICE_TOKEN diff --git a/examples/loggly/_3.8.x.yaml b/examples/loggly/_3.8.x.yaml new file mode 100644 index 00000000..186454f8 --- /dev/null +++ b/examples/loggly/_3.8.x.yaml @@ -0,0 +1,3 @@ +name: loggly +config: + key: YOUR_LOGGLY_SERVICE_TOKEN diff --git a/examples/loggly/_3.9.x.yaml b/examples/loggly/_3.9.x.yaml new file mode 100644 index 00000000..186454f8 --- /dev/null +++ b/examples/loggly/_3.9.x.yaml @@ -0,0 +1,3 @@ +name: loggly +config: + key: YOUR_LOGGLY_SERVICE_TOKEN diff --git a/examples/mocking/_3.10.x.yaml b/examples/mocking/_3.10.x.yaml new file mode 100644 index 00000000..549e1f46 --- /dev/null +++ b/examples/mocking/_3.10.x.yaml @@ -0,0 +1,14 @@ +name: mocking +config: + random_delay: true + max_delay_time: 1 + min_delay_time: 0.001 + random_examples: true + api_specification: | + openapi: 3.0.1 + info: + title: OpenAPI 3.0 API + description: This is a simple API + contact: + email: example@example.com + version: 1.0.0 diff --git a/examples/mocking/_3.11.x.yaml b/examples/mocking/_3.11.x.yaml new file mode 100644 index 00000000..549e1f46 --- /dev/null +++ b/examples/mocking/_3.11.x.yaml @@ -0,0 +1,14 @@ +name: mocking +config: + random_delay: true + max_delay_time: 1 + min_delay_time: 0.001 + random_examples: true + api_specification: | + openapi: 3.0.1 + info: + title: OpenAPI 3.0 API + description: This is a simple API + contact: + email: example@example.com + version: 1.0.0 diff --git a/examples/mocking/_3.5.x.yaml b/examples/mocking/_3.5.x.yaml new file mode 100644 index 00000000..549e1f46 --- /dev/null +++ b/examples/mocking/_3.5.x.yaml @@ -0,0 +1,14 @@ +name: mocking +config: + random_delay: true + max_delay_time: 1 + min_delay_time: 0.001 + random_examples: true + api_specification: | + openapi: 3.0.1 + info: + title: OpenAPI 3.0 API + description: This is a simple API + contact: + email: example@example.com + version: 1.0.0 diff --git a/examples/mocking/_3.6.x.yaml b/examples/mocking/_3.6.x.yaml new file mode 100644 index 00000000..549e1f46 --- /dev/null +++ b/examples/mocking/_3.6.x.yaml @@ -0,0 +1,14 @@ +name: mocking +config: + random_delay: true + max_delay_time: 1 + min_delay_time: 0.001 + random_examples: true + api_specification: | + openapi: 3.0.1 + info: + title: OpenAPI 3.0 API + description: This is a simple API + contact: + email: example@example.com + version: 1.0.0 diff --git a/examples/mocking/_3.7.x.yaml b/examples/mocking/_3.7.x.yaml new file mode 100644 index 00000000..549e1f46 --- /dev/null +++ b/examples/mocking/_3.7.x.yaml @@ -0,0 +1,14 @@ +name: mocking +config: + random_delay: true + max_delay_time: 1 + min_delay_time: 0.001 + random_examples: true + api_specification: | + openapi: 3.0.1 + info: + title: OpenAPI 3.0 API + description: This is a simple API + contact: + email: example@example.com + version: 1.0.0 diff --git a/examples/mocking/_3.8.x.yaml b/examples/mocking/_3.8.x.yaml new file mode 100644 index 00000000..549e1f46 --- /dev/null +++ b/examples/mocking/_3.8.x.yaml @@ -0,0 +1,14 @@ +name: mocking +config: + random_delay: true + max_delay_time: 1 + min_delay_time: 0.001 + random_examples: true + api_specification: | + openapi: 3.0.1 + info: + title: OpenAPI 3.0 API + description: This is a simple API + contact: + email: example@example.com + version: 1.0.0 diff --git a/examples/mocking/_3.9.x.yaml b/examples/mocking/_3.9.x.yaml new file mode 100644 index 00000000..549e1f46 --- /dev/null +++ b/examples/mocking/_3.9.x.yaml @@ -0,0 +1,14 @@ +name: mocking +config: + random_delay: true + max_delay_time: 1 + min_delay_time: 0.001 + random_examples: true + api_specification: | + openapi: 3.0.1 + info: + title: OpenAPI 3.0 API + description: This is a simple API + contact: + email: example@example.com + version: 1.0.0 diff --git a/examples/mtls-auth/_3.10.x.yaml b/examples/mtls-auth/_3.10.x.yaml new file mode 100644 index 00000000..4bcdb7fd --- /dev/null +++ b/examples/mtls-auth/_3.10.x.yaml @@ -0,0 +1,6 @@ +name: mtls-auth +config: + ca_certificates: + - fdac360e-7b19-4ade-a553-6dd22937c82f + http_proxy_host: example + http_proxy_port: 80 diff --git a/examples/mtls-auth/_3.11.x.yaml b/examples/mtls-auth/_3.11.x.yaml new file mode 100644 index 00000000..4bcdb7fd --- /dev/null +++ b/examples/mtls-auth/_3.11.x.yaml @@ -0,0 +1,6 @@ +name: mtls-auth +config: + ca_certificates: + - fdac360e-7b19-4ade-a553-6dd22937c82f + http_proxy_host: example + http_proxy_port: 80 diff --git a/examples/mtls-auth/_3.5.x.yaml b/examples/mtls-auth/_3.5.x.yaml new file mode 100644 index 00000000..4bcdb7fd --- /dev/null +++ b/examples/mtls-auth/_3.5.x.yaml @@ -0,0 +1,6 @@ +name: mtls-auth +config: + ca_certificates: + - fdac360e-7b19-4ade-a553-6dd22937c82f + http_proxy_host: example + http_proxy_port: 80 diff --git a/examples/mtls-auth/_3.6.x.yaml b/examples/mtls-auth/_3.6.x.yaml new file mode 100644 index 00000000..4bcdb7fd --- /dev/null +++ b/examples/mtls-auth/_3.6.x.yaml @@ -0,0 +1,6 @@ +name: mtls-auth +config: + ca_certificates: + - fdac360e-7b19-4ade-a553-6dd22937c82f + http_proxy_host: example + http_proxy_port: 80 diff --git a/examples/mtls-auth/_3.7.x.yaml b/examples/mtls-auth/_3.7.x.yaml new file mode 100644 index 00000000..4bcdb7fd --- /dev/null +++ b/examples/mtls-auth/_3.7.x.yaml @@ -0,0 +1,6 @@ +name: mtls-auth +config: + ca_certificates: + - fdac360e-7b19-4ade-a553-6dd22937c82f + http_proxy_host: example + http_proxy_port: 80 diff --git a/examples/mtls-auth/_3.8.x.yaml b/examples/mtls-auth/_3.8.x.yaml new file mode 100644 index 00000000..4bcdb7fd --- /dev/null +++ b/examples/mtls-auth/_3.8.x.yaml @@ -0,0 +1,6 @@ +name: mtls-auth +config: + ca_certificates: + - fdac360e-7b19-4ade-a553-6dd22937c82f + http_proxy_host: example + http_proxy_port: 80 diff --git a/examples/mtls-auth/_3.9.x.yaml b/examples/mtls-auth/_3.9.x.yaml new file mode 100644 index 00000000..4bcdb7fd --- /dev/null +++ b/examples/mtls-auth/_3.9.x.yaml @@ -0,0 +1,6 @@ +name: mtls-auth +config: + ca_certificates: + - fdac360e-7b19-4ade-a553-6dd22937c82f + http_proxy_host: example + http_proxy_port: 80 diff --git a/examples/oas-validation/_3.10.x.yaml b/examples/oas-validation/_3.10.x.yaml new file mode 100644 index 00000000..2eb7dc89 --- /dev/null +++ b/examples/oas-validation/_3.10.x.yaml @@ -0,0 +1,29 @@ +name: oas-validation +config: + api_spec: | + openapi: 3.0.0 + info: + version: "2.19.3" + title: Xero Finance API + description: The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. + termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" + contact: + name: "Xero Platform Team" + email: "api@xero.com" + url: "https://developer.xero.com" + license: + name: MIT + url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE' + servers: + - description: Xero API servers + url: https://api.xero.com/finance.xro/1.0 + paths: + /CashValidation: + get: + security: + - OAuth2: [finance.cashvalidation.read] + tags: + - Finance + summary: Get cash validation + operationId: getCashValidation + description: Summarizes the total cash position for each account for an org diff --git a/examples/oas-validation/_3.11.x.yaml b/examples/oas-validation/_3.11.x.yaml new file mode 100644 index 00000000..2eb7dc89 --- /dev/null +++ b/examples/oas-validation/_3.11.x.yaml @@ -0,0 +1,29 @@ +name: oas-validation +config: + api_spec: | + openapi: 3.0.0 + info: + version: "2.19.3" + title: Xero Finance API + description: The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. + termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" + contact: + name: "Xero Platform Team" + email: "api@xero.com" + url: "https://developer.xero.com" + license: + name: MIT + url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE' + servers: + - description: Xero API servers + url: https://api.xero.com/finance.xro/1.0 + paths: + /CashValidation: + get: + security: + - OAuth2: [finance.cashvalidation.read] + tags: + - Finance + summary: Get cash validation + operationId: getCashValidation + description: Summarizes the total cash position for each account for an org diff --git a/examples/oas-validation/_3.5.x.yaml b/examples/oas-validation/_3.5.x.yaml new file mode 100644 index 00000000..2eb7dc89 --- /dev/null +++ b/examples/oas-validation/_3.5.x.yaml @@ -0,0 +1,29 @@ +name: oas-validation +config: + api_spec: | + openapi: 3.0.0 + info: + version: "2.19.3" + title: Xero Finance API + description: The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. + termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" + contact: + name: "Xero Platform Team" + email: "api@xero.com" + url: "https://developer.xero.com" + license: + name: MIT + url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE' + servers: + - description: Xero API servers + url: https://api.xero.com/finance.xro/1.0 + paths: + /CashValidation: + get: + security: + - OAuth2: [finance.cashvalidation.read] + tags: + - Finance + summary: Get cash validation + operationId: getCashValidation + description: Summarizes the total cash position for each account for an org diff --git a/examples/oas-validation/_3.6.x.yaml b/examples/oas-validation/_3.6.x.yaml new file mode 100644 index 00000000..2eb7dc89 --- /dev/null +++ b/examples/oas-validation/_3.6.x.yaml @@ -0,0 +1,29 @@ +name: oas-validation +config: + api_spec: | + openapi: 3.0.0 + info: + version: "2.19.3" + title: Xero Finance API + description: The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. + termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" + contact: + name: "Xero Platform Team" + email: "api@xero.com" + url: "https://developer.xero.com" + license: + name: MIT + url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE' + servers: + - description: Xero API servers + url: https://api.xero.com/finance.xro/1.0 + paths: + /CashValidation: + get: + security: + - OAuth2: [finance.cashvalidation.read] + tags: + - Finance + summary: Get cash validation + operationId: getCashValidation + description: Summarizes the total cash position for each account for an org diff --git a/examples/oas-validation/_3.7.x.yaml b/examples/oas-validation/_3.7.x.yaml new file mode 100644 index 00000000..2eb7dc89 --- /dev/null +++ b/examples/oas-validation/_3.7.x.yaml @@ -0,0 +1,29 @@ +name: oas-validation +config: + api_spec: | + openapi: 3.0.0 + info: + version: "2.19.3" + title: Xero Finance API + description: The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. + termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" + contact: + name: "Xero Platform Team" + email: "api@xero.com" + url: "https://developer.xero.com" + license: + name: MIT + url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE' + servers: + - description: Xero API servers + url: https://api.xero.com/finance.xro/1.0 + paths: + /CashValidation: + get: + security: + - OAuth2: [finance.cashvalidation.read] + tags: + - Finance + summary: Get cash validation + operationId: getCashValidation + description: Summarizes the total cash position for each account for an org diff --git a/examples/oas-validation/_3.8.x.yaml b/examples/oas-validation/_3.8.x.yaml new file mode 100644 index 00000000..2eb7dc89 --- /dev/null +++ b/examples/oas-validation/_3.8.x.yaml @@ -0,0 +1,29 @@ +name: oas-validation +config: + api_spec: | + openapi: 3.0.0 + info: + version: "2.19.3" + title: Xero Finance API + description: The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. + termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" + contact: + name: "Xero Platform Team" + email: "api@xero.com" + url: "https://developer.xero.com" + license: + name: MIT + url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE' + servers: + - description: Xero API servers + url: https://api.xero.com/finance.xro/1.0 + paths: + /CashValidation: + get: + security: + - OAuth2: [finance.cashvalidation.read] + tags: + - Finance + summary: Get cash validation + operationId: getCashValidation + description: Summarizes the total cash position for each account for an org diff --git a/examples/oas-validation/_3.9.x.yaml b/examples/oas-validation/_3.9.x.yaml new file mode 100644 index 00000000..2eb7dc89 --- /dev/null +++ b/examples/oas-validation/_3.9.x.yaml @@ -0,0 +1,29 @@ +name: oas-validation +config: + api_spec: | + openapi: 3.0.0 + info: + version: "2.19.3" + title: Xero Finance API + description: The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. + termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" + contact: + name: "Xero Platform Team" + email: "api@xero.com" + url: "https://developer.xero.com" + license: + name: MIT + url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE' + servers: + - description: Xero API servers + url: https://api.xero.com/finance.xro/1.0 + paths: + /CashValidation: + get: + security: + - OAuth2: [finance.cashvalidation.read] + tags: + - Finance + summary: Get cash validation + operationId: getCashValidation + description: Summarizes the total cash position for each account for an org diff --git a/examples/oauth2-introspection/_3.10.x.yaml b/examples/oauth2-introspection/_3.10.x.yaml new file mode 100644 index 00000000..bdf723af --- /dev/null +++ b/examples/oauth2-introspection/_3.10.x.yaml @@ -0,0 +1,5 @@ +name: oauth2-introspection +config: + introspection_url: https://example-url.com + authorization_value: Basic MG9hNWlpbjpPcGVuU2VzYW1l + consumer_by: username diff --git a/examples/oauth2-introspection/_3.11.x.yaml b/examples/oauth2-introspection/_3.11.x.yaml new file mode 100644 index 00000000..bdf723af --- /dev/null +++ b/examples/oauth2-introspection/_3.11.x.yaml @@ -0,0 +1,5 @@ +name: oauth2-introspection +config: + introspection_url: https://example-url.com + authorization_value: Basic MG9hNWlpbjpPcGVuU2VzYW1l + consumer_by: username diff --git a/examples/oauth2-introspection/_3.5.x.yaml b/examples/oauth2-introspection/_3.5.x.yaml new file mode 100644 index 00000000..bdf723af --- /dev/null +++ b/examples/oauth2-introspection/_3.5.x.yaml @@ -0,0 +1,5 @@ +name: oauth2-introspection +config: + introspection_url: https://example-url.com + authorization_value: Basic MG9hNWlpbjpPcGVuU2VzYW1l + consumer_by: username diff --git a/examples/oauth2-introspection/_3.6.x.yaml b/examples/oauth2-introspection/_3.6.x.yaml new file mode 100644 index 00000000..bdf723af --- /dev/null +++ b/examples/oauth2-introspection/_3.6.x.yaml @@ -0,0 +1,5 @@ +name: oauth2-introspection +config: + introspection_url: https://example-url.com + authorization_value: Basic MG9hNWlpbjpPcGVuU2VzYW1l + consumer_by: username diff --git a/examples/oauth2-introspection/_3.7.x.yaml b/examples/oauth2-introspection/_3.7.x.yaml new file mode 100644 index 00000000..bdf723af --- /dev/null +++ b/examples/oauth2-introspection/_3.7.x.yaml @@ -0,0 +1,5 @@ +name: oauth2-introspection +config: + introspection_url: https://example-url.com + authorization_value: Basic MG9hNWlpbjpPcGVuU2VzYW1l + consumer_by: username diff --git a/examples/oauth2-introspection/_3.8.x.yaml b/examples/oauth2-introspection/_3.8.x.yaml new file mode 100644 index 00000000..bdf723af --- /dev/null +++ b/examples/oauth2-introspection/_3.8.x.yaml @@ -0,0 +1,5 @@ +name: oauth2-introspection +config: + introspection_url: https://example-url.com + authorization_value: Basic MG9hNWlpbjpPcGVuU2VzYW1l + consumer_by: username diff --git a/examples/oauth2-introspection/_3.9.x.yaml b/examples/oauth2-introspection/_3.9.x.yaml new file mode 100644 index 00000000..bdf723af --- /dev/null +++ b/examples/oauth2-introspection/_3.9.x.yaml @@ -0,0 +1,5 @@ +name: oauth2-introspection +config: + introspection_url: https://example-url.com + authorization_value: Basic MG9hNWlpbjpPcGVuU2VzYW1l + consumer_by: username diff --git a/examples/oauth2/_3.10.x.yaml b/examples/oauth2/_3.10.x.yaml new file mode 100644 index 00000000..d733d558 --- /dev/null +++ b/examples/oauth2/_3.10.x.yaml @@ -0,0 +1,9 @@ +name: oauth2 +config: + scopes: + - email + - phone + - address + mandatory_scope: true + provision_key: + enable_authorization_code: true diff --git a/examples/oauth2/_3.11.x.yaml b/examples/oauth2/_3.11.x.yaml new file mode 100644 index 00000000..d733d558 --- /dev/null +++ b/examples/oauth2/_3.11.x.yaml @@ -0,0 +1,9 @@ +name: oauth2 +config: + scopes: + - email + - phone + - address + mandatory_scope: true + provision_key: + enable_authorization_code: true diff --git a/examples/oauth2/_3.5.x.yaml b/examples/oauth2/_3.5.x.yaml new file mode 100644 index 00000000..d733d558 --- /dev/null +++ b/examples/oauth2/_3.5.x.yaml @@ -0,0 +1,9 @@ +name: oauth2 +config: + scopes: + - email + - phone + - address + mandatory_scope: true + provision_key: + enable_authorization_code: true diff --git a/examples/oauth2/_3.6.x.yaml b/examples/oauth2/_3.6.x.yaml new file mode 100644 index 00000000..d733d558 --- /dev/null +++ b/examples/oauth2/_3.6.x.yaml @@ -0,0 +1,9 @@ +name: oauth2 +config: + scopes: + - email + - phone + - address + mandatory_scope: true + provision_key: + enable_authorization_code: true diff --git a/examples/oauth2/_3.7.x.yaml b/examples/oauth2/_3.7.x.yaml new file mode 100644 index 00000000..d733d558 --- /dev/null +++ b/examples/oauth2/_3.7.x.yaml @@ -0,0 +1,9 @@ +name: oauth2 +config: + scopes: + - email + - phone + - address + mandatory_scope: true + provision_key: + enable_authorization_code: true diff --git a/examples/oauth2/_3.8.x.yaml b/examples/oauth2/_3.8.x.yaml new file mode 100644 index 00000000..d733d558 --- /dev/null +++ b/examples/oauth2/_3.8.x.yaml @@ -0,0 +1,9 @@ +name: oauth2 +config: + scopes: + - email + - phone + - address + mandatory_scope: true + provision_key: + enable_authorization_code: true diff --git a/examples/oauth2/_3.9.x.yaml b/examples/oauth2/_3.9.x.yaml new file mode 100644 index 00000000..d733d558 --- /dev/null +++ b/examples/oauth2/_3.9.x.yaml @@ -0,0 +1,9 @@ +name: oauth2 +config: + scopes: + - email + - phone + - address + mandatory_scope: true + provision_key: + enable_authorization_code: true diff --git a/examples/opa/_3.10.x.yaml b/examples/opa/_3.10.x.yaml new file mode 100644 index 00000000..51ff2b78 --- /dev/null +++ b/examples/opa/_3.10.x.yaml @@ -0,0 +1,5 @@ +name: opa +config: + opa_host: localhost + opa_port: 8181 + opa_path: /v1/data/example/kong/allowBoolean diff --git a/examples/opa/_3.11.x.yaml b/examples/opa/_3.11.x.yaml new file mode 100644 index 00000000..51ff2b78 --- /dev/null +++ b/examples/opa/_3.11.x.yaml @@ -0,0 +1,5 @@ +name: opa +config: + opa_host: localhost + opa_port: 8181 + opa_path: /v1/data/example/kong/allowBoolean diff --git a/examples/opa/_3.5.x.yaml b/examples/opa/_3.5.x.yaml new file mode 100644 index 00000000..51ff2b78 --- /dev/null +++ b/examples/opa/_3.5.x.yaml @@ -0,0 +1,5 @@ +name: opa +config: + opa_host: localhost + opa_port: 8181 + opa_path: /v1/data/example/kong/allowBoolean diff --git a/examples/opa/_3.6.x.yaml b/examples/opa/_3.6.x.yaml new file mode 100644 index 00000000..51ff2b78 --- /dev/null +++ b/examples/opa/_3.6.x.yaml @@ -0,0 +1,5 @@ +name: opa +config: + opa_host: localhost + opa_port: 8181 + opa_path: /v1/data/example/kong/allowBoolean diff --git a/examples/opa/_3.7.x.yaml b/examples/opa/_3.7.x.yaml new file mode 100644 index 00000000..51ff2b78 --- /dev/null +++ b/examples/opa/_3.7.x.yaml @@ -0,0 +1,5 @@ +name: opa +config: + opa_host: localhost + opa_port: 8181 + opa_path: /v1/data/example/kong/allowBoolean diff --git a/examples/opa/_3.8.x.yaml b/examples/opa/_3.8.x.yaml new file mode 100644 index 00000000..51ff2b78 --- /dev/null +++ b/examples/opa/_3.8.x.yaml @@ -0,0 +1,5 @@ +name: opa +config: + opa_host: localhost + opa_port: 8181 + opa_path: /v1/data/example/kong/allowBoolean diff --git a/examples/opa/_3.9.x.yaml b/examples/opa/_3.9.x.yaml new file mode 100644 index 00000000..51ff2b78 --- /dev/null +++ b/examples/opa/_3.9.x.yaml @@ -0,0 +1,5 @@ +name: opa +config: + opa_host: localhost + opa_port: 8181 + opa_path: /v1/data/example/kong/allowBoolean diff --git a/examples/openid-connect/_3.10.x.yaml b/examples/openid-connect/_3.10.x.yaml new file mode 100644 index 00000000..69f30114 --- /dev/null +++ b/examples/openid-connect/_3.10.x.yaml @@ -0,0 +1,12 @@ +name: openid-connect +config: + auth_methods: + - authorization_code + - session + issuer: http://example.org + client_id: + - + client_secret: + - + session_secret: + response_mode: form_post diff --git a/examples/openid-connect/_3.11.x.yaml b/examples/openid-connect/_3.11.x.yaml new file mode 100644 index 00000000..69f30114 --- /dev/null +++ b/examples/openid-connect/_3.11.x.yaml @@ -0,0 +1,12 @@ +name: openid-connect +config: + auth_methods: + - authorization_code + - session + issuer: http://example.org + client_id: + - + client_secret: + - + session_secret: + response_mode: form_post diff --git a/examples/openid-connect/_3.5.x.yaml b/examples/openid-connect/_3.5.x.yaml new file mode 100644 index 00000000..69f30114 --- /dev/null +++ b/examples/openid-connect/_3.5.x.yaml @@ -0,0 +1,12 @@ +name: openid-connect +config: + auth_methods: + - authorization_code + - session + issuer: http://example.org + client_id: + - + client_secret: + - + session_secret: + response_mode: form_post diff --git a/examples/openid-connect/_3.6.x.yaml b/examples/openid-connect/_3.6.x.yaml new file mode 100644 index 00000000..69f30114 --- /dev/null +++ b/examples/openid-connect/_3.6.x.yaml @@ -0,0 +1,12 @@ +name: openid-connect +config: + auth_methods: + - authorization_code + - session + issuer: http://example.org + client_id: + - + client_secret: + - + session_secret: + response_mode: form_post diff --git a/examples/openid-connect/_3.7.x.yaml b/examples/openid-connect/_3.7.x.yaml new file mode 100644 index 00000000..69f30114 --- /dev/null +++ b/examples/openid-connect/_3.7.x.yaml @@ -0,0 +1,12 @@ +name: openid-connect +config: + auth_methods: + - authorization_code + - session + issuer: http://example.org + client_id: + - + client_secret: + - + session_secret: + response_mode: form_post diff --git a/examples/openid-connect/_3.8.x.yaml b/examples/openid-connect/_3.8.x.yaml new file mode 100644 index 00000000..69f30114 --- /dev/null +++ b/examples/openid-connect/_3.8.x.yaml @@ -0,0 +1,12 @@ +name: openid-connect +config: + auth_methods: + - authorization_code + - session + issuer: http://example.org + client_id: + - + client_secret: + - + session_secret: + response_mode: form_post diff --git a/examples/openid-connect/_3.9.x.yaml b/examples/openid-connect/_3.9.x.yaml new file mode 100644 index 00000000..69f30114 --- /dev/null +++ b/examples/openid-connect/_3.9.x.yaml @@ -0,0 +1,12 @@ +name: openid-connect +config: + auth_methods: + - authorization_code + - session + issuer: http://example.org + client_id: + - + client_secret: + - + session_secret: + response_mode: form_post diff --git a/examples/opentelemetry/_3.10.x.yaml b/examples/opentelemetry/_3.10.x.yaml new file mode 100644 index 00000000..02aeaa66 --- /dev/null +++ b/examples/opentelemetry/_3.10.x.yaml @@ -0,0 +1,6 @@ +name: opentelemetry +config: + traces_endpoint: http://opentelemetry.collector:4318/v1/traces + logs_endpoint: http://opentelemetry.collector:4318/v1/logs + headers: + X-Auth-Token: secret-token diff --git a/examples/opentelemetry/_3.11.x.yaml b/examples/opentelemetry/_3.11.x.yaml new file mode 100644 index 00000000..02aeaa66 --- /dev/null +++ b/examples/opentelemetry/_3.11.x.yaml @@ -0,0 +1,6 @@ +name: opentelemetry +config: + traces_endpoint: http://opentelemetry.collector:4318/v1/traces + logs_endpoint: http://opentelemetry.collector:4318/v1/logs + headers: + X-Auth-Token: secret-token diff --git a/examples/opentelemetry/_3.5.x.yaml b/examples/opentelemetry/_3.5.x.yaml new file mode 100644 index 00000000..efacb712 --- /dev/null +++ b/examples/opentelemetry/_3.5.x.yaml @@ -0,0 +1,5 @@ +name: opentelemetry +config: + endpoint: http://opentelemetry.collector:4318/v1/traces + headers: + X-Auth-Token: secret-token diff --git a/examples/opentelemetry/_3.6.x.yaml b/examples/opentelemetry/_3.6.x.yaml new file mode 100644 index 00000000..efacb712 --- /dev/null +++ b/examples/opentelemetry/_3.6.x.yaml @@ -0,0 +1,5 @@ +name: opentelemetry +config: + endpoint: http://opentelemetry.collector:4318/v1/traces + headers: + X-Auth-Token: secret-token diff --git a/examples/opentelemetry/_3.7.x.yaml b/examples/opentelemetry/_3.7.x.yaml new file mode 100644 index 00000000..efacb712 --- /dev/null +++ b/examples/opentelemetry/_3.7.x.yaml @@ -0,0 +1,5 @@ +name: opentelemetry +config: + endpoint: http://opentelemetry.collector:4318/v1/traces + headers: + X-Auth-Token: secret-token diff --git a/examples/opentelemetry/_3.8.x.yaml b/examples/opentelemetry/_3.8.x.yaml new file mode 100644 index 00000000..02aeaa66 --- /dev/null +++ b/examples/opentelemetry/_3.8.x.yaml @@ -0,0 +1,6 @@ +name: opentelemetry +config: + traces_endpoint: http://opentelemetry.collector:4318/v1/traces + logs_endpoint: http://opentelemetry.collector:4318/v1/logs + headers: + X-Auth-Token: secret-token diff --git a/examples/opentelemetry/_3.9.x.yaml b/examples/opentelemetry/_3.9.x.yaml new file mode 100644 index 00000000..02aeaa66 --- /dev/null +++ b/examples/opentelemetry/_3.9.x.yaml @@ -0,0 +1,6 @@ +name: opentelemetry +config: + traces_endpoint: http://opentelemetry.collector:4318/v1/traces + logs_endpoint: http://opentelemetry.collector:4318/v1/logs + headers: + X-Auth-Token: secret-token diff --git a/examples/post-function/_2.6.x.yaml b/examples/post-function/_2.6.x.yaml new file mode 100644 index 00000000..f980a541 --- /dev/null +++ b/examples/post-function/_2.6.x.yaml @@ -0,0 +1,6 @@ +name: post-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/post-function/_2.7.x.yaml b/examples/post-function/_2.7.x.yaml new file mode 100644 index 00000000..f980a541 --- /dev/null +++ b/examples/post-function/_2.7.x.yaml @@ -0,0 +1,6 @@ +name: post-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/post-function/_2.8.x.yaml b/examples/post-function/_2.8.x.yaml new file mode 100644 index 00000000..f980a541 --- /dev/null +++ b/examples/post-function/_2.8.x.yaml @@ -0,0 +1,6 @@ +name: post-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/post-function/_3.0.x.yaml b/examples/post-function/_3.0.x.yaml new file mode 100644 index 00000000..f980a541 --- /dev/null +++ b/examples/post-function/_3.0.x.yaml @@ -0,0 +1,6 @@ +name: post-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/post-function/_3.1.x.yaml b/examples/post-function/_3.1.x.yaml new file mode 100644 index 00000000..f980a541 --- /dev/null +++ b/examples/post-function/_3.1.x.yaml @@ -0,0 +1,6 @@ +name: post-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/post-function/_3.10.x.yaml b/examples/post-function/_3.10.x.yaml new file mode 100644 index 00000000..f980a541 --- /dev/null +++ b/examples/post-function/_3.10.x.yaml @@ -0,0 +1,6 @@ +name: post-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/post-function/_3.11.x.yaml b/examples/post-function/_3.11.x.yaml new file mode 100644 index 00000000..f980a541 --- /dev/null +++ b/examples/post-function/_3.11.x.yaml @@ -0,0 +1,6 @@ +name: post-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/post-function/_3.2.x.yaml b/examples/post-function/_3.2.x.yaml new file mode 100644 index 00000000..f980a541 --- /dev/null +++ b/examples/post-function/_3.2.x.yaml @@ -0,0 +1,6 @@ +name: post-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/post-function/_3.3.x.yaml b/examples/post-function/_3.3.x.yaml new file mode 100644 index 00000000..f980a541 --- /dev/null +++ b/examples/post-function/_3.3.x.yaml @@ -0,0 +1,6 @@ +name: post-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/post-function/_3.4.x.yaml b/examples/post-function/_3.4.x.yaml new file mode 100644 index 00000000..f980a541 --- /dev/null +++ b/examples/post-function/_3.4.x.yaml @@ -0,0 +1,6 @@ +name: post-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/post-function/_3.5.x.yaml b/examples/post-function/_3.5.x.yaml new file mode 100644 index 00000000..f980a541 --- /dev/null +++ b/examples/post-function/_3.5.x.yaml @@ -0,0 +1,6 @@ +name: post-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/post-function/_3.6.x.yaml b/examples/post-function/_3.6.x.yaml new file mode 100644 index 00000000..f980a541 --- /dev/null +++ b/examples/post-function/_3.6.x.yaml @@ -0,0 +1,6 @@ +name: post-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/post-function/_3.7.x.yaml b/examples/post-function/_3.7.x.yaml new file mode 100644 index 00000000..f980a541 --- /dev/null +++ b/examples/post-function/_3.7.x.yaml @@ -0,0 +1,6 @@ +name: post-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/post-function/_3.8.x.yaml b/examples/post-function/_3.8.x.yaml new file mode 100644 index 00000000..f980a541 --- /dev/null +++ b/examples/post-function/_3.8.x.yaml @@ -0,0 +1,6 @@ +name: post-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/post-function/_3.9.x.yaml b/examples/post-function/_3.9.x.yaml new file mode 100644 index 00000000..f980a541 --- /dev/null +++ b/examples/post-function/_3.9.x.yaml @@ -0,0 +1,6 @@ +name: post-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/pre-function/_3.10.x.yaml b/examples/pre-function/_3.10.x.yaml new file mode 100644 index 00000000..62ffe4dd --- /dev/null +++ b/examples/pre-function/_3.10.x.yaml @@ -0,0 +1,6 @@ +name: pre-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/pre-function/_3.11.x.yaml b/examples/pre-function/_3.11.x.yaml new file mode 100644 index 00000000..62ffe4dd --- /dev/null +++ b/examples/pre-function/_3.11.x.yaml @@ -0,0 +1,6 @@ +name: pre-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/pre-function/_3.5.x.yaml b/examples/pre-function/_3.5.x.yaml new file mode 100644 index 00000000..62ffe4dd --- /dev/null +++ b/examples/pre-function/_3.5.x.yaml @@ -0,0 +1,6 @@ +name: pre-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/pre-function/_3.6.x.yaml b/examples/pre-function/_3.6.x.yaml new file mode 100644 index 00000000..62ffe4dd --- /dev/null +++ b/examples/pre-function/_3.6.x.yaml @@ -0,0 +1,6 @@ +name: pre-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/pre-function/_3.7.x.yaml b/examples/pre-function/_3.7.x.yaml new file mode 100644 index 00000000..62ffe4dd --- /dev/null +++ b/examples/pre-function/_3.7.x.yaml @@ -0,0 +1,6 @@ +name: pre-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/pre-function/_3.8.x.yaml b/examples/pre-function/_3.8.x.yaml new file mode 100644 index 00000000..62ffe4dd --- /dev/null +++ b/examples/pre-function/_3.8.x.yaml @@ -0,0 +1,6 @@ +name: pre-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/pre-function/_3.9.x.yaml b/examples/pre-function/_3.9.x.yaml new file mode 100644 index 00000000..62ffe4dd --- /dev/null +++ b/examples/pre-function/_3.9.x.yaml @@ -0,0 +1,6 @@ +name: pre-function +config: + access: + - | + kong.log.err("foo") + kong.response.exit(418) diff --git a/examples/prometheus/_3.10.x.yaml b/examples/prometheus/_3.10.x.yaml new file mode 100644 index 00000000..6b7b3b62 --- /dev/null +++ b/examples/prometheus/_3.10.x.yaml @@ -0,0 +1,4 @@ +name: prometheus +config: + per_consumer: false + diff --git a/examples/prometheus/_3.11.x.yaml b/examples/prometheus/_3.11.x.yaml new file mode 100644 index 00000000..6b7b3b62 --- /dev/null +++ b/examples/prometheus/_3.11.x.yaml @@ -0,0 +1,4 @@ +name: prometheus +config: + per_consumer: false + diff --git a/examples/prometheus/_3.5.x.yaml b/examples/prometheus/_3.5.x.yaml new file mode 100644 index 00000000..6b7b3b62 --- /dev/null +++ b/examples/prometheus/_3.5.x.yaml @@ -0,0 +1,4 @@ +name: prometheus +config: + per_consumer: false + diff --git a/examples/prometheus/_3.6.x.yaml b/examples/prometheus/_3.6.x.yaml new file mode 100644 index 00000000..6b7b3b62 --- /dev/null +++ b/examples/prometheus/_3.6.x.yaml @@ -0,0 +1,4 @@ +name: prometheus +config: + per_consumer: false + diff --git a/examples/prometheus/_3.7.x.yaml b/examples/prometheus/_3.7.x.yaml new file mode 100644 index 00000000..6b7b3b62 --- /dev/null +++ b/examples/prometheus/_3.7.x.yaml @@ -0,0 +1,4 @@ +name: prometheus +config: + per_consumer: false + diff --git a/examples/prometheus/_3.8.x.yaml b/examples/prometheus/_3.8.x.yaml new file mode 100644 index 00000000..6b7b3b62 --- /dev/null +++ b/examples/prometheus/_3.8.x.yaml @@ -0,0 +1,4 @@ +name: prometheus +config: + per_consumer: false + diff --git a/examples/prometheus/_3.9.x.yaml b/examples/prometheus/_3.9.x.yaml new file mode 100644 index 00000000..6b7b3b62 --- /dev/null +++ b/examples/prometheus/_3.9.x.yaml @@ -0,0 +1,4 @@ +name: prometheus +config: + per_consumer: false + diff --git a/examples/proxy-cache-advanced/_3.10.x.yaml b/examples/proxy-cache-advanced/_3.10.x.yaml new file mode 100644 index 00000000..d070db76 --- /dev/null +++ b/examples/proxy-cache-advanced/_3.10.x.yaml @@ -0,0 +1,11 @@ +name: proxy-cache-advanced +config: + response_code: + - 200 + request_method: + - GET + - HEAD + content_type: + - text/plain + - application/json + strategy: memory diff --git a/examples/proxy-cache-advanced/_3.11.x.yaml b/examples/proxy-cache-advanced/_3.11.x.yaml new file mode 100644 index 00000000..d070db76 --- /dev/null +++ b/examples/proxy-cache-advanced/_3.11.x.yaml @@ -0,0 +1,11 @@ +name: proxy-cache-advanced +config: + response_code: + - 200 + request_method: + - GET + - HEAD + content_type: + - text/plain + - application/json + strategy: memory diff --git a/examples/proxy-cache-advanced/_3.5.x.yaml b/examples/proxy-cache-advanced/_3.5.x.yaml new file mode 100644 index 00000000..d070db76 --- /dev/null +++ b/examples/proxy-cache-advanced/_3.5.x.yaml @@ -0,0 +1,11 @@ +name: proxy-cache-advanced +config: + response_code: + - 200 + request_method: + - GET + - HEAD + content_type: + - text/plain + - application/json + strategy: memory diff --git a/examples/proxy-cache-advanced/_3.6.x.yaml b/examples/proxy-cache-advanced/_3.6.x.yaml new file mode 100644 index 00000000..d070db76 --- /dev/null +++ b/examples/proxy-cache-advanced/_3.6.x.yaml @@ -0,0 +1,11 @@ +name: proxy-cache-advanced +config: + response_code: + - 200 + request_method: + - GET + - HEAD + content_type: + - text/plain + - application/json + strategy: memory diff --git a/examples/proxy-cache-advanced/_3.7.x.yaml b/examples/proxy-cache-advanced/_3.7.x.yaml new file mode 100644 index 00000000..d070db76 --- /dev/null +++ b/examples/proxy-cache-advanced/_3.7.x.yaml @@ -0,0 +1,11 @@ +name: proxy-cache-advanced +config: + response_code: + - 200 + request_method: + - GET + - HEAD + content_type: + - text/plain + - application/json + strategy: memory diff --git a/examples/proxy-cache-advanced/_3.8.x.yaml b/examples/proxy-cache-advanced/_3.8.x.yaml new file mode 100644 index 00000000..d070db76 --- /dev/null +++ b/examples/proxy-cache-advanced/_3.8.x.yaml @@ -0,0 +1,11 @@ +name: proxy-cache-advanced +config: + response_code: + - 200 + request_method: + - GET + - HEAD + content_type: + - text/plain + - application/json + strategy: memory diff --git a/examples/proxy-cache-advanced/_3.9.x.yaml b/examples/proxy-cache-advanced/_3.9.x.yaml new file mode 100644 index 00000000..d070db76 --- /dev/null +++ b/examples/proxy-cache-advanced/_3.9.x.yaml @@ -0,0 +1,11 @@ +name: proxy-cache-advanced +config: + response_code: + - 200 + request_method: + - GET + - HEAD + content_type: + - text/plain + - application/json + strategy: memory diff --git a/examples/proxy-cache/_3.10.x.yaml b/examples/proxy-cache/_3.10.x.yaml new file mode 100644 index 00000000..ce185e5e --- /dev/null +++ b/examples/proxy-cache/_3.10.x.yaml @@ -0,0 +1,12 @@ +name: proxy-cache +config: + response_code: + - 200 + request_method: + - GET + - HEAD + content_type: + - text/plain + - application/json + cache_ttl: 300 + strategy: memory diff --git a/examples/proxy-cache/_3.11.x.yaml b/examples/proxy-cache/_3.11.x.yaml new file mode 100644 index 00000000..ce185e5e --- /dev/null +++ b/examples/proxy-cache/_3.11.x.yaml @@ -0,0 +1,12 @@ +name: proxy-cache +config: + response_code: + - 200 + request_method: + - GET + - HEAD + content_type: + - text/plain + - application/json + cache_ttl: 300 + strategy: memory diff --git a/examples/proxy-cache/_3.5.x.yaml b/examples/proxy-cache/_3.5.x.yaml new file mode 100644 index 00000000..ce185e5e --- /dev/null +++ b/examples/proxy-cache/_3.5.x.yaml @@ -0,0 +1,12 @@ +name: proxy-cache +config: + response_code: + - 200 + request_method: + - GET + - HEAD + content_type: + - text/plain + - application/json + cache_ttl: 300 + strategy: memory diff --git a/examples/proxy-cache/_3.6.x.yaml b/examples/proxy-cache/_3.6.x.yaml new file mode 100644 index 00000000..ce185e5e --- /dev/null +++ b/examples/proxy-cache/_3.6.x.yaml @@ -0,0 +1,12 @@ +name: proxy-cache +config: + response_code: + - 200 + request_method: + - GET + - HEAD + content_type: + - text/plain + - application/json + cache_ttl: 300 + strategy: memory diff --git a/examples/proxy-cache/_3.7.x.yaml b/examples/proxy-cache/_3.7.x.yaml new file mode 100644 index 00000000..ce185e5e --- /dev/null +++ b/examples/proxy-cache/_3.7.x.yaml @@ -0,0 +1,12 @@ +name: proxy-cache +config: + response_code: + - 200 + request_method: + - GET + - HEAD + content_type: + - text/plain + - application/json + cache_ttl: 300 + strategy: memory diff --git a/examples/proxy-cache/_3.8.x.yaml b/examples/proxy-cache/_3.8.x.yaml new file mode 100644 index 00000000..ce185e5e --- /dev/null +++ b/examples/proxy-cache/_3.8.x.yaml @@ -0,0 +1,12 @@ +name: proxy-cache +config: + response_code: + - 200 + request_method: + - GET + - HEAD + content_type: + - text/plain + - application/json + cache_ttl: 300 + strategy: memory diff --git a/examples/proxy-cache/_3.9.x.yaml b/examples/proxy-cache/_3.9.x.yaml new file mode 100644 index 00000000..ce185e5e --- /dev/null +++ b/examples/proxy-cache/_3.9.x.yaml @@ -0,0 +1,12 @@ +name: proxy-cache +config: + response_code: + - 200 + request_method: + - GET + - HEAD + content_type: + - text/plain + - application/json + cache_ttl: 300 + strategy: memory diff --git a/examples/rate-limiting-advanced/_3.10.x.yaml b/examples/rate-limiting-advanced/_3.10.x.yaml new file mode 100644 index 00000000..7fee7c38 --- /dev/null +++ b/examples/rate-limiting-advanced/_3.10.x.yaml @@ -0,0 +1,11 @@ +name: rate-limiting-advanced +config: + limit: + - 5 + window_size: + - 30 + identifier: consumer + sync_rate: -1 + namespace: example_namespace + strategy: local + hide_client_headers: false diff --git a/examples/rate-limiting-advanced/_3.11.x.yaml b/examples/rate-limiting-advanced/_3.11.x.yaml new file mode 100644 index 00000000..7fee7c38 --- /dev/null +++ b/examples/rate-limiting-advanced/_3.11.x.yaml @@ -0,0 +1,11 @@ +name: rate-limiting-advanced +config: + limit: + - 5 + window_size: + - 30 + identifier: consumer + sync_rate: -1 + namespace: example_namespace + strategy: local + hide_client_headers: false diff --git a/examples/rate-limiting-advanced/_3.4.x.yaml b/examples/rate-limiting-advanced/_3.4.x.yaml index 3e36f7da..7fee7c38 100644 --- a/examples/rate-limiting-advanced/_3.4.x.yaml +++ b/examples/rate-limiting-advanced/_3.4.x.yaml @@ -9,7 +9,3 @@ config: namespace: example_namespace strategy: local hide_client_headers: false - enforce_consumer_groups: true - consumer_groups: - - group1 - - group2 diff --git a/examples/rate-limiting-advanced/_3.5.x.yaml b/examples/rate-limiting-advanced/_3.5.x.yaml new file mode 100644 index 00000000..7fee7c38 --- /dev/null +++ b/examples/rate-limiting-advanced/_3.5.x.yaml @@ -0,0 +1,11 @@ +name: rate-limiting-advanced +config: + limit: + - 5 + window_size: + - 30 + identifier: consumer + sync_rate: -1 + namespace: example_namespace + strategy: local + hide_client_headers: false diff --git a/examples/rate-limiting-advanced/_3.6.x.yaml b/examples/rate-limiting-advanced/_3.6.x.yaml new file mode 100644 index 00000000..7fee7c38 --- /dev/null +++ b/examples/rate-limiting-advanced/_3.6.x.yaml @@ -0,0 +1,11 @@ +name: rate-limiting-advanced +config: + limit: + - 5 + window_size: + - 30 + identifier: consumer + sync_rate: -1 + namespace: example_namespace + strategy: local + hide_client_headers: false diff --git a/examples/rate-limiting-advanced/_3.7.x.yaml b/examples/rate-limiting-advanced/_3.7.x.yaml new file mode 100644 index 00000000..7fee7c38 --- /dev/null +++ b/examples/rate-limiting-advanced/_3.7.x.yaml @@ -0,0 +1,11 @@ +name: rate-limiting-advanced +config: + limit: + - 5 + window_size: + - 30 + identifier: consumer + sync_rate: -1 + namespace: example_namespace + strategy: local + hide_client_headers: false diff --git a/examples/rate-limiting-advanced/_3.8.x.yaml b/examples/rate-limiting-advanced/_3.8.x.yaml new file mode 100644 index 00000000..7fee7c38 --- /dev/null +++ b/examples/rate-limiting-advanced/_3.8.x.yaml @@ -0,0 +1,11 @@ +name: rate-limiting-advanced +config: + limit: + - 5 + window_size: + - 30 + identifier: consumer + sync_rate: -1 + namespace: example_namespace + strategy: local + hide_client_headers: false diff --git a/examples/rate-limiting-advanced/_3.9.x.yaml b/examples/rate-limiting-advanced/_3.9.x.yaml new file mode 100644 index 00000000..7fee7c38 --- /dev/null +++ b/examples/rate-limiting-advanced/_3.9.x.yaml @@ -0,0 +1,11 @@ +name: rate-limiting-advanced +config: + limit: + - 5 + window_size: + - 30 + identifier: consumer + sync_rate: -1 + namespace: example_namespace + strategy: local + hide_client_headers: false diff --git a/examples/rate-limiting/_3.10.x.yaml b/examples/rate-limiting/_3.10.x.yaml new file mode 100644 index 00000000..f43f89fd --- /dev/null +++ b/examples/rate-limiting/_3.10.x.yaml @@ -0,0 +1,5 @@ +name: rate-limiting +config: + second: 5 + hour: 10000 + policy: local diff --git a/examples/rate-limiting/_3.11.x.yaml b/examples/rate-limiting/_3.11.x.yaml new file mode 100644 index 00000000..f43f89fd --- /dev/null +++ b/examples/rate-limiting/_3.11.x.yaml @@ -0,0 +1,5 @@ +name: rate-limiting +config: + second: 5 + hour: 10000 + policy: local diff --git a/examples/rate-limiting/_3.5.x.yaml b/examples/rate-limiting/_3.5.x.yaml new file mode 100644 index 00000000..f43f89fd --- /dev/null +++ b/examples/rate-limiting/_3.5.x.yaml @@ -0,0 +1,5 @@ +name: rate-limiting +config: + second: 5 + hour: 10000 + policy: local diff --git a/examples/rate-limiting/_3.6.x.yaml b/examples/rate-limiting/_3.6.x.yaml new file mode 100644 index 00000000..f43f89fd --- /dev/null +++ b/examples/rate-limiting/_3.6.x.yaml @@ -0,0 +1,5 @@ +name: rate-limiting +config: + second: 5 + hour: 10000 + policy: local diff --git a/examples/rate-limiting/_3.7.x.yaml b/examples/rate-limiting/_3.7.x.yaml new file mode 100644 index 00000000..f43f89fd --- /dev/null +++ b/examples/rate-limiting/_3.7.x.yaml @@ -0,0 +1,5 @@ +name: rate-limiting +config: + second: 5 + hour: 10000 + policy: local diff --git a/examples/rate-limiting/_3.8.x.yaml b/examples/rate-limiting/_3.8.x.yaml new file mode 100644 index 00000000..f43f89fd --- /dev/null +++ b/examples/rate-limiting/_3.8.x.yaml @@ -0,0 +1,5 @@ +name: rate-limiting +config: + second: 5 + hour: 10000 + policy: local diff --git a/examples/rate-limiting/_3.9.x.yaml b/examples/rate-limiting/_3.9.x.yaml new file mode 100644 index 00000000..f43f89fd --- /dev/null +++ b/examples/rate-limiting/_3.9.x.yaml @@ -0,0 +1,5 @@ +name: rate-limiting +config: + second: 5 + hour: 10000 + policy: local diff --git a/examples/redirect/_3.10.x.yaml b/examples/redirect/_3.10.x.yaml new file mode 100644 index 00000000..5c02d0ed --- /dev/null +++ b/examples/redirect/_3.10.x.yaml @@ -0,0 +1,3 @@ +name: redirect +config: + location: "https://example.com" \ No newline at end of file diff --git a/examples/redirect/_3.11.x.yaml b/examples/redirect/_3.11.x.yaml new file mode 100644 index 00000000..5c02d0ed --- /dev/null +++ b/examples/redirect/_3.11.x.yaml @@ -0,0 +1,3 @@ +name: redirect +config: + location: "https://example.com" \ No newline at end of file diff --git a/examples/redirect/_3.9.x.yaml b/examples/redirect/_3.9.x.yaml new file mode 100644 index 00000000..5c02d0ed --- /dev/null +++ b/examples/redirect/_3.9.x.yaml @@ -0,0 +1,3 @@ +name: redirect +config: + location: "https://example.com" \ No newline at end of file diff --git a/examples/request-callout/_3.10.x.yaml b/examples/request-callout/_3.10.x.yaml new file mode 100644 index 00000000..44c2aa93 --- /dev/null +++ b/examples/request-callout/_3.10.x.yaml @@ -0,0 +1 @@ +name: request-callout \ No newline at end of file diff --git a/examples/request-callout/_3.11.x.yaml b/examples/request-callout/_3.11.x.yaml new file mode 100644 index 00000000..44c2aa93 --- /dev/null +++ b/examples/request-callout/_3.11.x.yaml @@ -0,0 +1 @@ +name: request-callout \ No newline at end of file diff --git a/examples/request-size-limiting/_3.10.x.yaml b/examples/request-size-limiting/_3.10.x.yaml new file mode 100644 index 00000000..983d6d9e --- /dev/null +++ b/examples/request-size-limiting/_3.10.x.yaml @@ -0,0 +1,4 @@ +name: request-size-limiting +config: + allowed_payload_size: 128 + require_content_length: false diff --git a/examples/request-size-limiting/_3.11.x.yaml b/examples/request-size-limiting/_3.11.x.yaml new file mode 100644 index 00000000..983d6d9e --- /dev/null +++ b/examples/request-size-limiting/_3.11.x.yaml @@ -0,0 +1,4 @@ +name: request-size-limiting +config: + allowed_payload_size: 128 + require_content_length: false diff --git a/examples/request-size-limiting/_3.5.x.yaml b/examples/request-size-limiting/_3.5.x.yaml new file mode 100644 index 00000000..983d6d9e --- /dev/null +++ b/examples/request-size-limiting/_3.5.x.yaml @@ -0,0 +1,4 @@ +name: request-size-limiting +config: + allowed_payload_size: 128 + require_content_length: false diff --git a/examples/request-size-limiting/_3.6.x.yaml b/examples/request-size-limiting/_3.6.x.yaml new file mode 100644 index 00000000..983d6d9e --- /dev/null +++ b/examples/request-size-limiting/_3.6.x.yaml @@ -0,0 +1,4 @@ +name: request-size-limiting +config: + allowed_payload_size: 128 + require_content_length: false diff --git a/examples/request-size-limiting/_3.7.x.yaml b/examples/request-size-limiting/_3.7.x.yaml new file mode 100644 index 00000000..983d6d9e --- /dev/null +++ b/examples/request-size-limiting/_3.7.x.yaml @@ -0,0 +1,4 @@ +name: request-size-limiting +config: + allowed_payload_size: 128 + require_content_length: false diff --git a/examples/request-size-limiting/_3.8.x.yaml b/examples/request-size-limiting/_3.8.x.yaml new file mode 100644 index 00000000..983d6d9e --- /dev/null +++ b/examples/request-size-limiting/_3.8.x.yaml @@ -0,0 +1,4 @@ +name: request-size-limiting +config: + allowed_payload_size: 128 + require_content_length: false diff --git a/examples/request-size-limiting/_3.9.x.yaml b/examples/request-size-limiting/_3.9.x.yaml new file mode 100644 index 00000000..983d6d9e --- /dev/null +++ b/examples/request-size-limiting/_3.9.x.yaml @@ -0,0 +1,4 @@ +name: request-size-limiting +config: + allowed_payload_size: 128 + require_content_length: false diff --git a/examples/request-termination/_3.10.x.yaml b/examples/request-termination/_3.10.x.yaml new file mode 100644 index 00000000..7be67818 --- /dev/null +++ b/examples/request-termination/_3.10.x.yaml @@ -0,0 +1,4 @@ +name: request-termination +config: + status_code: 403 + message: So long and thanks for all the fish! diff --git a/examples/request-termination/_3.11.x.yaml b/examples/request-termination/_3.11.x.yaml new file mode 100644 index 00000000..7be67818 --- /dev/null +++ b/examples/request-termination/_3.11.x.yaml @@ -0,0 +1,4 @@ +name: request-termination +config: + status_code: 403 + message: So long and thanks for all the fish! diff --git a/examples/request-termination/_3.5.x.yaml b/examples/request-termination/_3.5.x.yaml new file mode 100644 index 00000000..7be67818 --- /dev/null +++ b/examples/request-termination/_3.5.x.yaml @@ -0,0 +1,4 @@ +name: request-termination +config: + status_code: 403 + message: So long and thanks for all the fish! diff --git a/examples/request-termination/_3.6.x.yaml b/examples/request-termination/_3.6.x.yaml new file mode 100644 index 00000000..7be67818 --- /dev/null +++ b/examples/request-termination/_3.6.x.yaml @@ -0,0 +1,4 @@ +name: request-termination +config: + status_code: 403 + message: So long and thanks for all the fish! diff --git a/examples/request-termination/_3.7.x.yaml b/examples/request-termination/_3.7.x.yaml new file mode 100644 index 00000000..7be67818 --- /dev/null +++ b/examples/request-termination/_3.7.x.yaml @@ -0,0 +1,4 @@ +name: request-termination +config: + status_code: 403 + message: So long and thanks for all the fish! diff --git a/examples/request-termination/_3.8.x.yaml b/examples/request-termination/_3.8.x.yaml new file mode 100644 index 00000000..7be67818 --- /dev/null +++ b/examples/request-termination/_3.8.x.yaml @@ -0,0 +1,4 @@ +name: request-termination +config: + status_code: 403 + message: So long and thanks for all the fish! diff --git a/examples/request-termination/_3.9.x.yaml b/examples/request-termination/_3.9.x.yaml new file mode 100644 index 00000000..7be67818 --- /dev/null +++ b/examples/request-termination/_3.9.x.yaml @@ -0,0 +1,4 @@ +name: request-termination +config: + status_code: 403 + message: So long and thanks for all the fish! diff --git a/examples/request-transformer-advanced/_3.10.x.yaml b/examples/request-transformer-advanced/_3.10.x.yaml new file mode 100644 index 00000000..999898e7 --- /dev/null +++ b/examples/request-transformer-advanced/_3.10.x.yaml @@ -0,0 +1,43 @@ +name: request-transformer-advanced +config: + remove: + headers: + - x-toremove + - x-another-one + remove: + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + remove: + body: + - formparam-toremove + - formparam-another-one + replace: + body: + - body-param1:new-value-1 + - body-param2:new-value-2 + rename: + headers: + - header-old-name:header-new-name + - another-old-name:another-new-name + rename: + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + rename: + body: + - param-old:param-new + - param2-old:param2-new + add: + headers: + - x-new-header:value + - x-another-header:something + add: + querystring: + - new-param:some_value + - another-param:some_value + add: + json_types: + - string + - boolean + - number diff --git a/examples/request-transformer-advanced/_3.11.x.yaml b/examples/request-transformer-advanced/_3.11.x.yaml new file mode 100644 index 00000000..999898e7 --- /dev/null +++ b/examples/request-transformer-advanced/_3.11.x.yaml @@ -0,0 +1,43 @@ +name: request-transformer-advanced +config: + remove: + headers: + - x-toremove + - x-another-one + remove: + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + remove: + body: + - formparam-toremove + - formparam-another-one + replace: + body: + - body-param1:new-value-1 + - body-param2:new-value-2 + rename: + headers: + - header-old-name:header-new-name + - another-old-name:another-new-name + rename: + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + rename: + body: + - param-old:param-new + - param2-old:param2-new + add: + headers: + - x-new-header:value + - x-another-header:something + add: + querystring: + - new-param:some_value + - another-param:some_value + add: + json_types: + - string + - boolean + - number diff --git a/examples/request-transformer-advanced/_3.5.x.yaml b/examples/request-transformer-advanced/_3.5.x.yaml new file mode 100644 index 00000000..999898e7 --- /dev/null +++ b/examples/request-transformer-advanced/_3.5.x.yaml @@ -0,0 +1,43 @@ +name: request-transformer-advanced +config: + remove: + headers: + - x-toremove + - x-another-one + remove: + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + remove: + body: + - formparam-toremove + - formparam-another-one + replace: + body: + - body-param1:new-value-1 + - body-param2:new-value-2 + rename: + headers: + - header-old-name:header-new-name + - another-old-name:another-new-name + rename: + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + rename: + body: + - param-old:param-new + - param2-old:param2-new + add: + headers: + - x-new-header:value + - x-another-header:something + add: + querystring: + - new-param:some_value + - another-param:some_value + add: + json_types: + - string + - boolean + - number diff --git a/examples/request-transformer-advanced/_3.6.x.yaml b/examples/request-transformer-advanced/_3.6.x.yaml new file mode 100644 index 00000000..999898e7 --- /dev/null +++ b/examples/request-transformer-advanced/_3.6.x.yaml @@ -0,0 +1,43 @@ +name: request-transformer-advanced +config: + remove: + headers: + - x-toremove + - x-another-one + remove: + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + remove: + body: + - formparam-toremove + - formparam-another-one + replace: + body: + - body-param1:new-value-1 + - body-param2:new-value-2 + rename: + headers: + - header-old-name:header-new-name + - another-old-name:another-new-name + rename: + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + rename: + body: + - param-old:param-new + - param2-old:param2-new + add: + headers: + - x-new-header:value + - x-another-header:something + add: + querystring: + - new-param:some_value + - another-param:some_value + add: + json_types: + - string + - boolean + - number diff --git a/examples/request-transformer-advanced/_3.7.x.yaml b/examples/request-transformer-advanced/_3.7.x.yaml new file mode 100644 index 00000000..999898e7 --- /dev/null +++ b/examples/request-transformer-advanced/_3.7.x.yaml @@ -0,0 +1,43 @@ +name: request-transformer-advanced +config: + remove: + headers: + - x-toremove + - x-another-one + remove: + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + remove: + body: + - formparam-toremove + - formparam-another-one + replace: + body: + - body-param1:new-value-1 + - body-param2:new-value-2 + rename: + headers: + - header-old-name:header-new-name + - another-old-name:another-new-name + rename: + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + rename: + body: + - param-old:param-new + - param2-old:param2-new + add: + headers: + - x-new-header:value + - x-another-header:something + add: + querystring: + - new-param:some_value + - another-param:some_value + add: + json_types: + - string + - boolean + - number diff --git a/examples/request-transformer-advanced/_3.8.x.yaml b/examples/request-transformer-advanced/_3.8.x.yaml new file mode 100644 index 00000000..999898e7 --- /dev/null +++ b/examples/request-transformer-advanced/_3.8.x.yaml @@ -0,0 +1,43 @@ +name: request-transformer-advanced +config: + remove: + headers: + - x-toremove + - x-another-one + remove: + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + remove: + body: + - formparam-toremove + - formparam-another-one + replace: + body: + - body-param1:new-value-1 + - body-param2:new-value-2 + rename: + headers: + - header-old-name:header-new-name + - another-old-name:another-new-name + rename: + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + rename: + body: + - param-old:param-new + - param2-old:param2-new + add: + headers: + - x-new-header:value + - x-another-header:something + add: + querystring: + - new-param:some_value + - another-param:some_value + add: + json_types: + - string + - boolean + - number diff --git a/examples/request-transformer-advanced/_3.9.x.yaml b/examples/request-transformer-advanced/_3.9.x.yaml new file mode 100644 index 00000000..999898e7 --- /dev/null +++ b/examples/request-transformer-advanced/_3.9.x.yaml @@ -0,0 +1,43 @@ +name: request-transformer-advanced +config: + remove: + headers: + - x-toremove + - x-another-one + remove: + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + remove: + body: + - formparam-toremove + - formparam-another-one + replace: + body: + - body-param1:new-value-1 + - body-param2:new-value-2 + rename: + headers: + - header-old-name:header-new-name + - another-old-name:another-new-name + rename: + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + rename: + body: + - param-old:param-new + - param2-old:param2-new + add: + headers: + - x-new-header:value + - x-another-header:something + add: + querystring: + - new-param:some_value + - another-param:some_value + add: + json_types: + - string + - boolean + - number diff --git a/examples/request-transformer/_3.10.x.yaml b/examples/request-transformer/_3.10.x.yaml new file mode 100644 index 00000000..3e9148f5 --- /dev/null +++ b/examples/request-transformer/_3.10.x.yaml @@ -0,0 +1,36 @@ +name: request-transformer +config: + remove: + headers: + - x-toremove + - x-another-one + querystring: + - qs-toremove + - qs2-toremove + body: + - formparam-toremove + - formparam-another-one + replace: + body: + - body-param1:new-value-1 + - body-param2:new-value-2 + rename: + headers: + - header-old-name:header-new-name + - another-old-name:another-new-name + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + body: + - param-old:param-new + - param2-old:param2-new + add: + headers: + - x-new-header:value + - x-another-header:something + querystring: + - new-param:some_value + - another-param:some_value + body: + - new-form-param:some_value + - another-form-param:some_value diff --git a/examples/request-transformer/_3.11.x.yaml b/examples/request-transformer/_3.11.x.yaml new file mode 100644 index 00000000..3e9148f5 --- /dev/null +++ b/examples/request-transformer/_3.11.x.yaml @@ -0,0 +1,36 @@ +name: request-transformer +config: + remove: + headers: + - x-toremove + - x-another-one + querystring: + - qs-toremove + - qs2-toremove + body: + - formparam-toremove + - formparam-another-one + replace: + body: + - body-param1:new-value-1 + - body-param2:new-value-2 + rename: + headers: + - header-old-name:header-new-name + - another-old-name:another-new-name + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + body: + - param-old:param-new + - param2-old:param2-new + add: + headers: + - x-new-header:value + - x-another-header:something + querystring: + - new-param:some_value + - another-param:some_value + body: + - new-form-param:some_value + - another-form-param:some_value diff --git a/examples/request-transformer/_3.5.x.yaml b/examples/request-transformer/_3.5.x.yaml new file mode 100644 index 00000000..d9e0a346 --- /dev/null +++ b/examples/request-transformer/_3.5.x.yaml @@ -0,0 +1,36 @@ +name: request-transformer +config: + remove: + headers: + - x-toremove + - x-another-one + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + body: + - formparam-toremove + - formparam-another-one + replace: + body: + - body-param1:new-value-1 + - body-param2:new-value-2 + rename: + headers: + - header-old-name:header-new-name + - another-old-name:another-new-name + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + body: + - param-old:param-new + - param2-old:param2-new + add: + headers: + - x-new-header:value + - x-another-header:something + querystring: + - new-param:some_value + - another-param:some_value + body: + - new-form-param:some_value + - another-form-param:some_value diff --git a/examples/request-transformer/_3.6.x.yaml b/examples/request-transformer/_3.6.x.yaml new file mode 100644 index 00000000..d9e0a346 --- /dev/null +++ b/examples/request-transformer/_3.6.x.yaml @@ -0,0 +1,36 @@ +name: request-transformer +config: + remove: + headers: + - x-toremove + - x-another-one + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + body: + - formparam-toremove + - formparam-another-one + replace: + body: + - body-param1:new-value-1 + - body-param2:new-value-2 + rename: + headers: + - header-old-name:header-new-name + - another-old-name:another-new-name + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + body: + - param-old:param-new + - param2-old:param2-new + add: + headers: + - x-new-header:value + - x-another-header:something + querystring: + - new-param:some_value + - another-param:some_value + body: + - new-form-param:some_value + - another-form-param:some_value diff --git a/examples/request-transformer/_3.7.x.yaml b/examples/request-transformer/_3.7.x.yaml new file mode 100644 index 00000000..d9e0a346 --- /dev/null +++ b/examples/request-transformer/_3.7.x.yaml @@ -0,0 +1,36 @@ +name: request-transformer +config: + remove: + headers: + - x-toremove + - x-another-one + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + body: + - formparam-toremove + - formparam-another-one + replace: + body: + - body-param1:new-value-1 + - body-param2:new-value-2 + rename: + headers: + - header-old-name:header-new-name + - another-old-name:another-new-name + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + body: + - param-old:param-new + - param2-old:param2-new + add: + headers: + - x-new-header:value + - x-another-header:something + querystring: + - new-param:some_value + - another-param:some_value + body: + - new-form-param:some_value + - another-form-param:some_value diff --git a/examples/request-transformer/_3.8.x.yaml b/examples/request-transformer/_3.8.x.yaml new file mode 100644 index 00000000..3e9148f5 --- /dev/null +++ b/examples/request-transformer/_3.8.x.yaml @@ -0,0 +1,36 @@ +name: request-transformer +config: + remove: + headers: + - x-toremove + - x-another-one + querystring: + - qs-toremove + - qs2-toremove + body: + - formparam-toremove + - formparam-another-one + replace: + body: + - body-param1:new-value-1 + - body-param2:new-value-2 + rename: + headers: + - header-old-name:header-new-name + - another-old-name:another-new-name + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + body: + - param-old:param-new + - param2-old:param2-new + add: + headers: + - x-new-header:value + - x-another-header:something + querystring: + - new-param:some_value + - another-param:some_value + body: + - new-form-param:some_value + - another-form-param:some_value diff --git a/examples/request-transformer/_3.9.x.yaml b/examples/request-transformer/_3.9.x.yaml new file mode 100644 index 00000000..3e9148f5 --- /dev/null +++ b/examples/request-transformer/_3.9.x.yaml @@ -0,0 +1,36 @@ +name: request-transformer +config: + remove: + headers: + - x-toremove + - x-another-one + querystring: + - qs-toremove + - qs2-toremove + body: + - formparam-toremove + - formparam-another-one + replace: + body: + - body-param1:new-value-1 + - body-param2:new-value-2 + rename: + headers: + - header-old-name:header-new-name + - another-old-name:another-new-name + querystring: + - qs-old-name:qs-new-name + - qs2-old-name:qs2-new-name + body: + - param-old:param-new + - param2-old:param2-new + add: + headers: + - x-new-header:value + - x-another-header:something + querystring: + - new-param:some_value + - another-param:some_value + body: + - new-form-param:some_value + - another-form-param:some_value diff --git a/examples/request-validator/_3.10.x.yaml b/examples/request-validator/_3.10.x.yaml new file mode 100644 index 00000000..89251acf --- /dev/null +++ b/examples/request-validator/_3.10.x.yaml @@ -0,0 +1,3 @@ +name: request-validator +config: + body_schema: '[{"name":{"type": "string", "required": true}}]' diff --git a/examples/request-validator/_3.11.x.yaml b/examples/request-validator/_3.11.x.yaml new file mode 100644 index 00000000..89251acf --- /dev/null +++ b/examples/request-validator/_3.11.x.yaml @@ -0,0 +1,3 @@ +name: request-validator +config: + body_schema: '[{"name":{"type": "string", "required": true}}]' diff --git a/examples/request-validator/_3.5.x.yaml b/examples/request-validator/_3.5.x.yaml new file mode 100644 index 00000000..89251acf --- /dev/null +++ b/examples/request-validator/_3.5.x.yaml @@ -0,0 +1,3 @@ +name: request-validator +config: + body_schema: '[{"name":{"type": "string", "required": true}}]' diff --git a/examples/request-validator/_3.6.x.yaml b/examples/request-validator/_3.6.x.yaml new file mode 100644 index 00000000..89251acf --- /dev/null +++ b/examples/request-validator/_3.6.x.yaml @@ -0,0 +1,3 @@ +name: request-validator +config: + body_schema: '[{"name":{"type": "string", "required": true}}]' diff --git a/examples/request-validator/_3.7.x.yaml b/examples/request-validator/_3.7.x.yaml new file mode 100644 index 00000000..89251acf --- /dev/null +++ b/examples/request-validator/_3.7.x.yaml @@ -0,0 +1,3 @@ +name: request-validator +config: + body_schema: '[{"name":{"type": "string", "required": true}}]' diff --git a/examples/request-validator/_3.8.x.yaml b/examples/request-validator/_3.8.x.yaml new file mode 100644 index 00000000..89251acf --- /dev/null +++ b/examples/request-validator/_3.8.x.yaml @@ -0,0 +1,3 @@ +name: request-validator +config: + body_schema: '[{"name":{"type": "string", "required": true}}]' diff --git a/examples/request-validator/_3.9.x.yaml b/examples/request-validator/_3.9.x.yaml new file mode 100644 index 00000000..89251acf --- /dev/null +++ b/examples/request-validator/_3.9.x.yaml @@ -0,0 +1,3 @@ +name: request-validator +config: + body_schema: '[{"name":{"type": "string", "required": true}}]' diff --git a/examples/response-ratelimiting/_3.10.x.yaml b/examples/response-ratelimiting/_3.10.x.yaml new file mode 100644 index 00000000..a3860b2a --- /dev/null +++ b/examples/response-ratelimiting/_3.10.x.yaml @@ -0,0 +1,8 @@ +name: response-ratelimiting +config: + limits: + limit_name: + limits: + limit_name: + minute: 10 + policy: local diff --git a/examples/response-ratelimiting/_3.11.x.yaml b/examples/response-ratelimiting/_3.11.x.yaml new file mode 100644 index 00000000..a3860b2a --- /dev/null +++ b/examples/response-ratelimiting/_3.11.x.yaml @@ -0,0 +1,8 @@ +name: response-ratelimiting +config: + limits: + limit_name: + limits: + limit_name: + minute: 10 + policy: local diff --git a/examples/response-ratelimiting/_3.5.x.yaml b/examples/response-ratelimiting/_3.5.x.yaml new file mode 100644 index 00000000..a3860b2a --- /dev/null +++ b/examples/response-ratelimiting/_3.5.x.yaml @@ -0,0 +1,8 @@ +name: response-ratelimiting +config: + limits: + limit_name: + limits: + limit_name: + minute: 10 + policy: local diff --git a/examples/response-ratelimiting/_3.6.x.yaml b/examples/response-ratelimiting/_3.6.x.yaml new file mode 100644 index 00000000..a3860b2a --- /dev/null +++ b/examples/response-ratelimiting/_3.6.x.yaml @@ -0,0 +1,8 @@ +name: response-ratelimiting +config: + limits: + limit_name: + limits: + limit_name: + minute: 10 + policy: local diff --git a/examples/response-ratelimiting/_3.7.x.yaml b/examples/response-ratelimiting/_3.7.x.yaml new file mode 100644 index 00000000..a3860b2a --- /dev/null +++ b/examples/response-ratelimiting/_3.7.x.yaml @@ -0,0 +1,8 @@ +name: response-ratelimiting +config: + limits: + limit_name: + limits: + limit_name: + minute: 10 + policy: local diff --git a/examples/response-ratelimiting/_3.8.x.yaml b/examples/response-ratelimiting/_3.8.x.yaml new file mode 100644 index 00000000..a3860b2a --- /dev/null +++ b/examples/response-ratelimiting/_3.8.x.yaml @@ -0,0 +1,8 @@ +name: response-ratelimiting +config: + limits: + limit_name: + limits: + limit_name: + minute: 10 + policy: local diff --git a/examples/response-ratelimiting/_3.9.x.yaml b/examples/response-ratelimiting/_3.9.x.yaml new file mode 100644 index 00000000..a3860b2a --- /dev/null +++ b/examples/response-ratelimiting/_3.9.x.yaml @@ -0,0 +1,8 @@ +name: response-ratelimiting +config: + limits: + limit_name: + limits: + limit_name: + minute: 10 + policy: local diff --git a/examples/response-transformer-advanced/_3.10.x.yaml b/examples/response-transformer-advanced/_3.10.x.yaml new file mode 100644 index 00000000..4942c5c5 --- /dev/null +++ b/examples/response-transformer-advanced/_3.10.x.yaml @@ -0,0 +1,31 @@ +name: response-transformer-advanced +config: + remove: + headers: + - x-toremove + - x-another-one:application/json + - x-list-of-values:v1,v2,v3 + - Set-Cookie:/JSESSIONID=.*/ + - x-another-regex://status/$/ + - x-one-more-regex:/^/begin// + remove: + json: + - json-key-toremove + - another-json-key + add: + headers: + - x-new-header:value + - x-another-header:something + add: + json: + - new-json-key:some_value + - another-json-key:some_value + add: + json_types: + - string + - boolean + - number + append: + headers: + - x-existing-header:some_value + - x-another-header:some_value diff --git a/examples/response-transformer-advanced/_3.11.x.yaml b/examples/response-transformer-advanced/_3.11.x.yaml new file mode 100644 index 00000000..4942c5c5 --- /dev/null +++ b/examples/response-transformer-advanced/_3.11.x.yaml @@ -0,0 +1,31 @@ +name: response-transformer-advanced +config: + remove: + headers: + - x-toremove + - x-another-one:application/json + - x-list-of-values:v1,v2,v3 + - Set-Cookie:/JSESSIONID=.*/ + - x-another-regex://status/$/ + - x-one-more-regex:/^/begin// + remove: + json: + - json-key-toremove + - another-json-key + add: + headers: + - x-new-header:value + - x-another-header:something + add: + json: + - new-json-key:some_value + - another-json-key:some_value + add: + json_types: + - string + - boolean + - number + append: + headers: + - x-existing-header:some_value + - x-another-header:some_value diff --git a/examples/response-transformer-advanced/_3.5.x.yaml b/examples/response-transformer-advanced/_3.5.x.yaml new file mode 100644 index 00000000..4942c5c5 --- /dev/null +++ b/examples/response-transformer-advanced/_3.5.x.yaml @@ -0,0 +1,31 @@ +name: response-transformer-advanced +config: + remove: + headers: + - x-toremove + - x-another-one:application/json + - x-list-of-values:v1,v2,v3 + - Set-Cookie:/JSESSIONID=.*/ + - x-another-regex://status/$/ + - x-one-more-regex:/^/begin// + remove: + json: + - json-key-toremove + - another-json-key + add: + headers: + - x-new-header:value + - x-another-header:something + add: + json: + - new-json-key:some_value + - another-json-key:some_value + add: + json_types: + - string + - boolean + - number + append: + headers: + - x-existing-header:some_value + - x-another-header:some_value diff --git a/examples/response-transformer-advanced/_3.6.x.yaml b/examples/response-transformer-advanced/_3.6.x.yaml new file mode 100644 index 00000000..4942c5c5 --- /dev/null +++ b/examples/response-transformer-advanced/_3.6.x.yaml @@ -0,0 +1,31 @@ +name: response-transformer-advanced +config: + remove: + headers: + - x-toremove + - x-another-one:application/json + - x-list-of-values:v1,v2,v3 + - Set-Cookie:/JSESSIONID=.*/ + - x-another-regex://status/$/ + - x-one-more-regex:/^/begin// + remove: + json: + - json-key-toremove + - another-json-key + add: + headers: + - x-new-header:value + - x-another-header:something + add: + json: + - new-json-key:some_value + - another-json-key:some_value + add: + json_types: + - string + - boolean + - number + append: + headers: + - x-existing-header:some_value + - x-another-header:some_value diff --git a/examples/response-transformer-advanced/_3.7.x.yaml b/examples/response-transformer-advanced/_3.7.x.yaml new file mode 100644 index 00000000..4942c5c5 --- /dev/null +++ b/examples/response-transformer-advanced/_3.7.x.yaml @@ -0,0 +1,31 @@ +name: response-transformer-advanced +config: + remove: + headers: + - x-toremove + - x-another-one:application/json + - x-list-of-values:v1,v2,v3 + - Set-Cookie:/JSESSIONID=.*/ + - x-another-regex://status/$/ + - x-one-more-regex:/^/begin// + remove: + json: + - json-key-toremove + - another-json-key + add: + headers: + - x-new-header:value + - x-another-header:something + add: + json: + - new-json-key:some_value + - another-json-key:some_value + add: + json_types: + - string + - boolean + - number + append: + headers: + - x-existing-header:some_value + - x-another-header:some_value diff --git a/examples/response-transformer-advanced/_3.8.x.yaml b/examples/response-transformer-advanced/_3.8.x.yaml new file mode 100644 index 00000000..4942c5c5 --- /dev/null +++ b/examples/response-transformer-advanced/_3.8.x.yaml @@ -0,0 +1,31 @@ +name: response-transformer-advanced +config: + remove: + headers: + - x-toremove + - x-another-one:application/json + - x-list-of-values:v1,v2,v3 + - Set-Cookie:/JSESSIONID=.*/ + - x-another-regex://status/$/ + - x-one-more-regex:/^/begin// + remove: + json: + - json-key-toremove + - another-json-key + add: + headers: + - x-new-header:value + - x-another-header:something + add: + json: + - new-json-key:some_value + - another-json-key:some_value + add: + json_types: + - string + - boolean + - number + append: + headers: + - x-existing-header:some_value + - x-another-header:some_value diff --git a/examples/response-transformer-advanced/_3.9.x.yaml b/examples/response-transformer-advanced/_3.9.x.yaml new file mode 100644 index 00000000..4942c5c5 --- /dev/null +++ b/examples/response-transformer-advanced/_3.9.x.yaml @@ -0,0 +1,31 @@ +name: response-transformer-advanced +config: + remove: + headers: + - x-toremove + - x-another-one:application/json + - x-list-of-values:v1,v2,v3 + - Set-Cookie:/JSESSIONID=.*/ + - x-another-regex://status/$/ + - x-one-more-regex:/^/begin// + remove: + json: + - json-key-toremove + - another-json-key + add: + headers: + - x-new-header:value + - x-another-header:something + add: + json: + - new-json-key:some_value + - another-json-key:some_value + add: + json_types: + - string + - boolean + - number + append: + headers: + - x-existing-header:some_value + - x-another-header:some_value diff --git a/examples/response-transformer/_3.10.x.yaml b/examples/response-transformer/_3.10.x.yaml new file mode 100644 index 00000000..aab7075a --- /dev/null +++ b/examples/response-transformer/_3.10.x.yaml @@ -0,0 +1,24 @@ +name: response-transformer +config: + remove: + headers: + - x-toremove + - x-another-one + json: + - json-key-toremove + - another-json-key + add: + headers: + - x-new-header:value + - x-another-header:something + json: + - new-json-key:some_value + - another-json-key:some_value + json_types: + - string + - boolean + - number + append: + headers: + - x-existing-header:some_value + - x-another-header:some_value diff --git a/examples/response-transformer/_3.11.x.yaml b/examples/response-transformer/_3.11.x.yaml new file mode 100644 index 00000000..aab7075a --- /dev/null +++ b/examples/response-transformer/_3.11.x.yaml @@ -0,0 +1,24 @@ +name: response-transformer +config: + remove: + headers: + - x-toremove + - x-another-one + json: + - json-key-toremove + - another-json-key + add: + headers: + - x-new-header:value + - x-another-header:something + json: + - new-json-key:some_value + - another-json-key:some_value + json_types: + - string + - boolean + - number + append: + headers: + - x-existing-header:some_value + - x-another-header:some_value diff --git a/examples/response-transformer/_3.5.x.yaml b/examples/response-transformer/_3.5.x.yaml new file mode 100644 index 00000000..aab7075a --- /dev/null +++ b/examples/response-transformer/_3.5.x.yaml @@ -0,0 +1,24 @@ +name: response-transformer +config: + remove: + headers: + - x-toremove + - x-another-one + json: + - json-key-toremove + - another-json-key + add: + headers: + - x-new-header:value + - x-another-header:something + json: + - new-json-key:some_value + - another-json-key:some_value + json_types: + - string + - boolean + - number + append: + headers: + - x-existing-header:some_value + - x-another-header:some_value diff --git a/examples/response-transformer/_3.6.x.yaml b/examples/response-transformer/_3.6.x.yaml new file mode 100644 index 00000000..aab7075a --- /dev/null +++ b/examples/response-transformer/_3.6.x.yaml @@ -0,0 +1,24 @@ +name: response-transformer +config: + remove: + headers: + - x-toremove + - x-another-one + json: + - json-key-toremove + - another-json-key + add: + headers: + - x-new-header:value + - x-another-header:something + json: + - new-json-key:some_value + - another-json-key:some_value + json_types: + - string + - boolean + - number + append: + headers: + - x-existing-header:some_value + - x-another-header:some_value diff --git a/examples/response-transformer/_3.7.x.yaml b/examples/response-transformer/_3.7.x.yaml new file mode 100644 index 00000000..aab7075a --- /dev/null +++ b/examples/response-transformer/_3.7.x.yaml @@ -0,0 +1,24 @@ +name: response-transformer +config: + remove: + headers: + - x-toremove + - x-another-one + json: + - json-key-toremove + - another-json-key + add: + headers: + - x-new-header:value + - x-another-header:something + json: + - new-json-key:some_value + - another-json-key:some_value + json_types: + - string + - boolean + - number + append: + headers: + - x-existing-header:some_value + - x-another-header:some_value diff --git a/examples/response-transformer/_3.8.x.yaml b/examples/response-transformer/_3.8.x.yaml new file mode 100644 index 00000000..aab7075a --- /dev/null +++ b/examples/response-transformer/_3.8.x.yaml @@ -0,0 +1,24 @@ +name: response-transformer +config: + remove: + headers: + - x-toremove + - x-another-one + json: + - json-key-toremove + - another-json-key + add: + headers: + - x-new-header:value + - x-another-header:something + json: + - new-json-key:some_value + - another-json-key:some_value + json_types: + - string + - boolean + - number + append: + headers: + - x-existing-header:some_value + - x-another-header:some_value diff --git a/examples/response-transformer/_3.9.x.yaml b/examples/response-transformer/_3.9.x.yaml new file mode 100644 index 00000000..aab7075a --- /dev/null +++ b/examples/response-transformer/_3.9.x.yaml @@ -0,0 +1,24 @@ +name: response-transformer +config: + remove: + headers: + - x-toremove + - x-another-one + json: + - json-key-toremove + - another-json-key + add: + headers: + - x-new-header:value + - x-another-header:something + json: + - new-json-key:some_value + - another-json-key:some_value + json_types: + - string + - boolean + - number + append: + headers: + - x-existing-header:some_value + - x-another-header:some_value diff --git a/examples/route-by-header/_3.10.x.yaml b/examples/route-by-header/_3.10.x.yaml new file mode 100644 index 00000000..e2854428 --- /dev/null +++ b/examples/route-by-header/_3.10.x.yaml @@ -0,0 +1,8 @@ +name: route-by-header +config: + rules: + - + upstream_name: bar.domain.com + condition: + location: us-east + diff --git a/examples/route-by-header/_3.11.x.yaml b/examples/route-by-header/_3.11.x.yaml new file mode 100644 index 00000000..e2854428 --- /dev/null +++ b/examples/route-by-header/_3.11.x.yaml @@ -0,0 +1,8 @@ +name: route-by-header +config: + rules: + - + upstream_name: bar.domain.com + condition: + location: us-east + diff --git a/examples/route-by-header/_3.5.x.yaml b/examples/route-by-header/_3.5.x.yaml new file mode 100644 index 00000000..e2854428 --- /dev/null +++ b/examples/route-by-header/_3.5.x.yaml @@ -0,0 +1,8 @@ +name: route-by-header +config: + rules: + - + upstream_name: bar.domain.com + condition: + location: us-east + diff --git a/examples/route-by-header/_3.6.x.yaml b/examples/route-by-header/_3.6.x.yaml new file mode 100644 index 00000000..e2854428 --- /dev/null +++ b/examples/route-by-header/_3.6.x.yaml @@ -0,0 +1,8 @@ +name: route-by-header +config: + rules: + - + upstream_name: bar.domain.com + condition: + location: us-east + diff --git a/examples/route-by-header/_3.7.x.yaml b/examples/route-by-header/_3.7.x.yaml new file mode 100644 index 00000000..e2854428 --- /dev/null +++ b/examples/route-by-header/_3.7.x.yaml @@ -0,0 +1,8 @@ +name: route-by-header +config: + rules: + - + upstream_name: bar.domain.com + condition: + location: us-east + diff --git a/examples/route-by-header/_3.8.x.yaml b/examples/route-by-header/_3.8.x.yaml new file mode 100644 index 00000000..e2854428 --- /dev/null +++ b/examples/route-by-header/_3.8.x.yaml @@ -0,0 +1,8 @@ +name: route-by-header +config: + rules: + - + upstream_name: bar.domain.com + condition: + location: us-east + diff --git a/examples/route-by-header/_3.9.x.yaml b/examples/route-by-header/_3.9.x.yaml new file mode 100644 index 00000000..e2854428 --- /dev/null +++ b/examples/route-by-header/_3.9.x.yaml @@ -0,0 +1,8 @@ +name: route-by-header +config: + rules: + - + upstream_name: bar.domain.com + condition: + location: us-east + diff --git a/examples/route-transformer-advanced/_3.10.x.yaml b/examples/route-transformer-advanced/_3.10.x.yaml new file mode 100644 index 00000000..098f0994 --- /dev/null +++ b/examples/route-transformer-advanced/_3.10.x.yaml @@ -0,0 +1,3 @@ +name: route-transformer-advanced +config: + path: /path diff --git a/examples/route-transformer-advanced/_3.11.x.yaml b/examples/route-transformer-advanced/_3.11.x.yaml new file mode 100644 index 00000000..098f0994 --- /dev/null +++ b/examples/route-transformer-advanced/_3.11.x.yaml @@ -0,0 +1,3 @@ +name: route-transformer-advanced +config: + path: /path diff --git a/examples/route-transformer-advanced/_3.5.x.yaml b/examples/route-transformer-advanced/_3.5.x.yaml new file mode 100644 index 00000000..098f0994 --- /dev/null +++ b/examples/route-transformer-advanced/_3.5.x.yaml @@ -0,0 +1,3 @@ +name: route-transformer-advanced +config: + path: /path diff --git a/examples/route-transformer-advanced/_3.6.x.yaml b/examples/route-transformer-advanced/_3.6.x.yaml new file mode 100644 index 00000000..098f0994 --- /dev/null +++ b/examples/route-transformer-advanced/_3.6.x.yaml @@ -0,0 +1,3 @@ +name: route-transformer-advanced +config: + path: /path diff --git a/examples/route-transformer-advanced/_3.7.x.yaml b/examples/route-transformer-advanced/_3.7.x.yaml new file mode 100644 index 00000000..098f0994 --- /dev/null +++ b/examples/route-transformer-advanced/_3.7.x.yaml @@ -0,0 +1,3 @@ +name: route-transformer-advanced +config: + path: /path diff --git a/examples/route-transformer-advanced/_3.8.x.yaml b/examples/route-transformer-advanced/_3.8.x.yaml new file mode 100644 index 00000000..098f0994 --- /dev/null +++ b/examples/route-transformer-advanced/_3.8.x.yaml @@ -0,0 +1,3 @@ +name: route-transformer-advanced +config: + path: /path diff --git a/examples/route-transformer-advanced/_3.9.x.yaml b/examples/route-transformer-advanced/_3.9.x.yaml new file mode 100644 index 00000000..098f0994 --- /dev/null +++ b/examples/route-transformer-advanced/_3.9.x.yaml @@ -0,0 +1,3 @@ +name: route-transformer-advanced +config: + path: /path diff --git a/examples/saml/_3.10.x.yaml b/examples/saml/_3.10.x.yaml new file mode 100644 index 00000000..18b41c3f --- /dev/null +++ b/examples/saml/_3.10.x.yaml @@ -0,0 +1,12 @@ +name: saml +config: + anonymous: anonymous + assertion_consumer_path: /acs-uri + idp_sso_url: http://example.org/sso-uri + validate_assertion_signature: true + session_secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + issuer: AzureAD_Identity_ID + idp_certificate: | + -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- diff --git a/examples/saml/_3.11.x.yaml b/examples/saml/_3.11.x.yaml new file mode 100644 index 00000000..18b41c3f --- /dev/null +++ b/examples/saml/_3.11.x.yaml @@ -0,0 +1,12 @@ +name: saml +config: + anonymous: anonymous + assertion_consumer_path: /acs-uri + idp_sso_url: http://example.org/sso-uri + validate_assertion_signature: true + session_secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + issuer: AzureAD_Identity_ID + idp_certificate: | + -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- diff --git a/examples/saml/_3.5.x.yaml b/examples/saml/_3.5.x.yaml new file mode 100644 index 00000000..18b41c3f --- /dev/null +++ b/examples/saml/_3.5.x.yaml @@ -0,0 +1,12 @@ +name: saml +config: + anonymous: anonymous + assertion_consumer_path: /acs-uri + idp_sso_url: http://example.org/sso-uri + validate_assertion_signature: true + session_secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + issuer: AzureAD_Identity_ID + idp_certificate: | + -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- diff --git a/examples/saml/_3.6.x.yaml b/examples/saml/_3.6.x.yaml new file mode 100644 index 00000000..18b41c3f --- /dev/null +++ b/examples/saml/_3.6.x.yaml @@ -0,0 +1,12 @@ +name: saml +config: + anonymous: anonymous + assertion_consumer_path: /acs-uri + idp_sso_url: http://example.org/sso-uri + validate_assertion_signature: true + session_secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + issuer: AzureAD_Identity_ID + idp_certificate: | + -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- diff --git a/examples/saml/_3.7.x.yaml b/examples/saml/_3.7.x.yaml new file mode 100644 index 00000000..18b41c3f --- /dev/null +++ b/examples/saml/_3.7.x.yaml @@ -0,0 +1,12 @@ +name: saml +config: + anonymous: anonymous + assertion_consumer_path: /acs-uri + idp_sso_url: http://example.org/sso-uri + validate_assertion_signature: true + session_secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + issuer: AzureAD_Identity_ID + idp_certificate: | + -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- diff --git a/examples/saml/_3.8.x.yaml b/examples/saml/_3.8.x.yaml new file mode 100644 index 00000000..18b41c3f --- /dev/null +++ b/examples/saml/_3.8.x.yaml @@ -0,0 +1,12 @@ +name: saml +config: + anonymous: anonymous + assertion_consumer_path: /acs-uri + idp_sso_url: http://example.org/sso-uri + validate_assertion_signature: true + session_secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + issuer: AzureAD_Identity_ID + idp_certificate: | + -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- diff --git a/examples/saml/_3.9.x.yaml b/examples/saml/_3.9.x.yaml new file mode 100644 index 00000000..18b41c3f --- /dev/null +++ b/examples/saml/_3.9.x.yaml @@ -0,0 +1,12 @@ +name: saml +config: + anonymous: anonymous + assertion_consumer_path: /acs-uri + idp_sso_url: http://example.org/sso-uri + validate_assertion_signature: true + session_secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + issuer: AzureAD_Identity_ID + idp_certificate: | + -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- diff --git a/examples/service-protection/_3.10.x.yaml b/examples/service-protection/_3.10.x.yaml new file mode 100644 index 00000000..73702a32 --- /dev/null +++ b/examples/service-protection/_3.10.x.yaml @@ -0,0 +1,8 @@ +name: service-protection +config: + window_size: + - 30 + window_type: sliding + limit: + - 5 + namespace: example_namespace diff --git a/examples/service-protection/_3.11.x.yaml b/examples/service-protection/_3.11.x.yaml new file mode 100644 index 00000000..73702a32 --- /dev/null +++ b/examples/service-protection/_3.11.x.yaml @@ -0,0 +1,8 @@ +name: service-protection +config: + window_size: + - 30 + window_type: sliding + limit: + - 5 + namespace: example_namespace diff --git a/examples/service-protection/_3.9.x.yaml b/examples/service-protection/_3.9.x.yaml new file mode 100644 index 00000000..73702a32 --- /dev/null +++ b/examples/service-protection/_3.9.x.yaml @@ -0,0 +1,8 @@ +name: service-protection +config: + window_size: + - 30 + window_type: sliding + limit: + - 5 + namespace: example_namespace diff --git a/examples/session/_3.10.x.yaml b/examples/session/_3.10.x.yaml new file mode 100644 index 00000000..1c5100d2 --- /dev/null +++ b/examples/session/_3.10.x.yaml @@ -0,0 +1,3 @@ +name: session +config: + secret: opensesame diff --git a/examples/session/_3.11.x.yaml b/examples/session/_3.11.x.yaml new file mode 100644 index 00000000..1c5100d2 --- /dev/null +++ b/examples/session/_3.11.x.yaml @@ -0,0 +1,3 @@ +name: session +config: + secret: opensesame diff --git a/examples/session/_3.5.x.yaml b/examples/session/_3.5.x.yaml new file mode 100644 index 00000000..1c5100d2 --- /dev/null +++ b/examples/session/_3.5.x.yaml @@ -0,0 +1,3 @@ +name: session +config: + secret: opensesame diff --git a/examples/session/_3.6.x.yaml b/examples/session/_3.6.x.yaml new file mode 100644 index 00000000..1c5100d2 --- /dev/null +++ b/examples/session/_3.6.x.yaml @@ -0,0 +1,3 @@ +name: session +config: + secret: opensesame diff --git a/examples/session/_3.7.x.yaml b/examples/session/_3.7.x.yaml new file mode 100644 index 00000000..1c5100d2 --- /dev/null +++ b/examples/session/_3.7.x.yaml @@ -0,0 +1,3 @@ +name: session +config: + secret: opensesame diff --git a/examples/session/_3.8.x.yaml b/examples/session/_3.8.x.yaml new file mode 100644 index 00000000..1c5100d2 --- /dev/null +++ b/examples/session/_3.8.x.yaml @@ -0,0 +1,3 @@ +name: session +config: + secret: opensesame diff --git a/examples/session/_3.9.x.yaml b/examples/session/_3.9.x.yaml new file mode 100644 index 00000000..1c5100d2 --- /dev/null +++ b/examples/session/_3.9.x.yaml @@ -0,0 +1,3 @@ +name: session +config: + secret: opensesame diff --git a/examples/standard-webhooks/_3.10.x.yaml b/examples/standard-webhooks/_3.10.x.yaml new file mode 100644 index 00000000..e2e66d71 --- /dev/null +++ b/examples/standard-webhooks/_3.10.x.yaml @@ -0,0 +1,3 @@ +name: standard-webhooks +config: + secret_v1: example-secret diff --git a/examples/standard-webhooks/_3.11.x.yaml b/examples/standard-webhooks/_3.11.x.yaml new file mode 100644 index 00000000..e2e66d71 --- /dev/null +++ b/examples/standard-webhooks/_3.11.x.yaml @@ -0,0 +1,3 @@ +name: standard-webhooks +config: + secret_v1: example-secret diff --git a/examples/standard-webhooks/_3.8.x.yaml b/examples/standard-webhooks/_3.8.x.yaml new file mode 100644 index 00000000..e2e66d71 --- /dev/null +++ b/examples/standard-webhooks/_3.8.x.yaml @@ -0,0 +1,3 @@ +name: standard-webhooks +config: + secret_v1: example-secret diff --git a/examples/standard-webhooks/_3.9.x.yaml b/examples/standard-webhooks/_3.9.x.yaml new file mode 100644 index 00000000..e2e66d71 --- /dev/null +++ b/examples/standard-webhooks/_3.9.x.yaml @@ -0,0 +1,3 @@ +name: standard-webhooks +config: + secret_v1: example-secret diff --git a/examples/statsd-advanced/_3.10.x.yaml b/examples/statsd-advanced/_3.10.x.yaml new file mode 100644 index 00000000..cfd68de0 --- /dev/null +++ b/examples/statsd-advanced/_3.10.x.yaml @@ -0,0 +1,7 @@ +name: statsd-advanced +config: + host: 127.0.0.1 + port: 8125 + allow_status_codes: + - 200-205 + - 400-499 diff --git a/examples/statsd-advanced/_3.11.x.yaml b/examples/statsd-advanced/_3.11.x.yaml new file mode 100644 index 00000000..cfd68de0 --- /dev/null +++ b/examples/statsd-advanced/_3.11.x.yaml @@ -0,0 +1,7 @@ +name: statsd-advanced +config: + host: 127.0.0.1 + port: 8125 + allow_status_codes: + - 200-205 + - 400-499 diff --git a/examples/statsd-advanced/_3.5.x.yaml b/examples/statsd-advanced/_3.5.x.yaml new file mode 100644 index 00000000..cfd68de0 --- /dev/null +++ b/examples/statsd-advanced/_3.5.x.yaml @@ -0,0 +1,7 @@ +name: statsd-advanced +config: + host: 127.0.0.1 + port: 8125 + allow_status_codes: + - 200-205 + - 400-499 diff --git a/examples/statsd-advanced/_3.6.x.yaml b/examples/statsd-advanced/_3.6.x.yaml new file mode 100644 index 00000000..cfd68de0 --- /dev/null +++ b/examples/statsd-advanced/_3.6.x.yaml @@ -0,0 +1,7 @@ +name: statsd-advanced +config: + host: 127.0.0.1 + port: 8125 + allow_status_codes: + - 200-205 + - 400-499 diff --git a/examples/statsd-advanced/_3.7.x.yaml b/examples/statsd-advanced/_3.7.x.yaml new file mode 100644 index 00000000..cfd68de0 --- /dev/null +++ b/examples/statsd-advanced/_3.7.x.yaml @@ -0,0 +1,7 @@ +name: statsd-advanced +config: + host: 127.0.0.1 + port: 8125 + allow_status_codes: + - 200-205 + - 400-499 diff --git a/examples/statsd-advanced/_3.8.x.yaml b/examples/statsd-advanced/_3.8.x.yaml new file mode 100644 index 00000000..cfd68de0 --- /dev/null +++ b/examples/statsd-advanced/_3.8.x.yaml @@ -0,0 +1,7 @@ +name: statsd-advanced +config: + host: 127.0.0.1 + port: 8125 + allow_status_codes: + - 200-205 + - 400-499 diff --git a/examples/statsd-advanced/_3.9.x.yaml b/examples/statsd-advanced/_3.9.x.yaml new file mode 100644 index 00000000..cfd68de0 --- /dev/null +++ b/examples/statsd-advanced/_3.9.x.yaml @@ -0,0 +1,7 @@ +name: statsd-advanced +config: + host: 127.0.0.1 + port: 8125 + allow_status_codes: + - 200-205 + - 400-499 diff --git a/examples/statsd/_3.10.x.yaml b/examples/statsd/_3.10.x.yaml new file mode 100644 index 00000000..796222aa --- /dev/null +++ b/examples/statsd/_3.10.x.yaml @@ -0,0 +1,9 @@ +name: statsd +config: + host: 127.0.0.1 + port: 8125 + allow_status_codes: + - 200-205 + - 400-499 + flush_timeout: 2 + retry_count: 10 diff --git a/examples/statsd/_3.11.x.yaml b/examples/statsd/_3.11.x.yaml new file mode 100644 index 00000000..796222aa --- /dev/null +++ b/examples/statsd/_3.11.x.yaml @@ -0,0 +1,9 @@ +name: statsd +config: + host: 127.0.0.1 + port: 8125 + allow_status_codes: + - 200-205 + - 400-499 + flush_timeout: 2 + retry_count: 10 diff --git a/examples/statsd/_3.5.x.yaml b/examples/statsd/_3.5.x.yaml new file mode 100644 index 00000000..796222aa --- /dev/null +++ b/examples/statsd/_3.5.x.yaml @@ -0,0 +1,9 @@ +name: statsd +config: + host: 127.0.0.1 + port: 8125 + allow_status_codes: + - 200-205 + - 400-499 + flush_timeout: 2 + retry_count: 10 diff --git a/examples/statsd/_3.6.x.yaml b/examples/statsd/_3.6.x.yaml new file mode 100644 index 00000000..796222aa --- /dev/null +++ b/examples/statsd/_3.6.x.yaml @@ -0,0 +1,9 @@ +name: statsd +config: + host: 127.0.0.1 + port: 8125 + allow_status_codes: + - 200-205 + - 400-499 + flush_timeout: 2 + retry_count: 10 diff --git a/examples/statsd/_3.7.x.yaml b/examples/statsd/_3.7.x.yaml new file mode 100644 index 00000000..796222aa --- /dev/null +++ b/examples/statsd/_3.7.x.yaml @@ -0,0 +1,9 @@ +name: statsd +config: + host: 127.0.0.1 + port: 8125 + allow_status_codes: + - 200-205 + - 400-499 + flush_timeout: 2 + retry_count: 10 diff --git a/examples/statsd/_3.8.x.yaml b/examples/statsd/_3.8.x.yaml new file mode 100644 index 00000000..796222aa --- /dev/null +++ b/examples/statsd/_3.8.x.yaml @@ -0,0 +1,9 @@ +name: statsd +config: + host: 127.0.0.1 + port: 8125 + allow_status_codes: + - 200-205 + - 400-499 + flush_timeout: 2 + retry_count: 10 diff --git a/examples/statsd/_3.9.x.yaml b/examples/statsd/_3.9.x.yaml new file mode 100644 index 00000000..796222aa --- /dev/null +++ b/examples/statsd/_3.9.x.yaml @@ -0,0 +1,9 @@ +name: statsd +config: + host: 127.0.0.1 + port: 8125 + allow_status_codes: + - 200-205 + - 400-499 + flush_timeout: 2 + retry_count: 10 diff --git a/examples/syslog/_3.10.x.yaml b/examples/syslog/_3.10.x.yaml new file mode 100644 index 00000000..9cc23ca1 --- /dev/null +++ b/examples/syslog/_3.10.x.yaml @@ -0,0 +1,3 @@ +name: syslog +config: + log_level: info diff --git a/examples/syslog/_3.11.x.yaml b/examples/syslog/_3.11.x.yaml new file mode 100644 index 00000000..9cc23ca1 --- /dev/null +++ b/examples/syslog/_3.11.x.yaml @@ -0,0 +1,3 @@ +name: syslog +config: + log_level: info diff --git a/examples/syslog/_3.5.x.yaml b/examples/syslog/_3.5.x.yaml new file mode 100644 index 00000000..9cc23ca1 --- /dev/null +++ b/examples/syslog/_3.5.x.yaml @@ -0,0 +1,3 @@ +name: syslog +config: + log_level: info diff --git a/examples/syslog/_3.6.x.yaml b/examples/syslog/_3.6.x.yaml new file mode 100644 index 00000000..9cc23ca1 --- /dev/null +++ b/examples/syslog/_3.6.x.yaml @@ -0,0 +1,3 @@ +name: syslog +config: + log_level: info diff --git a/examples/syslog/_3.7.x.yaml b/examples/syslog/_3.7.x.yaml new file mode 100644 index 00000000..9cc23ca1 --- /dev/null +++ b/examples/syslog/_3.7.x.yaml @@ -0,0 +1,3 @@ +name: syslog +config: + log_level: info diff --git a/examples/syslog/_3.8.x.yaml b/examples/syslog/_3.8.x.yaml new file mode 100644 index 00000000..9cc23ca1 --- /dev/null +++ b/examples/syslog/_3.8.x.yaml @@ -0,0 +1,3 @@ +name: syslog +config: + log_level: info diff --git a/examples/syslog/_3.9.x.yaml b/examples/syslog/_3.9.x.yaml new file mode 100644 index 00000000..9cc23ca1 --- /dev/null +++ b/examples/syslog/_3.9.x.yaml @@ -0,0 +1,3 @@ +name: syslog +config: + log_level: info diff --git a/examples/tcp-log/_3.10.x.yaml b/examples/tcp-log/_3.10.x.yaml new file mode 100644 index 00000000..4e155f5a --- /dev/null +++ b/examples/tcp-log/_3.10.x.yaml @@ -0,0 +1,4 @@ +name: tcp-log +config: + host: 127.0.0.1 + port: 9999 diff --git a/examples/tcp-log/_3.11.x.yaml b/examples/tcp-log/_3.11.x.yaml new file mode 100644 index 00000000..4e155f5a --- /dev/null +++ b/examples/tcp-log/_3.11.x.yaml @@ -0,0 +1,4 @@ +name: tcp-log +config: + host: 127.0.0.1 + port: 9999 diff --git a/examples/tcp-log/_3.5.x.yaml b/examples/tcp-log/_3.5.x.yaml new file mode 100644 index 00000000..4e155f5a --- /dev/null +++ b/examples/tcp-log/_3.5.x.yaml @@ -0,0 +1,4 @@ +name: tcp-log +config: + host: 127.0.0.1 + port: 9999 diff --git a/examples/tcp-log/_3.6.x.yaml b/examples/tcp-log/_3.6.x.yaml new file mode 100644 index 00000000..4e155f5a --- /dev/null +++ b/examples/tcp-log/_3.6.x.yaml @@ -0,0 +1,4 @@ +name: tcp-log +config: + host: 127.0.0.1 + port: 9999 diff --git a/examples/tcp-log/_3.7.x.yaml b/examples/tcp-log/_3.7.x.yaml new file mode 100644 index 00000000..4e155f5a --- /dev/null +++ b/examples/tcp-log/_3.7.x.yaml @@ -0,0 +1,4 @@ +name: tcp-log +config: + host: 127.0.0.1 + port: 9999 diff --git a/examples/tcp-log/_3.8.x.yaml b/examples/tcp-log/_3.8.x.yaml new file mode 100644 index 00000000..4e155f5a --- /dev/null +++ b/examples/tcp-log/_3.8.x.yaml @@ -0,0 +1,4 @@ +name: tcp-log +config: + host: 127.0.0.1 + port: 9999 diff --git a/examples/tcp-log/_3.9.x.yaml b/examples/tcp-log/_3.9.x.yaml new file mode 100644 index 00000000..4e155f5a --- /dev/null +++ b/examples/tcp-log/_3.9.x.yaml @@ -0,0 +1,4 @@ +name: tcp-log +config: + host: 127.0.0.1 + port: 9999 diff --git a/examples/tls-handshake-modifier/_3.10.x.yaml b/examples/tls-handshake-modifier/_3.10.x.yaml new file mode 100644 index 00000000..52561153 --- /dev/null +++ b/examples/tls-handshake-modifier/_3.10.x.yaml @@ -0,0 +1 @@ +name: tls-handshake-modifier diff --git a/examples/tls-handshake-modifier/_3.11.x.yaml b/examples/tls-handshake-modifier/_3.11.x.yaml new file mode 100644 index 00000000..52561153 --- /dev/null +++ b/examples/tls-handshake-modifier/_3.11.x.yaml @@ -0,0 +1 @@ +name: tls-handshake-modifier diff --git a/examples/tls-handshake-modifier/_3.5.x.yaml b/examples/tls-handshake-modifier/_3.5.x.yaml new file mode 100644 index 00000000..52561153 --- /dev/null +++ b/examples/tls-handshake-modifier/_3.5.x.yaml @@ -0,0 +1 @@ +name: tls-handshake-modifier diff --git a/examples/tls-handshake-modifier/_3.6.x.yaml b/examples/tls-handshake-modifier/_3.6.x.yaml new file mode 100644 index 00000000..52561153 --- /dev/null +++ b/examples/tls-handshake-modifier/_3.6.x.yaml @@ -0,0 +1 @@ +name: tls-handshake-modifier diff --git a/examples/tls-handshake-modifier/_3.7.x.yaml b/examples/tls-handshake-modifier/_3.7.x.yaml new file mode 100644 index 00000000..52561153 --- /dev/null +++ b/examples/tls-handshake-modifier/_3.7.x.yaml @@ -0,0 +1 @@ +name: tls-handshake-modifier diff --git a/examples/tls-handshake-modifier/_3.8.x.yaml b/examples/tls-handshake-modifier/_3.8.x.yaml new file mode 100644 index 00000000..52561153 --- /dev/null +++ b/examples/tls-handshake-modifier/_3.8.x.yaml @@ -0,0 +1 @@ +name: tls-handshake-modifier diff --git a/examples/tls-handshake-modifier/_3.9.x.yaml b/examples/tls-handshake-modifier/_3.9.x.yaml new file mode 100644 index 00000000..52561153 --- /dev/null +++ b/examples/tls-handshake-modifier/_3.9.x.yaml @@ -0,0 +1 @@ +name: tls-handshake-modifier diff --git a/examples/tls-metadata-headers/_3.10.x.yaml b/examples/tls-metadata-headers/_3.10.x.yaml new file mode 100644 index 00000000..98df21ec --- /dev/null +++ b/examples/tls-metadata-headers/_3.10.x.yaml @@ -0,0 +1,4 @@ +name: tls-metadata-headers +config: + inject_client_cert_details: true + client_cert_header_name: X-Forwarded-Client-Cert diff --git a/examples/tls-metadata-headers/_3.11.x.yaml b/examples/tls-metadata-headers/_3.11.x.yaml new file mode 100644 index 00000000..98df21ec --- /dev/null +++ b/examples/tls-metadata-headers/_3.11.x.yaml @@ -0,0 +1,4 @@ +name: tls-metadata-headers +config: + inject_client_cert_details: true + client_cert_header_name: X-Forwarded-Client-Cert diff --git a/examples/tls-metadata-headers/_3.5.x.yaml b/examples/tls-metadata-headers/_3.5.x.yaml new file mode 100644 index 00000000..98df21ec --- /dev/null +++ b/examples/tls-metadata-headers/_3.5.x.yaml @@ -0,0 +1,4 @@ +name: tls-metadata-headers +config: + inject_client_cert_details: true + client_cert_header_name: X-Forwarded-Client-Cert diff --git a/examples/tls-metadata-headers/_3.6.x.yaml b/examples/tls-metadata-headers/_3.6.x.yaml new file mode 100644 index 00000000..98df21ec --- /dev/null +++ b/examples/tls-metadata-headers/_3.6.x.yaml @@ -0,0 +1,4 @@ +name: tls-metadata-headers +config: + inject_client_cert_details: true + client_cert_header_name: X-Forwarded-Client-Cert diff --git a/examples/tls-metadata-headers/_3.7.x.yaml b/examples/tls-metadata-headers/_3.7.x.yaml new file mode 100644 index 00000000..98df21ec --- /dev/null +++ b/examples/tls-metadata-headers/_3.7.x.yaml @@ -0,0 +1,4 @@ +name: tls-metadata-headers +config: + inject_client_cert_details: true + client_cert_header_name: X-Forwarded-Client-Cert diff --git a/examples/tls-metadata-headers/_3.8.x.yaml b/examples/tls-metadata-headers/_3.8.x.yaml new file mode 100644 index 00000000..98df21ec --- /dev/null +++ b/examples/tls-metadata-headers/_3.8.x.yaml @@ -0,0 +1,4 @@ +name: tls-metadata-headers +config: + inject_client_cert_details: true + client_cert_header_name: X-Forwarded-Client-Cert diff --git a/examples/tls-metadata-headers/_3.9.x.yaml b/examples/tls-metadata-headers/_3.9.x.yaml new file mode 100644 index 00000000..98df21ec --- /dev/null +++ b/examples/tls-metadata-headers/_3.9.x.yaml @@ -0,0 +1,4 @@ +name: tls-metadata-headers +config: + inject_client_cert_details: true + client_cert_header_name: X-Forwarded-Client-Cert diff --git a/examples/udp-log/_3.10.x.yaml b/examples/udp-log/_3.10.x.yaml new file mode 100644 index 00000000..bfd35c0a --- /dev/null +++ b/examples/udp-log/_3.10.x.yaml @@ -0,0 +1,5 @@ +name: udp-log +config: + host: 127.0.0.1 + port: 9999 + timeout: 10000 diff --git a/examples/udp-log/_3.11.x.yaml b/examples/udp-log/_3.11.x.yaml new file mode 100644 index 00000000..bfd35c0a --- /dev/null +++ b/examples/udp-log/_3.11.x.yaml @@ -0,0 +1,5 @@ +name: udp-log +config: + host: 127.0.0.1 + port: 9999 + timeout: 10000 diff --git a/examples/udp-log/_3.5.x.yaml b/examples/udp-log/_3.5.x.yaml new file mode 100644 index 00000000..bfd35c0a --- /dev/null +++ b/examples/udp-log/_3.5.x.yaml @@ -0,0 +1,5 @@ +name: udp-log +config: + host: 127.0.0.1 + port: 9999 + timeout: 10000 diff --git a/examples/udp-log/_3.6.x.yaml b/examples/udp-log/_3.6.x.yaml new file mode 100644 index 00000000..bfd35c0a --- /dev/null +++ b/examples/udp-log/_3.6.x.yaml @@ -0,0 +1,5 @@ +name: udp-log +config: + host: 127.0.0.1 + port: 9999 + timeout: 10000 diff --git a/examples/udp-log/_3.7.x.yaml b/examples/udp-log/_3.7.x.yaml new file mode 100644 index 00000000..bfd35c0a --- /dev/null +++ b/examples/udp-log/_3.7.x.yaml @@ -0,0 +1,5 @@ +name: udp-log +config: + host: 127.0.0.1 + port: 9999 + timeout: 10000 diff --git a/examples/udp-log/_3.8.x.yaml b/examples/udp-log/_3.8.x.yaml new file mode 100644 index 00000000..bfd35c0a --- /dev/null +++ b/examples/udp-log/_3.8.x.yaml @@ -0,0 +1,5 @@ +name: udp-log +config: + host: 127.0.0.1 + port: 9999 + timeout: 10000 diff --git a/examples/udp-log/_3.9.x.yaml b/examples/udp-log/_3.9.x.yaml new file mode 100644 index 00000000..bfd35c0a --- /dev/null +++ b/examples/udp-log/_3.9.x.yaml @@ -0,0 +1,5 @@ +name: udp-log +config: + host: 127.0.0.1 + port: 9999 + timeout: 10000 diff --git a/examples/upstream-oauth/_3.10.x.yaml b/examples/upstream-oauth/_3.10.x.yaml new file mode 100644 index 00000000..2c80a4ac --- /dev/null +++ b/examples/upstream-oauth/_3.10.x.yaml @@ -0,0 +1,12 @@ +name: upstream-oauth +config: + oauth: + token_endpoint: "http://test.test" + grant_type: client_credentials + client_id: CLIENT_CREDENTIALS_GRANT_POST_AUTH_CLIENT_ID + client_secret: CLIENT_CREDENTIALS_GRANT_POST_AUTH_CLIENT_SECRET + scopes: + - "openid" + - "profile" + behavior: + upstream_access_token_header_name: X-Custom-Auth \ No newline at end of file diff --git a/examples/upstream-oauth/_3.11.x.yaml b/examples/upstream-oauth/_3.11.x.yaml new file mode 100644 index 00000000..2c80a4ac --- /dev/null +++ b/examples/upstream-oauth/_3.11.x.yaml @@ -0,0 +1,12 @@ +name: upstream-oauth +config: + oauth: + token_endpoint: "http://test.test" + grant_type: client_credentials + client_id: CLIENT_CREDENTIALS_GRANT_POST_AUTH_CLIENT_ID + client_secret: CLIENT_CREDENTIALS_GRANT_POST_AUTH_CLIENT_SECRET + scopes: + - "openid" + - "profile" + behavior: + upstream_access_token_header_name: X-Custom-Auth \ No newline at end of file diff --git a/examples/upstream-oauth/_3.8.x.yaml b/examples/upstream-oauth/_3.8.x.yaml new file mode 100644 index 00000000..2c80a4ac --- /dev/null +++ b/examples/upstream-oauth/_3.8.x.yaml @@ -0,0 +1,12 @@ +name: upstream-oauth +config: + oauth: + token_endpoint: "http://test.test" + grant_type: client_credentials + client_id: CLIENT_CREDENTIALS_GRANT_POST_AUTH_CLIENT_ID + client_secret: CLIENT_CREDENTIALS_GRANT_POST_AUTH_CLIENT_SECRET + scopes: + - "openid" + - "profile" + behavior: + upstream_access_token_header_name: X-Custom-Auth \ No newline at end of file diff --git a/examples/upstream-oauth/_3.9.x.yaml b/examples/upstream-oauth/_3.9.x.yaml new file mode 100644 index 00000000..2c80a4ac --- /dev/null +++ b/examples/upstream-oauth/_3.9.x.yaml @@ -0,0 +1,12 @@ +name: upstream-oauth +config: + oauth: + token_endpoint: "http://test.test" + grant_type: client_credentials + client_id: CLIENT_CREDENTIALS_GRANT_POST_AUTH_CLIENT_ID + client_secret: CLIENT_CREDENTIALS_GRANT_POST_AUTH_CLIENT_SECRET + scopes: + - "openid" + - "profile" + behavior: + upstream_access_token_header_name: X-Custom-Auth \ No newline at end of file diff --git a/examples/upstream-timeout/_3.10.x.yaml b/examples/upstream-timeout/_3.10.x.yaml new file mode 100644 index 00000000..962a6cdf --- /dev/null +++ b/examples/upstream-timeout/_3.10.x.yaml @@ -0,0 +1,5 @@ +name: upstream-timeout +config: + connect_timeout: 4000 + send_timeout: 5000 + read_timeout: 5000 diff --git a/examples/upstream-timeout/_3.11.x.yaml b/examples/upstream-timeout/_3.11.x.yaml new file mode 100644 index 00000000..962a6cdf --- /dev/null +++ b/examples/upstream-timeout/_3.11.x.yaml @@ -0,0 +1,5 @@ +name: upstream-timeout +config: + connect_timeout: 4000 + send_timeout: 5000 + read_timeout: 5000 diff --git a/examples/upstream-timeout/_3.5.x.yaml b/examples/upstream-timeout/_3.5.x.yaml new file mode 100644 index 00000000..962a6cdf --- /dev/null +++ b/examples/upstream-timeout/_3.5.x.yaml @@ -0,0 +1,5 @@ +name: upstream-timeout +config: + connect_timeout: 4000 + send_timeout: 5000 + read_timeout: 5000 diff --git a/examples/upstream-timeout/_3.6.x.yaml b/examples/upstream-timeout/_3.6.x.yaml new file mode 100644 index 00000000..962a6cdf --- /dev/null +++ b/examples/upstream-timeout/_3.6.x.yaml @@ -0,0 +1,5 @@ +name: upstream-timeout +config: + connect_timeout: 4000 + send_timeout: 5000 + read_timeout: 5000 diff --git a/examples/upstream-timeout/_3.7.x.yaml b/examples/upstream-timeout/_3.7.x.yaml new file mode 100644 index 00000000..962a6cdf --- /dev/null +++ b/examples/upstream-timeout/_3.7.x.yaml @@ -0,0 +1,5 @@ +name: upstream-timeout +config: + connect_timeout: 4000 + send_timeout: 5000 + read_timeout: 5000 diff --git a/examples/upstream-timeout/_3.8.x.yaml b/examples/upstream-timeout/_3.8.x.yaml new file mode 100644 index 00000000..962a6cdf --- /dev/null +++ b/examples/upstream-timeout/_3.8.x.yaml @@ -0,0 +1,5 @@ +name: upstream-timeout +config: + connect_timeout: 4000 + send_timeout: 5000 + read_timeout: 5000 diff --git a/examples/upstream-timeout/_3.9.x.yaml b/examples/upstream-timeout/_3.9.x.yaml new file mode 100644 index 00000000..962a6cdf --- /dev/null +++ b/examples/upstream-timeout/_3.9.x.yaml @@ -0,0 +1,5 @@ +name: upstream-timeout +config: + connect_timeout: 4000 + send_timeout: 5000 + read_timeout: 5000 diff --git a/examples/vault-auth/_3.10.x.yaml b/examples/vault-auth/_3.10.x.yaml new file mode 100644 index 00000000..8a2e5285 --- /dev/null +++ b/examples/vault-auth/_3.10.x.yaml @@ -0,0 +1,4 @@ +name: vault-auth +config: + vault: + id: 00000000-0000-0000-0000-000000000000 diff --git a/examples/vault-auth/_3.11.x.yaml b/examples/vault-auth/_3.11.x.yaml new file mode 100644 index 00000000..8a2e5285 --- /dev/null +++ b/examples/vault-auth/_3.11.x.yaml @@ -0,0 +1,4 @@ +name: vault-auth +config: + vault: + id: 00000000-0000-0000-0000-000000000000 diff --git a/examples/vault-auth/_3.5.x.yaml b/examples/vault-auth/_3.5.x.yaml new file mode 100644 index 00000000..8a2e5285 --- /dev/null +++ b/examples/vault-auth/_3.5.x.yaml @@ -0,0 +1,4 @@ +name: vault-auth +config: + vault: + id: 00000000-0000-0000-0000-000000000000 diff --git a/examples/vault-auth/_3.6.x.yaml b/examples/vault-auth/_3.6.x.yaml new file mode 100644 index 00000000..8a2e5285 --- /dev/null +++ b/examples/vault-auth/_3.6.x.yaml @@ -0,0 +1,4 @@ +name: vault-auth +config: + vault: + id: 00000000-0000-0000-0000-000000000000 diff --git a/examples/vault-auth/_3.7.x.yaml b/examples/vault-auth/_3.7.x.yaml new file mode 100644 index 00000000..8a2e5285 --- /dev/null +++ b/examples/vault-auth/_3.7.x.yaml @@ -0,0 +1,4 @@ +name: vault-auth +config: + vault: + id: 00000000-0000-0000-0000-000000000000 diff --git a/examples/vault-auth/_3.8.x.yaml b/examples/vault-auth/_3.8.x.yaml new file mode 100644 index 00000000..8a2e5285 --- /dev/null +++ b/examples/vault-auth/_3.8.x.yaml @@ -0,0 +1,4 @@ +name: vault-auth +config: + vault: + id: 00000000-0000-0000-0000-000000000000 diff --git a/examples/vault-auth/_3.9.x.yaml b/examples/vault-auth/_3.9.x.yaml new file mode 100644 index 00000000..8a2e5285 --- /dev/null +++ b/examples/vault-auth/_3.9.x.yaml @@ -0,0 +1,4 @@ +name: vault-auth +config: + vault: + id: 00000000-0000-0000-0000-000000000000 diff --git a/examples/websocket-size-limit/_3.10.x.yaml b/examples/websocket-size-limit/_3.10.x.yaml new file mode 100644 index 00000000..7274d312 --- /dev/null +++ b/examples/websocket-size-limit/_3.10.x.yaml @@ -0,0 +1,4 @@ +name: websocket-size-limit +config: + client_max_payload: 1024 + upstream_max_payload: 16384 diff --git a/examples/websocket-size-limit/_3.11.x.yaml b/examples/websocket-size-limit/_3.11.x.yaml new file mode 100644 index 00000000..7274d312 --- /dev/null +++ b/examples/websocket-size-limit/_3.11.x.yaml @@ -0,0 +1,4 @@ +name: websocket-size-limit +config: + client_max_payload: 1024 + upstream_max_payload: 16384 diff --git a/examples/websocket-size-limit/_3.5.x.yaml b/examples/websocket-size-limit/_3.5.x.yaml new file mode 100644 index 00000000..7274d312 --- /dev/null +++ b/examples/websocket-size-limit/_3.5.x.yaml @@ -0,0 +1,4 @@ +name: websocket-size-limit +config: + client_max_payload: 1024 + upstream_max_payload: 16384 diff --git a/examples/websocket-size-limit/_3.6.x.yaml b/examples/websocket-size-limit/_3.6.x.yaml new file mode 100644 index 00000000..7274d312 --- /dev/null +++ b/examples/websocket-size-limit/_3.6.x.yaml @@ -0,0 +1,4 @@ +name: websocket-size-limit +config: + client_max_payload: 1024 + upstream_max_payload: 16384 diff --git a/examples/websocket-size-limit/_3.7.x.yaml b/examples/websocket-size-limit/_3.7.x.yaml new file mode 100644 index 00000000..7274d312 --- /dev/null +++ b/examples/websocket-size-limit/_3.7.x.yaml @@ -0,0 +1,4 @@ +name: websocket-size-limit +config: + client_max_payload: 1024 + upstream_max_payload: 16384 diff --git a/examples/websocket-size-limit/_3.8.x.yaml b/examples/websocket-size-limit/_3.8.x.yaml new file mode 100644 index 00000000..7274d312 --- /dev/null +++ b/examples/websocket-size-limit/_3.8.x.yaml @@ -0,0 +1,4 @@ +name: websocket-size-limit +config: + client_max_payload: 1024 + upstream_max_payload: 16384 diff --git a/examples/websocket-size-limit/_3.9.x.yaml b/examples/websocket-size-limit/_3.9.x.yaml new file mode 100644 index 00000000..7274d312 --- /dev/null +++ b/examples/websocket-size-limit/_3.9.x.yaml @@ -0,0 +1,4 @@ +name: websocket-size-limit +config: + client_max_payload: 1024 + upstream_max_payload: 16384 diff --git a/examples/websocket-validator/_3.10.x.yaml b/examples/websocket-validator/_3.10.x.yaml new file mode 100644 index 00000000..12fe18ac --- /dev/null +++ b/examples/websocket-validator/_3.10.x.yaml @@ -0,0 +1,14 @@ +name: websocket-validator +config: + client: + text: + type: draft4 + schema: | + { + "type": "object", + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "string" } + }, + "required": [ "foo", "bar" ] + } diff --git a/examples/websocket-validator/_3.11.x.yaml b/examples/websocket-validator/_3.11.x.yaml new file mode 100644 index 00000000..12fe18ac --- /dev/null +++ b/examples/websocket-validator/_3.11.x.yaml @@ -0,0 +1,14 @@ +name: websocket-validator +config: + client: + text: + type: draft4 + schema: | + { + "type": "object", + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "string" } + }, + "required": [ "foo", "bar" ] + } diff --git a/examples/websocket-validator/_3.5.x.yaml b/examples/websocket-validator/_3.5.x.yaml new file mode 100644 index 00000000..12fe18ac --- /dev/null +++ b/examples/websocket-validator/_3.5.x.yaml @@ -0,0 +1,14 @@ +name: websocket-validator +config: + client: + text: + type: draft4 + schema: | + { + "type": "object", + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "string" } + }, + "required": [ "foo", "bar" ] + } diff --git a/examples/websocket-validator/_3.6.x.yaml b/examples/websocket-validator/_3.6.x.yaml new file mode 100644 index 00000000..12fe18ac --- /dev/null +++ b/examples/websocket-validator/_3.6.x.yaml @@ -0,0 +1,14 @@ +name: websocket-validator +config: + client: + text: + type: draft4 + schema: | + { + "type": "object", + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "string" } + }, + "required": [ "foo", "bar" ] + } diff --git a/examples/websocket-validator/_3.7.x.yaml b/examples/websocket-validator/_3.7.x.yaml new file mode 100644 index 00000000..12fe18ac --- /dev/null +++ b/examples/websocket-validator/_3.7.x.yaml @@ -0,0 +1,14 @@ +name: websocket-validator +config: + client: + text: + type: draft4 + schema: | + { + "type": "object", + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "string" } + }, + "required": [ "foo", "bar" ] + } diff --git a/examples/websocket-validator/_3.8.x.yaml b/examples/websocket-validator/_3.8.x.yaml new file mode 100644 index 00000000..12fe18ac --- /dev/null +++ b/examples/websocket-validator/_3.8.x.yaml @@ -0,0 +1,14 @@ +name: websocket-validator +config: + client: + text: + type: draft4 + schema: | + { + "type": "object", + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "string" } + }, + "required": [ "foo", "bar" ] + } diff --git a/examples/websocket-validator/_3.9.x.yaml b/examples/websocket-validator/_3.9.x.yaml new file mode 100644 index 00000000..12fe18ac --- /dev/null +++ b/examples/websocket-validator/_3.9.x.yaml @@ -0,0 +1,14 @@ +name: websocket-validator +config: + client: + text: + type: draft4 + schema: | + { + "type": "object", + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "string" } + }, + "required": [ "foo", "bar" ] + } diff --git a/examples/xml-threat-protection/_3.10.x.yaml b/examples/xml-threat-protection/_3.10.x.yaml new file mode 100644 index 00000000..a25f15fc --- /dev/null +++ b/examples/xml-threat-protection/_3.10.x.yaml @@ -0,0 +1,6 @@ +name: xml-threat-protection +config: + max_depth: 50 + localname: 512 + prefix: 512 + namespaceuri: 1024 diff --git a/examples/xml-threat-protection/_3.11.x.yaml b/examples/xml-threat-protection/_3.11.x.yaml new file mode 100644 index 00000000..a25f15fc --- /dev/null +++ b/examples/xml-threat-protection/_3.11.x.yaml @@ -0,0 +1,6 @@ +name: xml-threat-protection +config: + max_depth: 50 + localname: 512 + prefix: 512 + namespaceuri: 1024 diff --git a/examples/xml-threat-protection/_3.5.x.yaml b/examples/xml-threat-protection/_3.5.x.yaml new file mode 100644 index 00000000..a25f15fc --- /dev/null +++ b/examples/xml-threat-protection/_3.5.x.yaml @@ -0,0 +1,6 @@ +name: xml-threat-protection +config: + max_depth: 50 + localname: 512 + prefix: 512 + namespaceuri: 1024 diff --git a/examples/xml-threat-protection/_3.6.x.yaml b/examples/xml-threat-protection/_3.6.x.yaml new file mode 100644 index 00000000..a25f15fc --- /dev/null +++ b/examples/xml-threat-protection/_3.6.x.yaml @@ -0,0 +1,6 @@ +name: xml-threat-protection +config: + max_depth: 50 + localname: 512 + prefix: 512 + namespaceuri: 1024 diff --git a/examples/xml-threat-protection/_3.7.x.yaml b/examples/xml-threat-protection/_3.7.x.yaml new file mode 100644 index 00000000..a25f15fc --- /dev/null +++ b/examples/xml-threat-protection/_3.7.x.yaml @@ -0,0 +1,6 @@ +name: xml-threat-protection +config: + max_depth: 50 + localname: 512 + prefix: 512 + namespaceuri: 1024 diff --git a/examples/xml-threat-protection/_3.8.x.yaml b/examples/xml-threat-protection/_3.8.x.yaml new file mode 100644 index 00000000..a25f15fc --- /dev/null +++ b/examples/xml-threat-protection/_3.8.x.yaml @@ -0,0 +1,6 @@ +name: xml-threat-protection +config: + max_depth: 50 + localname: 512 + prefix: 512 + namespaceuri: 1024 diff --git a/examples/xml-threat-protection/_3.9.x.yaml b/examples/xml-threat-protection/_3.9.x.yaml new file mode 100644 index 00000000..a25f15fc --- /dev/null +++ b/examples/xml-threat-protection/_3.9.x.yaml @@ -0,0 +1,6 @@ +name: xml-threat-protection +config: + max_depth: 50 + localname: 512 + prefix: 512 + namespaceuri: 1024 diff --git a/examples/zipkin/_3.10.x.yaml b/examples/zipkin/_3.10.x.yaml new file mode 100644 index 00000000..62ab05c8 --- /dev/null +++ b/examples/zipkin/_3.10.x.yaml @@ -0,0 +1,5 @@ +name: zipkin +config: + http_endpoint: http://your.zipkin.collector:9411/api/v2/spans + sample_ratio: 0.001 + include_credential: true diff --git a/examples/zipkin/_3.11.x.yaml b/examples/zipkin/_3.11.x.yaml new file mode 100644 index 00000000..62ab05c8 --- /dev/null +++ b/examples/zipkin/_3.11.x.yaml @@ -0,0 +1,5 @@ +name: zipkin +config: + http_endpoint: http://your.zipkin.collector:9411/api/v2/spans + sample_ratio: 0.001 + include_credential: true diff --git a/examples/zipkin/_3.5.x.yaml b/examples/zipkin/_3.5.x.yaml new file mode 100644 index 00000000..62ab05c8 --- /dev/null +++ b/examples/zipkin/_3.5.x.yaml @@ -0,0 +1,5 @@ +name: zipkin +config: + http_endpoint: http://your.zipkin.collector:9411/api/v2/spans + sample_ratio: 0.001 + include_credential: true diff --git a/examples/zipkin/_3.6.x.yaml b/examples/zipkin/_3.6.x.yaml new file mode 100644 index 00000000..62ab05c8 --- /dev/null +++ b/examples/zipkin/_3.6.x.yaml @@ -0,0 +1,5 @@ +name: zipkin +config: + http_endpoint: http://your.zipkin.collector:9411/api/v2/spans + sample_ratio: 0.001 + include_credential: true diff --git a/examples/zipkin/_3.7.x.yaml b/examples/zipkin/_3.7.x.yaml new file mode 100644 index 00000000..62ab05c8 --- /dev/null +++ b/examples/zipkin/_3.7.x.yaml @@ -0,0 +1,5 @@ +name: zipkin +config: + http_endpoint: http://your.zipkin.collector:9411/api/v2/spans + sample_ratio: 0.001 + include_credential: true diff --git a/examples/zipkin/_3.8.x.yaml b/examples/zipkin/_3.8.x.yaml new file mode 100644 index 00000000..62ab05c8 --- /dev/null +++ b/examples/zipkin/_3.8.x.yaml @@ -0,0 +1,5 @@ +name: zipkin +config: + http_endpoint: http://your.zipkin.collector:9411/api/v2/spans + sample_ratio: 0.001 + include_credential: true diff --git a/examples/zipkin/_3.9.x.yaml b/examples/zipkin/_3.9.x.yaml new file mode 100644 index 00000000..62ab05c8 --- /dev/null +++ b/examples/zipkin/_3.9.x.yaml @@ -0,0 +1,5 @@ +name: zipkin +config: + http_endpoint: http://your.zipkin.collector:9411/api/v2/spans + sample_ratio: 0.001 + include_credential: true diff --git a/json_schemas/acl/2.8.json b/json_schemas/acl/2.8.json new file mode 100644 index 00000000..e4eb6e69 --- /dev/null +++ b/json_schemas/acl/2.8.json @@ -0,0 +1,126 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "description": "Arbitrary group names that are allowed to consume the Service or Route. One of `config.allow` or `config.deny` must be specified.", + "examples": [ + [ + "group1", + "group2" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "deny": { + "description": "Arbitrary group names that are not allowed to consume the Service or Route. One of `config.allow` or `config.deny` must be specified.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_groups_header": { + "default": false, + "description": "Flag that if enabled (`true`), prevents the `X-Consumer-Groups` header to be sent in the request to the Upstream service.", + "examples": [ + true + ], + "type": "boolean" + } + }, + "required": [ + + ], + "shorthand_fields": { + "blacklist": { + "items": { + "is_regex": true, + "type": "string" + }, + "type": "array" + }, + "whitelist": { + "items": { + "is_regex": true, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/acl/3.10.json b/json_schemas/acl/3.10.json new file mode 100644 index 00000000..c78c25f3 --- /dev/null +++ b/json_schemas/acl/3.10.json @@ -0,0 +1,98 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "description": "Arbitrary group names that are allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "always_use_authenticated_groups": { + "default": false, + "description": "If enabled (`true`), the authenticated groups will always be used even when an authenticated consumer already exists. If the authenticated groups don't exist, it will fallback to use the groups associated with the consumer. By default the authenticated groups will only be used when there is no consumer or the consumer is anonymous.", + "type": "boolean" + }, + "deny": { + "description": "Arbitrary group names that are not allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_groups_header": { + "default": false, + "description": "If enabled (`true`), prevents the `X-Consumer-Groups` header from being sent in the request to the upstream service.", + "type": "boolean" + }, + "include_consumer_groups": { + "default": false, + "description": "If enabled (`true`), allows the consumer-groups to be used in the `allow|deny` fields", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/acl/3.11.json b/json_schemas/acl/3.11.json new file mode 100644 index 00000000..303d1f68 --- /dev/null +++ b/json_schemas/acl/3.11.json @@ -0,0 +1,84 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "description": "Arbitrary group names that are allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "always_use_authenticated_groups": { + "default": false, + "description": "If enabled (`true`), the authenticated groups will always be used even when an authenticated consumer already exists. If the authenticated groups don't exist, it will fallback to use the groups associated with the consumer. By default the authenticated groups will only be used when there is no consumer or the consumer is anonymous.", + "type": "boolean" + }, + "deny": { + "description": "Arbitrary group names that are not allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "hide_groups_header": { + "default": false, + "description": "If enabled (`true`), prevents the `X-Consumer-Groups` header from being sent in the request to the upstream service.", + "type": "boolean" + }, + "include_consumer_groups": { + "default": false, + "description": "If enabled (`true`), allows the consumer-groups to be used in the `allow|deny` fields", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/acl/3.12.json b/json_schemas/acl/3.12.json new file mode 100644 index 00000000..303d1f68 --- /dev/null +++ b/json_schemas/acl/3.12.json @@ -0,0 +1,84 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "description": "Arbitrary group names that are allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "always_use_authenticated_groups": { + "default": false, + "description": "If enabled (`true`), the authenticated groups will always be used even when an authenticated consumer already exists. If the authenticated groups don't exist, it will fallback to use the groups associated with the consumer. By default the authenticated groups will only be used when there is no consumer or the consumer is anonymous.", + "type": "boolean" + }, + "deny": { + "description": "Arbitrary group names that are not allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "hide_groups_header": { + "default": false, + "description": "If enabled (`true`), prevents the `X-Consumer-Groups` header from being sent in the request to the upstream service.", + "type": "boolean" + }, + "include_consumer_groups": { + "default": false, + "description": "If enabled (`true`), allows the consumer-groups to be used in the `allow|deny` fields", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/acl/3.4.json b/json_schemas/acl/3.4.json new file mode 100644 index 00000000..f455a941 --- /dev/null +++ b/json_schemas/acl/3.4.json @@ -0,0 +1,88 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "description": "Arbitrary group names that are allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "deny": { + "description": "Arbitrary group names that are not allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_groups_header": { + "default": false, + "description": "If enabled (`true`), prevents the `X-Consumer-Groups` header from being sent in the request to the upstream service.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/acl/3.7.json b/json_schemas/acl/3.7.json new file mode 100644 index 00000000..51d27bd8 --- /dev/null +++ b/json_schemas/acl/3.7.json @@ -0,0 +1,92 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "description": "Arbitrary group names that are allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "deny": { + "description": "Arbitrary group names that are not allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_groups_header": { + "default": false, + "description": "If enabled (`true`), prevents the `X-Consumer-Groups` header from being sent in the request to the upstream service.", + "type": "boolean" + }, + "include_consumer_groups": { + "default": false, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/acl/3.8.json b/json_schemas/acl/3.8.json new file mode 100644 index 00000000..488af668 --- /dev/null +++ b/json_schemas/acl/3.8.json @@ -0,0 +1,97 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "description": "Arbitrary group names that are allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "always_use_authenticated_groups": { + "default": false, + "description": "If enabled (`true`), the authenticated groups will always be used even when an authenticated consumer already exists. If the authenticated groups don't exist, it will fallback to use the groups associated with the consumer. By default the authenticated groups will only be used when there is no consumer or the consumer is anonymous.", + "type": "boolean" + }, + "deny": { + "description": "Arbitrary group names that are not allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_groups_header": { + "default": false, + "description": "If enabled (`true`), prevents the `X-Consumer-Groups` header from being sent in the request to the upstream service.", + "type": "boolean" + }, + "include_consumer_groups": { + "default": false, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/acl/3.9.json b/json_schemas/acl/3.9.json new file mode 100644 index 00000000..c78c25f3 --- /dev/null +++ b/json_schemas/acl/3.9.json @@ -0,0 +1,98 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "description": "Arbitrary group names that are allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "always_use_authenticated_groups": { + "default": false, + "description": "If enabled (`true`), the authenticated groups will always be used even when an authenticated consumer already exists. If the authenticated groups don't exist, it will fallback to use the groups associated with the consumer. By default the authenticated groups will only be used when there is no consumer or the consumer is anonymous.", + "type": "boolean" + }, + "deny": { + "description": "Arbitrary group names that are not allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_groups_header": { + "default": false, + "description": "If enabled (`true`), prevents the `X-Consumer-Groups` header from being sent in the request to the upstream service.", + "type": "boolean" + }, + "include_consumer_groups": { + "default": false, + "description": "If enabled (`true`), allows the consumer-groups to be used in the `allow|deny` fields", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/acme/2.8.json b/json_schemas/acme/2.8.json new file mode 100644 index 00000000..5fae69d7 --- /dev/null +++ b/json_schemas/acme/2.8.json @@ -0,0 +1,272 @@ +{ + "properties": { + "config": { + "properties": { + "account_email": { + "description": "The account identifier. Can be reused in a different plugin instance.", + "examples": [ + "example@example.com" + ], + "pattern": "[a-zA-Z0-9]*[!-/:-@[-`{-~]*@+[a-zA-Z0-9]*%.?[a-zA-Z0-9]*", + "type": "string" + }, + "allow_any_domain": { + "default": false, + "type": "boolean" + }, + "api_uri": { + "default": "https://acme-v02.api.letsencrypt.org/directory", + "description": "The ACMEv2 API endpoint to use. You can specify the [Let's Encrypt staging environment](https://letsencrypt.org/docs/staging-environment/) for testing. Kong doesn't automatically delete staging certificates. If you use the same domain in test and production environments, you need to manually delete those certificates after testing.", + "type": "string" + }, + "cert_type": { + "default": "rsa", + "description": "The certificate type to create. The possible values are `'rsa'` for RSA certificate or `'ecc'` for EC certificate.", + "enum": [ + "ecc", + "rsa" + ], + "type": "string" + }, + "domains": { + "description": "The list of domains to create certificates for. To match subdomains under `example.com`, use `*.example.com`.\nRegex pattern is not supported.\n\nThis parameter is only used to match domains, not to specify the Common Name\nor Subject Alternative Name to create certificates. Each domain must have its own certificate.\nThe ACME plugin checks this configuration before checking any certificate in `storage` when serving the certificate of a request.\n\nIf this field is left empty, all top-level domains (TLDs) are allowed.", + "items": { + "match_all": { + "pattern": "^[^*]*%*?[^*]*$" + }, + "match_any": { + "patterns": [ + "%.%*$", + "^%*%.", + "^[^*]*$" + ] + }, + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "eab_hmac_key": { + "description": "External account binding (EAB) base64-encoded URL string of the HMAC key. You usually don't need to set this unless it is explicitly required by the CA.", + "type": "string" + }, + "eab_kid": { + "description": "External account binding (EAB) key id. You usually don't need to set this unless it is explicitly required by the CA.", + "type": "string" + }, + "fail_backoff_minutes": { + "default": 5, + "description": "Minutes to wait for each domain that fails to create a certificate. This applies to both a\nnew certificate and a renewal certificate.", + "type": "number" + }, + "preferred_chain": { + "type": "string" + }, + "renew_threshold_days": { + "default": 14, + "description": " Days remaining to renew the certificate before it expires.", + "type": "number" + }, + "rsa_key_size": { + "default": 4096, + "description": "RSA private key size for the certificate. The possible values are 2048, 3072, or 4096.", + "enum": [ + 2048, + 3072, + 4096 + ], + "type": "integer" + }, + "storage": { + "default": "shm", + "description": "The backend storage type to use. The possible values are `'kong'`, `'shm'`, `'redis'`, `'consul'`, or `'vault'`. In DB-less mode, `'kong'` storage is unavailable. Note that `'shm'` storage does not persist during Kong restarts and does not work for Kong running on different machines, so consider using one of `'kong'`, `'redis'`, `'consul'`, or `'vault'` in production. Please refer to the Hybrid Mode sections below as well.", + "enum": [ + "consul", + "kong", + "redis", + "shm", + "vault" + ], + "type": "string" + }, + "storage_config": { + "properties": { + "consul": { + "properties": { + "host": { + "type": "string" + }, + "https": { + "default": false, + "type": "boolean" + }, + "kv_path": { + "type": "string" + }, + "port": { + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "type": "number" + }, + "token": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "kong": { + "additionalProperties": true, + "properties": { + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "auth": { + "type": "string" + }, + "database": { + "type": "number" + }, + "host": { + "type": "string" + }, + "port": { + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "shm": { + "properties": { + "shm_name": { + "default": "kong", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "vault": { + "properties": { + "auth_method": { + "type": "string" + }, + "auth_path": { + "type": "string" + }, + "auth_role": { + "type": "string" + }, + "host": { + "type": "string" + }, + "https": { + "default": false, + "type": "boolean" + }, + "jwt_path": { + "type": "string" + }, + "kv_path": { + "type": "string" + }, + "port": { + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "type": "number" + }, + "tls_server_name": { + "type": "string" + }, + "tls_verify": { + "default": true, + "type": "boolean" + }, + "token": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "tos_accepted": { + "default": false, + "description": "If you are using Let's Encrypt, you must set this to `true` to agree the [Terms of Service](https://letsencrypt.org/repository/).", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/acme/3.10.json b/json_schemas/acme/3.10.json new file mode 100644 index 00000000..d7efcc36 --- /dev/null +++ b/json_schemas/acme/3.10.json @@ -0,0 +1,372 @@ +{ + "properties": { + "config": { + "properties": { + "account_email": { + "description": "The account identifier. Can be reused in a different plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "pattern": "[a-zA-Z0-9]*[!-/:-@[-`{-~]*@+[a-zA-Z0-9]*%.?[a-zA-Z0-9]*", + "type": "string" + }, + "account_key": { + "description": "The private key associated with the account.", + "properties": { + "key_id": { + "description": "The Key ID.", + "type": "string" + }, + "key_set": { + "description": "The ID of the key set to associate the Key ID with.", + "type": "string" + } + }, + "required": [ + "key_id" + ], + "type": "object" + }, + "allow_any_domain": { + "default": false, + "description": "If set to `true`, the plugin allows all domains and ignores any values in the `domains` list.", + "type": "boolean" + }, + "api_uri": { + "default": "https://acme-v02.api.letsencrypt.org/directory", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "cert_type": { + "default": "rsa", + "description": "The certificate type to create. The possible values are `rsa` for RSA certificate or `ecc` for EC certificate.", + "enum": [ + "ecc", + "rsa" + ], + "type": "string" + }, + "domains": { + "description": "An array of strings representing hosts. A valid host is a string containing one or more labels separated by periods, with at most one wildcard label ('*')", + "items": { + "match_all": { + "pattern": "^[^*]*%*?[^*]*$" + }, + "match_any": { + "patterns": [ + "%.%*$", + "^%*%.", + "^[^*]*$" + ] + }, + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "eab_hmac_key": { + "description": "External account binding (EAB) base64-encoded URL string of the HMAC key. You usually don't need to set this unless it is explicitly required by the CA.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "eab_kid": { + "description": "External account binding (EAB) key id. You usually don't need to set this unless it is explicitly required by the CA.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "enable_ipv4_common_name": { + "default": true, + "description": "A boolean value that controls whether to include the IPv4 address in the common name field of generated certificates.", + "type": "boolean" + }, + "fail_backoff_minutes": { + "default": 5, + "description": "Minutes to wait for each domain that fails to create a certificate. This applies to both a\nnew certificate and a renewal certificate.", + "type": "number" + }, + "preferred_chain": { + "description": "A string value that specifies the preferred certificate chain to use when generating certificates.", + "type": "string" + }, + "renew_threshold_days": { + "default": 14, + "description": "Days remaining to renew the certificate before it expires.", + "type": "number" + }, + "rsa_key_size": { + "default": 4096, + "description": "RSA private key size for the certificate. The possible values are 2048, 3072, or 4096.", + "enum": [ + 2048, + 3072, + 4096 + ], + "type": "integer" + }, + "storage": { + "default": "shm", + "description": "The backend storage type to use. In DB-less mode and Konnect, `kong` storage is unavailable. In hybrid mode and Konnect, `shm` storage is unavailable. `shm` storage does not persist during Kong restarts and does not work for Kong running on different machines, so consider using one of `kong`, `redis`, `consul`, or `vault` in production.", + "enum": [ + "consul", + "kong", + "redis", + "shm", + "vault" + ], + "type": "string" + }, + "storage_config": { + "properties": { + "consul": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https": { + "default": false, + "description": "Boolean representation of https.", + "type": "boolean" + }, + "kv_path": { + "description": "KV prefix path.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + }, + "token": { + "description": "Consul ACL token.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "kong": { + "additionalProperties": true, + "properties": { + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "extra_options": { + "description": "Custom ACME Redis options", + "properties": { + "namespace": { + "default": "", + "description": "A namespace to prepend to all keys stored in Redis.", + "minLength": 0, + "type": "string" + }, + "scan_count": { + "default": 10, + "description": "The number of keys to return in Redis SCAN calls.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "minLength": 0, + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "auth": { + "minLength": 0, + "type": "string" + }, + "namespace": { + "minLength": 0, + "type": "string" + }, + "scan_count": { + "type": "integer" + }, + "ssl_server_name": { + "type": "string" + } + }, + "type": "object" + }, + "shm": { + "properties": { + "shm_name": { + "default": "kong", + "description": "Name of shared memory zone used for Kong API gateway storage", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "vault": { + "properties": { + "auth_method": { + "default": "token", + "description": "Auth Method, default to token, can be 'token' or 'kubernetes'.", + "enum": [ + "kubernetes", + "token" + ], + "type": "string" + }, + "auth_path": { + "description": "Vault's authentication path to use.", + "type": "string" + }, + "auth_role": { + "description": "The role to try and assign.", + "type": "string" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https": { + "default": false, + "description": "Boolean representation of https.", + "type": "boolean" + }, + "jwt_path": { + "description": "The path to the JWT.", + "type": "string" + }, + "kv_path": { + "description": "KV prefix path.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + }, + "tls_server_name": { + "description": "SNI used in request, default to host if omitted.", + "type": "string" + }, + "tls_verify": { + "default": true, + "description": "Turn on TLS verification.", + "type": "boolean" + }, + "token": { + "description": "Consul ACL token.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "tos_accepted": { + "default": false, + "description": "If you are using Let's Encrypt, you must set this to `true` to agree the terms of service.", + "type": "boolean" + } + }, + "required": [ + "account_email" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/acme/3.11.json b/json_schemas/acme/3.11.json new file mode 100644 index 00000000..493cbe12 --- /dev/null +++ b/json_schemas/acme/3.11.json @@ -0,0 +1,353 @@ +{ + "properties": { + "config": { + "properties": { + "account_email": { + "description": "The account identifier. Can be reused in a different plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "pattern": "[a-zA-Z0-9]*[!-/:-@[-`{-~]*@+[a-zA-Z0-9]*%.?[a-zA-Z0-9]*", + "type": "string" + }, + "account_key": { + "description": "The private key associated with the account.", + "properties": { + "key_id": { + "description": "The Key ID.", + "type": "string" + }, + "key_set": { + "description": "The ID of the key set to associate the Key ID with.", + "type": "string" + } + }, + "required": [ + "key_id" + ], + "type": "object" + }, + "allow_any_domain": { + "default": false, + "description": "If set to `true`, the plugin allows all domains and ignores any values in the `domains` list.", + "type": "boolean" + }, + "api_uri": { + "default": "https://acme-v02.api.letsencrypt.org/directory", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "cert_type": { + "default": "rsa", + "description": "The certificate type to create. The possible values are `rsa` for RSA certificate or `ecc` for EC certificate.", + "enum": [ + "ecc", + "rsa" + ], + "type": "string" + }, + "domains": { + "description": "An array of strings representing hosts. A valid host is a string containing one or more labels separated by periods, with at most one wildcard label ('*')", + "items": { + "match_all": { + "pattern": "^[^*]*%*?[^*]*$" + }, + "match_any": { + "patterns": [ + "%.%*$", + "^%*%.", + "^[^*]*$" + ] + }, + "required": [], + "type": "string" + }, + "type": "array" + }, + "eab_hmac_key": { + "description": "External account binding (EAB) base64-encoded URL string of the HMAC key. You usually don't need to set this unless it is explicitly required by the CA.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "eab_kid": { + "description": "External account binding (EAB) key id. You usually don't need to set this unless it is explicitly required by the CA.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "enable_ipv4_common_name": { + "default": true, + "description": "A boolean value that controls whether to include the IPv4 address in the common name field of generated certificates.", + "type": "boolean" + }, + "fail_backoff_minutes": { + "default": 5, + "description": "Minutes to wait for each domain that fails to create a certificate. This applies to both a\nnew certificate and a renewal certificate.", + "type": "number" + }, + "preferred_chain": { + "description": "A string value that specifies the preferred certificate chain to use when generating certificates.", + "type": "string" + }, + "renew_threshold_days": { + "default": 14, + "description": "Days remaining to renew the certificate before it expires.", + "type": "number" + }, + "rsa_key_size": { + "default": 4096, + "description": "RSA private key size for the certificate. The possible values are 2048, 3072, or 4096.", + "enum": [ + 2048, + 3072, + 4096 + ], + "type": "integer" + }, + "storage": { + "default": "shm", + "description": "The backend storage type to use. In DB-less mode and Konnect, `kong` storage is unavailable. In hybrid mode and Konnect, `shm` storage is unavailable. `shm` storage does not persist during Kong restarts and does not work for Kong running on different machines, so consider using one of `kong`, `redis`, `consul`, or `vault` in production.", + "enum": [ + "consul", + "kong", + "redis", + "shm", + "vault" + ], + "type": "string" + }, + "storage_config": { + "properties": { + "consul": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https": { + "default": false, + "description": "Boolean representation of https.", + "type": "boolean" + }, + "kv_path": { + "description": "KV prefix path.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + }, + "token": { + "description": "Consul ACL token.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "kong": { + "additionalProperties": true, + "properties": {}, + "required": [], + "type": "object" + }, + "redis": { + "properties": { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "extra_options": { + "description": "Custom ACME Redis options", + "properties": { + "namespace": { + "default": "", + "description": "A namespace to prepend to all keys stored in Redis.", + "minLength": 0, + "type": "string" + }, + "scan_count": { + "default": 10, + "description": "The number of keys to return in Redis SCAN calls.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "minLength": 0, + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "auth": { + "minLength": 0, + "type": "string" + }, + "namespace": { + "minLength": 0, + "type": "string" + }, + "scan_count": { + "type": "integer" + }, + "ssl_server_name": { + "type": "string" + } + }, + "type": "object" + }, + "shm": { + "properties": { + "shm_name": { + "default": "kong", + "description": "Name of shared memory zone used for Kong API gateway storage", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "vault": { + "properties": { + "auth_method": { + "default": "token", + "description": "Auth Method, default to token, can be 'token' or 'kubernetes'.", + "enum": [ + "kubernetes", + "token" + ], + "type": "string" + }, + "auth_path": { + "description": "Vault's authentication path to use.", + "type": "string" + }, + "auth_role": { + "description": "The role to try and assign.", + "type": "string" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https": { + "default": false, + "description": "Boolean representation of https.", + "type": "boolean" + }, + "jwt_path": { + "description": "The path to the JWT.", + "type": "string" + }, + "kv_path": { + "description": "KV prefix path.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + }, + "tls_server_name": { + "description": "SNI used in request, default to host if omitted.", + "type": "string" + }, + "tls_verify": { + "default": true, + "description": "Turn on TLS verification.", + "type": "boolean" + }, + "token": { + "description": "Consul ACL token.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "tos_accepted": { + "default": false, + "description": "If you are using Let's Encrypt, you must set this to `true` to agree the terms of service.", + "type": "boolean" + } + }, + "required": [ + "account_email" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/acme/3.12.json b/json_schemas/acme/3.12.json new file mode 100644 index 00000000..3e259c34 --- /dev/null +++ b/json_schemas/acme/3.12.json @@ -0,0 +1,353 @@ +{ + "properties": { + "config": { + "properties": { + "account_email": { + "description": "The account identifier. Can be reused in a different plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "pattern": "[a-zA-Z0-9]*[!-/:-@[-`{-~]*@+[a-zA-Z0-9]*%.?[a-zA-Z0-9]*", + "type": "string" + }, + "account_key": { + "description": "The private key associated with the account.", + "properties": { + "key_id": { + "description": "The Key ID.", + "type": "string" + }, + "key_set": { + "description": "The ID of the key set to associate the Key ID with.", + "type": "string" + } + }, + "required": [ + "key_id" + ], + "type": "object" + }, + "allow_any_domain": { + "default": false, + "description": "If set to `true`, the plugin allows all domains and ignores any values in the `domains` list.", + "type": "boolean" + }, + "api_uri": { + "default": "https://acme-v02.api.letsencrypt.org/directory", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "cert_type": { + "default": "rsa", + "description": "The certificate type to create. The possible values are `rsa` for RSA certificate or `ecc` for EC certificate.", + "enum": [ + "ecc", + "rsa" + ], + "type": "string" + }, + "domains": { + "description": "An array of strings representing hosts. A valid host is a string containing one or more labels separated by periods, with at most one wildcard label ('*')", + "items": { + "match_all": { + "pattern": "^[^*]*%*?[^*]*$" + }, + "match_any": { + "patterns": [ + "%.%*$", + "^%*%.", + "^[^*]*$" + ] + }, + "required": [], + "type": "string" + }, + "type": "array" + }, + "eab_hmac_key": { + "description": "External account binding (EAB) base64-encoded URL string of the HMAC key. You usually don't need to set this unless it is explicitly required by the CA.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "eab_kid": { + "description": "External account binding (EAB) key id. You usually don't need to set this unless it is explicitly required by the CA.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "enable_ipv4_common_name": { + "default": true, + "description": "A boolean value that controls whether to include the IPv4 address in the common name field of generated certificates.", + "type": "boolean" + }, + "fail_backoff_minutes": { + "default": 5, + "description": "Minutes to wait for each domain that fails to create a certificate. This applies to both a\nnew certificate and a renewal certificate.", + "type": "number" + }, + "preferred_chain": { + "description": "A string value that specifies the preferred certificate chain to use when generating certificates.", + "type": "string" + }, + "renew_threshold_days": { + "default": 14, + "description": "Days remaining to renew the certificate before it expires.", + "type": "number" + }, + "rsa_key_size": { + "default": 4096, + "description": "RSA private key size for the certificate. The possible values are 2048, 3072, or 4096.", + "enum": [ + 2048, + 3072, + 4096 + ], + "type": "integer" + }, + "storage": { + "default": "shm", + "description": "The backend storage type to use. In DB-less mode and Konnect, `kong` storage is unavailable. In hybrid mode and Konnect, `shm` storage is unavailable. `shm` storage does not persist during Kong restarts and does not work for Kong running on different machines, so consider using one of `kong`, `redis`, `consul`, or `vault` in production.", + "enum": [ + "consul", + "kong", + "redis", + "shm", + "vault" + ], + "type": "string" + }, + "storage_config": { + "properties": { + "consul": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https": { + "default": false, + "description": "Boolean representation of https.", + "type": "boolean" + }, + "kv_path": { + "description": "KV prefix path.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + }, + "token": { + "description": "Consul ACL token.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "kong": { + "additionalProperties": true, + "properties": {}, + "required": [], + "type": "object" + }, + "redis": { + "properties": { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "extra_options": { + "description": "Custom ACME Redis options", + "properties": { + "namespace": { + "default": "", + "description": "A namespace to prepend to all keys stored in Redis.", + "minLength": 0, + "type": "string" + }, + "scan_count": { + "default": 10, + "description": "The number of keys to return in Redis SCAN calls.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "minLength": 0, + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "auth": { + "minLength": 0, + "type": "string" + }, + "namespace": { + "minLength": 0, + "type": "string" + }, + "scan_count": { + "type": "integer" + }, + "ssl_server_name": { + "type": "string" + } + }, + "type": "object" + }, + "shm": { + "properties": { + "shm_name": { + "default": "kong", + "description": "Name of shared memory zone used for Kong API gateway storage", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "vault": { + "properties": { + "auth_method": { + "default": "token", + "description": "Auth Method, default to token, can be 'token' or 'kubernetes'.", + "enum": [ + "kubernetes", + "token" + ], + "type": "string" + }, + "auth_path": { + "description": "Vault's authentication path to use.", + "type": "string" + }, + "auth_role": { + "description": "The role to try and assign.", + "type": "string" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https": { + "default": false, + "description": "Boolean representation of https.", + "type": "boolean" + }, + "jwt_path": { + "description": "The path to the JWT.", + "type": "string" + }, + "kv_path": { + "description": "KV prefix path.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + }, + "tls_server_name": { + "description": "SNI used in request, default to host if omitted.", + "type": "string" + }, + "tls_verify": { + "default": true, + "description": "Turn on TLS verification.", + "type": "boolean" + }, + "token": { + "description": "Consul ACL token.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "tos_accepted": { + "default": false, + "description": "If you are using Let's Encrypt, you must set this to `true` to agree the terms of service.", + "type": "boolean" + } + }, + "required": [ + "account_email" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/acme/3.4.json b/json_schemas/acme/3.4.json new file mode 100644 index 00000000..b2e5492b --- /dev/null +++ b/json_schemas/acme/3.4.json @@ -0,0 +1,328 @@ +{ + "properties": { + "config": { + "properties": { + "account_email": { + "description": "The account identifier. Can be reused in a different plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "pattern": "[a-zA-Z0-9]*[!-/:-@[-`{-~]*@+[a-zA-Z0-9]*%.?[a-zA-Z0-9]*", + "type": "string" + }, + "account_key": { + "description": "The private key associated with the account.", + "properties": { + "key_id": { + "description": "The Key ID.", + "type": "string" + }, + "key_set": { + "description": "The ID of the key set to associate the Key ID with.", + "type": "string" + } + }, + "required": [ + "key_id" + ], + "type": "object" + }, + "allow_any_domain": { + "default": false, + "description": "If set to `true`, the plugin allows all domains and ignores any values in the `domains` list.", + "type": "boolean" + }, + "api_uri": { + "default": "https://acme-v02.api.letsencrypt.org/directory", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "cert_type": { + "default": "rsa", + "description": "The certificate type to create. The possible values are `'rsa'` for RSA certificate or `'ecc'` for EC certificate.", + "enum": [ + "ecc", + "rsa" + ], + "type": "string" + }, + "domains": { + "description": "An array of strings representing hosts. A valid host is a string containing one or more labels separated by periods, with at most one wildcard label ('*')", + "items": { + "match_all": { + "pattern": "^[^*]*%*?[^*]*$" + }, + "match_any": { + "patterns": [ + "%.%*$", + "^%*%.", + "^[^*]*$" + ] + }, + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "eab_hmac_key": { + "description": "External account binding (EAB) base64-encoded URL string of the HMAC key. You usually don't need to set this unless it is explicitly required by the CA.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "eab_kid": { + "description": "External account binding (EAB) key id. You usually don't need to set this unless it is explicitly required by the CA.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "enable_ipv4_common_name": { + "default": true, + "description": "A boolean value that controls whether to include the IPv4 address in the common name field of generated certificates.", + "type": "boolean" + }, + "fail_backoff_minutes": { + "default": 5, + "description": "Minutes to wait for each domain that fails to create a certificate. This applies to both a\nnew certificate and a renewal certificate.", + "type": "number" + }, + "preferred_chain": { + "description": "A string value that specifies the preferred certificate chain to use when generating certificates.", + "type": "string" + }, + "renew_threshold_days": { + "default": 14, + "description": "Days remaining to renew the certificate before it expires.", + "type": "number" + }, + "rsa_key_size": { + "default": 4096, + "description": "RSA private key size for the certificate. The possible values are 2048, 3072, or 4096.", + "enum": [ + 2048, + 3072, + 4096 + ], + "type": "integer" + }, + "storage": { + "default": "shm", + "description": "The backend storage type to use. The possible values are `'kong'`, `'shm'`, `'redis'`, `'consul'`, or `'vault'`. In DB-less mode, `'kong'` storage is unavailable. Note that `'shm'` storage does not persist during Kong restarts and does not work for Kong running on different machines, so consider using one of `'kong'`, `'redis'`, `'consul'`, or `'vault'` in production. Please refer to the Hybrid Mode sections below as well.", + "enum": [ + "consul", + "kong", + "redis", + "shm", + "vault" + ], + "type": "string" + }, + "storage_config": { + "properties": { + "consul": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https": { + "default": false, + "description": "Boolean representation of https.", + "type": "boolean" + }, + "kv_path": { + "description": "KV prefix path.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + }, + "token": { + "description": "Consul ACL token.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "kong": { + "additionalProperties": true, + "properties": { + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "auth": { + "description": "The Redis password to use for authentication. \nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "database": { + "description": "The index of the Redis database to use.", + "type": "number" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "namespace": { + "default": "", + "description": "A namespace to prepend to all keys stored in Redis.", + "minLength": 0, + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "ssl": { + "default": false, + "description": "Whether to use SSL/TLS encryption when connecting to the Redis server.", + "type": "boolean" + }, + "ssl_server_name": { + "description": "The expected server name for the SSL/TLS certificate presented by the Redis server.", + "type": "string" + }, + "ssl_verify": { + "default": false, + "description": "Whether to verify the SSL/TLS certificate presented by the Redis server. This should be a boolean value.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "shm": { + "properties": { + "shm_name": { + "default": "kong", + "description": "Name of shared memory zone used for Kong API gateway storage", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "vault": { + "properties": { + "auth_method": { + "default": "token", + "description": "Auth Method, default to token, can be 'token' or 'kubernetes'.", + "enum": [ + "kubernetes", + "token" + ], + "type": "string" + }, + "auth_path": { + "description": "Vault's authentication path to use.", + "type": "string" + }, + "auth_role": { + "description": "The role to try and assign.", + "type": "string" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https": { + "default": false, + "description": "Boolean representation of https.", + "type": "boolean" + }, + "jwt_path": { + "description": "The path to the JWT.", + "type": "string" + }, + "kv_path": { + "description": "KV prefix path.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + }, + "tls_server_name": { + "description": "SNI used in request, default to host if omitted.", + "type": "string" + }, + "tls_verify": { + "default": true, + "description": "Turn on TLS verification.", + "type": "boolean" + }, + "token": { + "description": "Consul ACL token.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "tos_accepted": { + "default": false, + "description": "If you are using Let's Encrypt, you must set this to `true` to agree the terms of service.", + "type": "boolean" + } + }, + "required": [ + "account_email" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/acme/3.7.json b/json_schemas/acme/3.7.json new file mode 100644 index 00000000..443e9f1b --- /dev/null +++ b/json_schemas/acme/3.7.json @@ -0,0 +1,386 @@ +{ + "properties": { + "config": { + "properties": { + "account_email": { + "description": "The account identifier. Can be reused in a different plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "pattern": "[a-zA-Z0-9]*[!-/:-@[-`{-~]*@+[a-zA-Z0-9]*%.?[a-zA-Z0-9]*", + "type": "string" + }, + "account_key": { + "description": "The private key associated with the account.", + "properties": { + "key_id": { + "description": "The Key ID.", + "type": "string" + }, + "key_set": { + "description": "The ID of the key set to associate the Key ID with.", + "type": "string" + } + }, + "required": [ + "key_id" + ], + "type": "object" + }, + "allow_any_domain": { + "default": false, + "description": "If set to `true`, the plugin allows all domains and ignores any values in the `domains` list.", + "type": "boolean" + }, + "api_uri": { + "default": "https://acme-v02.api.letsencrypt.org/directory", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "cert_type": { + "default": "rsa", + "description": "The certificate type to create. The possible values are `'rsa'` for RSA certificate or `'ecc'` for EC certificate.", + "enum": [ + "ecc", + "rsa" + ], + "type": "string" + }, + "domains": { + "description": "An array of strings representing hosts. A valid host is a string containing one or more labels separated by periods, with at most one wildcard label ('*')", + "items": { + "match_all": { + "pattern": "^[^*]*%*?[^*]*$" + }, + "match_any": { + "patterns": [ + "%.%*$", + "^%*%.", + "^[^*]*$" + ] + }, + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "eab_hmac_key": { + "description": "External account binding (EAB) base64-encoded URL string of the HMAC key. You usually don't need to set this unless it is explicitly required by the CA.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "eab_kid": { + "description": "External account binding (EAB) key id. You usually don't need to set this unless it is explicitly required by the CA.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "enable_ipv4_common_name": { + "default": true, + "description": "A boolean value that controls whether to include the IPv4 address in the common name field of generated certificates.", + "type": "boolean" + }, + "fail_backoff_minutes": { + "default": 5, + "description": "Minutes to wait for each domain that fails to create a certificate. This applies to both a\nnew certificate and a renewal certificate.", + "type": "number" + }, + "preferred_chain": { + "description": "A string value that specifies the preferred certificate chain to use when generating certificates.", + "type": "string" + }, + "renew_threshold_days": { + "default": 14, + "description": "Days remaining to renew the certificate before it expires.", + "type": "number" + }, + "rsa_key_size": { + "default": 4096, + "description": "RSA private key size for the certificate. The possible values are 2048, 3072, or 4096.", + "enum": [ + 2048, + 3072, + 4096 + ], + "type": "integer" + }, + "storage": { + "default": "shm", + "description": "The backend storage type to use. The possible values are `'kong'`, `'shm'`, `'redis'`, `'consul'`, or `'vault'`. In DB-less mode, `'kong'` storage is unavailable. Note that `'shm'` storage does not persist during Kong restarts and does not work for Kong running on different machines, so consider using one of `'kong'`, `'redis'`, `'consul'`, or `'vault'` in production. Please refer to the Hybrid Mode sections below as well.", + "enum": [ + "consul", + "kong", + "redis", + "shm", + "vault" + ], + "type": "string" + }, + "storage_config": { + "properties": { + "consul": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https": { + "default": false, + "description": "Boolean representation of https.", + "type": "boolean" + }, + "kv_path": { + "description": "KV prefix path.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + }, + "token": { + "description": "Consul ACL token.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "kong": { + "additionalProperties": true, + "properties": { + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "extra_options": { + "description": "Custom ACME Redis options", + "properties": { + "namespace": { + "default": "", + "description": "A namespace to prepend to all keys stored in Redis.", + "minLength": 0, + "type": "string" + }, + "scan_count": { + "default": 10, + "description": "The number of keys to return in Redis SCAN calls.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "minLength": 0, + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "auth": { + "minLength": 0, + "translate_backwards": [ + "password" + ], + "type": "string" + }, + "namespace": { + "minLength": 0, + "translate_backwards": [ + "extra_options", + "namespace" + ], + "type": "string" + }, + "scan_count": { + "translate_backwards": [ + "extra_options", + "scan_count" + ], + "type": "integer" + }, + "ssl_server_name": { + "translate_backwards": [ + "server_name" + ], + "type": "string" + } + }, + "type": "object" + }, + "shm": { + "properties": { + "shm_name": { + "default": "kong", + "description": "Name of shared memory zone used for Kong API gateway storage", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "vault": { + "properties": { + "auth_method": { + "default": "token", + "description": "Auth Method, default to token, can be 'token' or 'kubernetes'.", + "enum": [ + "kubernetes", + "token" + ], + "type": "string" + }, + "auth_path": { + "description": "Vault's authentication path to use.", + "type": "string" + }, + "auth_role": { + "description": "The role to try and assign.", + "type": "string" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https": { + "default": false, + "description": "Boolean representation of https.", + "type": "boolean" + }, + "jwt_path": { + "description": "The path to the JWT.", + "type": "string" + }, + "kv_path": { + "description": "KV prefix path.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + }, + "tls_server_name": { + "description": "SNI used in request, default to host if omitted.", + "type": "string" + }, + "tls_verify": { + "default": true, + "description": "Turn on TLS verification.", + "type": "boolean" + }, + "token": { + "description": "Consul ACL token.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "tos_accepted": { + "default": false, + "description": "If you are using Let's Encrypt, you must set this to `true` to agree the terms of service.", + "type": "boolean" + } + }, + "required": [ + "account_email" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/acme/3.8.json b/json_schemas/acme/3.8.json new file mode 100644 index 00000000..1b81dd03 --- /dev/null +++ b/json_schemas/acme/3.8.json @@ -0,0 +1,386 @@ +{ + "properties": { + "config": { + "properties": { + "account_email": { + "description": "The account identifier. Can be reused in a different plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "pattern": "[a-zA-Z0-9]*[!-/:-@[-`{-~]*@+[a-zA-Z0-9]*%.?[a-zA-Z0-9]*", + "type": "string" + }, + "account_key": { + "description": "The private key associated with the account.", + "properties": { + "key_id": { + "description": "The Key ID.", + "type": "string" + }, + "key_set": { + "description": "The ID of the key set to associate the Key ID with.", + "type": "string" + } + }, + "required": [ + "key_id" + ], + "type": "object" + }, + "allow_any_domain": { + "default": false, + "description": "If set to `true`, the plugin allows all domains and ignores any values in the `domains` list.", + "type": "boolean" + }, + "api_uri": { + "default": "https://acme-v02.api.letsencrypt.org/directory", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "cert_type": { + "default": "rsa", + "description": "The certificate type to create. The possible values are `'rsa'` for RSA certificate or `'ecc'` for EC certificate.", + "enum": [ + "ecc", + "rsa" + ], + "type": "string" + }, + "domains": { + "description": "An array of strings representing hosts. A valid host is a string containing one or more labels separated by periods, with at most one wildcard label ('*')", + "items": { + "match_all": { + "pattern": "^[^*]*%*?[^*]*$" + }, + "match_any": { + "patterns": [ + "%.%*$", + "^%*%.", + "^[^*]*$" + ] + }, + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "eab_hmac_key": { + "description": "External account binding (EAB) base64-encoded URL string of the HMAC key. You usually don't need to set this unless it is explicitly required by the CA.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "eab_kid": { + "description": "External account binding (EAB) key id. You usually don't need to set this unless it is explicitly required by the CA.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "enable_ipv4_common_name": { + "default": true, + "description": "A boolean value that controls whether to include the IPv4 address in the common name field of generated certificates.", + "type": "boolean" + }, + "fail_backoff_minutes": { + "default": 5, + "description": "Minutes to wait for each domain that fails to create a certificate. This applies to both a\nnew certificate and a renewal certificate.", + "type": "number" + }, + "preferred_chain": { + "description": "A string value that specifies the preferred certificate chain to use when generating certificates.", + "type": "string" + }, + "renew_threshold_days": { + "default": 14, + "description": "Days remaining to renew the certificate before it expires.", + "type": "number" + }, + "rsa_key_size": { + "default": 4096, + "description": "RSA private key size for the certificate. The possible values are 2048, 3072, or 4096.", + "enum": [ + 2048, + 3072, + 4096 + ], + "type": "integer" + }, + "storage": { + "default": "shm", + "description": "The backend storage type to use. The possible values are `'kong'`, `'shm'`, `'redis'`, `'consul'`, or `'vault'`. In DB-less mode, `'kong'` storage is unavailable. Note that `'shm'` storage does not persist during Kong restarts and does not work for Kong running on different machines, so consider using one of `'kong'`, `'redis'`, `'consul'`, or `'vault'` in production. Please refer to the Hybrid Mode sections below as well.", + "enum": [ + "consul", + "kong", + "redis", + "shm", + "vault" + ], + "type": "string" + }, + "storage_config": { + "properties": { + "consul": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https": { + "default": false, + "description": "Boolean representation of https.", + "type": "boolean" + }, + "kv_path": { + "description": "KV prefix path.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + }, + "token": { + "description": "Consul ACL token.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "kong": { + "additionalProperties": true, + "properties": { + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "extra_options": { + "description": "Custom ACME Redis options", + "properties": { + "namespace": { + "default": "", + "description": "A namespace to prepend to all keys stored in Redis.", + "minLength": 0, + "type": "string" + }, + "scan_count": { + "default": 10, + "description": "The number of keys to return in Redis SCAN calls.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "minLength": 0, + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "auth": { + "minLength": 0, + "translate_backwards": [ + "password" + ], + "type": "string" + }, + "namespace": { + "minLength": 0, + "translate_backwards": [ + "extra_options", + "namespace" + ], + "type": "string" + }, + "scan_count": { + "translate_backwards": [ + "extra_options", + "scan_count" + ], + "type": "integer" + }, + "ssl_server_name": { + "translate_backwards": [ + "server_name" + ], + "type": "string" + } + }, + "type": "object" + }, + "shm": { + "properties": { + "shm_name": { + "default": "kong", + "description": "Name of shared memory zone used for Kong API gateway storage", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "vault": { + "properties": { + "auth_method": { + "default": "token", + "description": "Auth Method, default to token, can be 'token' or 'kubernetes'.", + "enum": [ + "kubernetes", + "token" + ], + "type": "string" + }, + "auth_path": { + "description": "Vault's authentication path to use.", + "type": "string" + }, + "auth_role": { + "description": "The role to try and assign.", + "type": "string" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https": { + "default": false, + "description": "Boolean representation of https.", + "type": "boolean" + }, + "jwt_path": { + "description": "The path to the JWT.", + "type": "string" + }, + "kv_path": { + "description": "KV prefix path.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + }, + "tls_server_name": { + "description": "SNI used in request, default to host if omitted.", + "type": "string" + }, + "tls_verify": { + "default": true, + "description": "Turn on TLS verification.", + "type": "boolean" + }, + "token": { + "description": "Consul ACL token.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "tos_accepted": { + "default": false, + "description": "If you are using Let's Encrypt, you must set this to `true` to agree the terms of service.", + "type": "boolean" + } + }, + "required": [ + "account_email" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/acme/3.9.json b/json_schemas/acme/3.9.json new file mode 100644 index 00000000..0ed7b8ad --- /dev/null +++ b/json_schemas/acme/3.9.json @@ -0,0 +1,372 @@ +{ + "properties": { + "config": { + "properties": { + "account_email": { + "description": "The account identifier. Can be reused in a different plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "pattern": "[a-zA-Z0-9]*[!-/:-@[-`{-~]*@+[a-zA-Z0-9]*%.?[a-zA-Z0-9]*", + "type": "string" + }, + "account_key": { + "description": "The private key associated with the account.", + "properties": { + "key_id": { + "description": "The Key ID.", + "type": "string" + }, + "key_set": { + "description": "The ID of the key set to associate the Key ID with.", + "type": "string" + } + }, + "required": [ + "key_id" + ], + "type": "object" + }, + "allow_any_domain": { + "default": false, + "description": "If set to `true`, the plugin allows all domains and ignores any values in the `domains` list.", + "type": "boolean" + }, + "api_uri": { + "default": "https://acme-v02.api.letsencrypt.org/directory", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "cert_type": { + "default": "rsa", + "description": "The certificate type to create. The possible values are `rsa` for RSA certificate or `ecc` for EC certificate.", + "enum": [ + "ecc", + "rsa" + ], + "type": "string" + }, + "domains": { + "description": "An array of strings representing hosts. A valid host is a string containing one or more labels separated by periods, with at most one wildcard label ('*')", + "items": { + "match_all": { + "pattern": "^[^*]*%*?[^*]*$" + }, + "match_any": { + "patterns": [ + "%.%*$", + "^%*%.", + "^[^*]*$" + ] + }, + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "eab_hmac_key": { + "description": "External account binding (EAB) base64-encoded URL string of the HMAC key. You usually don't need to set this unless it is explicitly required by the CA.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "eab_kid": { + "description": "External account binding (EAB) key id. You usually don't need to set this unless it is explicitly required by the CA.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "enable_ipv4_common_name": { + "default": true, + "description": "A boolean value that controls whether to include the IPv4 address in the common name field of generated certificates.", + "type": "boolean" + }, + "fail_backoff_minutes": { + "default": 5, + "description": "Minutes to wait for each domain that fails to create a certificate. This applies to both a\nnew certificate and a renewal certificate.", + "type": "number" + }, + "preferred_chain": { + "description": "A string value that specifies the preferred certificate chain to use when generating certificates.", + "type": "string" + }, + "renew_threshold_days": { + "default": 14, + "description": "Days remaining to renew the certificate before it expires.", + "type": "number" + }, + "rsa_key_size": { + "default": 4096, + "description": "RSA private key size for the certificate. The possible values are 2048, 3072, or 4096.", + "enum": [ + 2048, + 3072, + 4096 + ], + "type": "integer" + }, + "storage": { + "default": "shm", + "description": "The backend storage type to use. In DB-less mode and Konnect, `kong` storage is unavailable. In hybrid mode and Konnect, `shm` storage is unavailable. `shm` storage does not persist during Kong restarts and does not work for Kong running on different machines, so consider using one of `kong`, `redis`, `consul`, or `vault` in production.", + "enum": [ + "consul", + "kong", + "redis", + "shm", + "vault" + ], + "type": "string" + }, + "storage_config": { + "properties": { + "consul": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https": { + "default": false, + "description": "Boolean representation of https.", + "type": "boolean" + }, + "kv_path": { + "description": "KV prefix path.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + }, + "token": { + "description": "Consul ACL token.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "kong": { + "additionalProperties": true, + "properties": { + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "extra_options": { + "description": "Custom ACME Redis options", + "properties": { + "namespace": { + "default": "", + "description": "A namespace to prepend to all keys stored in Redis.", + "minLength": 0, + "type": "string" + }, + "scan_count": { + "default": 10, + "description": "The number of keys to return in Redis SCAN calls.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "minLength": 0, + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "auth": { + "minLength": 0, + "type": "string" + }, + "namespace": { + "minLength": 0, + "type": "string" + }, + "scan_count": { + "type": "integer" + }, + "ssl_server_name": { + "type": "string" + } + }, + "type": "object" + }, + "shm": { + "properties": { + "shm_name": { + "default": "kong", + "description": "Name of shared memory zone used for Kong API gateway storage", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "vault": { + "properties": { + "auth_method": { + "default": "token", + "description": "Auth Method, default to token, can be 'token' or 'kubernetes'.", + "enum": [ + "kubernetes", + "token" + ], + "type": "string" + }, + "auth_path": { + "description": "Vault's authentication path to use.", + "type": "string" + }, + "auth_role": { + "description": "The role to try and assign.", + "type": "string" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https": { + "default": false, + "description": "Boolean representation of https.", + "type": "boolean" + }, + "jwt_path": { + "description": "The path to the JWT.", + "type": "string" + }, + "kv_path": { + "description": "KV prefix path.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + }, + "tls_server_name": { + "description": "SNI used in request, default to host if omitted.", + "type": "string" + }, + "tls_verify": { + "default": true, + "description": "Turn on TLS verification.", + "type": "boolean" + }, + "token": { + "description": "Consul ACL token.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "tos_accepted": { + "default": false, + "description": "If you are using Let's Encrypt, you must set this to `true` to agree the terms of service.", + "type": "boolean" + } + }, + "required": [ + "account_email" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-aws-guardrails/3.11.json b/json_schemas/ai-aws-guardrails/3.11.json new file mode 100644 index 00000000..1e73906c --- /dev/null +++ b/json_schemas/ai-aws-guardrails/3.11.json @@ -0,0 +1,135 @@ +{ + "properties": { + "config": { + "properties": { + "aws_access_key_id": { + "description": "The AWS access key ID to use for authentication\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_region": { + "description": "The AWS region to use for the Bedrock API", + "type": "string" + }, + "aws_secret_access_key": { + "description": "The AWS secret access key to use for authentication\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "guarding_mode": { + "default": "INPUT", + "description": "The guardrail mode to use for the request", + "enum": [ + "BOTH", + "INPUT", + "OUTPUT" + ], + "type": "string" + }, + "guardrails_id": { + "description": "The guardrail identifier used in the request to apply the guardrail", + "type": "string" + }, + "guardrails_version": { + "description": "The guardrail version used in the request to apply the guardrail", + "type": "string" + }, + "response_buffer_size": { + "default": 100, + "description": "The amount of token receiving from upstream to be buffered before sending to the guardrails service. This only applies to the response content guard.", + "type": "number" + }, + "stop_on_error": { + "default": true, + "description": "Stop processing if an error occurs", + "type": "boolean" + }, + "text_source": { + "default": "concatenate_all_content", + "description": "Select where to pick the 'text' for the Content Guard Services request.", + "enum": [ + "concatenate_all_content", + "concatenate_user_content" + ], + "type": "string" + }, + "timeout": { + "default": 10000, + "description": "Connection timeout with the bedrock service", + "type": "number" + } + }, + "required": [ + "aws_region", + "guardrails_id", + "guardrails_version" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-aws-guardrails/3.12.json b/json_schemas/ai-aws-guardrails/3.12.json new file mode 100644 index 00000000..32a546f1 --- /dev/null +++ b/json_schemas/ai-aws-guardrails/3.12.json @@ -0,0 +1,147 @@ +{ + "properties": { + "config": { + "properties": { + "aws_access_key_id": { + "description": "The AWS access key ID to use for authentication\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_assume_role_arn": { + "description": "The target AWS IAM role ARN used to access the guardrails service", + "type": "string" + }, + "aws_region": { + "description": "The AWS region to use for the Bedrock API", + "type": "string" + }, + "aws_role_session_name": { + "description": "The identifier of the assumed role session", + "type": "string" + }, + "aws_secret_access_key": { + "description": "The AWS secret access key to use for authentication\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "Override the STS endpoint URL when assuming a different role", + "type": "string" + }, + "guarding_mode": { + "default": "INPUT", + "description": "The guardrail mode to use for the request", + "enum": [ + "BOTH", + "INPUT", + "OUTPUT" + ], + "type": "string" + }, + "guardrails_id": { + "description": "The guardrail identifier used in the request to apply the guardrail", + "type": "string" + }, + "guardrails_version": { + "description": "The guardrail version used in the request to apply the guardrail", + "type": "string" + }, + "response_buffer_size": { + "default": 100, + "description": "The amount of bytes receiving from upstream to be buffered before sending to the guardrails service. This only applies to the response content guard.", + "type": "number" + }, + "stop_on_error": { + "default": true, + "description": "Stop processing if an error occurs", + "type": "boolean" + }, + "text_source": { + "default": "concatenate_all_content", + "description": "Select where to pick the 'text' for the Content Guard Services request.", + "enum": [ + "concatenate_all_content", + "concatenate_user_content" + ], + "type": "string" + }, + "timeout": { + "default": 10000, + "description": "Connection timeout with the bedrock service", + "type": "number" + } + }, + "required": [ + "aws_region", + "guardrails_id", + "guardrails_version" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-azure-content-safety/3.10.json b/json_schemas/ai-azure-content-safety/3.10.json new file mode 100644 index 00000000..4daed24a --- /dev/null +++ b/json_schemas/ai-azure-content-safety/3.10.json @@ -0,0 +1,151 @@ +{ + "properties": { + "config": { + "properties": { + "azure_api_version": { + "default": "2023-10-01", + "description": "Sets the ?api-version URL parameter, used for defining the Azure Content Services interchange format.", + "minLength": 1, + "type": "string" + }, + "azure_client_id": { + "description": "If `azure_use_managed_identity` is true, set the client ID if required.", + "type": "string" + }, + "azure_client_secret": { + "description": "If `azure_use_managed_identity` is true, set the client secret if required.", + "type": "string" + }, + "azure_tenant_id": { + "description": "If `azure_use_managed_identity` is true, set the tenant ID if required.", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "If checked, uses (if set) `azure_client_id`, `azure_client_secret`, and/or `azure_tenant_id` for Azure authentication, via Managed or User-assigned identity", + "type": "boolean" + }, + "blocklist_names": { + "description": "Use these configured blocklists (in Azure Content Services) when inspecting content.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "categories": { + "description": "Array of categories, and their thresholds, to measure on.", + "items": { + "properties": { + "name": { + "type": "string" + }, + "rejection_level": { + "type": "integer" + } + }, + "required": [ + "name", + "rejection_level" + ], + "type": "object" + }, + "type": "array" + }, + "content_safety_key": { + "description": "If `azure_use_managed_identity` is true, set the API key to call Content Safety.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "content_safety_url": { + "description": "Full URL, inc protocol, of the Azure Content Safety instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "halt_on_blocklist_hit": { + "default": true, + "description": "Tells Azure to reject the request if any blocklist filter is hit.", + "type": "boolean" + }, + "output_type": { + "default": "FourSeverityLevels", + "description": "See https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter#content-filtering-categories", + "enum": [ + "EightSeverityLevels", + "FourSeverityLevels" + ], + "type": "string" + }, + "reveal_failure_reason": { + "default": true, + "description": "Set true to tell the caller why their request was rejected, if so.", + "type": "boolean" + }, + "text_source": { + "default": "concatenate_all_content", + "description": "Select where to pick the 'text' for the Azure Content Services request.", + "enum": [ + "concatenate_all_content", + "concatenate_user_content" + ], + "type": "string" + } + }, + "required": [ + "content_safety_url" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-azure-content-safety/3.11.json b/json_schemas/ai-azure-content-safety/3.11.json new file mode 100644 index 00000000..fbbf79e2 --- /dev/null +++ b/json_schemas/ai-azure-content-safety/3.11.json @@ -0,0 +1,143 @@ +{ + "properties": { + "config": { + "properties": { + "azure_api_version": { + "default": "2023-10-01", + "description": "Sets the ?api-version URL parameter, used for defining the Azure Content Services interchange format.", + "minLength": 1, + "type": "string" + }, + "azure_client_id": { + "description": "If `azure_use_managed_identity` is true, set the client ID if required.", + "type": "string" + }, + "azure_client_secret": { + "description": "If `azure_use_managed_identity` is true, set the client secret if required.", + "type": "string" + }, + "azure_tenant_id": { + "description": "If `azure_use_managed_identity` is true, set the tenant ID if required.", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "If checked, uses (if set) `azure_client_id`, `azure_client_secret`, and/or `azure_tenant_id` for Azure authentication, via Managed or User-assigned identity", + "type": "boolean" + }, + "blocklist_names": { + "description": "Use these configured blocklists (in Azure Content Services) when inspecting content.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "categories": { + "description": "Array of categories, and their thresholds, to measure on.", + "items": { + "properties": { + "name": { + "type": "string" + }, + "rejection_level": { + "type": "integer" + } + }, + "required": [ + "name", + "rejection_level" + ], + "type": "object" + }, + "type": "array" + }, + "content_safety_key": { + "description": "If `azure_use_managed_identity` is true, set the API key to call Content Safety.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "content_safety_url": { + "description": "Full URL, inc protocol, of the Azure Content Safety instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "halt_on_blocklist_hit": { + "default": true, + "description": "Tells Azure to reject the request if any blocklist filter is hit.", + "type": "boolean" + }, + "output_type": { + "default": "FourSeverityLevels", + "description": "See https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter#content-filtering-categories", + "enum": [ + "EightSeverityLevels", + "FourSeverityLevels" + ], + "type": "string" + }, + "reveal_failure_reason": { + "default": true, + "description": "Set true to tell the caller why their request was rejected, if so.", + "type": "boolean" + }, + "text_source": { + "default": "concatenate_all_content", + "description": "Select where to pick the 'text' for the Azure Content Services request.", + "enum": [ + "concatenate_all_content", + "concatenate_user_content" + ], + "type": "string" + } + }, + "required": [ + "content_safety_url" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-azure-content-safety/3.12.json b/json_schemas/ai-azure-content-safety/3.12.json new file mode 100644 index 00000000..78bd41e2 --- /dev/null +++ b/json_schemas/ai-azure-content-safety/3.12.json @@ -0,0 +1,163 @@ +{ + "properties": { + "config": { + "properties": { + "azure_api_version": { + "default": "2023-10-01", + "description": "Sets the ?api-version URL parameter, used for defining the Azure Content Services interchange format.", + "minLength": 1, + "type": "string" + }, + "azure_client_id": { + "description": "If `azure_use_managed_identity` is true, set the client ID if required.", + "type": "string" + }, + "azure_client_secret": { + "description": "If `azure_use_managed_identity` is true, set the client secret if required.", + "type": "string" + }, + "azure_tenant_id": { + "description": "If `azure_use_managed_identity` is true, set the tenant ID if required.", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "If checked, uses (if set) `azure_client_id`, `azure_client_secret`, and/or `azure_tenant_id` for Azure authentication, via Managed or User-assigned identity", + "type": "boolean" + }, + "blocklist_names": { + "description": "Use these configured blocklists (in Azure Content Services) when inspecting content.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "categories": { + "description": "Array of categories, and their thresholds, to measure on.", + "items": { + "properties": { + "name": { + "type": "string" + }, + "rejection_level": { + "type": "integer" + } + }, + "required": [ + "name", + "rejection_level" + ], + "type": "object" + }, + "type": "array" + }, + "content_safety_key": { + "description": "If `azure_use_managed_identity` is true, set the API key to call Content Safety.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "content_safety_url": { + "description": "Full URL, inc protocol, of the Azure Content Safety instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "guarding_mode": { + "default": "INPUT", + "description": "The guard mode to use for the request", + "enum": [ + "BOTH", + "INPUT", + "OUTPUT" + ], + "type": "string" + }, + "halt_on_blocklist_hit": { + "default": true, + "description": "Tells Azure to reject the request if any blocklist filter is hit.", + "type": "boolean" + }, + "output_type": { + "default": "FourSeverityLevels", + "description": "See https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter#content-filtering-categories", + "enum": [ + "EightSeverityLevels", + "FourSeverityLevels" + ], + "type": "string" + }, + "response_buffer_size": { + "default": 100, + "description": "The amount of bytes receiving from upstream to be buffered before sending to the guardrails service. This only applies to the response content guard.", + "type": "number" + }, + "reveal_failure_reason": { + "default": true, + "description": "Set true to tell the caller why their request was rejected, if so.", + "type": "boolean" + }, + "stop_on_error": { + "default": true, + "description": "Stop processing if an error occurs", + "type": "boolean" + }, + "text_source": { + "default": "concatenate_all_content", + "description": "Select where to pick the 'text' for the Azure Content Services request.", + "enum": [ + "concatenate_all_content", + "concatenate_user_content" + ], + "type": "string" + } + }, + "required": [ + "content_safety_url" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-azure-content-safety/3.7.json b/json_schemas/ai-azure-content-safety/3.7.json new file mode 100644 index 00000000..012ff015 --- /dev/null +++ b/json_schemas/ai-azure-content-safety/3.7.json @@ -0,0 +1,151 @@ +{ + "properties": { + "config": { + "properties": { + "azure_api_version": { + "default": "2023-10-01", + "description": "Sets the ?api-version URL parameter, used for defining the Azure Content Services interchange format.", + "minLength": 1, + "type": "string" + }, + "azure_client_id": { + "description": "If `azure_use_managed_identity` is true, set the client ID if required.", + "type": "string" + }, + "azure_client_secret": { + "description": "If `azure_use_managed_identity` is true, set the client secret if required.", + "type": "string" + }, + "azure_tenant_id": { + "description": "If `azure_use_managed_identity` is true, set the tenant ID if required.", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "If checked, uses (if set) `azure_client_id`, `azure_client_secret`, and/or `azure_tenant_id` for Azure authentication, via Managed or User-assigned identity", + "type": "boolean" + }, + "blocklist_names": { + "description": "Use these configured blocklists (in Azure Content Services) when inspecting content.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "categories": { + "description": "Array of categories, and their thresholds, to measure on.", + "items": { + "properties": { + "name": { + "type": "string" + }, + "rejection_level": { + "type": "integer" + } + }, + "required": [ + "name", + "rejection_level" + ], + "type": "object" + }, + "type": "array" + }, + "content_safety_key": { + "description": "If `azure_use_managed_identity` is true, set the API key to call Content Safety.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "content_safety_url": { + "description": "Full URL, inc protocol, of the Azure Content Safety instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "halt_on_blocklist_hit": { + "default": true, + "description": "Tells Azure to reject the request if any blocklist filter is hit.", + "type": "boolean" + }, + "output_type": { + "default": "FourSeverityLevels", + "description": "See https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter#content-filtering-categories", + "enum": [ + "EightSeverityLevels", + "FourSeverityLevels" + ], + "type": "string" + }, + "reveal_failure_reason": { + "default": true, + "description": "Set true to tell the caller why their request was rejected, if so.", + "type": "boolean" + }, + "text_source": { + "default": "concatenate_all_content", + "description": "Select where to pick the 'text' for the Azure Content Services request.", + "enum": [ + "concatenate_all_content", + "concatenate_user_content" + ], + "type": "string" + } + }, + "required": [ + "content_safety_url" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-azure-content-safety/3.8.json b/json_schemas/ai-azure-content-safety/3.8.json new file mode 100644 index 00000000..012ff015 --- /dev/null +++ b/json_schemas/ai-azure-content-safety/3.8.json @@ -0,0 +1,151 @@ +{ + "properties": { + "config": { + "properties": { + "azure_api_version": { + "default": "2023-10-01", + "description": "Sets the ?api-version URL parameter, used for defining the Azure Content Services interchange format.", + "minLength": 1, + "type": "string" + }, + "azure_client_id": { + "description": "If `azure_use_managed_identity` is true, set the client ID if required.", + "type": "string" + }, + "azure_client_secret": { + "description": "If `azure_use_managed_identity` is true, set the client secret if required.", + "type": "string" + }, + "azure_tenant_id": { + "description": "If `azure_use_managed_identity` is true, set the tenant ID if required.", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "If checked, uses (if set) `azure_client_id`, `azure_client_secret`, and/or `azure_tenant_id` for Azure authentication, via Managed or User-assigned identity", + "type": "boolean" + }, + "blocklist_names": { + "description": "Use these configured blocklists (in Azure Content Services) when inspecting content.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "categories": { + "description": "Array of categories, and their thresholds, to measure on.", + "items": { + "properties": { + "name": { + "type": "string" + }, + "rejection_level": { + "type": "integer" + } + }, + "required": [ + "name", + "rejection_level" + ], + "type": "object" + }, + "type": "array" + }, + "content_safety_key": { + "description": "If `azure_use_managed_identity` is true, set the API key to call Content Safety.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "content_safety_url": { + "description": "Full URL, inc protocol, of the Azure Content Safety instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "halt_on_blocklist_hit": { + "default": true, + "description": "Tells Azure to reject the request if any blocklist filter is hit.", + "type": "boolean" + }, + "output_type": { + "default": "FourSeverityLevels", + "description": "See https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter#content-filtering-categories", + "enum": [ + "EightSeverityLevels", + "FourSeverityLevels" + ], + "type": "string" + }, + "reveal_failure_reason": { + "default": true, + "description": "Set true to tell the caller why their request was rejected, if so.", + "type": "boolean" + }, + "text_source": { + "default": "concatenate_all_content", + "description": "Select where to pick the 'text' for the Azure Content Services request.", + "enum": [ + "concatenate_all_content", + "concatenate_user_content" + ], + "type": "string" + } + }, + "required": [ + "content_safety_url" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-azure-content-safety/3.9.json b/json_schemas/ai-azure-content-safety/3.9.json new file mode 100644 index 00000000..012ff015 --- /dev/null +++ b/json_schemas/ai-azure-content-safety/3.9.json @@ -0,0 +1,151 @@ +{ + "properties": { + "config": { + "properties": { + "azure_api_version": { + "default": "2023-10-01", + "description": "Sets the ?api-version URL parameter, used for defining the Azure Content Services interchange format.", + "minLength": 1, + "type": "string" + }, + "azure_client_id": { + "description": "If `azure_use_managed_identity` is true, set the client ID if required.", + "type": "string" + }, + "azure_client_secret": { + "description": "If `azure_use_managed_identity` is true, set the client secret if required.", + "type": "string" + }, + "azure_tenant_id": { + "description": "If `azure_use_managed_identity` is true, set the tenant ID if required.", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "If checked, uses (if set) `azure_client_id`, `azure_client_secret`, and/or `azure_tenant_id` for Azure authentication, via Managed or User-assigned identity", + "type": "boolean" + }, + "blocklist_names": { + "description": "Use these configured blocklists (in Azure Content Services) when inspecting content.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "categories": { + "description": "Array of categories, and their thresholds, to measure on.", + "items": { + "properties": { + "name": { + "type": "string" + }, + "rejection_level": { + "type": "integer" + } + }, + "required": [ + "name", + "rejection_level" + ], + "type": "object" + }, + "type": "array" + }, + "content_safety_key": { + "description": "If `azure_use_managed_identity` is true, set the API key to call Content Safety.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "content_safety_url": { + "description": "Full URL, inc protocol, of the Azure Content Safety instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "halt_on_blocklist_hit": { + "default": true, + "description": "Tells Azure to reject the request if any blocklist filter is hit.", + "type": "boolean" + }, + "output_type": { + "default": "FourSeverityLevels", + "description": "See https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter#content-filtering-categories", + "enum": [ + "EightSeverityLevels", + "FourSeverityLevels" + ], + "type": "string" + }, + "reveal_failure_reason": { + "default": true, + "description": "Set true to tell the caller why their request was rejected, if so.", + "type": "boolean" + }, + "text_source": { + "default": "concatenate_all_content", + "description": "Select where to pick the 'text' for the Azure Content Services request.", + "enum": [ + "concatenate_all_content", + "concatenate_user_content" + ], + "type": "string" + } + }, + "required": [ + "content_safety_url" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-mcp/3.12.json b/json_schemas/ai-mcp/3.12.json new file mode 100644 index 00000000..5d9d3e7e --- /dev/null +++ b/json_schemas/ai-mcp/3.12.json @@ -0,0 +1,187 @@ +{ + "properties": { + "config": { + "properties": { + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled, will add mcp metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be handled as MCP request.", + "minimum": 0, + "type": "integer" + }, + "server": { + "properties": { + "enabled": { + "default": true, + "description": "Enable or disable the MCP server. If disabled, the server will not be exported.", + "type": "boolean" + }, + "tag": { + "description": "The tag of the MCP server. This is used to filter the exported MCP tools. The field should contain exactly one tag. ", + "type": "string" + }, + "timeout": { + "default": 10000, + "description": "The timeout for calling the tools in milliseconds.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "tools": { + "items": { + "properties": { + "annotations": { + "properties": { + "destructive_hint": { + "description": "If true, the tool may perform destructive updates", + "type": "boolean" + }, + "idempotent_hint": { + "description": "If true, repeated calls with same args have no additional effect", + "type": "boolean" + }, + "open_world_hint": { + "description": "If true, tool interacts with external entities", + "type": "boolean" + }, + "read_only_hint": { + "description": "If true, the tool does not modify its environment", + "type": "boolean" + }, + "title": { + "description": "Human-readable title for the tool", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "description": { + "description": "The description of the MCP tool. This is used to provide information about the tool's functionality and usage.", + "type": "string" + }, + "host": { + "description": "The host of the exported API. By default, Kong will extract the host from API configuration. If the configured host is wildcard, this field is required.", + "type": "string" + }, + "method": { + "description": "The method of the exported API. By default, Kong will extract the method from API configuration. If the configured method is not exactly matched, this field is required.", + "enum": [ + "DELETE", + "GET", + "PATCH", + "POST", + "PUT" + ], + "type": "string" + }, + "parameters": { + "description": "The API parameters specification defined in OpenAPI. For example, '[{\"name\": \"city\", \"in\": \"query\", \"description\": \"Name of the city to get the weather for\", \"required\": true, \"schema\": {\"type\": \"string\"}}]'.See https://swagger.io/docs/specification/v3_0/describing-parameters/ for more details.", + "json_schema": { + "inline": { + "type": [ + "array", + "null" + ] + } + }, + "type": "json" + }, + "path": { + "description": "The path of the exported API. By default, Kong will extract the path from API configuration. If the configured path is not exactly matched, this field is required.", + "type": "string" + }, + "request_body": { + "description": "The API requestBody specification defined in OpenAPI. For example, '{\"content\":{\"application/x-www-form-urlencoded\":{\"schema\":{\"type\":\"object\",\"properties\":{\"color\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}}}}'.See https://swagger.io/docs/specification/v3_0/describing-request-body/describing-request-body/ for more details.", + "json_schema": { + "inline": { + "type": [ + "null", + "object" + ] + } + }, + "type": "json" + }, + "scheme": { + "description": "The scheme of the exported API. By default, Kong will extract the scheme from API configuration. If the configured scheme is not expected, this field can be used to override it.", + "enum": [ + "http", + "https" + ], + "type": "string" + } + }, + "required": [ + "description" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-compressor/.gitkeep b/json_schemas/ai-prompt-compressor/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/json_schemas/ai-prompt-compressor/3.11.json b/json_schemas/ai-prompt-compressor/3.11.json new file mode 100644 index 00000000..b5aa62c2 --- /dev/null +++ b/json_schemas/ai-prompt-compressor/3.11.json @@ -0,0 +1,151 @@ +{ + "properties": { + "config": { + "properties": { + "compression_ranges": { + "description": "What value to be used to compress with. The 'value' is interpreted as rate or target_token depending on compressor_type.", + "items": { + "properties": { + "max_tokens": { + "type": "integer" + }, + "min_tokens": { + "type": "integer" + }, + "value": { + "type": "number" + } + }, + "required": [ + "max_tokens", + "min_tokens", + "value" + ], + "type": "object" + }, + "type": "array" + }, + "compressor_type": { + "default": "rate", + "description": "What compression type to use to compress with", + "enum": [ + "rate", + "target_token" + ], + "type": "string" + }, + "compressor_url": { + "default": "http://localhost:8080", + "description": "The url of the compressor", + "type": "string" + }, + "keepalive_timeout": { + "default": 60000, + "description": "The keepalive timeout for the established http connnection", + "type": "number" + }, + "log_text_data": { + "default": false, + "description": "Log the text data", + "type": "boolean" + }, + "message_type": { + "default": [ + "user" + ], + "items": { + "enum": [ + "assistant", + "system", + "user" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "stop_on_error": { + "default": true, + "description": "Stop processing if an error occurs", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Connection timeout with the compressor", + "type": "number" + } + }, + "required": [ + "compression_ranges" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-compressor/3.12.json b/json_schemas/ai-prompt-compressor/3.12.json new file mode 100644 index 00000000..b5aa62c2 --- /dev/null +++ b/json_schemas/ai-prompt-compressor/3.12.json @@ -0,0 +1,151 @@ +{ + "properties": { + "config": { + "properties": { + "compression_ranges": { + "description": "What value to be used to compress with. The 'value' is interpreted as rate or target_token depending on compressor_type.", + "items": { + "properties": { + "max_tokens": { + "type": "integer" + }, + "min_tokens": { + "type": "integer" + }, + "value": { + "type": "number" + } + }, + "required": [ + "max_tokens", + "min_tokens", + "value" + ], + "type": "object" + }, + "type": "array" + }, + "compressor_type": { + "default": "rate", + "description": "What compression type to use to compress with", + "enum": [ + "rate", + "target_token" + ], + "type": "string" + }, + "compressor_url": { + "default": "http://localhost:8080", + "description": "The url of the compressor", + "type": "string" + }, + "keepalive_timeout": { + "default": 60000, + "description": "The keepalive timeout for the established http connnection", + "type": "number" + }, + "log_text_data": { + "default": false, + "description": "Log the text data", + "type": "boolean" + }, + "message_type": { + "default": [ + "user" + ], + "items": { + "enum": [ + "assistant", + "system", + "user" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "stop_on_error": { + "default": true, + "description": "Stop processing if an error occurs", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Connection timeout with the compressor", + "type": "number" + } + }, + "required": [ + "compression_ranges" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-decorator/3.10.json b/json_schemas/ai-prompt-decorator/3.10.json new file mode 100644 index 00000000..0bf6f29f --- /dev/null +++ b/json_schemas/ai-prompt-decorator/3.10.json @@ -0,0 +1,167 @@ +{ + "properties": { + "config": { + "properties": { + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "gemini", + "openai" + ], + "type": "string" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + }, + "prompts": { + "properties": { + "append": { + "description": "Insert chat messages at the end of the chat message array. This array preserves exact order when adding messages.", + "items": { + "properties": { + "content": { + "maxLength": 500, + "minLength": 1, + "type": "string" + }, + "role": { + "default": "system", + "enum": [ + "assistant", + "system", + "user" + ], + "type": "string" + } + }, + "required": [ + "content" + ], + "type": "object" + }, + "maxLength": 15, + "type": "array" + }, + "prepend": { + "description": "Insert chat messages at the beginning of the chat message array. This array preserves exact order when adding messages.", + "items": { + "properties": { + "content": { + "maxLength": 500, + "minLength": 1, + "type": "string" + }, + "role": { + "default": "system", + "enum": [ + "assistant", + "system", + "user" + ], + "type": "string" + } + }, + "required": [ + "content" + ], + "type": "object" + }, + "maxLength": 15, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-decorator/3.11.json b/json_schemas/ai-prompt-decorator/3.11.json new file mode 100644 index 00000000..4701f447 --- /dev/null +++ b/json_schemas/ai-prompt-decorator/3.11.json @@ -0,0 +1,153 @@ +{ + "properties": { + "config": { + "properties": { + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "cohere", + "gemini", + "huggingface", + "openai" + ], + "type": "string" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "minimum": 0, + "type": "integer" + }, + "prompts": { + "properties": { + "append": { + "description": "Insert chat messages at the end of the chat message array. This array preserves exact order when adding messages.", + "items": { + "properties": { + "content": { + "maxLength": 100000, + "minLength": 1, + "type": "string" + }, + "role": { + "default": "system", + "enum": [ + "assistant", + "system", + "user" + ], + "type": "string" + } + }, + "required": [ + "content" + ], + "type": "object" + }, + "maxLength": 15, + "type": "array" + }, + "prepend": { + "description": "Insert chat messages at the beginning of the chat message array. This array preserves exact order when adding messages.", + "items": { + "properties": { + "content": { + "maxLength": 100000, + "minLength": 1, + "type": "string" + }, + "role": { + "default": "system", + "enum": [ + "assistant", + "system", + "user" + ], + "type": "string" + } + }, + "required": [ + "content" + ], + "type": "object" + }, + "maxLength": 15, + "type": "array" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-decorator/3.12.json b/json_schemas/ai-prompt-decorator/3.12.json new file mode 100644 index 00000000..4701f447 --- /dev/null +++ b/json_schemas/ai-prompt-decorator/3.12.json @@ -0,0 +1,153 @@ +{ + "properties": { + "config": { + "properties": { + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "cohere", + "gemini", + "huggingface", + "openai" + ], + "type": "string" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "minimum": 0, + "type": "integer" + }, + "prompts": { + "properties": { + "append": { + "description": "Insert chat messages at the end of the chat message array. This array preserves exact order when adding messages.", + "items": { + "properties": { + "content": { + "maxLength": 100000, + "minLength": 1, + "type": "string" + }, + "role": { + "default": "system", + "enum": [ + "assistant", + "system", + "user" + ], + "type": "string" + } + }, + "required": [ + "content" + ], + "type": "object" + }, + "maxLength": 15, + "type": "array" + }, + "prepend": { + "description": "Insert chat messages at the beginning of the chat message array. This array preserves exact order when adding messages.", + "items": { + "properties": { + "content": { + "maxLength": 100000, + "minLength": 1, + "type": "string" + }, + "role": { + "default": "system", + "enum": [ + "assistant", + "system", + "user" + ], + "type": "string" + } + }, + "required": [ + "content" + ], + "type": "object" + }, + "maxLength": 15, + "type": "array" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-decorator/3.7.json b/json_schemas/ai-prompt-decorator/3.7.json new file mode 100644 index 00000000..b6f1eb69 --- /dev/null +++ b/json_schemas/ai-prompt-decorator/3.7.json @@ -0,0 +1,151 @@ +{ + "properties": { + "config": { + "properties": { + "prompts": { + "properties": { + "append": { + "description": "Insert chat messages at the end of the chat message array. This array preserves exact order when adding messages.", + "items": { + "properties": { + "content": { + "maxLength": 500, + "minLength": 1, + "type": "string" + }, + "role": { + "default": "system", + "enum": [ + "assistant", + "system", + "user" + ], + "type": "string" + } + }, + "required": [ + "content" + ], + "type": "object" + }, + "maxLength": 15, + "type": "array" + }, + "prepend": { + "description": "Insert chat messages at the beginning of the chat message array. This array preserves exact order when adding messages.", + "items": { + "properties": { + "content": { + "maxLength": 500, + "minLength": 1, + "type": "string" + }, + "role": { + "default": "system", + "enum": [ + "assistant", + "system", + "user" + ], + "type": "string" + } + }, + "required": [ + "content" + ], + "type": "object" + }, + "maxLength": 15, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-decorator/3.8.json b/json_schemas/ai-prompt-decorator/3.8.json new file mode 100644 index 00000000..0559463c --- /dev/null +++ b/json_schemas/ai-prompt-decorator/3.8.json @@ -0,0 +1,157 @@ +{ + "properties": { + "config": { + "properties": { + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + }, + "prompts": { + "properties": { + "append": { + "description": "Insert chat messages at the end of the chat message array. This array preserves exact order when adding messages.", + "items": { + "properties": { + "content": { + "maxLength": 500, + "minLength": 1, + "type": "string" + }, + "role": { + "default": "system", + "enum": [ + "assistant", + "system", + "user" + ], + "type": "string" + } + }, + "required": [ + "content" + ], + "type": "object" + }, + "maxLength": 15, + "type": "array" + }, + "prepend": { + "description": "Insert chat messages at the beginning of the chat message array. This array preserves exact order when adding messages.", + "items": { + "properties": { + "content": { + "maxLength": 500, + "minLength": 1, + "type": "string" + }, + "role": { + "default": "system", + "enum": [ + "assistant", + "system", + "user" + ], + "type": "string" + } + }, + "required": [ + "content" + ], + "type": "object" + }, + "maxLength": 15, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-decorator/3.9.json b/json_schemas/ai-prompt-decorator/3.9.json new file mode 100644 index 00000000..0559463c --- /dev/null +++ b/json_schemas/ai-prompt-decorator/3.9.json @@ -0,0 +1,157 @@ +{ + "properties": { + "config": { + "properties": { + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + }, + "prompts": { + "properties": { + "append": { + "description": "Insert chat messages at the end of the chat message array. This array preserves exact order when adding messages.", + "items": { + "properties": { + "content": { + "maxLength": 500, + "minLength": 1, + "type": "string" + }, + "role": { + "default": "system", + "enum": [ + "assistant", + "system", + "user" + ], + "type": "string" + } + }, + "required": [ + "content" + ], + "type": "object" + }, + "maxLength": 15, + "type": "array" + }, + "prepend": { + "description": "Insert chat messages at the beginning of the chat message array. This array preserves exact order when adding messages.", + "items": { + "properties": { + "content": { + "maxLength": 500, + "minLength": 1, + "type": "string" + }, + "role": { + "default": "system", + "enum": [ + "assistant", + "system", + "user" + ], + "type": "string" + } + }, + "required": [ + "content" + ], + "type": "object" + }, + "maxLength": 15, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-guard/3.10.json b/json_schemas/ai-prompt-guard/3.10.json new file mode 100644 index 00000000..3f9cacf9 --- /dev/null +++ b/json_schemas/ai-prompt-guard/3.10.json @@ -0,0 +1,141 @@ +{ + "properties": { + "config": { + "properties": { + "allow_all_conversation_history": { + "default": false, + "description": "If true, will ignore all previous chat prompts from the conversation history.", + "type": "boolean" + }, + "allow_patterns": { + "description": "Array of valid regex patterns, or valid questions from the 'user' role in chat.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "maxLength": 10, + "type": "array" + }, + "deny_patterns": { + "description": "Array of invalid regex patterns, or invalid questions from the 'user' role in chat.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "maxLength": 10, + "type": "array" + }, + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "gemini", + "openai" + ], + "type": "string" + }, + "match_all_roles": { + "default": false, + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "type": "boolean" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-guard/3.11.json b/json_schemas/ai-prompt-guard/3.11.json new file mode 100644 index 00000000..b12e8fdd --- /dev/null +++ b/json_schemas/ai-prompt-guard/3.11.json @@ -0,0 +1,138 @@ +{ + "properties": { + "config": { + "properties": { + "allow_all_conversation_history": { + "default": false, + "description": "If true, will ignore all previous chat prompts from the conversation history.", + "type": "boolean" + }, + "allow_patterns": { + "description": "Array of valid regex patterns, or valid questions from the 'user' role in chat.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [], + "type": "string" + }, + "maxLength": 10, + "type": "array" + }, + "deny_patterns": { + "description": "Array of invalid regex patterns, or invalid questions from the 'user' role in chat.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [], + "type": "string" + }, + "maxLength": 10, + "type": "array" + }, + "genai_category": { + "default": "text/generation", + "description": "Generative AI category of the request", + "enum": [ + "audio/speech", + "audio/transcription", + "image/generation", + "realtime/generation", + "text/embeddings", + "text/generation" + ], + "type": "string" + }, + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "cohere", + "gemini", + "huggingface", + "openai" + ], + "type": "string" + }, + "match_all_roles": { + "default": false, + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "type": "boolean" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-guard/3.12.json b/json_schemas/ai-prompt-guard/3.12.json new file mode 100644 index 00000000..b12e8fdd --- /dev/null +++ b/json_schemas/ai-prompt-guard/3.12.json @@ -0,0 +1,138 @@ +{ + "properties": { + "config": { + "properties": { + "allow_all_conversation_history": { + "default": false, + "description": "If true, will ignore all previous chat prompts from the conversation history.", + "type": "boolean" + }, + "allow_patterns": { + "description": "Array of valid regex patterns, or valid questions from the 'user' role in chat.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [], + "type": "string" + }, + "maxLength": 10, + "type": "array" + }, + "deny_patterns": { + "description": "Array of invalid regex patterns, or invalid questions from the 'user' role in chat.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [], + "type": "string" + }, + "maxLength": 10, + "type": "array" + }, + "genai_category": { + "default": "text/generation", + "description": "Generative AI category of the request", + "enum": [ + "audio/speech", + "audio/transcription", + "image/generation", + "realtime/generation", + "text/embeddings", + "text/generation" + ], + "type": "string" + }, + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "cohere", + "gemini", + "huggingface", + "openai" + ], + "type": "string" + }, + "match_all_roles": { + "default": false, + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "type": "boolean" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-guard/3.7.json b/json_schemas/ai-prompt-guard/3.7.json new file mode 100644 index 00000000..7ba1573f --- /dev/null +++ b/json_schemas/ai-prompt-guard/3.7.json @@ -0,0 +1,126 @@ +{ + "properties": { + "config": { + "properties": { + "allow_all_conversation_history": { + "default": false, + "description": "If true, will ignore all previous chat prompts from the conversation history.", + "type": "boolean" + }, + "allow_patterns": { + "default": [ + + ], + "description": "Array of valid patterns, or valid questions from the 'user' role in chat.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "maxLength": 10, + "type": "array" + }, + "deny_patterns": { + "default": [ + + ], + "description": "Array of invalid patterns, or invalid questions from the 'user' role in chat.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "maxLength": 10, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-guard/3.8.json b/json_schemas/ai-prompt-guard/3.8.json new file mode 100644 index 00000000..536e841e --- /dev/null +++ b/json_schemas/ai-prompt-guard/3.8.json @@ -0,0 +1,131 @@ +{ + "properties": { + "config": { + "properties": { + "allow_all_conversation_history": { + "default": false, + "description": "If true, will ignore all previous chat prompts from the conversation history.", + "type": "boolean" + }, + "allow_patterns": { + "description": "Array of valid regex patterns, or valid questions from the 'user' role in chat.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "maxLength": 10, + "type": "array" + }, + "deny_patterns": { + "description": "Array of invalid regex patterns, or invalid questions from the 'user' role in chat.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "maxLength": 10, + "type": "array" + }, + "match_all_roles": { + "default": false, + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "type": "boolean" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-guard/3.9.json b/json_schemas/ai-prompt-guard/3.9.json new file mode 100644 index 00000000..536e841e --- /dev/null +++ b/json_schemas/ai-prompt-guard/3.9.json @@ -0,0 +1,131 @@ +{ + "properties": { + "config": { + "properties": { + "allow_all_conversation_history": { + "default": false, + "description": "If true, will ignore all previous chat prompts from the conversation history.", + "type": "boolean" + }, + "allow_patterns": { + "description": "Array of valid regex patterns, or valid questions from the 'user' role in chat.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "maxLength": 10, + "type": "array" + }, + "deny_patterns": { + "description": "Array of invalid regex patterns, or invalid questions from the 'user' role in chat.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "maxLength": 10, + "type": "array" + }, + "match_all_roles": { + "default": false, + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "type": "boolean" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-template/3.10.json b/json_schemas/ai-prompt-template/3.10.json new file mode 100644 index 00000000..5824bbb1 --- /dev/null +++ b/json_schemas/ai-prompt-template/3.10.json @@ -0,0 +1,126 @@ +{ + "properties": { + "config": { + "properties": { + "allow_untemplated_requests": { + "default": true, + "description": "Set true to allow requests that don't call or match any template.", + "type": "boolean" + }, + "log_original_request": { + "default": false, + "description": "Set true to add the original request to the Kong log plugin(s) output.", + "type": "boolean" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + }, + "templates": { + "description": "Array of templates available to the request context.", + "items": { + "properties": { + "name": { + "description": "Unique name for the template, can be called with `{template://NAME}`", + "type": "string" + }, + "template": { + "description": "Template string for this request, supports mustache-style `{{placeholders}}`", + "type": "string" + } + }, + "required": [ + "name", + "template" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "templates" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-template/3.11.json b/json_schemas/ai-prompt-template/3.11.json new file mode 100644 index 00000000..06f9da82 --- /dev/null +++ b/json_schemas/ai-prompt-template/3.11.json @@ -0,0 +1,116 @@ +{ + "properties": { + "config": { + "properties": { + "allow_untemplated_requests": { + "default": true, + "description": "Set true to allow requests that don't call or match any template.", + "type": "boolean" + }, + "log_original_request": { + "default": false, + "description": "Set true to add the original request to the Kong log plugin(s) output.", + "type": "boolean" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "minimum": 0, + "type": "integer" + }, + "templates": { + "description": "Array of templates available to the request context.", + "items": { + "properties": { + "name": { + "description": "Unique name for the template, can be called with `{template://NAME}`", + "type": "string" + }, + "template": { + "description": "Template string for this request, supports mustache-style `{{placeholders}}`", + "type": "string" + } + }, + "required": [ + "name", + "template" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "templates" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-template/3.12.json b/json_schemas/ai-prompt-template/3.12.json new file mode 100644 index 00000000..06f9da82 --- /dev/null +++ b/json_schemas/ai-prompt-template/3.12.json @@ -0,0 +1,116 @@ +{ + "properties": { + "config": { + "properties": { + "allow_untemplated_requests": { + "default": true, + "description": "Set true to allow requests that don't call or match any template.", + "type": "boolean" + }, + "log_original_request": { + "default": false, + "description": "Set true to add the original request to the Kong log plugin(s) output.", + "type": "boolean" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "minimum": 0, + "type": "integer" + }, + "templates": { + "description": "Array of templates available to the request context.", + "items": { + "properties": { + "name": { + "description": "Unique name for the template, can be called with `{template://NAME}`", + "type": "string" + }, + "template": { + "description": "Template string for this request, supports mustache-style `{{placeholders}}`", + "type": "string" + } + }, + "required": [ + "name", + "template" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "templates" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-template/3.7.json b/json_schemas/ai-prompt-template/3.7.json new file mode 100644 index 00000000..91a5b74c --- /dev/null +++ b/json_schemas/ai-prompt-template/3.7.json @@ -0,0 +1,107 @@ +{ + "properties": { + "config": { + "properties": { + "allow_untemplated_requests": { + "default": true, + "description": "Set true to allow requests that don't call or match any template.", + "type": "boolean" + }, + "log_original_request": { + "default": false, + "description": "Set true to add the original request to the Kong log plugin(s) output.", + "type": "boolean" + }, + "templates": { + "description": "Array of templates available to the request context.", + "items": { + "properties": { + "name": { + "description": "Unique name for the template, can be called with `{template://NAME}`", + "type": "string" + }, + "template": { + "description": "Template string for this request, supports mustache-style `{{placeholders}}`", + "type": "string" + } + }, + "required": [ + "name", + "template" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "templates" + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-template/3.8.json b/json_schemas/ai-prompt-template/3.8.json new file mode 100644 index 00000000..5824bbb1 --- /dev/null +++ b/json_schemas/ai-prompt-template/3.8.json @@ -0,0 +1,126 @@ +{ + "properties": { + "config": { + "properties": { + "allow_untemplated_requests": { + "default": true, + "description": "Set true to allow requests that don't call or match any template.", + "type": "boolean" + }, + "log_original_request": { + "default": false, + "description": "Set true to add the original request to the Kong log plugin(s) output.", + "type": "boolean" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + }, + "templates": { + "description": "Array of templates available to the request context.", + "items": { + "properties": { + "name": { + "description": "Unique name for the template, can be called with `{template://NAME}`", + "type": "string" + }, + "template": { + "description": "Template string for this request, supports mustache-style `{{placeholders}}`", + "type": "string" + } + }, + "required": [ + "name", + "template" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "templates" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-prompt-template/3.9.json b/json_schemas/ai-prompt-template/3.9.json new file mode 100644 index 00000000..5824bbb1 --- /dev/null +++ b/json_schemas/ai-prompt-template/3.9.json @@ -0,0 +1,126 @@ +{ + "properties": { + "config": { + "properties": { + "allow_untemplated_requests": { + "default": true, + "description": "Set true to allow requests that don't call or match any template.", + "type": "boolean" + }, + "log_original_request": { + "default": false, + "description": "Set true to add the original request to the Kong log plugin(s) output.", + "type": "boolean" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + }, + "templates": { + "description": "Array of templates available to the request context.", + "items": { + "properties": { + "name": { + "description": "Unique name for the template, can be called with `{template://NAME}`", + "type": "string" + }, + "template": { + "description": "Template string for this request, supports mustache-style `{{placeholders}}`", + "type": "string" + } + }, + "required": [ + "name", + "template" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "templates" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-proxy-advanced/3.10.json b/json_schemas/ai-proxy-advanced/3.10.json new file mode 100644 index 00000000..2c803b19 --- /dev/null +++ b/json_schemas/ai-proxy-advanced/3.10.json @@ -0,0 +1,1003 @@ +{ + "properties": { + "config": { + "properties": { + "balancer": { + "properties": { + "algorithm": { + "default": "round-robin", + "description": "Which load balancing algorithm to use.", + "enum": [ + "consistent-hashing", + "lowest-latency", + "lowest-usage", + "priority", + "round-robin", + "semantic" + ], + "type": "string" + }, + "connect_timeout": { + "default": 60000, + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "failover_criteria": { + "default": [ + "error", + "timeout" + ], + "description": "Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream", + "items": { + "enum": [ + "error", + "http_403", + "http_404", + "http_429", + "http_500", + "http_502", + "http_503", + "http_504", + "invalid_header", + "non_idempotent", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hash_on_header": { + "default": "X-Kong-LLM-Request-ID", + "description": "The header to use for consistent-hashing.", + "type": "string" + }, + "latency_strategy": { + "default": "tpot", + "description": "What metrics to use for latency. Available values are: `tpot` (time-per-output-token) and `e2e`.", + "enum": [ + "e2e", + "tpot" + ], + "type": "string" + }, + "read_timeout": { + "default": 60000, + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "retries": { + "default": 5, + "description": "The number of retries to execute upon failure to proxy.", + "maximum": 32767, + "minimum": 0, + "type": "integer" + }, + "slots": { + "default": 10000, + "description": "The number of slots in the load balancer algorithm.", + "maximum": 65536, + "minimum": 10, + "type": "integer" + }, + "tokens_count_strategy": { + "default": "total-tokens", + "description": "What tokens to use for usage calculation. Available values are: `total_tokens` `prompt_tokens`, `completion_tokens` and `cost`.", + "enum": [ + "completion-tokens", + "cost", + "prompt-tokens", + "total-tokens" + ], + "type": "string" + }, + "write_timeout": { + "default": 60000, + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "embeddings": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "azure": { + "properties": { + "api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string" + } + }, + "required": [ + "azure" + ], + "type": "object" + }, + "provider": { + "description": "AI provider format to use for embeddings API", + "enum": [ + "azure", + "bedrock", + "gemini", + "huggingface", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "name", + "provider" + ], + "type": "object" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "gemini", + "openai" + ], + "type": "string" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + }, + "model_name_header": { + "default": true, + "description": "Display the model name selected in the X-Kong-LLM-Model response header", + "type": "boolean" + }, + "response_streaming": { + "default": "allow", + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "enum": [ + "allow", + "always", + "deny" + ], + "type": "string" + }, + "targets": { + "items": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "description": { + "description": "The semantic description of the target, required if using semantic load balancing. Specially, setting this to 'CATCHALL' will indicate such target to be used when no other targets match the semantic threshold.", + "type": "string" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "enum": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "type": "string" + }, + "weight": { + "default": 100, + "description": "The weight this target gets within the upstream loadbalancer (1-65535).", + "maximum": 65535, + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "logging", + "model", + "route_type" + ], + "type": "object" + }, + "type": "array" + }, + "vectordb": { + "properties": { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer" + }, + "distance_metric": { + "description": "the distance metric to use for vector searches", + "enum": [ + "cosine", + "euclidean" + ], + "type": "string" + }, + "pgvector": { + "properties": { + "database": { + "default": "kong-pgvector", + "description": "the database of the pgvector database", + "type": "string" + }, + "host": { + "default": "127.0.0.1", + "description": "the host of the pgvector database", + "type": "string" + }, + "password": { + "description": "the password of the pgvector database\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 5432, + "description": "the port of the pgvector database", + "type": "integer" + }, + "ssl": { + "default": false, + "description": "whether to use ssl for the pgvector database", + "type": "boolean" + }, + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + }, + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + }, + "ssl_required": { + "default": false, + "description": "whether ssl is required for the pgvector database", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "whether to verify ssl for the pgvector database", + "type": "boolean" + }, + "ssl_version": { + "default": "tlsv1_2", + "description": "the ssl version to use for the pgvector database", + "enum": [ + "any", + "tlsv1_2", + "tlsv1_3" + ], + "type": "string" + }, + "timeout": { + "default": 5000, + "description": "the timeout of the pgvector database", + "type": "number" + }, + "user": { + "default": "postgres", + "description": "the user of the pgvector database\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "description": "which vector database driver to use", + "enum": [ + "pgvector", + "redis" + ], + "type": "string" + }, + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number" + } + }, + "required": [ + "dimensions", + "distance_metric", + "pgvector", + "redis", + "strategy", + "threshold" + ], + "type": "object" + } + }, + "required": [ + "targets" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-proxy-advanced/3.11.json b/json_schemas/ai-proxy-advanced/3.11.json new file mode 100644 index 00000000..6b989d36 --- /dev/null +++ b/json_schemas/ai-proxy-advanced/3.11.json @@ -0,0 +1,1034 @@ +{ + "properties": { + "config": { + "properties": { + "balancer": { + "properties": { + "algorithm": { + "default": "round-robin", + "description": "Which load balancing algorithm to use.", + "enum": [ + "consistent-hashing", + "lowest-latency", + "lowest-usage", + "priority", + "round-robin", + "semantic" + ], + "type": "string" + }, + "connect_timeout": { + "default": 60000, + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "failover_criteria": { + "default": [ + "error", + "timeout" + ], + "description": "Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream", + "items": { + "enum": [ + "error", + "http_403", + "http_404", + "http_429", + "http_500", + "http_502", + "http_503", + "http_504", + "invalid_header", + "non_idempotent", + "timeout" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "hash_on_header": { + "default": "X-Kong-LLM-Request-ID", + "description": "The header to use for consistent-hashing.", + "type": "string" + }, + "latency_strategy": { + "default": "tpot", + "description": "What metrics to use for latency. Available values are: `tpot` (time-per-output-token) and `e2e`.", + "enum": [ + "e2e", + "tpot" + ], + "type": "string" + }, + "read_timeout": { + "default": 60000, + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "retries": { + "default": 5, + "description": "The number of retries to execute upon failure to proxy.", + "maximum": 32767, + "minimum": 0, + "type": "integer" + }, + "slots": { + "default": 10000, + "description": "The number of slots in the load balancer algorithm.", + "maximum": 65536, + "minimum": 10, + "type": "integer" + }, + "tokens_count_strategy": { + "default": "total-tokens", + "description": "What tokens to use for usage calculation. Available values are: `total_tokens` `prompt_tokens`, `completion_tokens` and `cost`.", + "enum": [ + "completion-tokens", + "cost", + "prompt-tokens", + "total-tokens" + ], + "type": "string" + }, + "write_timeout": { + "default": 60000, + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "embeddings": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "azure": { + "properties": { + "api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + }, + "embeddings_normalize": { + "default": false, + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "type": "boolean" + }, + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string" + } + }, + "required": [ + "azure" + ], + "type": "object" + }, + "provider": { + "description": "AI provider format to use for embeddings API", + "enum": [ + "azure", + "bedrock", + "gemini", + "huggingface", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "name", + "provider" + ], + "type": "object" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "genai_category": { + "default": "text/generation", + "description": "Generative AI category of the request", + "enum": [ + "audio/speech", + "audio/transcription", + "image/generation", + "realtime/generation", + "text/embeddings", + "text/generation" + ], + "type": "string" + }, + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "cohere", + "gemini", + "huggingface", + "openai" + ], + "type": "string" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "minimum": 0, + "type": "integer" + }, + "model_name_header": { + "default": true, + "description": "Display the model name selected in the X-Kong-LLM-Model response header", + "type": "boolean" + }, + "response_streaming": { + "default": "allow", + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "enum": [ + "allow", + "always", + "deny" + ], + "type": "string" + }, + "targets": { + "items": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "description": { + "description": "The semantic description of the target, required if using semantic load balancing. Specially, setting this to 'CATCHALL' will indicate such target to be used when no other targets match the semantic threshold.", + "type": "string" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + }, + "embeddings_normalize": { + "default": false, + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "type": "boolean" + }, + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "cohere": { + "properties": { + "embedding_input_type": { + "default": "classification", + "description": "The purpose of the input text to calculate embedding vectors.", + "enum": [ + "classification", + "clustering", + "image", + "search_document", + "search_query" + ], + "type": "string" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "embeddings_dimensions": { + "description": "If using embeddings models, set the number of dimensions to generate.", + "minimum": 0, + "type": "integer" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. ", + "enum": [ + "audio/v1/audio/speech", + "audio/v1/audio/transcriptions", + "audio/v1/audio/translations", + "image/v1/images/edits", + "image/v1/images/generations", + "llm/v1/assistants", + "llm/v1/batches", + "llm/v1/chat", + "llm/v1/completions", + "llm/v1/embeddings", + "llm/v1/files", + "llm/v1/responses", + "preserve", + "realtime/v1/realtime" + ], + "type": "string" + }, + "weight": { + "default": 100, + "description": "The weight this target gets within the upstream loadbalancer (1-65535).", + "maximum": 65535, + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "logging", + "model", + "route_type" + ], + "type": "object" + }, + "type": "array" + }, + "vectordb": { + "properties": { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer" + }, + "distance_metric": { + "description": "the distance metric to use for vector searches", + "enum": [ + "cosine", + "euclidean" + ], + "type": "string" + }, + "pgvector": { + "properties": { + "database": { + "default": "kong-pgvector", + "description": "the database of the pgvector database", + "type": "string" + }, + "host": { + "default": "127.0.0.1", + "description": "the host of the pgvector database", + "type": "string" + }, + "password": { + "description": "the password of the pgvector database\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 5432, + "description": "the port of the pgvector database", + "type": "integer" + }, + "ssl": { + "default": false, + "description": "whether to use ssl for the pgvector database", + "type": "boolean" + }, + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + }, + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + }, + "ssl_required": { + "default": false, + "description": "whether ssl is required for the pgvector database", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "whether to verify ssl for the pgvector database", + "type": "boolean" + }, + "ssl_version": { + "default": "tlsv1_2", + "description": "the ssl version to use for the pgvector database", + "enum": [ + "any", + "tlsv1_2", + "tlsv1_3" + ], + "type": "string" + }, + "timeout": { + "default": 5000, + "description": "the timeout of the pgvector database", + "type": "number" + }, + "user": { + "default": "postgres", + "description": "the user of the pgvector database\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "description": "which vector database driver to use", + "enum": [ + "pgvector", + "redis" + ], + "type": "string" + }, + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number" + } + }, + "required": [ + "dimensions", + "distance_metric", + "pgvector", + "redis", + "strategy", + "threshold" + ], + "type": "object" + } + }, + "required": [ + "targets" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-proxy-advanced/3.12.json b/json_schemas/ai-proxy-advanced/3.12.json new file mode 100644 index 00000000..6b989d36 --- /dev/null +++ b/json_schemas/ai-proxy-advanced/3.12.json @@ -0,0 +1,1034 @@ +{ + "properties": { + "config": { + "properties": { + "balancer": { + "properties": { + "algorithm": { + "default": "round-robin", + "description": "Which load balancing algorithm to use.", + "enum": [ + "consistent-hashing", + "lowest-latency", + "lowest-usage", + "priority", + "round-robin", + "semantic" + ], + "type": "string" + }, + "connect_timeout": { + "default": 60000, + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "failover_criteria": { + "default": [ + "error", + "timeout" + ], + "description": "Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream", + "items": { + "enum": [ + "error", + "http_403", + "http_404", + "http_429", + "http_500", + "http_502", + "http_503", + "http_504", + "invalid_header", + "non_idempotent", + "timeout" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "hash_on_header": { + "default": "X-Kong-LLM-Request-ID", + "description": "The header to use for consistent-hashing.", + "type": "string" + }, + "latency_strategy": { + "default": "tpot", + "description": "What metrics to use for latency. Available values are: `tpot` (time-per-output-token) and `e2e`.", + "enum": [ + "e2e", + "tpot" + ], + "type": "string" + }, + "read_timeout": { + "default": 60000, + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "retries": { + "default": 5, + "description": "The number of retries to execute upon failure to proxy.", + "maximum": 32767, + "minimum": 0, + "type": "integer" + }, + "slots": { + "default": 10000, + "description": "The number of slots in the load balancer algorithm.", + "maximum": 65536, + "minimum": 10, + "type": "integer" + }, + "tokens_count_strategy": { + "default": "total-tokens", + "description": "What tokens to use for usage calculation. Available values are: `total_tokens` `prompt_tokens`, `completion_tokens` and `cost`.", + "enum": [ + "completion-tokens", + "cost", + "prompt-tokens", + "total-tokens" + ], + "type": "string" + }, + "write_timeout": { + "default": 60000, + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "embeddings": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "azure": { + "properties": { + "api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + }, + "embeddings_normalize": { + "default": false, + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "type": "boolean" + }, + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string" + } + }, + "required": [ + "azure" + ], + "type": "object" + }, + "provider": { + "description": "AI provider format to use for embeddings API", + "enum": [ + "azure", + "bedrock", + "gemini", + "huggingface", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "name", + "provider" + ], + "type": "object" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "genai_category": { + "default": "text/generation", + "description": "Generative AI category of the request", + "enum": [ + "audio/speech", + "audio/transcription", + "image/generation", + "realtime/generation", + "text/embeddings", + "text/generation" + ], + "type": "string" + }, + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "cohere", + "gemini", + "huggingface", + "openai" + ], + "type": "string" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "minimum": 0, + "type": "integer" + }, + "model_name_header": { + "default": true, + "description": "Display the model name selected in the X-Kong-LLM-Model response header", + "type": "boolean" + }, + "response_streaming": { + "default": "allow", + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "enum": [ + "allow", + "always", + "deny" + ], + "type": "string" + }, + "targets": { + "items": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "description": { + "description": "The semantic description of the target, required if using semantic load balancing. Specially, setting this to 'CATCHALL' will indicate such target to be used when no other targets match the semantic threshold.", + "type": "string" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + }, + "embeddings_normalize": { + "default": false, + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "type": "boolean" + }, + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "cohere": { + "properties": { + "embedding_input_type": { + "default": "classification", + "description": "The purpose of the input text to calculate embedding vectors.", + "enum": [ + "classification", + "clustering", + "image", + "search_document", + "search_query" + ], + "type": "string" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "embeddings_dimensions": { + "description": "If using embeddings models, set the number of dimensions to generate.", + "minimum": 0, + "type": "integer" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. ", + "enum": [ + "audio/v1/audio/speech", + "audio/v1/audio/transcriptions", + "audio/v1/audio/translations", + "image/v1/images/edits", + "image/v1/images/generations", + "llm/v1/assistants", + "llm/v1/batches", + "llm/v1/chat", + "llm/v1/completions", + "llm/v1/embeddings", + "llm/v1/files", + "llm/v1/responses", + "preserve", + "realtime/v1/realtime" + ], + "type": "string" + }, + "weight": { + "default": 100, + "description": "The weight this target gets within the upstream loadbalancer (1-65535).", + "maximum": 65535, + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "logging", + "model", + "route_type" + ], + "type": "object" + }, + "type": "array" + }, + "vectordb": { + "properties": { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer" + }, + "distance_metric": { + "description": "the distance metric to use for vector searches", + "enum": [ + "cosine", + "euclidean" + ], + "type": "string" + }, + "pgvector": { + "properties": { + "database": { + "default": "kong-pgvector", + "description": "the database of the pgvector database", + "type": "string" + }, + "host": { + "default": "127.0.0.1", + "description": "the host of the pgvector database", + "type": "string" + }, + "password": { + "description": "the password of the pgvector database\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 5432, + "description": "the port of the pgvector database", + "type": "integer" + }, + "ssl": { + "default": false, + "description": "whether to use ssl for the pgvector database", + "type": "boolean" + }, + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + }, + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + }, + "ssl_required": { + "default": false, + "description": "whether ssl is required for the pgvector database", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "whether to verify ssl for the pgvector database", + "type": "boolean" + }, + "ssl_version": { + "default": "tlsv1_2", + "description": "the ssl version to use for the pgvector database", + "enum": [ + "any", + "tlsv1_2", + "tlsv1_3" + ], + "type": "string" + }, + "timeout": { + "default": 5000, + "description": "the timeout of the pgvector database", + "type": "number" + }, + "user": { + "default": "postgres", + "description": "the user of the pgvector database\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "description": "which vector database driver to use", + "enum": [ + "pgvector", + "redis" + ], + "type": "string" + }, + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number" + } + }, + "required": [ + "dimensions", + "distance_metric", + "pgvector", + "redis", + "strategy", + "threshold" + ], + "type": "object" + } + }, + "required": [ + "targets" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-proxy-advanced/3.8.json b/json_schemas/ai-proxy-advanced/3.8.json new file mode 100644 index 00000000..323a1135 --- /dev/null +++ b/json_schemas/ai-proxy-advanced/3.8.json @@ -0,0 +1,775 @@ +{ + "properties": { + "config": { + "properties": { + "balancer": { + "properties": { + "algorithm": { + "default": "round-robin", + "description": "Which load balancing algorithm to use.", + "enum": [ + "consistent-hashing", + "lowest-latency", + "lowest-usage", + "round-robin", + "semantic" + ], + "type": "string" + }, + "connect_timeout": { + "default": 60000, + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "hash_on_header": { + "default": "X-Kong-LLM-Request-ID", + "description": "The header to use for consistent-hashing.", + "type": "string" + }, + "latency_strategy": { + "default": "tpot", + "description": "What metrics to use for latency. Available values are: `tpot` (time-per-output-token) and `e2e`.", + "enum": [ + "e2e", + "tpot" + ], + "type": "string" + }, + "read_timeout": { + "default": 60000, + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "retries": { + "default": 5, + "description": "The number of retries to execute upon failure to proxy.", + "maximum": 32767, + "minimum": 0, + "type": "integer" + }, + "slots": { + "default": 10000, + "description": "The number of slots in the load balancer algorithm.", + "maximum": 65536, + "minimum": 10, + "type": "integer" + }, + "tokens_count_strategy": { + "default": "total-tokens", + "description": "What tokens to use for usage calculation. Available values are: `total_tokens` `prompt_tokens`, and `completion_tokens`.", + "enum": [ + "completion-tokens", + "prompt-tokens", + "total-tokens" + ], + "type": "string" + }, + "write_timeout": { + "default": 60000, + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "embeddings": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "enum": [ + "mistral-embed", + "text-embedding-3-large", + "text-embedding-3-small" + ], + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider format to use for embeddings API", + "enum": [ + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "name", + "provider" + ], + "type": "object" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + }, + "model_name_header": { + "default": true, + "description": "Display the model name selected in the X-Kong-LLM-Model response header", + "type": "boolean" + }, + "targets": { + "items": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "description": { + "description": "The semantic description of the target, required if using semantic load balancing.", + "type": "string" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "default": 256, + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "enum": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "type": "string" + }, + "weight": { + "default": 100, + "description": "The weight this target gets within the upstream loadbalancer (1-65535).", + "maximum": 65535, + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "logging", + "model", + "route_type" + ], + "type": "object" + }, + "type": "array" + }, + "vectordb": { + "properties": { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer" + }, + "distance_metric": { + "description": "the distance metric to use for vector searches", + "enum": [ + "cosine", + "euclidean" + ], + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "translate_backwards": [ + "connect_timeout" + ], + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "description": "which vector database driver to use", + "enum": [ + "redis" + ], + "type": "string" + }, + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number" + } + }, + "required": [ + "dimensions", + "distance_metric", + "redis", + "strategy", + "threshold" + ], + "type": "object" + } + }, + "required": [ + "targets" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-proxy-advanced/3.9.json b/json_schemas/ai-proxy-advanced/3.9.json new file mode 100644 index 00000000..97baacd0 --- /dev/null +++ b/json_schemas/ai-proxy-advanced/3.9.json @@ -0,0 +1,796 @@ +{ + "properties": { + "config": { + "properties": { + "balancer": { + "properties": { + "algorithm": { + "default": "round-robin", + "description": "Which load balancing algorithm to use.", + "enum": [ + "consistent-hashing", + "lowest-latency", + "lowest-usage", + "round-robin", + "semantic" + ], + "type": "string" + }, + "connect_timeout": { + "default": 60000, + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "hash_on_header": { + "default": "X-Kong-LLM-Request-ID", + "description": "The header to use for consistent-hashing.", + "type": "string" + }, + "latency_strategy": { + "default": "tpot", + "description": "What metrics to use for latency. Available values are: `tpot` (time-per-output-token) and `e2e`.", + "enum": [ + "e2e", + "tpot" + ], + "type": "string" + }, + "read_timeout": { + "default": 60000, + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "retries": { + "default": 5, + "description": "The number of retries to execute upon failure to proxy.", + "maximum": 32767, + "minimum": 0, + "type": "integer" + }, + "slots": { + "default": 10000, + "description": "The number of slots in the load balancer algorithm.", + "maximum": 65536, + "minimum": 10, + "type": "integer" + }, + "tokens_count_strategy": { + "default": "total-tokens", + "description": "What tokens to use for usage calculation. Available values are: `total_tokens` `prompt_tokens`, and `completion_tokens`.", + "enum": [ + "completion-tokens", + "prompt-tokens", + "total-tokens" + ], + "type": "string" + }, + "write_timeout": { + "default": 60000, + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "embeddings": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider format to use for embeddings API", + "enum": [ + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "name", + "provider" + ], + "type": "object" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + }, + "model_name_header": { + "default": true, + "description": "Display the model name selected in the X-Kong-LLM-Model response header", + "type": "boolean" + }, + "response_streaming": { + "default": "allow", + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "enum": [ + "allow", + "always", + "deny" + ], + "type": "string" + }, + "targets": { + "items": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "description": { + "description": "The semantic description of the target, required if using semantic load balancing.", + "type": "string" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "default": 256, + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "enum": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "type": "string" + }, + "weight": { + "default": 100, + "description": "The weight this target gets within the upstream loadbalancer (1-65535).", + "maximum": 65535, + "minimum": 1, + "type": "integer" + } + }, + "required": [ + "logging", + "model", + "route_type" + ], + "type": "object" + }, + "type": "array" + }, + "vectordb": { + "properties": { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer" + }, + "distance_metric": { + "description": "the distance metric to use for vector searches", + "enum": [ + "cosine", + "euclidean" + ], + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "description": "which vector database driver to use", + "enum": [ + "redis" + ], + "type": "string" + }, + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number" + } + }, + "required": [ + "dimensions", + "distance_metric", + "redis", + "strategy", + "threshold" + ], + "type": "object" + } + }, + "required": [ + "targets" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-proxy/3.10.json b/json_schemas/ai-proxy/3.10.json new file mode 100644 index 00000000..c9522ad3 --- /dev/null +++ b/json_schemas/ai-proxy/3.10.json @@ -0,0 +1,389 @@ +{ + "properties": { + "config": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "gemini", + "openai" + ], + "type": "string" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "model_name_header": { + "default": true, + "description": "Display the model name selected in the X-Kong-LLM-Model response header", + "type": "boolean" + }, + "response_streaming": { + "default": "allow", + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "enum": [ + "allow", + "always", + "deny" + ], + "type": "string" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "enum": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "type": "string" + } + }, + "required": [ + "model", + "route_type" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-proxy/3.11.json b/json_schemas/ai-proxy/3.11.json new file mode 100644 index 00000000..80e90108 --- /dev/null +++ b/json_schemas/ai-proxy/3.11.json @@ -0,0 +1,432 @@ +{ + "properties": { + "config": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "genai_category": { + "default": "text/generation", + "description": "Generative AI category of the request", + "enum": [ + "audio/speech", + "audio/transcription", + "image/generation", + "text/embeddings", + "text/generation" + ], + "type": "string" + }, + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "cohere", + "gemini", + "huggingface", + "openai" + ], + "type": "string" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "minimum": 0, + "type": "integer" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + }, + "embeddings_normalize": { + "default": false, + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "type": "boolean" + }, + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "cohere": { + "properties": { + "embedding_input_type": { + "default": "classification", + "description": "The purpose of the input text to calculate embedding vectors.", + "enum": [ + "classification", + "clustering", + "image", + "search_document", + "search_query" + ], + "type": "string" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "embeddings_dimensions": { + "description": "If using embeddings models, set the number of dimensions to generate.", + "minimum": 0, + "type": "integer" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "model_name_header": { + "default": true, + "description": "Display the model name selected in the X-Kong-LLM-Model response header", + "type": "boolean" + }, + "response_streaming": { + "default": "allow", + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "enum": [ + "allow", + "always", + "deny" + ], + "type": "string" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. ", + "enum": [ + "audio/v1/audio/speech", + "audio/v1/audio/transcriptions", + "audio/v1/audio/translations", + "image/v1/images/edits", + "image/v1/images/generations", + "llm/v1/assistants", + "llm/v1/batches", + "llm/v1/chat", + "llm/v1/completions", + "llm/v1/embeddings", + "llm/v1/files", + "llm/v1/responses", + "preserve", + "realtime/v1/realtime" + ], + "type": "string" + } + }, + "required": [ + "model", + "route_type" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-proxy/3.12.json b/json_schemas/ai-proxy/3.12.json new file mode 100644 index 00000000..80e90108 --- /dev/null +++ b/json_schemas/ai-proxy/3.12.json @@ -0,0 +1,432 @@ +{ + "properties": { + "config": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "genai_category": { + "default": "text/generation", + "description": "Generative AI category of the request", + "enum": [ + "audio/speech", + "audio/transcription", + "image/generation", + "text/embeddings", + "text/generation" + ], + "type": "string" + }, + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "cohere", + "gemini", + "huggingface", + "openai" + ], + "type": "string" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "minimum": 0, + "type": "integer" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + }, + "embeddings_normalize": { + "default": false, + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "type": "boolean" + }, + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "cohere": { + "properties": { + "embedding_input_type": { + "default": "classification", + "description": "The purpose of the input text to calculate embedding vectors.", + "enum": [ + "classification", + "clustering", + "image", + "search_document", + "search_query" + ], + "type": "string" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "embeddings_dimensions": { + "description": "If using embeddings models, set the number of dimensions to generate.", + "minimum": 0, + "type": "integer" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "model_name_header": { + "default": true, + "description": "Display the model name selected in the X-Kong-LLM-Model response header", + "type": "boolean" + }, + "response_streaming": { + "default": "allow", + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "enum": [ + "allow", + "always", + "deny" + ], + "type": "string" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. ", + "enum": [ + "audio/v1/audio/speech", + "audio/v1/audio/transcriptions", + "audio/v1/audio/translations", + "image/v1/images/edits", + "image/v1/images/generations", + "llm/v1/assistants", + "llm/v1/batches", + "llm/v1/chat", + "llm/v1/completions", + "llm/v1/embeddings", + "llm/v1/files", + "llm/v1/responses", + "preserve", + "realtime/v1/realtime" + ], + "type": "string" + } + }, + "required": [ + "model", + "route_type" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-proxy/3.7.json b/json_schemas/ai-proxy/3.7.json new file mode 100644 index 00000000..e10cf0a0 --- /dev/null +++ b/json_schemas/ai-proxy/3.7.json @@ -0,0 +1,248 @@ +{ + "properties": { + "config": { + "properties": { + "auth": { + "properties": { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "default": 256, + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "response_streaming": { + "default": "allow", + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "enum": [ + "allow", + "always", + "deny" + ], + "type": "string" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "cohere", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "enum": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "type": "string" + } + }, + "required": [ + "model", + "route_type" + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-proxy/3.8.json b/json_schemas/ai-proxy/3.8.json new file mode 100644 index 00000000..5bbc12ae --- /dev/null +++ b/json_schemas/ai-proxy/3.8.json @@ -0,0 +1,351 @@ +{ + "properties": { + "config": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "default": 256, + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "model_name_header": { + "default": true, + "description": "Display the model name selected in the X-Kong-LLM-Model response header", + "type": "boolean" + }, + "response_streaming": { + "default": "allow", + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "enum": [ + "allow", + "always", + "deny" + ], + "type": "string" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "enum": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "type": "string" + } + }, + "required": [ + "model", + "route_type" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-proxy/3.9.json b/json_schemas/ai-proxy/3.9.json new file mode 100644 index 00000000..7c219607 --- /dev/null +++ b/json_schemas/ai-proxy/3.9.json @@ -0,0 +1,368 @@ +{ + "properties": { + "config": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "default": 256, + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "model_name_header": { + "default": true, + "description": "Display the model name selected in the X-Kong-LLM-Model response header", + "type": "boolean" + }, + "response_streaming": { + "default": "allow", + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "enum": [ + "allow", + "always", + "deny" + ], + "type": "string" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "enum": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "type": "string" + } + }, + "required": [ + "model", + "route_type" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-rag-injector/3.10.json b/json_schemas/ai-rag-injector/3.10.json new file mode 100644 index 00000000..7696ea80 --- /dev/null +++ b/json_schemas/ai-rag-injector/3.10.json @@ -0,0 +1,597 @@ +{ + "properties": { + "config": { + "properties": { + "embeddings": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "azure": { + "properties": { + "api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string" + } + }, + "required": [ + "azure" + ], + "type": "object" + }, + "provider": { + "description": "AI provider format to use for embeddings API", + "enum": [ + "azure", + "bedrock", + "gemini", + "huggingface", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "name", + "provider" + ], + "type": "object" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "fetch_chunks_count": { + "default": 5, + "description": "The maximum number of chunks to fetch from vectordb", + "type": "number" + }, + "inject_as_role": { + "default": "user", + "enum": [ + "assistant", + "system", + "user" + ], + "type": "string" + }, + "inject_template": { + "default": "\n", + "type": "string" + }, + "stop_on_failure": { + "default": false, + "description": "Halt the LLM request process in case of a vectordb or embeddings service failure", + "type": "boolean" + }, + "vectordb": { + "properties": { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer" + }, + "distance_metric": { + "description": "the distance metric to use for vector searches", + "enum": [ + "cosine", + "euclidean" + ], + "type": "string" + }, + "pgvector": { + "properties": { + "database": { + "default": "kong-pgvector", + "description": "the database of the pgvector database", + "type": "string" + }, + "host": { + "default": "127.0.0.1", + "description": "the host of the pgvector database", + "type": "string" + }, + "password": { + "description": "the password of the pgvector database\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 5432, + "description": "the port of the pgvector database", + "type": "integer" + }, + "ssl": { + "default": false, + "description": "whether to use ssl for the pgvector database", + "type": "boolean" + }, + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + }, + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + }, + "ssl_required": { + "default": false, + "description": "whether ssl is required for the pgvector database", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "whether to verify ssl for the pgvector database", + "type": "boolean" + }, + "ssl_version": { + "default": "tlsv1_2", + "description": "the ssl version to use for the pgvector database", + "enum": [ + "any", + "tlsv1_2", + "tlsv1_3" + ], + "type": "string" + }, + "timeout": { + "default": 5000, + "description": "the timeout of the pgvector database", + "type": "number" + }, + "user": { + "default": "postgres", + "description": "the user of the pgvector database\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "description": "which vector database driver to use", + "enum": [ + "pgvector", + "redis" + ], + "type": "string" + } + }, + "required": [ + "dimensions", + "distance_metric", + "strategy" + ], + "type": "object" + }, + "vectordb_namespace": { + "default": "kong_rag_injector", + "description": "The namespace of the vectordb to use for embeddings lookup", + "type": "string" + } + }, + "required": [ + "embeddings", + "vectordb" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-rag-injector/3.11.json b/json_schemas/ai-rag-injector/3.11.json new file mode 100644 index 00000000..0aadd254 --- /dev/null +++ b/json_schemas/ai-rag-injector/3.11.json @@ -0,0 +1,578 @@ +{ + "properties": { + "config": { + "properties": { + "embeddings": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "azure": { + "properties": { + "api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + }, + "embeddings_normalize": { + "default": false, + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "type": "boolean" + }, + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string" + } + }, + "required": [ + "azure" + ], + "type": "object" + }, + "provider": { + "description": "AI provider format to use for embeddings API", + "enum": [ + "azure", + "bedrock", + "gemini", + "huggingface", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "name", + "provider" + ], + "type": "object" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "fetch_chunks_count": { + "default": 5, + "description": "The maximum number of chunks to fetch from vectordb", + "type": "number" + }, + "inject_as_role": { + "default": "user", + "enum": [ + "assistant", + "system", + "user" + ], + "type": "string" + }, + "inject_template": { + "default": "\n", + "type": "string" + }, + "stop_on_failure": { + "default": false, + "description": "Halt the LLM request process in case of a vectordb or embeddings service failure", + "type": "boolean" + }, + "vectordb": { + "properties": { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer" + }, + "distance_metric": { + "description": "the distance metric to use for vector searches", + "enum": [ + "cosine", + "euclidean" + ], + "type": "string" + }, + "pgvector": { + "properties": { + "database": { + "default": "kong-pgvector", + "description": "the database of the pgvector database", + "type": "string" + }, + "host": { + "default": "127.0.0.1", + "description": "the host of the pgvector database", + "type": "string" + }, + "password": { + "description": "the password of the pgvector database\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 5432, + "description": "the port of the pgvector database", + "type": "integer" + }, + "ssl": { + "default": false, + "description": "whether to use ssl for the pgvector database", + "type": "boolean" + }, + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + }, + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + }, + "ssl_required": { + "default": false, + "description": "whether ssl is required for the pgvector database", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "whether to verify ssl for the pgvector database", + "type": "boolean" + }, + "ssl_version": { + "default": "tlsv1_2", + "description": "the ssl version to use for the pgvector database", + "enum": [ + "any", + "tlsv1_2", + "tlsv1_3" + ], + "type": "string" + }, + "timeout": { + "default": 5000, + "description": "the timeout of the pgvector database", + "type": "number" + }, + "user": { + "default": "postgres", + "description": "the user of the pgvector database\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "description": "which vector database driver to use", + "enum": [ + "pgvector", + "redis" + ], + "type": "string" + } + }, + "required": [ + "dimensions", + "distance_metric", + "strategy" + ], + "type": "object" + }, + "vectordb_namespace": { + "default": "kong_rag_injector", + "description": "The namespace of the vectordb to use for embeddings lookup", + "type": "string" + } + }, + "required": [ + "embeddings", + "vectordb" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-rag-injector/3.12.json b/json_schemas/ai-rag-injector/3.12.json new file mode 100644 index 00000000..0aadd254 --- /dev/null +++ b/json_schemas/ai-rag-injector/3.12.json @@ -0,0 +1,578 @@ +{ + "properties": { + "config": { + "properties": { + "embeddings": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "azure": { + "properties": { + "api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + }, + "embeddings_normalize": { + "default": false, + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "type": "boolean" + }, + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string" + } + }, + "required": [ + "azure" + ], + "type": "object" + }, + "provider": { + "description": "AI provider format to use for embeddings API", + "enum": [ + "azure", + "bedrock", + "gemini", + "huggingface", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "name", + "provider" + ], + "type": "object" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "fetch_chunks_count": { + "default": 5, + "description": "The maximum number of chunks to fetch from vectordb", + "type": "number" + }, + "inject_as_role": { + "default": "user", + "enum": [ + "assistant", + "system", + "user" + ], + "type": "string" + }, + "inject_template": { + "default": "\n", + "type": "string" + }, + "stop_on_failure": { + "default": false, + "description": "Halt the LLM request process in case of a vectordb or embeddings service failure", + "type": "boolean" + }, + "vectordb": { + "properties": { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer" + }, + "distance_metric": { + "description": "the distance metric to use for vector searches", + "enum": [ + "cosine", + "euclidean" + ], + "type": "string" + }, + "pgvector": { + "properties": { + "database": { + "default": "kong-pgvector", + "description": "the database of the pgvector database", + "type": "string" + }, + "host": { + "default": "127.0.0.1", + "description": "the host of the pgvector database", + "type": "string" + }, + "password": { + "description": "the password of the pgvector database\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 5432, + "description": "the port of the pgvector database", + "type": "integer" + }, + "ssl": { + "default": false, + "description": "whether to use ssl for the pgvector database", + "type": "boolean" + }, + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + }, + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + }, + "ssl_required": { + "default": false, + "description": "whether ssl is required for the pgvector database", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "whether to verify ssl for the pgvector database", + "type": "boolean" + }, + "ssl_version": { + "default": "tlsv1_2", + "description": "the ssl version to use for the pgvector database", + "enum": [ + "any", + "tlsv1_2", + "tlsv1_3" + ], + "type": "string" + }, + "timeout": { + "default": 5000, + "description": "the timeout of the pgvector database", + "type": "number" + }, + "user": { + "default": "postgres", + "description": "the user of the pgvector database\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "description": "which vector database driver to use", + "enum": [ + "pgvector", + "redis" + ], + "type": "string" + } + }, + "required": [ + "dimensions", + "distance_metric", + "strategy" + ], + "type": "object" + }, + "vectordb_namespace": { + "default": "kong_rag_injector", + "description": "The namespace of the vectordb to use for embeddings lookup", + "type": "string" + } + }, + "required": [ + "embeddings", + "vectordb" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-rate-limiting-advanced/3.10.json b/json_schemas/ai-rate-limiting-advanced/3.10.json new file mode 100644 index 00000000..4ca1a424 --- /dev/null +++ b/json_schemas/ai-rate-limiting-advanced/3.10.json @@ -0,0 +1,426 @@ +{ + "properties": { + "config": { + "properties": { + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string" + }, + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type and the request prompt provider.", + "type": "boolean" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_hide_providers": { + "default": false, + "description": "Optionally hide informative response that would otherwise provide information about the provider in the error message.", + "type": "boolean" + }, + "error_message": { + "default": "AI token rate limit exceeded for provider(s): ", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`. Note if `identifier` is `consumer-group`, the plugin must be applied on a consumer group entity. Because a consumer may belong to multiple consumer groups, the plugin needs to know explicitly which consumer group to limit the rate.", + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "gemini", + "openai" + ], + "type": "string" + }, + "llm_providers": { + "description": "The provider config. Takes an array of `name`, `limit` and `window size` values.", + "items": { + "properties": { + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "name": { + "description": "The LLM provider to which the rate limit applies.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai", + "requestPrompt" + ], + "type": "string" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + } + }, + "required": [ + "limit", + "name", + "window_size" + ], + "type": "object" + }, + "type": "array" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "request_prompt_count_function": { + "description": "If defined, it use custom function to count requests for the request prompt provider", + "type": "string" + }, + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + }, + "strategy": { + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + }, + "tokens_count_strategy": { + "default": "total_tokens", + "description": "What tokens to use for cost calculation. Available values are: `total_tokens` `prompt_tokens`, `completion_tokens` or `cost`.", + "enum": [ + "completion_tokens", + "cost", + "prompt_tokens", + "total_tokens" + ], + "type": "string" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "llm_providers" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-rate-limiting-advanced/3.11.json b/json_schemas/ai-rate-limiting-advanced/3.11.json new file mode 100644 index 00000000..a186af04 --- /dev/null +++ b/json_schemas/ai-rate-limiting-advanced/3.11.json @@ -0,0 +1,412 @@ +{ + "properties": { + "config": { + "properties": { + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string" + }, + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type and the request prompt provider.", + "type": "boolean" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_hide_providers": { + "default": false, + "description": "Optionally hide informative response that would otherwise provide information about the provider in the error message.", + "type": "boolean" + }, + "error_message": { + "default": "AI token rate limit exceeded for provider(s): ", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`. Note if `identifier` is `consumer-group`, the plugin must be applied on a consumer group entity. Because a consumer may belong to multiple consumer groups, the plugin needs to know explicitly which consumer group to limit the rate.", + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "cohere", + "gemini", + "huggingface", + "openai" + ], + "type": "string" + }, + "llm_providers": { + "description": "The provider config. Takes an array of `name`, `limit` and `window size` values.", + "items": { + "properties": { + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "items": { + "required": [], + "type": "number" + }, + "type": "array" + }, + "name": { + "description": "The LLM provider to which the rate limit applies.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai", + "requestPrompt" + ], + "type": "string" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "items": { + "required": [], + "type": "number" + }, + "type": "array" + } + }, + "required": [ + "limit", + "name", + "window_size" + ], + "type": "object" + }, + "type": "array" + }, + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same.", + "type": "string" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "request_prompt_count_function": { + "description": "If defined, it use custom function to count requests for the request prompt provider", + "type": "string" + }, + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + }, + "strategy": { + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + }, + "tokens_count_strategy": { + "default": "total_tokens", + "description": "What tokens to use for cost calculation. Available values are: `total_tokens` `prompt_tokens`, `completion_tokens` or `cost`.", + "enum": [ + "completion_tokens", + "cost", + "prompt_tokens", + "total_tokens" + ], + "type": "string" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "llm_providers" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-rate-limiting-advanced/3.12.json b/json_schemas/ai-rate-limiting-advanced/3.12.json new file mode 100644 index 00000000..a186af04 --- /dev/null +++ b/json_schemas/ai-rate-limiting-advanced/3.12.json @@ -0,0 +1,412 @@ +{ + "properties": { + "config": { + "properties": { + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string" + }, + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type and the request prompt provider.", + "type": "boolean" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_hide_providers": { + "default": false, + "description": "Optionally hide informative response that would otherwise provide information about the provider in the error message.", + "type": "boolean" + }, + "error_message": { + "default": "AI token rate limit exceeded for provider(s): ", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`. Note if `identifier` is `consumer-group`, the plugin must be applied on a consumer group entity. Because a consumer may belong to multiple consumer groups, the plugin needs to know explicitly which consumer group to limit the rate.", + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "cohere", + "gemini", + "huggingface", + "openai" + ], + "type": "string" + }, + "llm_providers": { + "description": "The provider config. Takes an array of `name`, `limit` and `window size` values.", + "items": { + "properties": { + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "items": { + "required": [], + "type": "number" + }, + "type": "array" + }, + "name": { + "description": "The LLM provider to which the rate limit applies.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai", + "requestPrompt" + ], + "type": "string" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "items": { + "required": [], + "type": "number" + }, + "type": "array" + } + }, + "required": [ + "limit", + "name", + "window_size" + ], + "type": "object" + }, + "type": "array" + }, + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same.", + "type": "string" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "request_prompt_count_function": { + "description": "If defined, it use custom function to count requests for the request prompt provider", + "type": "string" + }, + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + }, + "strategy": { + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + }, + "tokens_count_strategy": { + "default": "total_tokens", + "description": "What tokens to use for cost calculation. Available values are: `total_tokens` `prompt_tokens`, `completion_tokens` or `cost`.", + "enum": [ + "completion_tokens", + "cost", + "prompt_tokens", + "total_tokens" + ], + "type": "string" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "llm_providers" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-rate-limiting-advanced/3.7.json b/json_schemas/ai-rate-limiting-advanced/3.7.json new file mode 100644 index 00000000..891776cb --- /dev/null +++ b/json_schemas/ai-rate-limiting-advanced/3.7.json @@ -0,0 +1,345 @@ +{ + "properties": { + "config": { + "properties": { + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string" + }, + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type and the request prompt provider.", + "type": "boolean" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_hide_providers": { + "default": false, + "description": "Optionally hide informative response that would otherwise provide information about the provider in the error message.", + "type": "boolean" + }, + "error_message": { + "default": "API rate limit exceeded for provider(s): ", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`.", + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "llm_providers": { + "description": "The provider config. Takes an array of `name`, `limit` and `window size` values.", + "items": { + "properties": { + "limit": { + "description": "The limit applies to the LLM provider within the defined window size. It used the query cost from the tokens to increment the counter.", + "type": "number" + }, + "name": { + "description": "The LLM provider to which the rate limit applies.", + "enum": [ + "anthropic", + "azure", + "cohere", + "llama2", + "mistral", + "openai", + "requestPrompt" + ], + "type": "string" + }, + "window_size": { + "description": "The window size to apply a limit (defined in seconds).", + "type": "number" + } + }, + "required": [ + "limit", + "name", + "window_size" + ], + "type": "object" + }, + "type": "array" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "redis": { + "properties": { + "cluster_addresses": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_addresses": { + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "request_prompt_count_function": { + "description": "If defined, it use custom function to count requests for the request prompt provider", + "type": "string" + }, + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + }, + "strategy": { + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + }, + "tokens_count_strategy": { + "default": "total_tokens", + "description": "What tokens to use for cost calculation. Available values are: `total_tokens` `prompt_tokens`, and `completion_tokens`.", + "enum": [ + "completion_tokens", + "prompt_tokens", + "total_tokens" + ], + "type": "string" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "llm_providers" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-rate-limiting-advanced/3.8.json b/json_schemas/ai-rate-limiting-advanced/3.8.json new file mode 100644 index 00000000..8a91403a --- /dev/null +++ b/json_schemas/ai-rate-limiting-advanced/3.8.json @@ -0,0 +1,404 @@ +{ + "properties": { + "config": { + "properties": { + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string" + }, + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type and the request prompt provider.", + "type": "boolean" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_hide_providers": { + "default": false, + "description": "Optionally hide informative response that would otherwise provide information about the provider in the error message.", + "type": "boolean" + }, + "error_message": { + "default": "API rate limit exceeded for provider(s): ", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`.", + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "llm_providers": { + "description": "The provider config. Takes an array of `name`, `limit` and `window size` values.", + "items": { + "properties": { + "limit": { + "description": "The limit applies to the LLM provider within the defined window size. It used the query cost from the tokens to increment the counter.", + "type": "number" + }, + "name": { + "description": "The LLM provider to which the rate limit applies.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "llama2", + "mistral", + "openai", + "requestPrompt" + ], + "type": "string" + }, + "window_size": { + "description": "The window size to apply a limit (defined in seconds).", + "type": "number" + } + }, + "required": [ + "limit", + "name", + "window_size" + ], + "type": "object" + }, + "type": "array" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "translate_backwards": [ + "connect_timeout" + ], + "type": "integer" + } + }, + "type": "object" + }, + "request_prompt_count_function": { + "description": "If defined, it use custom function to count requests for the request prompt provider", + "type": "string" + }, + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + }, + "strategy": { + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + }, + "tokens_count_strategy": { + "default": "total_tokens", + "description": "What tokens to use for cost calculation. Available values are: `total_tokens` `prompt_tokens`, `completion_tokens` or `cost`.", + "enum": [ + "completion_tokens", + "cost", + "prompt_tokens", + "total_tokens" + ], + "type": "string" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "llm_providers" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-rate-limiting-advanced/3.9.json b/json_schemas/ai-rate-limiting-advanced/3.9.json new file mode 100644 index 00000000..0feff88e --- /dev/null +++ b/json_schemas/ai-rate-limiting-advanced/3.9.json @@ -0,0 +1,404 @@ +{ + "properties": { + "config": { + "properties": { + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string" + }, + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type and the request prompt provider.", + "type": "boolean" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_hide_providers": { + "default": false, + "description": "Optionally hide informative response that would otherwise provide information about the provider in the error message.", + "type": "boolean" + }, + "error_message": { + "default": "AI token rate limit exceeded for provider(s): ", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`.", + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "llm_providers": { + "description": "The provider config. Takes an array of `name`, `limit` and `window size` values.", + "items": { + "properties": { + "limit": { + "description": "The limit applies to the LLM provider within the defined window size. It used the query cost from the tokens to increment the counter.", + "type": "number" + }, + "name": { + "description": "The LLM provider to which the rate limit applies.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai", + "requestPrompt" + ], + "type": "string" + }, + "window_size": { + "description": "The window size to apply a limit (defined in seconds).", + "type": "number" + } + }, + "required": [ + "limit", + "name", + "window_size" + ], + "type": "object" + }, + "type": "array" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "request_prompt_count_function": { + "description": "If defined, it use custom function to count requests for the request prompt provider", + "type": "string" + }, + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + }, + "strategy": { + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + }, + "tokens_count_strategy": { + "default": "total_tokens", + "description": "What tokens to use for cost calculation. Available values are: `total_tokens` `prompt_tokens`, `completion_tokens` or `cost`.", + "enum": [ + "completion_tokens", + "cost", + "prompt_tokens", + "total_tokens" + ], + "type": "string" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "llm_providers" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-request-transformer/3.10.json b/json_schemas/ai-request-transformer/3.10.json new file mode 100644 index 00000000..6c6e74b5 --- /dev/null +++ b/json_schemas/ai-request-transformer/3.10.json @@ -0,0 +1,398 @@ +{ + "properties": { + "config": { + "properties": { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 60000, + "description": "Timeout in milliseconds for the AI upstream service.", + "type": "integer" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": true, + "description": "Verify the TLS certificate of the AI upstream service.", + "type": "boolean" + }, + "llm": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "enum": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "type": "string" + } + }, + "required": [ + "model", + "route_type" + ], + "type": "object" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + }, + "prompt": { + "description": "Use this prompt to tune the LLM system/assistant message for the incoming proxy request (from the client), and what you are expecting in return.", + "type": "string" + }, + "transformation_extract_pattern": { + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the request phase. The first match will be set as the outgoing body. If the AI service's response doesn't match this pattern, it is marked as a failure.", + "type": "string" + } + }, + "required": [ + "llm", + "prompt" + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-request-transformer/3.11.json b/json_schemas/ai-request-transformer/3.11.json new file mode 100644 index 00000000..75e4fab5 --- /dev/null +++ b/json_schemas/ai-request-transformer/3.11.json @@ -0,0 +1,425 @@ +{ + "properties": { + "config": { + "properties": { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 60000, + "description": "Timeout in milliseconds for the AI upstream service.", + "type": "integer" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": true, + "description": "Verify the TLS certificate of the AI upstream service.", + "type": "boolean" + }, + "llm": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + }, + "embeddings_normalize": { + "default": false, + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "type": "boolean" + }, + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "cohere": { + "properties": { + "embedding_input_type": { + "default": "classification", + "description": "The purpose of the input text to calculate embedding vectors.", + "enum": [ + "classification", + "clustering", + "image", + "search_document", + "search_query" + ], + "type": "string" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "embeddings_dimensions": { + "description": "If using embeddings models, set the number of dimensions to generate.", + "minimum": 0, + "type": "integer" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. ", + "enum": [ + "audio/v1/audio/speech", + "audio/v1/audio/transcriptions", + "audio/v1/audio/translations", + "image/v1/images/edits", + "image/v1/images/generations", + "llm/v1/assistants", + "llm/v1/batches", + "llm/v1/chat", + "llm/v1/completions", + "llm/v1/embeddings", + "llm/v1/files", + "llm/v1/responses", + "preserve", + "realtime/v1/realtime" + ], + "type": "string" + } + }, + "required": [ + "model", + "route_type" + ], + "type": "object" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "minimum": 0, + "type": "integer" + }, + "prompt": { + "description": "Use this prompt to tune the LLM system/assistant message for the incoming proxy request (from the client), and what you are expecting in return.", + "type": "string" + }, + "transformation_extract_pattern": { + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the request phase. The first match will be set as the outgoing body. If the AI service's response doesn't match this pattern, it is marked as a failure.", + "type": "string" + } + }, + "required": [ + "llm", + "prompt" + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-request-transformer/3.12.json b/json_schemas/ai-request-transformer/3.12.json new file mode 100644 index 00000000..75e4fab5 --- /dev/null +++ b/json_schemas/ai-request-transformer/3.12.json @@ -0,0 +1,425 @@ +{ + "properties": { + "config": { + "properties": { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 60000, + "description": "Timeout in milliseconds for the AI upstream service.", + "type": "integer" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": true, + "description": "Verify the TLS certificate of the AI upstream service.", + "type": "boolean" + }, + "llm": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + }, + "embeddings_normalize": { + "default": false, + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "type": "boolean" + }, + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "cohere": { + "properties": { + "embedding_input_type": { + "default": "classification", + "description": "The purpose of the input text to calculate embedding vectors.", + "enum": [ + "classification", + "clustering", + "image", + "search_document", + "search_query" + ], + "type": "string" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "embeddings_dimensions": { + "description": "If using embeddings models, set the number of dimensions to generate.", + "minimum": 0, + "type": "integer" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. ", + "enum": [ + "audio/v1/audio/speech", + "audio/v1/audio/transcriptions", + "audio/v1/audio/translations", + "image/v1/images/edits", + "image/v1/images/generations", + "llm/v1/assistants", + "llm/v1/batches", + "llm/v1/chat", + "llm/v1/completions", + "llm/v1/embeddings", + "llm/v1/files", + "llm/v1/responses", + "preserve", + "realtime/v1/realtime" + ], + "type": "string" + } + }, + "required": [ + "model", + "route_type" + ], + "type": "object" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "minimum": 0, + "type": "integer" + }, + "prompt": { + "description": "Use this prompt to tune the LLM system/assistant message for the incoming proxy request (from the client), and what you are expecting in return.", + "type": "string" + }, + "transformation_extract_pattern": { + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the request phase. The first match will be set as the outgoing body. If the AI service's response doesn't match this pattern, it is marked as a failure.", + "type": "string" + } + }, + "required": [ + "llm", + "prompt" + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-request-transformer/3.7.json b/json_schemas/ai-request-transformer/3.7.json new file mode 100644 index 00000000..1a5300da --- /dev/null +++ b/json_schemas/ai-request-transformer/3.7.json @@ -0,0 +1,308 @@ +{ + "properties": { + "config": { + "properties": { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 60000, + "description": "Timeout in milliseconds for the AI upstream service.", + "type": "integer" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": true, + "description": "Verify the TLS certificate of the AI upstream service.", + "type": "boolean" + }, + "llm": { + "properties": { + "auth": { + "properties": { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "default": 256, + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "response_streaming": { + "default": "allow", + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "enum": [ + "allow", + "always", + "deny" + ], + "type": "string" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "cohere", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "enum": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "type": "string" + } + }, + "required": [ + "model", + "route_type" + ], + "type": "object" + }, + "prompt": { + "description": "Use this prompt to tune the LLM system/assistant message for the incoming proxy request (from the client), and what you are expecting in return.", + "type": "string" + }, + "transformation_extract_pattern": { + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the request phase. The first match will be set as the outgoing body. If the AI service's response doesn't match this pattern, it is marked as a failure.", + "type": "string" + } + }, + "required": [ + "llm", + "prompt" + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-request-transformer/3.8.json b/json_schemas/ai-request-transformer/3.8.json new file mode 100644 index 00000000..c59997d5 --- /dev/null +++ b/json_schemas/ai-request-transformer/3.8.json @@ -0,0 +1,370 @@ +{ + "properties": { + "config": { + "properties": { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 60000, + "description": "Timeout in milliseconds for the AI upstream service.", + "type": "integer" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": true, + "description": "Verify the TLS certificate of the AI upstream service.", + "type": "boolean" + }, + "llm": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "default": 256, + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "enum": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "type": "string" + } + }, + "required": [ + "model", + "route_type" + ], + "type": "object" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + }, + "prompt": { + "description": "Use this prompt to tune the LLM system/assistant message for the incoming proxy request (from the client), and what you are expecting in return.", + "type": "string" + }, + "transformation_extract_pattern": { + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the request phase. The first match will be set as the outgoing body. If the AI service's response doesn't match this pattern, it is marked as a failure.", + "type": "string" + } + }, + "required": [ + "llm", + "prompt" + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-request-transformer/3.9.json b/json_schemas/ai-request-transformer/3.9.json new file mode 100644 index 00000000..daca3602 --- /dev/null +++ b/json_schemas/ai-request-transformer/3.9.json @@ -0,0 +1,387 @@ +{ + "properties": { + "config": { + "properties": { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 60000, + "description": "Timeout in milliseconds for the AI upstream service.", + "type": "integer" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": true, + "description": "Verify the TLS certificate of the AI upstream service.", + "type": "boolean" + }, + "llm": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "default": 256, + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "enum": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "type": "string" + } + }, + "required": [ + "model", + "route_type" + ], + "type": "object" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + }, + "prompt": { + "description": "Use this prompt to tune the LLM system/assistant message for the incoming proxy request (from the client), and what you are expecting in return.", + "type": "string" + }, + "transformation_extract_pattern": { + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the request phase. The first match will be set as the outgoing body. If the AI service's response doesn't match this pattern, it is marked as a failure.", + "type": "string" + } + }, + "required": [ + "llm", + "prompt" + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-response-transformer/3.10.json b/json_schemas/ai-response-transformer/3.10.json new file mode 100644 index 00000000..2ba4feef --- /dev/null +++ b/json_schemas/ai-response-transformer/3.10.json @@ -0,0 +1,416 @@ +{ + "properties": { + "config": { + "properties": { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 60000, + "description": "Timeout in milliseconds for the AI upstream service.", + "type": "integer" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": true, + "description": "Verify the TLS certificate of the AI upstream service.", + "type": "boolean" + }, + "llm": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "enum": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "type": "string" + } + }, + "required": [ + "model", + "route_type" + ], + "type": "object" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + }, + "parse_llm_response_json_instructions": { + "default": false, + "description": "Set true to read specific response format from the LLM, and accordingly set the status code / body / headers that proxy back to the client. You need to engineer your LLM prompt to return the correct format, see plugin docs 'Overview' page for usage instructions.", + "type": "boolean" + }, + "prompt": { + "description": "Use this prompt to tune the LLM system/assistant message for the returning proxy response (from the upstream), adn what response format you are expecting.", + "type": "string" + }, + "transformation_extract_pattern": { + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the response phase. The first match will be set as the returning body. If the AI service's response doesn't match this pattern, a failure is returned to the client.", + "type": "string" + } + }, + "required": [ + "llm", + "prompt" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-response-transformer/3.11.json b/json_schemas/ai-response-transformer/3.11.json new file mode 100644 index 00000000..68b46a67 --- /dev/null +++ b/json_schemas/ai-response-transformer/3.11.json @@ -0,0 +1,441 @@ +{ + "properties": { + "config": { + "properties": { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 60000, + "description": "Timeout in milliseconds for the AI upstream service.", + "type": "integer" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": true, + "description": "Verify the TLS certificate of the AI upstream service.", + "type": "boolean" + }, + "llm": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + }, + "embeddings_normalize": { + "default": false, + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "type": "boolean" + }, + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "cohere": { + "properties": { + "embedding_input_type": { + "default": "classification", + "description": "The purpose of the input text to calculate embedding vectors.", + "enum": [ + "classification", + "clustering", + "image", + "search_document", + "search_query" + ], + "type": "string" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "embeddings_dimensions": { + "description": "If using embeddings models, set the number of dimensions to generate.", + "minimum": 0, + "type": "integer" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. ", + "enum": [ + "audio/v1/audio/speech", + "audio/v1/audio/transcriptions", + "audio/v1/audio/translations", + "image/v1/images/edits", + "image/v1/images/generations", + "llm/v1/assistants", + "llm/v1/batches", + "llm/v1/chat", + "llm/v1/completions", + "llm/v1/embeddings", + "llm/v1/files", + "llm/v1/responses", + "preserve", + "realtime/v1/realtime" + ], + "type": "string" + } + }, + "required": [ + "model", + "route_type" + ], + "type": "object" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "minimum": 0, + "type": "integer" + }, + "parse_llm_response_json_instructions": { + "default": false, + "description": "Set true to read specific response format from the LLM, and accordingly set the status code / body / headers that proxy back to the client. You need to engineer your LLM prompt to return the correct format, see plugin docs 'Overview' page for usage instructions.", + "type": "boolean" + }, + "prompt": { + "description": "Use this prompt to tune the LLM system/assistant message for the returning proxy response (from the upstream), adn what response format you are expecting.", + "type": "string" + }, + "transformation_extract_pattern": { + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the response phase. The first match will be set as the returning body. If the AI service's response doesn't match this pattern, a failure is returned to the client.", + "type": "string" + } + }, + "required": [ + "llm", + "prompt" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-response-transformer/3.12.json b/json_schemas/ai-response-transformer/3.12.json new file mode 100644 index 00000000..68b46a67 --- /dev/null +++ b/json_schemas/ai-response-transformer/3.12.json @@ -0,0 +1,441 @@ +{ + "properties": { + "config": { + "properties": { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 60000, + "description": "Timeout in milliseconds for the AI upstream service.", + "type": "integer" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": true, + "description": "Verify the TLS certificate of the AI upstream service.", + "type": "boolean" + }, + "llm": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + }, + "embeddings_normalize": { + "default": false, + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "type": "boolean" + }, + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "cohere": { + "properties": { + "embedding_input_type": { + "default": "classification", + "description": "The purpose of the input text to calculate embedding vectors.", + "enum": [ + "classification", + "clustering", + "image", + "search_document", + "search_query" + ], + "type": "string" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "embeddings_dimensions": { + "description": "If using embeddings models, set the number of dimensions to generate.", + "minimum": 0, + "type": "integer" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. ", + "enum": [ + "audio/v1/audio/speech", + "audio/v1/audio/transcriptions", + "audio/v1/audio/translations", + "image/v1/images/edits", + "image/v1/images/generations", + "llm/v1/assistants", + "llm/v1/batches", + "llm/v1/chat", + "llm/v1/completions", + "llm/v1/embeddings", + "llm/v1/files", + "llm/v1/responses", + "preserve", + "realtime/v1/realtime" + ], + "type": "string" + } + }, + "required": [ + "model", + "route_type" + ], + "type": "object" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "minimum": 0, + "type": "integer" + }, + "parse_llm_response_json_instructions": { + "default": false, + "description": "Set true to read specific response format from the LLM, and accordingly set the status code / body / headers that proxy back to the client. You need to engineer your LLM prompt to return the correct format, see plugin docs 'Overview' page for usage instructions.", + "type": "boolean" + }, + "prompt": { + "description": "Use this prompt to tune the LLM system/assistant message for the returning proxy response (from the upstream), adn what response format you are expecting.", + "type": "string" + }, + "transformation_extract_pattern": { + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the response phase. The first match will be set as the returning body. If the AI service's response doesn't match this pattern, a failure is returned to the client.", + "type": "string" + } + }, + "required": [ + "llm", + "prompt" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-response-transformer/3.7.json b/json_schemas/ai-response-transformer/3.7.json new file mode 100644 index 00000000..4260b5cb --- /dev/null +++ b/json_schemas/ai-response-transformer/3.7.json @@ -0,0 +1,313 @@ +{ + "properties": { + "config": { + "properties": { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 60000, + "description": "Timeout in milliseconds for the AI upstream service.", + "type": "integer" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": true, + "description": "Verify the TLS certificate of the AI upstream service.", + "type": "boolean" + }, + "llm": { + "properties": { + "auth": { + "properties": { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "default": 256, + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "response_streaming": { + "default": "allow", + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "enum": [ + "allow", + "always", + "deny" + ], + "type": "string" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "cohere", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "enum": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "type": "string" + } + }, + "required": [ + "model", + "route_type" + ], + "type": "object" + }, + "parse_llm_response_json_instructions": { + "default": false, + "description": "Set true to read specific response format from the LLM, and accordingly set the status code / body / headers that proxy back to the client. You need to engineer your LLM prompt to return the correct format, see plugin docs 'Overview' page for usage instructions.", + "type": "boolean" + }, + "prompt": { + "description": "Use this prompt to tune the LLM system/assistant message for the returning proxy response (from the upstream), adn what response format you are expecting.", + "type": "string" + }, + "transformation_extract_pattern": { + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the response phase. The first match will be set as the returning body. If the AI service's response doesn't match this pattern, a failure is returned to the client.", + "type": "string" + } + }, + "required": [ + "llm", + "prompt" + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-response-transformer/3.8.json b/json_schemas/ai-response-transformer/3.8.json new file mode 100644 index 00000000..270147be --- /dev/null +++ b/json_schemas/ai-response-transformer/3.8.json @@ -0,0 +1,388 @@ +{ + "properties": { + "config": { + "properties": { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 60000, + "description": "Timeout in milliseconds for the AI upstream service.", + "type": "integer" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": true, + "description": "Verify the TLS certificate of the AI upstream service.", + "type": "boolean" + }, + "llm": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "default": 256, + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "enum": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "type": "string" + } + }, + "required": [ + "model", + "route_type" + ], + "type": "object" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + }, + "parse_llm_response_json_instructions": { + "default": false, + "description": "Set true to read specific response format from the LLM, and accordingly set the status code / body / headers that proxy back to the client. You need to engineer your LLM prompt to return the correct format, see plugin docs 'Overview' page for usage instructions.", + "type": "boolean" + }, + "prompt": { + "description": "Use this prompt to tune the LLM system/assistant message for the returning proxy response (from the upstream), adn what response format you are expecting.", + "type": "string" + }, + "transformation_extract_pattern": { + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the response phase. The first match will be set as the returning body. If the AI service's response doesn't match this pattern, a failure is returned to the client.", + "type": "string" + } + }, + "required": [ + "llm", + "prompt" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-response-transformer/3.9.json b/json_schemas/ai-response-transformer/3.9.json new file mode 100644 index 00000000..fc73fb23 --- /dev/null +++ b/json_schemas/ai-response-transformer/3.9.json @@ -0,0 +1,405 @@ +{ + "properties": { + "config": { + "properties": { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 60000, + "description": "Timeout in milliseconds for the AI upstream service.", + "type": "integer" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": true, + "description": "Verify the TLS certificate of the AI upstream service.", + "type": "boolean" + }, + "llm": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "logging": { + "properties": { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + }, + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + }, + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + }, + "bedrock": { + "properties": { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "minimum": 0, + "type": "number" + }, + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "enum": [ + "ollama", + "openai", + "raw" + ], + "type": "string" + }, + "max_tokens": { + "default": 256, + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + }, + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "enum": [ + "ollama", + "openai" + ], + "type": "string" + }, + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "minimum": 0, + "type": "number" + }, + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "maximum": 5, + "minimum": 0, + "type": "number" + }, + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "maximum": 500, + "minimum": 0, + "type": "integer" + }, + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + }, + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "enum": [ + "anthropic", + "azure", + "bedrock", + "cohere", + "gemini", + "huggingface", + "llama2", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "provider" + ], + "type": "object" + }, + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "enum": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "type": "string" + } + }, + "required": [ + "model", + "route_type" + ], + "type": "object" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + }, + "parse_llm_response_json_instructions": { + "default": false, + "description": "Set true to read specific response format from the LLM, and accordingly set the status code / body / headers that proxy back to the client. You need to engineer your LLM prompt to return the correct format, see plugin docs 'Overview' page for usage instructions.", + "type": "boolean" + }, + "prompt": { + "description": "Use this prompt to tune the LLM system/assistant message for the returning proxy response (from the upstream), adn what response format you are expecting.", + "type": "string" + }, + "transformation_extract_pattern": { + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the response phase. The first match will be set as the returning body. If the AI service's response doesn't match this pattern, a failure is returned to the client.", + "type": "string" + } + }, + "required": [ + "llm", + "prompt" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-sanitizer/3.10.json b/json_schemas/ai-sanitizer/3.10.json new file mode 100644 index 00000000..2fe62504 --- /dev/null +++ b/json_schemas/ai-sanitizer/3.10.json @@ -0,0 +1,194 @@ +{ + "properties": { + "config": { + "properties": { + "anonymize": { + "default": [ + "all_and_credentials" + ], + "description": "List of types to be anonymized", + "items": { + "enum": [ + "all", + "all_and_credentials", + "bank", + "credentials", + "creditcard", + "crypto", + "custom", + "date", + "domain", + "driverlicense", + "email", + "general", + "ip", + "medical", + "nationalid", + "nrp", + "passport", + "phone", + "ssn", + "url" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "custom_patterns": { + "description": "List of custom patterns to be used for anonymization", + "items": { + "properties": { + "name": { + "type": "string" + }, + "regex": { + "type": "string" + }, + "score": { + "default": 0.5, + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "name", + "regex" + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "host": { + "default": "localhost", + "description": "The host of the sanitizer", + "type": "string" + }, + "keepalive_timeout": { + "default": 60000, + "description": "The keepalive timeout for the established http connnection", + "type": "number" + }, + "port": { + "default": 8080, + "description": "The port of the sanitizer", + "type": "number" + }, + "recover_redacted": { + "default": true, + "description": "Whether to recover redacted data", + "type": "boolean" + }, + "redact_type": { + "default": "placeholder", + "description": "What value to be used to redacted to", + "enum": [ + "placeholder", + "synthetic" + ], + "type": "string" + }, + "scheme": { + "default": "http", + "description": "The protocol can be http and https", + "type": "string" + }, + "stop_on_error": { + "default": true, + "description": "Stop processing if an error occurs", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Connection timeout with the sanitizer", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/ai-sanitizer/3.11.json b/json_schemas/ai-sanitizer/3.11.json new file mode 100644 index 00000000..b17db4b8 --- /dev/null +++ b/json_schemas/ai-sanitizer/3.11.json @@ -0,0 +1,178 @@ +{ + "properties": { + "config": { + "properties": { + "anonymize": { + "default": [ + "all_and_credentials" + ], + "description": "List of types to be anonymized", + "items": { + "enum": [ + "all", + "all_and_credentials", + "bank", + "credentials", + "creditcard", + "crypto", + "custom", + "date", + "domain", + "driverlicense", + "email", + "general", + "ip", + "medical", + "nationalid", + "nrp", + "passport", + "phone", + "ssn", + "url" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "custom_patterns": { + "description": "List of custom patterns to be used for anonymization", + "items": { + "properties": { + "name": { + "type": "string" + }, + "regex": { + "type": "string" + }, + "score": { + "default": 0.5, + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "name", + "regex" + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "host": { + "default": "localhost", + "description": "The host of the sanitizer", + "type": "string" + }, + "keepalive_timeout": { + "default": 60000, + "description": "The keepalive timeout for the established http connnection", + "type": "number" + }, + "port": { + "default": 8080, + "description": "The port of the sanitizer", + "type": "number" + }, + "recover_redacted": { + "default": true, + "description": "Whether to recover redacted data", + "type": "boolean" + }, + "redact_type": { + "default": "placeholder", + "description": "What value to be used to redacted to", + "enum": [ + "placeholder", + "synthetic" + ], + "type": "string" + }, + "scheme": { + "default": "http", + "description": "The protocol can be http and https", + "type": "string" + }, + "stop_on_error": { + "default": true, + "description": "Stop processing if an error occurs", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Connection timeout with the sanitizer", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/ai-sanitizer/3.12.json b/json_schemas/ai-sanitizer/3.12.json new file mode 100644 index 00000000..173cfde1 --- /dev/null +++ b/json_schemas/ai-sanitizer/3.12.json @@ -0,0 +1,183 @@ +{ + "properties": { + "config": { + "properties": { + "anonymize": { + "default": [ + "all_and_credentials" + ], + "description": "List of types to be anonymized", + "items": { + "enum": [ + "all", + "all_and_credentials", + "bank", + "credentials", + "creditcard", + "crypto", + "custom", + "date", + "domain", + "driverlicense", + "email", + "general", + "ip", + "medical", + "nationalid", + "nrp", + "passport", + "phone", + "ssn", + "url" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "block_if_detected": { + "default": false, + "description": "Whether to block requests containing PII data", + "type": "boolean" + }, + "custom_patterns": { + "description": "List of custom patterns to be used for anonymization", + "items": { + "properties": { + "name": { + "type": "string" + }, + "regex": { + "type": "string" + }, + "score": { + "default": 0.5, + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "required": [ + "name", + "regex" + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "host": { + "default": "localhost", + "description": "The host of the sanitizer", + "type": "string" + }, + "keepalive_timeout": { + "default": 60000, + "description": "The keepalive timeout for the established http connnection", + "type": "number" + }, + "port": { + "default": 8080, + "description": "The port of the sanitizer", + "type": "number" + }, + "recover_redacted": { + "default": true, + "description": "Whether to recover redacted data", + "type": "boolean" + }, + "redact_type": { + "default": "placeholder", + "description": "What value to be used to redacted to", + "enum": [ + "placeholder", + "synthetic" + ], + "type": "string" + }, + "scheme": { + "default": "http", + "description": "The protocol can be http and https", + "type": "string" + }, + "stop_on_error": { + "default": true, + "description": "Stop processing if an error occurs", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Connection timeout with the sanitizer", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/ai-semantic-cache/3.10.json b/json_schemas/ai-semantic-cache/3.10.json new file mode 100644 index 00000000..914d28b9 --- /dev/null +++ b/json_schemas/ai-semantic-cache/3.10.json @@ -0,0 +1,627 @@ +{ + "properties": { + "config": { + "properties": { + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "minimum": 0, + "type": "integer" + }, + "embeddings": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "azure": { + "properties": { + "api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string" + } + }, + "required": [ + "azure" + ], + "type": "object" + }, + "provider": { + "description": "AI provider format to use for embeddings API", + "enum": [ + "azure", + "bedrock", + "gemini", + "huggingface", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "name", + "provider" + ], + "type": "object" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "exact_caching": { + "default": false, + "description": "When enabled, a first check for exact query will be done. It will impact DB size", + "type": "boolean" + }, + "ignore_assistant_prompts": { + "default": false, + "description": "Ignore and discard any assistant prompts when Vectorizing the request", + "type": "boolean" + }, + "ignore_system_prompts": { + "default": false, + "description": "Ignore and discard any system prompts when Vectorizing the request", + "type": "boolean" + }, + "ignore_tool_prompts": { + "default": false, + "description": "Ignore and discard any tool prompts when Vectorizing the request", + "type": "boolean" + }, + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "gemini", + "openai" + ], + "type": "string" + }, + "message_countback": { + "default": 1, + "description": "Number of messages in the chat history to Vectorize/Cache", + "maximum": 1000, + "minimum": 1, + "type": "number" + }, + "stop_on_failure": { + "default": false, + "description": "Halt the LLM request process in case of a caching system failure", + "type": "boolean" + }, + "vectordb": { + "properties": { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer" + }, + "distance_metric": { + "description": "the distance metric to use for vector searches", + "enum": [ + "cosine", + "euclidean" + ], + "type": "string" + }, + "pgvector": { + "properties": { + "database": { + "default": "kong-pgvector", + "description": "the database of the pgvector database", + "type": "string" + }, + "host": { + "default": "127.0.0.1", + "description": "the host of the pgvector database", + "type": "string" + }, + "password": { + "description": "the password of the pgvector database\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 5432, + "description": "the port of the pgvector database", + "type": "integer" + }, + "ssl": { + "default": false, + "description": "whether to use ssl for the pgvector database", + "type": "boolean" + }, + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + }, + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + }, + "ssl_required": { + "default": false, + "description": "whether ssl is required for the pgvector database", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "whether to verify ssl for the pgvector database", + "type": "boolean" + }, + "ssl_version": { + "default": "tlsv1_2", + "description": "the ssl version to use for the pgvector database", + "enum": [ + "any", + "tlsv1_2", + "tlsv1_3" + ], + "type": "string" + }, + "timeout": { + "default": 5000, + "description": "the timeout of the pgvector database", + "type": "number" + }, + "user": { + "default": "postgres", + "description": "the user of the pgvector database\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "description": "which vector database driver to use", + "enum": [ + "pgvector", + "redis" + ], + "type": "string" + }, + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number" + } + }, + "required": [ + "dimensions", + "distance_metric", + "strategy", + "threshold" + ], + "type": "object" + } + }, + "required": [ + "embeddings", + "vectordb" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-semantic-cache/3.11.json b/json_schemas/ai-semantic-cache/3.11.json new file mode 100644 index 00000000..a63afc95 --- /dev/null +++ b/json_schemas/ai-semantic-cache/3.11.json @@ -0,0 +1,610 @@ +{ + "properties": { + "config": { + "properties": { + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "minimum": 0, + "type": "integer" + }, + "embeddings": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "azure": { + "properties": { + "api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + }, + "embeddings_normalize": { + "default": false, + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "type": "boolean" + }, + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string" + } + }, + "required": [ + "azure" + ], + "type": "object" + }, + "provider": { + "description": "AI provider format to use for embeddings API", + "enum": [ + "azure", + "bedrock", + "gemini", + "huggingface", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "name", + "provider" + ], + "type": "object" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "exact_caching": { + "default": false, + "description": "When enabled, a first check for exact query will be done. It will impact DB size", + "type": "boolean" + }, + "ignore_assistant_prompts": { + "default": false, + "description": "Ignore and discard any assistant prompts when Vectorizing the request", + "type": "boolean" + }, + "ignore_system_prompts": { + "default": false, + "description": "Ignore and discard any system prompts when Vectorizing the request", + "type": "boolean" + }, + "ignore_tool_prompts": { + "default": false, + "description": "Ignore and discard any tool prompts when Vectorizing the request", + "type": "boolean" + }, + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "cohere", + "gemini", + "huggingface", + "openai" + ], + "type": "string" + }, + "message_countback": { + "default": 1, + "description": "Number of messages in the chat history to Vectorize/Cache", + "maximum": 1000, + "minimum": 1, + "type": "number" + }, + "stop_on_failure": { + "default": false, + "description": "Halt the LLM request process in case of a caching system failure", + "type": "boolean" + }, + "vectordb": { + "properties": { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer" + }, + "distance_metric": { + "description": "the distance metric to use for vector searches", + "enum": [ + "cosine", + "euclidean" + ], + "type": "string" + }, + "pgvector": { + "properties": { + "database": { + "default": "kong-pgvector", + "description": "the database of the pgvector database", + "type": "string" + }, + "host": { + "default": "127.0.0.1", + "description": "the host of the pgvector database", + "type": "string" + }, + "password": { + "description": "the password of the pgvector database\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 5432, + "description": "the port of the pgvector database", + "type": "integer" + }, + "ssl": { + "default": false, + "description": "whether to use ssl for the pgvector database", + "type": "boolean" + }, + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + }, + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + }, + "ssl_required": { + "default": false, + "description": "whether ssl is required for the pgvector database", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "whether to verify ssl for the pgvector database", + "type": "boolean" + }, + "ssl_version": { + "default": "tlsv1_2", + "description": "the ssl version to use for the pgvector database", + "enum": [ + "any", + "tlsv1_2", + "tlsv1_3" + ], + "type": "string" + }, + "timeout": { + "default": 5000, + "description": "the timeout of the pgvector database", + "type": "number" + }, + "user": { + "default": "postgres", + "description": "the user of the pgvector database\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "description": "which vector database driver to use", + "enum": [ + "pgvector", + "redis" + ], + "type": "string" + }, + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number" + } + }, + "required": [ + "dimensions", + "distance_metric", + "strategy", + "threshold" + ], + "type": "object" + } + }, + "required": [ + "embeddings", + "vectordb" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-semantic-cache/3.12.json b/json_schemas/ai-semantic-cache/3.12.json new file mode 100644 index 00000000..a63afc95 --- /dev/null +++ b/json_schemas/ai-semantic-cache/3.12.json @@ -0,0 +1,610 @@ +{ + "properties": { + "config": { + "properties": { + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "minimum": 0, + "type": "integer" + }, + "embeddings": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "azure": { + "properties": { + "api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + }, + "embeddings_normalize": { + "default": false, + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "type": "boolean" + }, + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string" + } + }, + "required": [ + "azure" + ], + "type": "object" + }, + "provider": { + "description": "AI provider format to use for embeddings API", + "enum": [ + "azure", + "bedrock", + "gemini", + "huggingface", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "name", + "provider" + ], + "type": "object" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "exact_caching": { + "default": false, + "description": "When enabled, a first check for exact query will be done. It will impact DB size", + "type": "boolean" + }, + "ignore_assistant_prompts": { + "default": false, + "description": "Ignore and discard any assistant prompts when Vectorizing the request", + "type": "boolean" + }, + "ignore_system_prompts": { + "default": false, + "description": "Ignore and discard any system prompts when Vectorizing the request", + "type": "boolean" + }, + "ignore_tool_prompts": { + "default": false, + "description": "Ignore and discard any tool prompts when Vectorizing the request", + "type": "boolean" + }, + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "cohere", + "gemini", + "huggingface", + "openai" + ], + "type": "string" + }, + "message_countback": { + "default": 1, + "description": "Number of messages in the chat history to Vectorize/Cache", + "maximum": 1000, + "minimum": 1, + "type": "number" + }, + "stop_on_failure": { + "default": false, + "description": "Halt the LLM request process in case of a caching system failure", + "type": "boolean" + }, + "vectordb": { + "properties": { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer" + }, + "distance_metric": { + "description": "the distance metric to use for vector searches", + "enum": [ + "cosine", + "euclidean" + ], + "type": "string" + }, + "pgvector": { + "properties": { + "database": { + "default": "kong-pgvector", + "description": "the database of the pgvector database", + "type": "string" + }, + "host": { + "default": "127.0.0.1", + "description": "the host of the pgvector database", + "type": "string" + }, + "password": { + "description": "the password of the pgvector database\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 5432, + "description": "the port of the pgvector database", + "type": "integer" + }, + "ssl": { + "default": false, + "description": "whether to use ssl for the pgvector database", + "type": "boolean" + }, + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + }, + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + }, + "ssl_required": { + "default": false, + "description": "whether ssl is required for the pgvector database", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "whether to verify ssl for the pgvector database", + "type": "boolean" + }, + "ssl_version": { + "default": "tlsv1_2", + "description": "the ssl version to use for the pgvector database", + "enum": [ + "any", + "tlsv1_2", + "tlsv1_3" + ], + "type": "string" + }, + "timeout": { + "default": 5000, + "description": "the timeout of the pgvector database", + "type": "number" + }, + "user": { + "default": "postgres", + "description": "the user of the pgvector database\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "description": "which vector database driver to use", + "enum": [ + "pgvector", + "redis" + ], + "type": "string" + }, + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number" + } + }, + "required": [ + "dimensions", + "distance_metric", + "strategy", + "threshold" + ], + "type": "object" + } + }, + "required": [ + "embeddings", + "vectordb" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-semantic-cache/3.8.json b/json_schemas/ai-semantic-cache/3.8.json new file mode 100644 index 00000000..38806cf6 --- /dev/null +++ b/json_schemas/ai-semantic-cache/3.8.json @@ -0,0 +1,449 @@ +{ + "properties": { + "config": { + "properties": { + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "minimum": 0, + "type": "integer" + }, + "embeddings": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "enum": [ + "mistral-embed", + "text-embedding-3-large", + "text-embedding-3-small" + ], + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider format to use for embeddings API", + "enum": [ + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "name", + "provider" + ], + "type": "object" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "exact_caching": { + "default": false, + "description": "When enabled, a first check for exact query will be done. It will impact DB size", + "type": "boolean" + }, + "ignore_assistant_prompts": { + "default": false, + "description": "Ignore and discard any assistant prompts when Vectorizing the request", + "type": "boolean" + }, + "ignore_system_prompts": { + "default": false, + "description": "Ignore and discard any system prompts when Vectorizing the request", + "type": "boolean" + }, + "message_countback": { + "default": 1, + "description": "Number of messages in the chat history to Vectorize/Cache", + "maximum": 1000, + "minimum": 1, + "type": "number" + }, + "stop_on_failure": { + "default": false, + "description": "Halt the LLM request process in case of a caching system failure", + "type": "boolean" + }, + "vectordb": { + "properties": { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer" + }, + "distance_metric": { + "description": "the distance metric to use for vector searches", + "enum": [ + "cosine", + "euclidean" + ], + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "translate_backwards": [ + "connect_timeout" + ], + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "description": "which vector database driver to use", + "enum": [ + "redis" + ], + "type": "string" + }, + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number" + } + }, + "required": [ + "dimensions", + "distance_metric", + "strategy", + "threshold" + ], + "type": "object" + } + }, + "required": [ + "embeddings", + "vectordb" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-semantic-cache/3.9.json b/json_schemas/ai-semantic-cache/3.9.json new file mode 100644 index 00000000..c137d470 --- /dev/null +++ b/json_schemas/ai-semantic-cache/3.9.json @@ -0,0 +1,461 @@ +{ + "properties": { + "config": { + "properties": { + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "minimum": 0, + "type": "integer" + }, + "embeddings": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider format to use for embeddings API", + "enum": [ + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "name", + "provider" + ], + "type": "object" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "exact_caching": { + "default": false, + "description": "When enabled, a first check for exact query will be done. It will impact DB size", + "type": "boolean" + }, + "ignore_assistant_prompts": { + "default": false, + "description": "Ignore and discard any assistant prompts when Vectorizing the request", + "type": "boolean" + }, + "ignore_system_prompts": { + "default": false, + "description": "Ignore and discard any system prompts when Vectorizing the request", + "type": "boolean" + }, + "ignore_tool_prompts": { + "default": false, + "description": "Ignore and discard any tool prompts when Vectorizing the request", + "type": "boolean" + }, + "message_countback": { + "default": 1, + "description": "Number of messages in the chat history to Vectorize/Cache", + "maximum": 1000, + "minimum": 1, + "type": "number" + }, + "stop_on_failure": { + "default": false, + "description": "Halt the LLM request process in case of a caching system failure", + "type": "boolean" + }, + "vectordb": { + "properties": { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer" + }, + "distance_metric": { + "description": "the distance metric to use for vector searches", + "enum": [ + "cosine", + "euclidean" + ], + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "description": "which vector database driver to use", + "enum": [ + "redis" + ], + "type": "string" + }, + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number" + } + }, + "required": [ + "dimensions", + "distance_metric", + "strategy", + "threshold" + ], + "type": "object" + } + }, + "required": [ + "embeddings", + "vectordb" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-semantic-prompt-guard/3.10.json b/json_schemas/ai-semantic-prompt-guard/3.10.json new file mode 100644 index 00000000..8c712b47 --- /dev/null +++ b/json_schemas/ai-semantic-prompt-guard/3.10.json @@ -0,0 +1,647 @@ +{ + "properties": { + "config": { + "properties": { + "embeddings": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "azure": { + "properties": { + "api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string" + } + }, + "required": [ + "azure" + ], + "type": "object" + }, + "provider": { + "description": "AI provider format to use for embeddings API", + "enum": [ + "azure", + "bedrock", + "gemini", + "huggingface", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "name", + "provider" + ], + "type": "object" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "gemini", + "openai" + ], + "type": "string" + }, + "rules": { + "properties": { + "allow_prompts": { + "description": "List of prompts to allow.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "maxLength": 100, + "type": "array" + }, + "deny_prompts": { + "description": "List of prompts to deny.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "maxLength": 100, + "type": "array" + }, + "match_all_conversation_history": { + "default": false, + "description": "If false, will ignore all previous chat prompts from the conversation history.", + "type": "boolean" + }, + "match_all_roles": { + "default": false, + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "type": "boolean" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "search": { + "properties": { + "threshold": { + "default": 0.5, + "description": "Threshold for the similarity score to be considered a match.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "vectordb": { + "properties": { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer" + }, + "distance_metric": { + "description": "the distance metric to use for vector searches", + "enum": [ + "cosine", + "euclidean" + ], + "type": "string" + }, + "pgvector": { + "properties": { + "database": { + "default": "kong-pgvector", + "description": "the database of the pgvector database", + "type": "string" + }, + "host": { + "default": "127.0.0.1", + "description": "the host of the pgvector database", + "type": "string" + }, + "password": { + "description": "the password of the pgvector database\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 5432, + "description": "the port of the pgvector database", + "type": "integer" + }, + "ssl": { + "default": false, + "description": "whether to use ssl for the pgvector database", + "type": "boolean" + }, + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + }, + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + }, + "ssl_required": { + "default": false, + "description": "whether ssl is required for the pgvector database", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "whether to verify ssl for the pgvector database", + "type": "boolean" + }, + "ssl_version": { + "default": "tlsv1_2", + "description": "the ssl version to use for the pgvector database", + "enum": [ + "any", + "tlsv1_2", + "tlsv1_3" + ], + "type": "string" + }, + "timeout": { + "default": 5000, + "description": "the timeout of the pgvector database", + "type": "number" + }, + "user": { + "default": "postgres", + "description": "the user of the pgvector database\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "description": "which vector database driver to use", + "enum": [ + "pgvector", + "redis" + ], + "type": "string" + }, + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number" + } + }, + "required": [ + "dimensions", + "distance_metric", + "strategy", + "threshold" + ], + "type": "object" + } + }, + "required": [ + "embeddings", + "vectordb" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-semantic-prompt-guard/3.11.json b/json_schemas/ai-semantic-prompt-guard/3.11.json new file mode 100644 index 00000000..9df98077 --- /dev/null +++ b/json_schemas/ai-semantic-prompt-guard/3.11.json @@ -0,0 +1,635 @@ +{ + "properties": { + "config": { + "properties": { + "embeddings": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "azure": { + "properties": { + "api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + }, + "embeddings_normalize": { + "default": false, + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "type": "boolean" + }, + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string" + } + }, + "required": [ + "azure" + ], + "type": "object" + }, + "provider": { + "description": "AI provider format to use for embeddings API", + "enum": [ + "azure", + "bedrock", + "gemini", + "huggingface", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "name", + "provider" + ], + "type": "object" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "genai_category": { + "default": "text/generation", + "description": "Generative AI category of the request", + "enum": [ + "audio/speech", + "audio/transcription", + "image/generation", + "realtime/generation", + "text/embeddings", + "text/generation" + ], + "type": "string" + }, + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "cohere", + "gemini", + "huggingface", + "openai" + ], + "type": "string" + }, + "rules": { + "properties": { + "allow_prompts": { + "description": "List of prompts to allow.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [], + "type": "string" + }, + "maxLength": 100, + "type": "array" + }, + "deny_prompts": { + "description": "List of prompts to deny.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [], + "type": "string" + }, + "maxLength": 100, + "type": "array" + }, + "match_all_conversation_history": { + "default": false, + "description": "If false, will ignore all previous chat prompts from the conversation history.", + "type": "boolean" + }, + "match_all_roles": { + "default": false, + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "type": "boolean" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "search": { + "properties": { + "threshold": { + "default": 0.5, + "description": "Threshold for the similarity score to be considered a match.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "vectordb": { + "properties": { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer" + }, + "distance_metric": { + "description": "the distance metric to use for vector searches", + "enum": [ + "cosine", + "euclidean" + ], + "type": "string" + }, + "pgvector": { + "properties": { + "database": { + "default": "kong-pgvector", + "description": "the database of the pgvector database", + "type": "string" + }, + "host": { + "default": "127.0.0.1", + "description": "the host of the pgvector database", + "type": "string" + }, + "password": { + "description": "the password of the pgvector database\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 5432, + "description": "the port of the pgvector database", + "type": "integer" + }, + "ssl": { + "default": false, + "description": "whether to use ssl for the pgvector database", + "type": "boolean" + }, + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + }, + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + }, + "ssl_required": { + "default": false, + "description": "whether ssl is required for the pgvector database", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "whether to verify ssl for the pgvector database", + "type": "boolean" + }, + "ssl_version": { + "default": "tlsv1_2", + "description": "the ssl version to use for the pgvector database", + "enum": [ + "any", + "tlsv1_2", + "tlsv1_3" + ], + "type": "string" + }, + "timeout": { + "default": 5000, + "description": "the timeout of the pgvector database", + "type": "number" + }, + "user": { + "default": "postgres", + "description": "the user of the pgvector database\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "description": "which vector database driver to use", + "enum": [ + "pgvector", + "redis" + ], + "type": "string" + }, + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number" + } + }, + "required": [ + "dimensions", + "distance_metric", + "strategy", + "threshold" + ], + "type": "object" + } + }, + "required": [ + "embeddings", + "vectordb" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-semantic-prompt-guard/3.12.json b/json_schemas/ai-semantic-prompt-guard/3.12.json new file mode 100644 index 00000000..9df98077 --- /dev/null +++ b/json_schemas/ai-semantic-prompt-guard/3.12.json @@ -0,0 +1,635 @@ +{ + "properties": { + "config": { + "properties": { + "embeddings": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "azure": { + "properties": { + "api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + }, + "deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + }, + "instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "bedrock": { + "properties": { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + }, + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + }, + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + }, + "embeddings_normalize": { + "default": false, + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "type": "boolean" + }, + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "gemini": { + "properties": { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + }, + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + }, + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "huggingface": { + "properties": { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean" + }, + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string" + } + }, + "required": [ + "azure" + ], + "type": "object" + }, + "provider": { + "description": "AI provider format to use for embeddings API", + "enum": [ + "azure", + "bedrock", + "gemini", + "huggingface", + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "name", + "provider" + ], + "type": "object" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "genai_category": { + "default": "text/generation", + "description": "Generative AI category of the request", + "enum": [ + "audio/speech", + "audio/transcription", + "image/generation", + "realtime/generation", + "text/embeddings", + "text/generation" + ], + "type": "string" + }, + "llm_format": { + "default": "openai", + "description": "LLM input and output format and schema to use", + "enum": [ + "bedrock", + "cohere", + "gemini", + "huggingface", + "openai" + ], + "type": "string" + }, + "rules": { + "properties": { + "allow_prompts": { + "description": "List of prompts to allow.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [], + "type": "string" + }, + "maxLength": 100, + "type": "array" + }, + "deny_prompts": { + "description": "List of prompts to deny.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [], + "type": "string" + }, + "maxLength": 100, + "type": "array" + }, + "match_all_conversation_history": { + "default": false, + "description": "If false, will ignore all previous chat prompts from the conversation history.", + "type": "boolean" + }, + "match_all_roles": { + "default": false, + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "type": "boolean" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "search": { + "properties": { + "threshold": { + "default": 0.5, + "description": "Threshold for the similarity score to be considered a match.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "vectordb": { + "properties": { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer" + }, + "distance_metric": { + "description": "the distance metric to use for vector searches", + "enum": [ + "cosine", + "euclidean" + ], + "type": "string" + }, + "pgvector": { + "properties": { + "database": { + "default": "kong-pgvector", + "description": "the database of the pgvector database", + "type": "string" + }, + "host": { + "default": "127.0.0.1", + "description": "the host of the pgvector database", + "type": "string" + }, + "password": { + "description": "the password of the pgvector database\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 5432, + "description": "the port of the pgvector database", + "type": "integer" + }, + "ssl": { + "default": false, + "description": "whether to use ssl for the pgvector database", + "type": "boolean" + }, + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + }, + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + }, + "ssl_required": { + "default": false, + "description": "whether ssl is required for the pgvector database", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "whether to verify ssl for the pgvector database", + "type": "boolean" + }, + "ssl_version": { + "default": "tlsv1_2", + "description": "the ssl version to use for the pgvector database", + "enum": [ + "any", + "tlsv1_2", + "tlsv1_3" + ], + "type": "string" + }, + "timeout": { + "default": 5000, + "description": "the timeout of the pgvector database", + "type": "number" + }, + "user": { + "default": "postgres", + "description": "the user of the pgvector database\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "description": "which vector database driver to use", + "enum": [ + "pgvector", + "redis" + ], + "type": "string" + }, + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number" + } + }, + "required": [ + "dimensions", + "distance_metric", + "strategy", + "threshold" + ], + "type": "object" + } + }, + "required": [ + "embeddings", + "vectordb" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-semantic-prompt-guard/3.8.json b/json_schemas/ai-semantic-prompt-guard/3.8.json new file mode 100644 index 00000000..368c48e6 --- /dev/null +++ b/json_schemas/ai-semantic-prompt-guard/3.8.json @@ -0,0 +1,487 @@ +{ + "properties": { + "config": { + "properties": { + "embeddings": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "enum": [ + "mistral-embed", + "text-embedding-3-large", + "text-embedding-3-small" + ], + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider format to use for embeddings API", + "enum": [ + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "name", + "provider" + ], + "type": "object" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "rules": { + "properties": { + "allow_prompts": { + "description": "List of prompts to allow.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "maxLength": 100, + "type": "array" + }, + "deny_prompts": { + "description": "List of prompts to deny.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "maxLength": 100, + "type": "array" + }, + "match_all_conversation_history": { + "default": false, + "description": "If false, will ignore all previous chat prompts from the conversation history.", + "type": "boolean" + }, + "match_all_roles": { + "default": false, + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "type": "boolean" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "search": { + "properties": { + "threshold": { + "default": 0.5, + "description": "Threshold for the similarity score to be considered a match.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "vectordb": { + "properties": { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer" + }, + "distance_metric": { + "description": "the distance metric to use for vector searches", + "enum": [ + "cosine", + "euclidean" + ], + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "translate_backwards": [ + "connect_timeout" + ], + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "description": "which vector database driver to use", + "enum": [ + "redis" + ], + "type": "string" + }, + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number" + } + }, + "required": [ + "dimensions", + "distance_metric", + "strategy", + "threshold" + ], + "type": "object" + } + }, + "required": [ + "embeddings", + "vectordb" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ai-semantic-prompt-guard/3.9.json b/json_schemas/ai-semantic-prompt-guard/3.9.json new file mode 100644 index 00000000..706123fb --- /dev/null +++ b/json_schemas/ai-semantic-prompt-guard/3.9.json @@ -0,0 +1,481 @@ +{ + "properties": { + "config": { + "properties": { + "embeddings": { + "properties": { + "auth": { + "properties": { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + }, + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + }, + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + }, + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "enum": [ + "body", + "query" + ], + "type": "string" + }, + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "param_value": { + "description": "Specify the full parameter value for 'param_name'.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "model": { + "properties": { + "name": { + "description": "Model name to execute.", + "type": "string" + }, + "options": { + "description": "Key/value settings for the model", + "properties": { + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "provider": { + "description": "AI provider format to use for embeddings API", + "enum": [ + "mistral", + "openai" + ], + "type": "string" + } + }, + "required": [ + "name", + "provider" + ], + "type": "object" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "rules": { + "properties": { + "allow_prompts": { + "description": "List of prompts to allow.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "maxLength": 100, + "type": "array" + }, + "deny_prompts": { + "description": "List of prompts to deny.", + "items": { + "maxLength": 500, + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "maxLength": 100, + "type": "array" + }, + "match_all_conversation_history": { + "default": false, + "description": "If false, will ignore all previous chat prompts from the conversation history.", + "type": "boolean" + }, + "match_all_roles": { + "default": false, + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "type": "boolean" + }, + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "search": { + "properties": { + "threshold": { + "default": 0.5, + "description": "Threshold for the similarity score to be considered a match.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "vectordb": { + "properties": { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer" + }, + "distance_metric": { + "description": "the distance metric to use for vector searches", + "enum": [ + "cosine", + "euclidean" + ], + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "description": "which vector database driver to use", + "enum": [ + "redis" + ], + "type": "string" + }, + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number" + } + }, + "required": [ + "dimensions", + "distance_metric", + "strategy", + "threshold" + ], + "type": "object" + } + }, + "required": [ + "embeddings", + "vectordb" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/app-dynamics/3.10.json b/json_schemas/app-dynamics/3.10.json new file mode 100644 index 00000000..fa37327f --- /dev/null +++ b/json_schemas/app-dynamics/3.10.json @@ -0,0 +1,77 @@ +{ + "properties": { + "config": { + "additionalProperties": true, + "properties": { + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/app-dynamics/3.11.json b/json_schemas/app-dynamics/3.11.json new file mode 100644 index 00000000..984044ad --- /dev/null +++ b/json_schemas/app-dynamics/3.11.json @@ -0,0 +1,64 @@ +{ + "properties": { + "config": { + "additionalProperties": true, + "properties": {}, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/app-dynamics/3.12.json b/json_schemas/app-dynamics/3.12.json new file mode 100644 index 00000000..984044ad --- /dev/null +++ b/json_schemas/app-dynamics/3.12.json @@ -0,0 +1,64 @@ +{ + "properties": { + "config": { + "additionalProperties": true, + "properties": {}, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/app-dynamics/3.4.json b/json_schemas/app-dynamics/3.4.json new file mode 100644 index 00000000..5675452c --- /dev/null +++ b/json_schemas/app-dynamics/3.4.json @@ -0,0 +1,90 @@ +{ + "properties": { + "config": { + "additionalProperties": true, + "properties": { + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/app-dynamics/3.7.json b/json_schemas/app-dynamics/3.7.json new file mode 100644 index 00000000..fa37327f --- /dev/null +++ b/json_schemas/app-dynamics/3.7.json @@ -0,0 +1,77 @@ +{ + "properties": { + "config": { + "additionalProperties": true, + "properties": { + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/app-dynamics/3.8.json b/json_schemas/app-dynamics/3.8.json new file mode 100644 index 00000000..fa37327f --- /dev/null +++ b/json_schemas/app-dynamics/3.8.json @@ -0,0 +1,77 @@ +{ + "properties": { + "config": { + "additionalProperties": true, + "properties": { + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/app-dynamics/3.9.json b/json_schemas/app-dynamics/3.9.json new file mode 100644 index 00000000..fa37327f --- /dev/null +++ b/json_schemas/app-dynamics/3.9.json @@ -0,0 +1,77 @@ +{ + "properties": { + "config": { + "additionalProperties": true, + "properties": { + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/application-registration/2.8.json b/json_schemas/application-registration/2.8.json new file mode 100644 index 00000000..fe9da919 --- /dev/null +++ b/json_schemas/application-registration/2.8.json @@ -0,0 +1,80 @@ +{ + "properties": { + "config": { + "properties": { + "auto_approve": { + "default": false, + "description": "If enabled, all new Service Contracts requests are automatically\napproved. See [Enable automatic registration approval](#enable-automatic-registration-approval). Otherwise, Dev Portal admins must manually approve requests.", + "examples": [ + false + ], + "type": "boolean" + }, + "description": { + "description": "Unique description displayed in information about a Service in the Developer Portal.", + "examples": [ + "" + ], + "type": "string" + }, + "display_name": { + "description": "Unique display name used for a Service in the Developer Portal.", + "examples": [ + "" + ], + "type": "string" + }, + "show_issuer": { + "default": false, + "description": "Displays the **Issuer URL** in the **Service Details** dialog.", + "examples": [ + false + ], + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/application-registration/3.10.json b/json_schemas/application-registration/3.10.json new file mode 100644 index 00000000..88f34f5b --- /dev/null +++ b/json_schemas/application-registration/3.10.json @@ -0,0 +1,61 @@ +{ + "properties": { + "config": { + "properties": { + "auto_approve": { + "default": false, + "description": "If enabled, all new Service Contracts requests are automatically approved.", + "type": "boolean" + }, + "description": { + "description": "Unique description displayed in information about a Service in the Developer Portal.", + "type": "string", + "unique": true + }, + "display_name": { + "description": "Unique display name used for a Service in the Developer Portal.", + "type": "string" + }, + "enable_proxy_with_consumer_credential": { + "default": false, + "description": "If enabled, the Route of the Service can be accessed using the Consumer's credential", + "type": "boolean" + }, + "show_issuer": { + "default": false, + "description": "Displays the **Issuer URL** in the **Service Details** dialog.", + "type": "boolean" + } + }, + "required": [ + "display_name" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/application-registration/3.11.json b/json_schemas/application-registration/3.11.json new file mode 100644 index 00000000..5715c411 --- /dev/null +++ b/json_schemas/application-registration/3.11.json @@ -0,0 +1,59 @@ +{ + "properties": { + "config": { + "properties": { + "auto_approve": { + "default": false, + "description": "If enabled, all new Service Contracts requests are automatically approved.", + "type": "boolean" + }, + "description": { + "description": "Unique description displayed in information about a Service in the Developer Portal.", + "type": "string", + "unique": true + }, + "display_name": { + "description": "Unique display name used for a Service in the Developer Portal.", + "type": "string" + }, + "enable_proxy_with_consumer_credential": { + "default": false, + "description": "If enabled, the Route of the Service can be accessed using the Consumer's credential", + "type": "boolean" + }, + "show_issuer": { + "default": false, + "description": "Displays the **Issuer URL** in the **Service Details** dialog.", + "type": "boolean" + } + }, + "required": [ + "display_name" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/application-registration/3.4.json b/json_schemas/application-registration/3.4.json new file mode 100644 index 00000000..f7b76d33 --- /dev/null +++ b/json_schemas/application-registration/3.4.json @@ -0,0 +1,56 @@ +{ + "properties": { + "config": { + "properties": { + "auto_approve": { + "default": false, + "description": "If enabled, all new Service Contracts requests are automatically approved.", + "type": "boolean" + }, + "description": { + "description": "Unique description displayed in information about a Service in the Developer Portal.", + "type": "string", + "unique": true + }, + "display_name": { + "description": "Unique display name used for a Service in the Developer Portal.", + "type": "string" + }, + "show_issuer": { + "default": false, + "description": "Displays the **Issuer URL** in the **Service Details** dialog.", + "type": "boolean" + } + }, + "required": [ + "display_name" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/application-registration/3.7.json b/json_schemas/application-registration/3.7.json new file mode 100644 index 00000000..88f34f5b --- /dev/null +++ b/json_schemas/application-registration/3.7.json @@ -0,0 +1,61 @@ +{ + "properties": { + "config": { + "properties": { + "auto_approve": { + "default": false, + "description": "If enabled, all new Service Contracts requests are automatically approved.", + "type": "boolean" + }, + "description": { + "description": "Unique description displayed in information about a Service in the Developer Portal.", + "type": "string", + "unique": true + }, + "display_name": { + "description": "Unique display name used for a Service in the Developer Portal.", + "type": "string" + }, + "enable_proxy_with_consumer_credential": { + "default": false, + "description": "If enabled, the Route of the Service can be accessed using the Consumer's credential", + "type": "boolean" + }, + "show_issuer": { + "default": false, + "description": "Displays the **Issuer URL** in the **Service Details** dialog.", + "type": "boolean" + } + }, + "required": [ + "display_name" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/application-registration/3.8.json b/json_schemas/application-registration/3.8.json new file mode 100644 index 00000000..88f34f5b --- /dev/null +++ b/json_schemas/application-registration/3.8.json @@ -0,0 +1,61 @@ +{ + "properties": { + "config": { + "properties": { + "auto_approve": { + "default": false, + "description": "If enabled, all new Service Contracts requests are automatically approved.", + "type": "boolean" + }, + "description": { + "description": "Unique description displayed in information about a Service in the Developer Portal.", + "type": "string", + "unique": true + }, + "display_name": { + "description": "Unique display name used for a Service in the Developer Portal.", + "type": "string" + }, + "enable_proxy_with_consumer_credential": { + "default": false, + "description": "If enabled, the Route of the Service can be accessed using the Consumer's credential", + "type": "boolean" + }, + "show_issuer": { + "default": false, + "description": "Displays the **Issuer URL** in the **Service Details** dialog.", + "type": "boolean" + } + }, + "required": [ + "display_name" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/application-registration/3.9.json b/json_schemas/application-registration/3.9.json new file mode 100644 index 00000000..88f34f5b --- /dev/null +++ b/json_schemas/application-registration/3.9.json @@ -0,0 +1,61 @@ +{ + "properties": { + "config": { + "properties": { + "auto_approve": { + "default": false, + "description": "If enabled, all new Service Contracts requests are automatically approved.", + "type": "boolean" + }, + "description": { + "description": "Unique description displayed in information about a Service in the Developer Portal.", + "type": "string", + "unique": true + }, + "display_name": { + "description": "Unique display name used for a Service in the Developer Portal.", + "type": "string" + }, + "enable_proxy_with_consumer_credential": { + "default": false, + "description": "If enabled, the Route of the Service can be accessed using the Consumer's credential", + "type": "boolean" + }, + "show_issuer": { + "default": false, + "description": "Displays the **Issuer URL** in the **Service Details** dialog.", + "type": "boolean" + } + }, + "required": [ + "display_name" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/aws-lambda/2.8.json b/json_schemas/aws-lambda/2.8.json new file mode 100644 index 00000000..5869617d --- /dev/null +++ b/json_schemas/aws-lambda/2.8.json @@ -0,0 +1,235 @@ +{ + "properties": { + "config": { + "properties": { + "aws_assume_role_arn": { + "description": "The target AWS IAM role ARN used to invoke the Lambda function. Typically this is\nused for a cross-account Lambda function invocation.", + "examples": [ + "" + ], + "type": "string" + }, + "aws_key": { + "description": "The AWS key credential to be used when invoking the function. The `aws_key` value is required\nif `aws_secret` is defined. If `aws_key` and `aws_secret` are not set, the plugin uses an\nIAM role inherited from the instance running Kong to authenticate. Can be symmetrically encrypted\nif using Kong Gateway and [data encryption](/gateway/latest/kong-production/db-encryption/)\nis configured.", + "examples": [ + "" + ], + "type": "string" + }, + "aws_region": { + "description": "The AWS region where the Lambda function is located. The plugin does not\nattempt to validate the supplied region name. If an invalid region name\nis provided, the plugin responds with an HTTP `500 Internal Server Error`\nat runtime and logs a DNS resolution failure.\n\nThe plugin will automatically\ndetect the AWS region on runtime via `AWS_REGION` or `AWS_DEFAULT_REGION` environment\nvariables when neither `aws_region` nor `host` is specified in plugin configuration.\nUsing environment variables enables regionally distributed Kong cluster nodes\nto connect to the closest AWS region. If `aws_region`, `host` and environment\nvariables have not been specified, the plugin responds with an HTTP\n`500 Internal Server Error` at run-time.", + "examples": [ + "" + ], + "type": "string" + }, + "aws_role_session_name": { + "default": "kong", + "description": "The identifier of the assumed role session. It is used for uniquely identifying\na session when the same target role is assumed by different principals or\nfor different reasons. The role session name is also used in the ARN of the assumed role principle.", + "examples": [ + "" + ], + "type": "string" + }, + "aws_secret": { + "description": "The AWS secret credential to be used when invoking the function. The `aws_secret` value is required\nif `aws_key` is defined. If `aws_key` and `aws_secret` are not set, the plugin uses an\nIAM role inherited from the instance running Kong to authenticate. Can be symmetrically encrypted\nif using Kong Gateway and [data encryption](/gateway/latest/kong-production/db-encryption/)\nis configured.", + "examples": [ + "" + ], + "type": "string" + }, + "awsgateway_compatible": { + "default": false, + "description": "An optional value that defines whether the plugin should wrap requests into the Amazon API gateway.", + "type": "boolean" + }, + "base64_encode_body": { + "default": true, + "type": "boolean" + }, + "forward_request_body": { + "default": false, + "description": "An optional value that defines whether the request body is sent in the `request_body` field of the JSON-encoded request.\nIf the body arguments can be parsed, they are sent in the separate `request_body_args` field of the request.\nThe body arguments can be parsed for `application/json`, `application/x-www-form-urlencoded`, and `multipart/form-data` content types.", + "type": "boolean" + }, + "forward_request_headers": { + "default": false, + "description": "An optional value that defines whether the original HTTP request headers are\nsent as a map in the `request_headers` field of the JSON-encoded request.", + "type": "boolean" + }, + "forward_request_method": { + "default": false, + "description": "An optional value that defines whether the original HTTP request method verb is\nsent in the `request_method` field of the JSON-encoded request.", + "type": "boolean" + }, + "forward_request_uri": { + "default": false, + "description": "An optional value that defines whether the original HTTP request URI is sent in\nthe `request_uri` field of the JSON-encoded request. Request URI arguments (if any) are sent in\nthe separate `request_uri_args` field of the JSON body.", + "type": "boolean" + }, + "function_name": { + "description": "The AWS Lambda function name to invoke. This may contain\nthe function name only (`my-function`), the full ARN\n(arn:aws:lambda:us-west-2:123456789012:function:my-function) or a\npartial ARN (123456789012:function:my-function). You can also append a version\nnumber or alias to any of the formats.", + "examples": [ + "" + ], + "type": "string" + }, + "host": { + "description": "The host where the Lambda function is located. This value can point to a\nlocal Lambda server, allowing for easier debugging.\n\nEither `aws_region` or `host` must be provided.", + "type": "string" + }, + "invocation_type": { + "default": "RequestResponse", + "description": "The [`InvocationType`](http://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html#API_Invoke_RequestSyntax) to use when invoking the function. Available types are `RequestResponse`, `Event`, `DryRun`.", + "enum": [ + "DryRun", + "Event", + "RequestResponse" + ], + "type": "string" + }, + "is_proxy_integration": { + "default": false, + "description": "An optional value that defines whether the response format to receive from the Lambda to\n[this format](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html#api-gateway-simple-proxy-for-lambda-output-format).", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number" + }, + "log_type": { + "default": "Tail", + "enum": [ + "None", + "Tail" + ], + "type": "string" + }, + "port": { + "default": 443, + "description": "The TCP port that the plugin uses to connect to the server.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "proxy_scheme": { + "description": "{:.important}\n> As of Kong Gateway 2.8.0.0, this parameter is deprecated.\n>

\n> If running Kong Gateway 2.7.x or earlier, the\n`proxy_scheme` value is required if `proxy_url` is defined. In 2.8.x or\nlater versions, `proxy_scheme` is not required.\n\nAn optional value that defines which HTTP scheme to use for connecting through the proxy server. The\nsupported schemes are `http` and `https`.", + "enum": [ + "http", + "https" + ], + "type": "string" + }, + "proxy_url": { + "description": "An optional value that defines whether the plugin should connect through\nthe given proxy server URL. Include the request scheme in the URL, which\nmust be `http`. For example: `http://my-proxy-server:3128`.\n\nKong Gateway uses HTTP tunneling via the [CONNECT HTTP](https://httpwg.org/specs/rfc7231.html#CONNECT)\nmethod so that no details of the AWS Lambda request are leaked to the proxy server.", + "examples": [ + "http://my-proxy-server:3128" + ], + "type": "string" + }, + "qualifier": { + "description": "The [`Qualifier`](http://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html#API_Invoke_RequestSyntax) to use when invoking the function.", + "type": "string" + }, + "skip_large_bodies": { + "default": true, + "description": "An optional value that defines whether Kong should send large\nbodies that are buffered to disk. Note that enabling this option will have an impact\non system memory depending on the number of requests simultaneously in flight at any given point in time\nand on the maximum size of each request. Also this option blocks all requests being handled by the\nnginx workers. That could be tens of thousands of other transactions that are not being processed. For small I/O\noperations, such a delay would generally not be problematic. In cases where the body size is in the order of MB,\nsuch a delay would cause notable interruptions in request processing. Given all of the potential\ndownsides resulting from enabling this option, consider increasing the\n[client_body_buffer_size](http://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_buffer_size)\nvalue instead.", + "type": "boolean" + }, + "timeout": { + "default": 60000, + "description": "An optional timeout in milliseconds when invoking the function.", + "type": "number" + }, + "unhandled_status": { + "description": "The response status code to use (instead of the default `200`, `202`, or `204`) in the case of an\n[`Unhandled` Function Error](https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html#API_Invoke_ResponseSyntax).", + "maximum": 999, + "minimum": 100, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/aws-lambda/3.10.json b/json_schemas/aws-lambda/3.10.json new file mode 100644 index 00000000..e90e09aa --- /dev/null +++ b/json_schemas/aws-lambda/3.10.json @@ -0,0 +1,221 @@ +{ + "properties": { + "config": { + "properties": { + "aws_assume_role_arn": { + "description": "The target AWS IAM role ARN used to invoke the Lambda function.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_imds_protocol_version": { + "default": "v1", + "description": "Identifier to select the IMDS protocol version to use: `v1` or `v2`.", + "enum": [ + "v1", + "v2" + ], + "type": "string" + }, + "aws_key": { + "description": "The AWS key credential to be used when invoking the function.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_region": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "aws_role_session_name": { + "default": "kong", + "description": "The identifier of the assumed role session.", + "type": "string" + }, + "aws_secret": { + "description": "The AWS secret credential to be used when invoking the function. \nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "awsgateway_compatible": { + "default": false, + "description": "An optional value that defines whether the plugin should wrap requests into the Amazon API gateway.", + "type": "boolean" + }, + "base64_encode_body": { + "default": true, + "description": "An optional value that Base64-encodes the request body.", + "type": "boolean" + }, + "disable_https": { + "default": false, + "type": "boolean" + }, + "empty_arrays_mode": { + "default": "legacy", + "description": "An optional value that defines whether Kong should send empty arrays (returned by Lambda function) as `[]` arrays or `{}` objects in JSON responses. The value `legacy` means Kong will send empty arrays as `{}` objects in response", + "enum": [ + "correct", + "legacy" + ], + "type": "string" + }, + "forward_request_body": { + "default": false, + "description": "An optional value that defines whether the request body is sent in the request_body field of the JSON-encoded request. If the body arguments can be parsed, they are sent in the separate request_body_args field of the request. ", + "type": "boolean" + }, + "forward_request_headers": { + "default": false, + "description": "An optional value that defines whether the original HTTP request headers are sent as a map in the request_headers field of the JSON-encoded request.", + "type": "boolean" + }, + "forward_request_method": { + "default": false, + "description": "An optional value that defines whether the original HTTP request method verb is sent in the request_method field of the JSON-encoded request.", + "type": "boolean" + }, + "forward_request_uri": { + "default": false, + "description": "An optional value that defines whether the original HTTP request URI is sent in the request_uri field of the JSON-encoded request.", + "type": "boolean" + }, + "function_name": { + "description": "The AWS Lambda function to invoke. Both function name and function ARN (including partial) are supported.", + "type": "string" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "invocation_type": { + "default": "RequestResponse", + "description": "The InvocationType to use when invoking the function. Available types are RequestResponse, Event, DryRun.", + "enum": [ + "DryRun", + "Event", + "RequestResponse" + ], + "type": "string" + }, + "is_proxy_integration": { + "default": false, + "description": "An optional value that defines whether the response format to receive from the Lambda to this format.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number" + }, + "log_type": { + "default": "Tail", + "description": "The LogType to use when invoking the function. By default, None and Tail are supported.", + "enum": [ + "None", + "Tail" + ], + "type": "string" + }, + "port": { + "default": 443, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "proxy_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "qualifier": { + "description": "The qualifier to use when invoking the function.", + "type": "string" + }, + "skip_large_bodies": { + "default": true, + "description": "An optional value that defines whether Kong should send large bodies that are buffered to disk", + "type": "boolean" + }, + "timeout": { + "default": 60000, + "description": "An optional timeout in milliseconds when invoking the function.", + "type": "number" + }, + "unhandled_status": { + "description": "The response status code to use (instead of the default 200, 202, or 204) in the case of an Unhandled Function Error.", + "maximum": 999, + "minimum": 100, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/aws-lambda/3.11.json b/json_schemas/aws-lambda/3.11.json new file mode 100644 index 00000000..17ffe00b --- /dev/null +++ b/json_schemas/aws-lambda/3.11.json @@ -0,0 +1,209 @@ +{ + "properties": { + "config": { + "properties": { + "aws_assume_role_arn": { + "description": "The target AWS IAM role ARN used to invoke the Lambda function.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_imds_protocol_version": { + "default": "v1", + "description": "Identifier to select the IMDS protocol version to use: `v1` or `v2`.", + "enum": [ + "v1", + "v2" + ], + "type": "string" + }, + "aws_key": { + "description": "The AWS key credential to be used when invoking the function.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_region": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "aws_role_session_name": { + "default": "kong", + "description": "The identifier of the assumed role session.", + "type": "string" + }, + "aws_secret": { + "description": "The AWS secret credential to be used when invoking the function. \nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "awsgateway_compatible": { + "default": false, + "description": "An optional value that defines whether the plugin should wrap requests into the Amazon API gateway.", + "type": "boolean" + }, + "base64_encode_body": { + "default": true, + "description": "An optional value that Base64-encodes the request body.", + "type": "boolean" + }, + "disable_https": { + "default": false, + "type": "boolean" + }, + "empty_arrays_mode": { + "default": "legacy", + "description": "An optional value that defines whether Kong should send empty arrays (returned by Lambda function) as `[]` arrays or `{}` objects in JSON responses. The value `legacy` means Kong will send empty arrays as `{}` objects in response", + "enum": [ + "correct", + "legacy" + ], + "type": "string" + }, + "forward_request_body": { + "default": false, + "description": "An optional value that defines whether the request body is sent in the request_body field of the JSON-encoded request. If the body arguments can be parsed, they are sent in the separate request_body_args field of the request. ", + "type": "boolean" + }, + "forward_request_headers": { + "default": false, + "description": "An optional value that defines whether the original HTTP request headers are sent as a map in the request_headers field of the JSON-encoded request.", + "type": "boolean" + }, + "forward_request_method": { + "default": false, + "description": "An optional value that defines whether the original HTTP request method verb is sent in the request_method field of the JSON-encoded request.", + "type": "boolean" + }, + "forward_request_uri": { + "default": false, + "description": "An optional value that defines whether the original HTTP request URI is sent in the request_uri field of the JSON-encoded request.", + "type": "boolean" + }, + "function_name": { + "description": "The AWS Lambda function to invoke. Both function name and function ARN (including partial) are supported.", + "type": "string" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "invocation_type": { + "default": "RequestResponse", + "description": "The InvocationType to use when invoking the function. Available types are RequestResponse, Event, DryRun.", + "enum": [ + "DryRun", + "Event", + "RequestResponse" + ], + "type": "string" + }, + "is_proxy_integration": { + "default": false, + "description": "An optional value that defines whether the response format to receive from the Lambda to this format.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number" + }, + "log_type": { + "default": "Tail", + "description": "The LogType to use when invoking the function. By default, None and Tail are supported.", + "enum": [ + "None", + "Tail" + ], + "type": "string" + }, + "port": { + "default": 443, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "proxy_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "qualifier": { + "description": "The qualifier to use when invoking the function.", + "type": "string" + }, + "skip_large_bodies": { + "default": true, + "description": "An optional value that defines whether Kong should send large bodies that are buffered to disk", + "type": "boolean" + }, + "timeout": { + "default": 60000, + "description": "An optional timeout in milliseconds when invoking the function.", + "type": "number" + }, + "unhandled_status": { + "description": "The response status code to use (instead of the default 200, 202, or 204) in the case of an Unhandled Function Error.", + "maximum": 999, + "minimum": 100, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/aws-lambda/3.12.json b/json_schemas/aws-lambda/3.12.json new file mode 100644 index 00000000..17ffe00b --- /dev/null +++ b/json_schemas/aws-lambda/3.12.json @@ -0,0 +1,209 @@ +{ + "properties": { + "config": { + "properties": { + "aws_assume_role_arn": { + "description": "The target AWS IAM role ARN used to invoke the Lambda function.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_imds_protocol_version": { + "default": "v1", + "description": "Identifier to select the IMDS protocol version to use: `v1` or `v2`.", + "enum": [ + "v1", + "v2" + ], + "type": "string" + }, + "aws_key": { + "description": "The AWS key credential to be used when invoking the function.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_region": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "aws_role_session_name": { + "default": "kong", + "description": "The identifier of the assumed role session.", + "type": "string" + }, + "aws_secret": { + "description": "The AWS secret credential to be used when invoking the function. \nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "awsgateway_compatible": { + "default": false, + "description": "An optional value that defines whether the plugin should wrap requests into the Amazon API gateway.", + "type": "boolean" + }, + "base64_encode_body": { + "default": true, + "description": "An optional value that Base64-encodes the request body.", + "type": "boolean" + }, + "disable_https": { + "default": false, + "type": "boolean" + }, + "empty_arrays_mode": { + "default": "legacy", + "description": "An optional value that defines whether Kong should send empty arrays (returned by Lambda function) as `[]` arrays or `{}` objects in JSON responses. The value `legacy` means Kong will send empty arrays as `{}` objects in response", + "enum": [ + "correct", + "legacy" + ], + "type": "string" + }, + "forward_request_body": { + "default": false, + "description": "An optional value that defines whether the request body is sent in the request_body field of the JSON-encoded request. If the body arguments can be parsed, they are sent in the separate request_body_args field of the request. ", + "type": "boolean" + }, + "forward_request_headers": { + "default": false, + "description": "An optional value that defines whether the original HTTP request headers are sent as a map in the request_headers field of the JSON-encoded request.", + "type": "boolean" + }, + "forward_request_method": { + "default": false, + "description": "An optional value that defines whether the original HTTP request method verb is sent in the request_method field of the JSON-encoded request.", + "type": "boolean" + }, + "forward_request_uri": { + "default": false, + "description": "An optional value that defines whether the original HTTP request URI is sent in the request_uri field of the JSON-encoded request.", + "type": "boolean" + }, + "function_name": { + "description": "The AWS Lambda function to invoke. Both function name and function ARN (including partial) are supported.", + "type": "string" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "invocation_type": { + "default": "RequestResponse", + "description": "The InvocationType to use when invoking the function. Available types are RequestResponse, Event, DryRun.", + "enum": [ + "DryRun", + "Event", + "RequestResponse" + ], + "type": "string" + }, + "is_proxy_integration": { + "default": false, + "description": "An optional value that defines whether the response format to receive from the Lambda to this format.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number" + }, + "log_type": { + "default": "Tail", + "description": "The LogType to use when invoking the function. By default, None and Tail are supported.", + "enum": [ + "None", + "Tail" + ], + "type": "string" + }, + "port": { + "default": 443, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "proxy_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "qualifier": { + "description": "The qualifier to use when invoking the function.", + "type": "string" + }, + "skip_large_bodies": { + "default": true, + "description": "An optional value that defines whether Kong should send large bodies that are buffered to disk", + "type": "boolean" + }, + "timeout": { + "default": 60000, + "description": "An optional timeout in milliseconds when invoking the function.", + "type": "number" + }, + "unhandled_status": { + "description": "The response status code to use (instead of the default 200, 202, or 204) in the case of an Unhandled Function Error.", + "maximum": 999, + "minimum": 100, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/aws-lambda/3.4.json b/json_schemas/aws-lambda/3.4.json new file mode 100644 index 00000000..e58acc3c --- /dev/null +++ b/json_schemas/aws-lambda/3.4.json @@ -0,0 +1,212 @@ +{ + "properties": { + "config": { + "properties": { + "aws_assume_role_arn": { + "description": "The target AWS IAM role ARN used to invoke the Lambda function.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_imds_protocol_version": { + "default": "v1", + "description": "Identifier to select the IMDS protocol version to use: `v1` or `v2`.", + "enum": [ + "v1", + "v2" + ], + "type": "string" + }, + "aws_key": { + "description": "The AWS key credential to be used when invoking the function.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_region": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "aws_role_session_name": { + "default": "kong", + "description": "The identifier of the assumed role session.", + "type": "string" + }, + "aws_secret": { + "description": "The AWS secret credential to be used when invoking the function. \nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "awsgateway_compatible": { + "default": false, + "description": "An optional value that defines whether the plugin should wrap requests into the Amazon API gateway.", + "type": "boolean" + }, + "base64_encode_body": { + "default": true, + "description": "An optional value that Base64-encodes the request body.", + "type": "boolean" + }, + "disable_https": { + "default": false, + "type": "boolean" + }, + "forward_request_body": { + "default": false, + "description": "An optional value that defines whether the request body is sent in the request_body field of the JSON-encoded request. If the body arguments can be parsed, they are sent in the separate request_body_args field of the request. ", + "type": "boolean" + }, + "forward_request_headers": { + "default": false, + "description": "An optional value that defines whether the original HTTP request headers are sent as a map in the request_headers field of the JSON-encoded request.", + "type": "boolean" + }, + "forward_request_method": { + "default": false, + "description": "An optional value that defines whether the original HTTP request method verb is sent in the request_method field of the JSON-encoded request.", + "type": "boolean" + }, + "forward_request_uri": { + "default": false, + "description": "An optional value that defines whether the original HTTP request URI is sent in the request_uri field of the JSON-encoded request.", + "type": "boolean" + }, + "function_name": { + "description": "The AWS Lambda function name to invoke.", + "type": "string" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "invocation_type": { + "default": "RequestResponse", + "description": "The InvocationType to use when invoking the function. Available types are RequestResponse, Event, DryRun.", + "enum": [ + "DryRun", + "Event", + "RequestResponse" + ], + "type": "string" + }, + "is_proxy_integration": { + "default": false, + "description": "An optional value that defines whether the response format to receive from the Lambda to this format.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number" + }, + "log_type": { + "default": "Tail", + "description": "The LogType to use when invoking the function. By default, None and Tail are supported.", + "enum": [ + "None", + "Tail" + ], + "type": "string" + }, + "port": { + "default": 443, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "proxy_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "qualifier": { + "description": "The qualifier to use when invoking the function.", + "type": "string" + }, + "skip_large_bodies": { + "default": true, + "description": "An optional value that defines whether Kong should send large bodies that are buffered to disk", + "type": "boolean" + }, + "timeout": { + "default": 60000, + "description": "An optional timeout in milliseconds when invoking the function.", + "type": "number" + }, + "unhandled_status": { + "description": "The response status code to use (instead of the default 200, 202, or 204) in the case of an Unhandled Function Error.", + "maximum": 999, + "minimum": 100, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/aws-lambda/3.7.json b/json_schemas/aws-lambda/3.7.json new file mode 100644 index 00000000..aa150b58 --- /dev/null +++ b/json_schemas/aws-lambda/3.7.json @@ -0,0 +1,212 @@ +{ + "properties": { + "config": { + "properties": { + "aws_assume_role_arn": { + "description": "The target AWS IAM role ARN used to invoke the Lambda function.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_imds_protocol_version": { + "default": "v1", + "description": "Identifier to select the IMDS protocol version to use: `v1` or `v2`.", + "enum": [ + "v1", + "v2" + ], + "type": "string" + }, + "aws_key": { + "description": "The AWS key credential to be used when invoking the function.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_region": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "aws_role_session_name": { + "default": "kong", + "description": "The identifier of the assumed role session.", + "type": "string" + }, + "aws_secret": { + "description": "The AWS secret credential to be used when invoking the function. \nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "awsgateway_compatible": { + "default": false, + "description": "An optional value that defines whether the plugin should wrap requests into the Amazon API gateway.", + "type": "boolean" + }, + "base64_encode_body": { + "default": true, + "description": "An optional value that Base64-encodes the request body.", + "type": "boolean" + }, + "disable_https": { + "default": false, + "type": "boolean" + }, + "forward_request_body": { + "default": false, + "description": "An optional value that defines whether the request body is sent in the request_body field of the JSON-encoded request. If the body arguments can be parsed, they are sent in the separate request_body_args field of the request. ", + "type": "boolean" + }, + "forward_request_headers": { + "default": false, + "description": "An optional value that defines whether the original HTTP request headers are sent as a map in the request_headers field of the JSON-encoded request.", + "type": "boolean" + }, + "forward_request_method": { + "default": false, + "description": "An optional value that defines whether the original HTTP request method verb is sent in the request_method field of the JSON-encoded request.", + "type": "boolean" + }, + "forward_request_uri": { + "default": false, + "description": "An optional value that defines whether the original HTTP request URI is sent in the request_uri field of the JSON-encoded request.", + "type": "boolean" + }, + "function_name": { + "description": "The AWS Lambda function to invoke. Both function name and function ARN (including partial) are supported.", + "type": "string" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "invocation_type": { + "default": "RequestResponse", + "description": "The InvocationType to use when invoking the function. Available types are RequestResponse, Event, DryRun.", + "enum": [ + "DryRun", + "Event", + "RequestResponse" + ], + "type": "string" + }, + "is_proxy_integration": { + "default": false, + "description": "An optional value that defines whether the response format to receive from the Lambda to this format.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number" + }, + "log_type": { + "default": "Tail", + "description": "The LogType to use when invoking the function. By default, None and Tail are supported.", + "enum": [ + "None", + "Tail" + ], + "type": "string" + }, + "port": { + "default": 443, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "proxy_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "qualifier": { + "description": "The qualifier to use when invoking the function.", + "type": "string" + }, + "skip_large_bodies": { + "default": true, + "description": "An optional value that defines whether Kong should send large bodies that are buffered to disk", + "type": "boolean" + }, + "timeout": { + "default": 60000, + "description": "An optional timeout in milliseconds when invoking the function.", + "type": "number" + }, + "unhandled_status": { + "description": "The response status code to use (instead of the default 200, 202, or 204) in the case of an Unhandled Function Error.", + "maximum": 999, + "minimum": 100, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/aws-lambda/3.8.json b/json_schemas/aws-lambda/3.8.json new file mode 100644 index 00000000..e90e09aa --- /dev/null +++ b/json_schemas/aws-lambda/3.8.json @@ -0,0 +1,221 @@ +{ + "properties": { + "config": { + "properties": { + "aws_assume_role_arn": { + "description": "The target AWS IAM role ARN used to invoke the Lambda function.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_imds_protocol_version": { + "default": "v1", + "description": "Identifier to select the IMDS protocol version to use: `v1` or `v2`.", + "enum": [ + "v1", + "v2" + ], + "type": "string" + }, + "aws_key": { + "description": "The AWS key credential to be used when invoking the function.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_region": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "aws_role_session_name": { + "default": "kong", + "description": "The identifier of the assumed role session.", + "type": "string" + }, + "aws_secret": { + "description": "The AWS secret credential to be used when invoking the function. \nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "awsgateway_compatible": { + "default": false, + "description": "An optional value that defines whether the plugin should wrap requests into the Amazon API gateway.", + "type": "boolean" + }, + "base64_encode_body": { + "default": true, + "description": "An optional value that Base64-encodes the request body.", + "type": "boolean" + }, + "disable_https": { + "default": false, + "type": "boolean" + }, + "empty_arrays_mode": { + "default": "legacy", + "description": "An optional value that defines whether Kong should send empty arrays (returned by Lambda function) as `[]` arrays or `{}` objects in JSON responses. The value `legacy` means Kong will send empty arrays as `{}` objects in response", + "enum": [ + "correct", + "legacy" + ], + "type": "string" + }, + "forward_request_body": { + "default": false, + "description": "An optional value that defines whether the request body is sent in the request_body field of the JSON-encoded request. If the body arguments can be parsed, they are sent in the separate request_body_args field of the request. ", + "type": "boolean" + }, + "forward_request_headers": { + "default": false, + "description": "An optional value that defines whether the original HTTP request headers are sent as a map in the request_headers field of the JSON-encoded request.", + "type": "boolean" + }, + "forward_request_method": { + "default": false, + "description": "An optional value that defines whether the original HTTP request method verb is sent in the request_method field of the JSON-encoded request.", + "type": "boolean" + }, + "forward_request_uri": { + "default": false, + "description": "An optional value that defines whether the original HTTP request URI is sent in the request_uri field of the JSON-encoded request.", + "type": "boolean" + }, + "function_name": { + "description": "The AWS Lambda function to invoke. Both function name and function ARN (including partial) are supported.", + "type": "string" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "invocation_type": { + "default": "RequestResponse", + "description": "The InvocationType to use when invoking the function. Available types are RequestResponse, Event, DryRun.", + "enum": [ + "DryRun", + "Event", + "RequestResponse" + ], + "type": "string" + }, + "is_proxy_integration": { + "default": false, + "description": "An optional value that defines whether the response format to receive from the Lambda to this format.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number" + }, + "log_type": { + "default": "Tail", + "description": "The LogType to use when invoking the function. By default, None and Tail are supported.", + "enum": [ + "None", + "Tail" + ], + "type": "string" + }, + "port": { + "default": 443, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "proxy_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "qualifier": { + "description": "The qualifier to use when invoking the function.", + "type": "string" + }, + "skip_large_bodies": { + "default": true, + "description": "An optional value that defines whether Kong should send large bodies that are buffered to disk", + "type": "boolean" + }, + "timeout": { + "default": 60000, + "description": "An optional timeout in milliseconds when invoking the function.", + "type": "number" + }, + "unhandled_status": { + "description": "The response status code to use (instead of the default 200, 202, or 204) in the case of an Unhandled Function Error.", + "maximum": 999, + "minimum": 100, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/aws-lambda/3.9.json b/json_schemas/aws-lambda/3.9.json new file mode 100644 index 00000000..e90e09aa --- /dev/null +++ b/json_schemas/aws-lambda/3.9.json @@ -0,0 +1,221 @@ +{ + "properties": { + "config": { + "properties": { + "aws_assume_role_arn": { + "description": "The target AWS IAM role ARN used to invoke the Lambda function.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_imds_protocol_version": { + "default": "v1", + "description": "Identifier to select the IMDS protocol version to use: `v1` or `v2`.", + "enum": [ + "v1", + "v2" + ], + "type": "string" + }, + "aws_key": { + "description": "The AWS key credential to be used when invoking the function.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_region": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "aws_role_session_name": { + "default": "kong", + "description": "The identifier of the assumed role session.", + "type": "string" + }, + "aws_secret": { + "description": "The AWS secret credential to be used when invoking the function. \nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "aws_sts_endpoint_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "awsgateway_compatible": { + "default": false, + "description": "An optional value that defines whether the plugin should wrap requests into the Amazon API gateway.", + "type": "boolean" + }, + "base64_encode_body": { + "default": true, + "description": "An optional value that Base64-encodes the request body.", + "type": "boolean" + }, + "disable_https": { + "default": false, + "type": "boolean" + }, + "empty_arrays_mode": { + "default": "legacy", + "description": "An optional value that defines whether Kong should send empty arrays (returned by Lambda function) as `[]` arrays or `{}` objects in JSON responses. The value `legacy` means Kong will send empty arrays as `{}` objects in response", + "enum": [ + "correct", + "legacy" + ], + "type": "string" + }, + "forward_request_body": { + "default": false, + "description": "An optional value that defines whether the request body is sent in the request_body field of the JSON-encoded request. If the body arguments can be parsed, they are sent in the separate request_body_args field of the request. ", + "type": "boolean" + }, + "forward_request_headers": { + "default": false, + "description": "An optional value that defines whether the original HTTP request headers are sent as a map in the request_headers field of the JSON-encoded request.", + "type": "boolean" + }, + "forward_request_method": { + "default": false, + "description": "An optional value that defines whether the original HTTP request method verb is sent in the request_method field of the JSON-encoded request.", + "type": "boolean" + }, + "forward_request_uri": { + "default": false, + "description": "An optional value that defines whether the original HTTP request URI is sent in the request_uri field of the JSON-encoded request.", + "type": "boolean" + }, + "function_name": { + "description": "The AWS Lambda function to invoke. Both function name and function ARN (including partial) are supported.", + "type": "string" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "invocation_type": { + "default": "RequestResponse", + "description": "The InvocationType to use when invoking the function. Available types are RequestResponse, Event, DryRun.", + "enum": [ + "DryRun", + "Event", + "RequestResponse" + ], + "type": "string" + }, + "is_proxy_integration": { + "default": false, + "description": "An optional value that defines whether the response format to receive from the Lambda to this format.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number" + }, + "log_type": { + "default": "Tail", + "description": "The LogType to use when invoking the function. By default, None and Tail are supported.", + "enum": [ + "None", + "Tail" + ], + "type": "string" + }, + "port": { + "default": 443, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "proxy_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "qualifier": { + "description": "The qualifier to use when invoking the function.", + "type": "string" + }, + "skip_large_bodies": { + "default": true, + "description": "An optional value that defines whether Kong should send large bodies that are buffered to disk", + "type": "boolean" + }, + "timeout": { + "default": 60000, + "description": "An optional timeout in milliseconds when invoking the function.", + "type": "number" + }, + "unhandled_status": { + "description": "The response status code to use (instead of the default 200, 202, or 204) in the case of an Unhandled Function Error.", + "maximum": 999, + "minimum": 100, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/azure-functions/2.8.json b/json_schemas/azure-functions/2.8.json new file mode 100644 index 00000000..8ae58938 --- /dev/null +++ b/json_schemas/azure-functions/2.8.json @@ -0,0 +1,125 @@ +{ + "properties": { + "config": { + "properties": { + "apikey": { + "description": "The apikey to access the Azure resources. If provided, it is injected as the `x-functions-key` header.", + "examples": [ + "" + ], + "type": "string" + }, + "appname": { + "description": "The Azure app name.", + "examples": [ + "" + ], + "type": "string" + }, + "clientid": { + "description": "The `clientid` to access the Azure resources. If provided, it is injected as the `x-functions-clientid` header.", + "type": "string" + }, + "functionname": { + "description": "Name of the Azure function to invoke.", + "examples": [ + "" + ], + "type": "string" + }, + "hostdomain": { + "default": "azurewebsites.net", + "description": "The domain where the function resides.", + "examples": [ + "azurewebsites.net" + ], + "type": "string" + }, + "https": { + "default": true, + "description": "Use of HTTPS to connect with the Azure Functions server.", + "type": "boolean" + }, + "https_verify": { + "default": false, + "description": "Set to `true` to authenticate the Azure Functions server.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Time in milliseconds during which an idle connection to the Azure Functions server lives before being closed.", + "type": "number" + }, + "routeprefix": { + "default": "api", + "description": "Route prefix to use.", + "type": "string" + }, + "timeout": { + "default": 600000, + "description": "Timeout in milliseconds before closing a connection to the Azure Functions server.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/azure-functions/3.10.json b/json_schemas/azure-functions/3.10.json new file mode 100644 index 00000000..1795248e --- /dev/null +++ b/json_schemas/azure-functions/3.10.json @@ -0,0 +1,130 @@ +{ + "properties": { + "config": { + "properties": { + "apikey": { + "description": "The apikey to access the Azure resources. If provided, it is injected as the `x-functions-key` header.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "appname": { + "description": "The Azure app name.", + "type": "string" + }, + "clientid": { + "description": "The `clientid` to access the Azure resources. If provided, it is injected as the `x-functions-clientid` header.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "functionname": { + "description": "Name of the Azure function to invoke.", + "type": "string" + }, + "hostdomain": { + "default": "azurewebsites.net", + "description": "The domain where the function resides.", + "type": "string" + }, + "https": { + "default": true, + "description": "Use of HTTPS to connect with the Azure Functions server.", + "type": "boolean" + }, + "https_verify": { + "default": false, + "description": "Set to `true` to authenticate the Azure Functions server.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Time in milliseconds during which an idle connection to the Azure Functions server lives before being closed.", + "type": "number" + }, + "routeprefix": { + "default": "api", + "description": "Route prefix to use.", + "type": "string" + }, + "timeout": { + "default": 600000, + "description": "Timeout in milliseconds before closing a connection to the Azure Functions server.", + "type": "number" + } + }, + "required": [ + "appname", + "functionname" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/azure-functions/3.11.json b/json_schemas/azure-functions/3.11.json new file mode 100644 index 00000000..cf086bb2 --- /dev/null +++ b/json_schemas/azure-functions/3.11.json @@ -0,0 +1,122 @@ +{ + "properties": { + "config": { + "properties": { + "apikey": { + "description": "The apikey to access the Azure resources. If provided, it is injected as the `x-functions-key` header.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "appname": { + "description": "The Azure app name.", + "type": "string" + }, + "clientid": { + "description": "The `clientid` to access the Azure resources. If provided, it is injected as the `x-functions-clientid` header.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "functionname": { + "description": "Name of the Azure function to invoke.", + "type": "string" + }, + "hostdomain": { + "default": "azurewebsites.net", + "description": "The domain where the function resides.", + "type": "string" + }, + "https": { + "default": true, + "description": "Use of HTTPS to connect with the Azure Functions server.", + "type": "boolean" + }, + "https_verify": { + "default": false, + "description": "Set to `true` to authenticate the Azure Functions server.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Time in milliseconds during which an idle connection to the Azure Functions server lives before being closed.", + "type": "number" + }, + "routeprefix": { + "default": "api", + "description": "Route prefix to use.", + "type": "string" + }, + "timeout": { + "default": 600000, + "description": "Timeout in milliseconds before closing a connection to the Azure Functions server.", + "type": "number" + } + }, + "required": [ + "appname", + "functionname" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/azure-functions/3.12.json b/json_schemas/azure-functions/3.12.json new file mode 100644 index 00000000..cf086bb2 --- /dev/null +++ b/json_schemas/azure-functions/3.12.json @@ -0,0 +1,122 @@ +{ + "properties": { + "config": { + "properties": { + "apikey": { + "description": "The apikey to access the Azure resources. If provided, it is injected as the `x-functions-key` header.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "appname": { + "description": "The Azure app name.", + "type": "string" + }, + "clientid": { + "description": "The `clientid` to access the Azure resources. If provided, it is injected as the `x-functions-clientid` header.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "functionname": { + "description": "Name of the Azure function to invoke.", + "type": "string" + }, + "hostdomain": { + "default": "azurewebsites.net", + "description": "The domain where the function resides.", + "type": "string" + }, + "https": { + "default": true, + "description": "Use of HTTPS to connect with the Azure Functions server.", + "type": "boolean" + }, + "https_verify": { + "default": false, + "description": "Set to `true` to authenticate the Azure Functions server.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Time in milliseconds during which an idle connection to the Azure Functions server lives before being closed.", + "type": "number" + }, + "routeprefix": { + "default": "api", + "description": "Route prefix to use.", + "type": "string" + }, + "timeout": { + "default": 600000, + "description": "Timeout in milliseconds before closing a connection to the Azure Functions server.", + "type": "number" + } + }, + "required": [ + "appname", + "functionname" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/azure-functions/3.4.json b/json_schemas/azure-functions/3.4.json new file mode 100644 index 00000000..282003c0 --- /dev/null +++ b/json_schemas/azure-functions/3.4.json @@ -0,0 +1,130 @@ +{ + "properties": { + "config": { + "properties": { + "apikey": { + "description": "The apikey to access the Azure resources. If provided, it is injected as the `x-functions-key` header.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "appname": { + "description": "The Azure app name.", + "type": "string" + }, + "clientid": { + "description": "The `clientid` to access the Azure resources. If provided, it is injected as the `x-functions-clientid` header.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "functionname": { + "description": "Name of the Azure function to invoke.", + "type": "string" + }, + "hostdomain": { + "default": "azurewebsites.net", + "description": "The domain where the function resides.", + "type": "string" + }, + "https": { + "default": true, + "description": "Use of HTTPS to connect with the Azure Functions server.", + "type": "boolean" + }, + "https_verify": { + "default": false, + "description": "Set to `true` to authenticate the Azure Functions server.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Time in milliseconds during which an idle connection to the Azure Functions server lives before being closed.", + "type": "number" + }, + "routeprefix": { + "default": "api", + "description": "Route prefix to use.", + "type": "string" + }, + "timeout": { + "default": 600000, + "description": "Timeout in milliseconds before closing a connection to the Azure Functions server.", + "type": "number" + } + }, + "required": [ + "appname", + "functionname" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/azure-functions/3.7.json b/json_schemas/azure-functions/3.7.json new file mode 100644 index 00000000..1795248e --- /dev/null +++ b/json_schemas/azure-functions/3.7.json @@ -0,0 +1,130 @@ +{ + "properties": { + "config": { + "properties": { + "apikey": { + "description": "The apikey to access the Azure resources. If provided, it is injected as the `x-functions-key` header.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "appname": { + "description": "The Azure app name.", + "type": "string" + }, + "clientid": { + "description": "The `clientid` to access the Azure resources. If provided, it is injected as the `x-functions-clientid` header.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "functionname": { + "description": "Name of the Azure function to invoke.", + "type": "string" + }, + "hostdomain": { + "default": "azurewebsites.net", + "description": "The domain where the function resides.", + "type": "string" + }, + "https": { + "default": true, + "description": "Use of HTTPS to connect with the Azure Functions server.", + "type": "boolean" + }, + "https_verify": { + "default": false, + "description": "Set to `true` to authenticate the Azure Functions server.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Time in milliseconds during which an idle connection to the Azure Functions server lives before being closed.", + "type": "number" + }, + "routeprefix": { + "default": "api", + "description": "Route prefix to use.", + "type": "string" + }, + "timeout": { + "default": 600000, + "description": "Timeout in milliseconds before closing a connection to the Azure Functions server.", + "type": "number" + } + }, + "required": [ + "appname", + "functionname" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/azure-functions/3.8.json b/json_schemas/azure-functions/3.8.json new file mode 100644 index 00000000..1795248e --- /dev/null +++ b/json_schemas/azure-functions/3.8.json @@ -0,0 +1,130 @@ +{ + "properties": { + "config": { + "properties": { + "apikey": { + "description": "The apikey to access the Azure resources. If provided, it is injected as the `x-functions-key` header.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "appname": { + "description": "The Azure app name.", + "type": "string" + }, + "clientid": { + "description": "The `clientid` to access the Azure resources. If provided, it is injected as the `x-functions-clientid` header.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "functionname": { + "description": "Name of the Azure function to invoke.", + "type": "string" + }, + "hostdomain": { + "default": "azurewebsites.net", + "description": "The domain where the function resides.", + "type": "string" + }, + "https": { + "default": true, + "description": "Use of HTTPS to connect with the Azure Functions server.", + "type": "boolean" + }, + "https_verify": { + "default": false, + "description": "Set to `true` to authenticate the Azure Functions server.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Time in milliseconds during which an idle connection to the Azure Functions server lives before being closed.", + "type": "number" + }, + "routeprefix": { + "default": "api", + "description": "Route prefix to use.", + "type": "string" + }, + "timeout": { + "default": 600000, + "description": "Timeout in milliseconds before closing a connection to the Azure Functions server.", + "type": "number" + } + }, + "required": [ + "appname", + "functionname" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/azure-functions/3.9.json b/json_schemas/azure-functions/3.9.json new file mode 100644 index 00000000..1795248e --- /dev/null +++ b/json_schemas/azure-functions/3.9.json @@ -0,0 +1,130 @@ +{ + "properties": { + "config": { + "properties": { + "apikey": { + "description": "The apikey to access the Azure resources. If provided, it is injected as the `x-functions-key` header.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "appname": { + "description": "The Azure app name.", + "type": "string" + }, + "clientid": { + "description": "The `clientid` to access the Azure resources. If provided, it is injected as the `x-functions-clientid` header.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "functionname": { + "description": "Name of the Azure function to invoke.", + "type": "string" + }, + "hostdomain": { + "default": "azurewebsites.net", + "description": "The domain where the function resides.", + "type": "string" + }, + "https": { + "default": true, + "description": "Use of HTTPS to connect with the Azure Functions server.", + "type": "boolean" + }, + "https_verify": { + "default": false, + "description": "Set to `true` to authenticate the Azure Functions server.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Time in milliseconds during which an idle connection to the Azure Functions server lives before being closed.", + "type": "number" + }, + "routeprefix": { + "default": "api", + "description": "Route prefix to use.", + "type": "string" + }, + "timeout": { + "default": 600000, + "description": "Timeout in milliseconds before closing a connection to the Azure Functions server.", + "type": "number" + } + }, + "required": [ + "appname", + "functionname" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/basic-auth/2.8.json b/json_schemas/basic-auth/2.8.json new file mode 100644 index 00000000..fa36a1a9 --- /dev/null +++ b/json_schemas/basic-auth/2.8.json @@ -0,0 +1,88 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID) value to use as an anonymous consumer if authentication fails.\nIf empty (default), the request will fail with an authentication failure `4xx`. Note that this value\nmust refer to the consumer `id` attribute that is internal to Kong, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the `Authorization` header) before proxying it.", + "examples": [ + true + ], + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/basic-auth/3.10.json b/json_schemas/basic-auth/3.10.json new file mode 100644 index 00000000..da803a97 --- /dev/null +++ b/json_schemas/basic-auth/3.10.json @@ -0,0 +1,81 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Please note that this value must refer to the Consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the `Authorization` header) before proxying it.", + "type": "boolean" + }, + "realm": { + "default": "service", + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/basic-auth/3.11.json b/json_schemas/basic-auth/3.11.json new file mode 100644 index 00000000..d67e26e6 --- /dev/null +++ b/json_schemas/basic-auth/3.11.json @@ -0,0 +1,71 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Please note that this value must refer to the Consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the `Authorization` header) before proxying it.", + "type": "boolean" + }, + "realm": { + "default": "service", + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/basic-auth/3.12.json b/json_schemas/basic-auth/3.12.json new file mode 100644 index 00000000..d67e26e6 --- /dev/null +++ b/json_schemas/basic-auth/3.12.json @@ -0,0 +1,71 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Please note that this value must refer to the Consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the `Authorization` header) before proxying it.", + "type": "boolean" + }, + "realm": { + "default": "service", + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/basic-auth/3.4.json b/json_schemas/basic-auth/3.4.json new file mode 100644 index 00000000..f74daaf1 --- /dev/null +++ b/json_schemas/basic-auth/3.4.json @@ -0,0 +1,76 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Please note that this value must refer to the Consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the `Authorization` header) before proxying it.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/basic-auth/3.7.json b/json_schemas/basic-auth/3.7.json new file mode 100644 index 00000000..da803a97 --- /dev/null +++ b/json_schemas/basic-auth/3.7.json @@ -0,0 +1,81 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Please note that this value must refer to the Consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the `Authorization` header) before proxying it.", + "type": "boolean" + }, + "realm": { + "default": "service", + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/basic-auth/3.8.json b/json_schemas/basic-auth/3.8.json new file mode 100644 index 00000000..da803a97 --- /dev/null +++ b/json_schemas/basic-auth/3.8.json @@ -0,0 +1,81 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Please note that this value must refer to the Consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the `Authorization` header) before proxying it.", + "type": "boolean" + }, + "realm": { + "default": "service", + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/basic-auth/3.9.json b/json_schemas/basic-auth/3.9.json new file mode 100644 index 00000000..da803a97 --- /dev/null +++ b/json_schemas/basic-auth/3.9.json @@ -0,0 +1,81 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Please note that this value must refer to the Consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the `Authorization` header) before proxying it.", + "type": "boolean" + }, + "realm": { + "default": "service", + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/bot-detection/2.8.json b/json_schemas/bot-detection/2.8.json new file mode 100644 index 00000000..6dbbea2f --- /dev/null +++ b/json_schemas/bot-detection/2.8.json @@ -0,0 +1,125 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "default": [ + + ], + "description": "An array of regular expressions that should be allowed. The regular expressions will be checked against the `User-Agent` header.", + "items": { + "is_regex": true, + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "deny": { + "default": [ + + ], + "description": "An array of regular expressions that should be denied. The regular expressions will be checked against the `User-Agent` header.", + "examples": [ + [ + "helloworld" + ] + ], + "items": { + "is_regex": true, + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "shorthand_fields": { + "blacklist": { + "items": { + "is_regex": true, + "type": "string" + }, + "type": "array" + }, + "whitelist": { + "items": { + "is_regex": true, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/bot-detection/3.10.json b/json_schemas/bot-detection/3.10.json new file mode 100644 index 00000000..2233a89d --- /dev/null +++ b/json_schemas/bot-detection/3.10.json @@ -0,0 +1,91 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "default": [ + + ], + "description": "An array of regular expressions that should be allowed. The regular expressions will be checked against the `User-Agent` header.", + "items": { + "is_regex": true, + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "deny": { + "default": [ + + ], + "description": "An array of regular expressions that should be denied. The regular expressions will be checked against the `User-Agent` header.", + "items": { + "is_regex": true, + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/bot-detection/3.11.json b/json_schemas/bot-detection/3.11.json new file mode 100644 index 00000000..0a4e686c --- /dev/null +++ b/json_schemas/bot-detection/3.11.json @@ -0,0 +1,73 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "default": [], + "description": "An array of regular expressions that should be allowed. The regular expressions will be checked against the `User-Agent` header.", + "items": { + "is_regex": true, + "required": [], + "type": "string" + }, + "type": "array" + }, + "deny": { + "default": [], + "description": "An array of regular expressions that should be denied. The regular expressions will be checked against the `User-Agent` header.", + "items": { + "is_regex": true, + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/bot-detection/3.12.json b/json_schemas/bot-detection/3.12.json new file mode 100644 index 00000000..0a4e686c --- /dev/null +++ b/json_schemas/bot-detection/3.12.json @@ -0,0 +1,73 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "default": [], + "description": "An array of regular expressions that should be allowed. The regular expressions will be checked against the `User-Agent` header.", + "items": { + "is_regex": true, + "required": [], + "type": "string" + }, + "type": "array" + }, + "deny": { + "default": [], + "description": "An array of regular expressions that should be denied. The regular expressions will be checked against the `User-Agent` header.", + "items": { + "is_regex": true, + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/bot-detection/3.4.json b/json_schemas/bot-detection/3.4.json new file mode 100644 index 00000000..2233a89d --- /dev/null +++ b/json_schemas/bot-detection/3.4.json @@ -0,0 +1,91 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "default": [ + + ], + "description": "An array of regular expressions that should be allowed. The regular expressions will be checked against the `User-Agent` header.", + "items": { + "is_regex": true, + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "deny": { + "default": [ + + ], + "description": "An array of regular expressions that should be denied. The regular expressions will be checked against the `User-Agent` header.", + "items": { + "is_regex": true, + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/bot-detection/3.7.json b/json_schemas/bot-detection/3.7.json new file mode 100644 index 00000000..2233a89d --- /dev/null +++ b/json_schemas/bot-detection/3.7.json @@ -0,0 +1,91 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "default": [ + + ], + "description": "An array of regular expressions that should be allowed. The regular expressions will be checked against the `User-Agent` header.", + "items": { + "is_regex": true, + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "deny": { + "default": [ + + ], + "description": "An array of regular expressions that should be denied. The regular expressions will be checked against the `User-Agent` header.", + "items": { + "is_regex": true, + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/bot-detection/3.8.json b/json_schemas/bot-detection/3.8.json new file mode 100644 index 00000000..2233a89d --- /dev/null +++ b/json_schemas/bot-detection/3.8.json @@ -0,0 +1,91 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "default": [ + + ], + "description": "An array of regular expressions that should be allowed. The regular expressions will be checked against the `User-Agent` header.", + "items": { + "is_regex": true, + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "deny": { + "default": [ + + ], + "description": "An array of regular expressions that should be denied. The regular expressions will be checked against the `User-Agent` header.", + "items": { + "is_regex": true, + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/bot-detection/3.9.json b/json_schemas/bot-detection/3.9.json new file mode 100644 index 00000000..2233a89d --- /dev/null +++ b/json_schemas/bot-detection/3.9.json @@ -0,0 +1,91 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "default": [ + + ], + "description": "An array of regular expressions that should be allowed. The regular expressions will be checked against the `User-Agent` header.", + "items": { + "is_regex": true, + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "deny": { + "default": [ + + ], + "description": "An array of regular expressions that should be denied. The regular expressions will be checked against the `User-Agent` header.", + "items": { + "is_regex": true, + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/canary/2.8.json b/json_schemas/canary/2.8.json new file mode 100644 index 00000000..61c8f82c --- /dev/null +++ b/json_schemas/canary/2.8.json @@ -0,0 +1,140 @@ +{ + "properties": { + "config": { + "properties": { + "canary_by_header_name": { + "description": "Header name that, when present on a request, overrides the configured canary\nfunctionality.\n\n* If the configured header is present with the value `always`, the request will\nalways go to the canary upstream.\n* If the header is present with the value `never`, the request will never go to the\ncanary upstream.\n\nFor all other values, the configured canary rules will be applied.", + "type": "string" + }, + "duration": { + "default": 3600, + "description": "The duration of the transition in seconds. Ignored when `percentage` is set, or\nwhen using `allow` or `deny` in `hash`.", + "minimum": 0, + "type": "number" + }, + "groups": { + "description": "An array of strings with the group names that are allowed or denied. Set `hash` to either `allow` (the listed groups\ngo into the canary) or `deny` (the listed groups will NOT go into the canary.)", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hash": { + "default": "consumer", + "description": "Entity to be used for hashing. Options: `consumer`, `ip`, `header`, `allow`, `deny`, or `none`.\nWhen using `consumer` or `ip`, make sure to properly set the settings for trusted IPs\n(see the `trusted_ips` and `real_ip_header` settings in the Kong configuration file.)", + "enum": [ + "allow", + "consumer", + "deny", + "header", + "ip", + "none" + ], + "type": "string" + }, + "hash_header": { + "description": "Header name whose value will be used as hash input. Required if `config.hash` is set to `header`.", + "type": "string" + }, + "percentage": { + "description": "Fixed percentage of traffic to be routed to new target, if given overrides `start` and `duration`. The\nvalue must be between 0 and 100.", + "examples": [ + 50 + ], + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "start": { + "description": "Future time in seconds since epoch, when the canary release will start.\nIgnored when `percentage` is set, or when using `allow` or `deny` in `hash`.", + "type": "number" + }, + "steps": { + "default": 1000, + "description": "Number of steps the release should be broken into.", + "minimum": 1, + "type": "number" + }, + "upstream_fallback": { + "default": false, + "type": "boolean" + }, + "upstream_host": { + "description": "The target hostname where traffic will be routed. Required if `upstream_uri` and `upstream_port` are not set.", + "examples": [ + "example.com" + ], + "type": "string" + }, + "upstream_port": { + "description": "The target port where traffic will be routed. Required if `upstream_uri` and `upstream_host` are not set.\nMust be a value between 0 and 65535.", + "examples": [ + 80 + ], + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "upstream_uri": { + "description": "The Upstream URI where traffic will be routed. Required if `upstream_port` and `upstream_host` are not set.", + "minLength": 1, + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "hash": { + "type": "string" + } + }, + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/canary/3.10.json b/json_schemas/canary/3.10.json new file mode 100644 index 00000000..39072c60 --- /dev/null +++ b/json_schemas/canary/3.10.json @@ -0,0 +1,142 @@ +{ + "properties": { + "config": { + "properties": { + "canary_by_header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "duration": { + "default": 3600, + "description": "The duration of the canary release in seconds.", + "minimum": 0, + "type": "number" + }, + "groups": { + "description": "The groups allowed to access the canary release.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hash": { + "default": "consumer", + "description": "Hash algorithm to be used for canary release.\n\n* `consumer`: The hash will be based on the consumer.\n* `ip`: The hash will be based on the client IP address.\n* `none`: No hash will be applied.\n* `allow`: Allows the specified groups to access the canary release.\n* `deny`: Denies the specified groups from accessing the canary release.\n* `header`: The hash will be based on the specified header value.", + "enum": [ + "allow", + "consumer", + "deny", + "header", + "ip", + "none" + ], + "type": "string" + }, + "hash_header": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "percentage": { + "description": "The percentage of traffic to be routed to the canary release.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "start": { + "description": "Future time in seconds since epoch, when the canary release will start. Ignored when `percentage` is set, or when using `allow` or `deny` in `hash`.", + "type": "number" + }, + "steps": { + "default": 1000, + "description": "The number of steps for the canary release.", + "minimum": 1, + "type": "number" + }, + "upstream_fallback": { + "default": false, + "description": "Specifies whether to fallback to the upstream server if the canary release fails.", + "type": "boolean" + }, + "upstream_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "upstream_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "upstream_uri": { + "description": "The URI of the upstream server to be used for the canary release.", + "minLength": 1, + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "hash": { + "description": "Hash algorithm to be used for canary release. `whitelist` is deprecated. Use `allow` instead `blacklist` is deprecated. Use `deny` instead.", + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/canary/3.11.json b/json_schemas/canary/3.11.json new file mode 100644 index 00000000..b7ecf25f --- /dev/null +++ b/json_schemas/canary/3.11.json @@ -0,0 +1,130 @@ +{ + "properties": { + "config": { + "properties": { + "canary_by_header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "duration": { + "default": 3600, + "description": "The duration of the canary release in seconds.", + "minimum": 0, + "type": "number" + }, + "groups": { + "description": "The groups allowed to access the canary release.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "hash": { + "default": "consumer", + "description": "Hash algorithm to be used for canary release.\n\n* `consumer`: The hash will be based on the consumer.\n* `ip`: The hash will be based on the client IP address.\n* `none`: No hash will be applied.\n* `allow`: Allows the specified groups to access the canary release.\n* `deny`: Denies the specified groups from accessing the canary release.\n* `header`: The hash will be based on the specified header value.", + "enum": [ + "allow", + "consumer", + "deny", + "header", + "ip", + "none" + ], + "type": "string" + }, + "hash_header": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "percentage": { + "description": "The percentage of traffic to be routed to the canary release.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "start": { + "description": "Future time in seconds since epoch, when the canary release will start. Ignored when `percentage` is set, or when using `allow` or `deny` in `hash`.", + "type": "number" + }, + "steps": { + "default": 1000, + "description": "The number of steps for the canary release.", + "minimum": 1, + "type": "number" + }, + "upstream_fallback": { + "default": false, + "description": "Specifies whether to fallback to the upstream server if the canary release fails.", + "type": "boolean" + }, + "upstream_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "upstream_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "upstream_uri": { + "description": "The URI of the upstream server to be used for the canary release.", + "minLength": 1, + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "hash": { + "description": "Hash algorithm to be used for canary release. `whitelist` is deprecated. Use `allow` instead `blacklist` is deprecated. Use `deny` instead.", + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/canary/3.12.json b/json_schemas/canary/3.12.json new file mode 100644 index 00000000..b7ecf25f --- /dev/null +++ b/json_schemas/canary/3.12.json @@ -0,0 +1,130 @@ +{ + "properties": { + "config": { + "properties": { + "canary_by_header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "duration": { + "default": 3600, + "description": "The duration of the canary release in seconds.", + "minimum": 0, + "type": "number" + }, + "groups": { + "description": "The groups allowed to access the canary release.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "hash": { + "default": "consumer", + "description": "Hash algorithm to be used for canary release.\n\n* `consumer`: The hash will be based on the consumer.\n* `ip`: The hash will be based on the client IP address.\n* `none`: No hash will be applied.\n* `allow`: Allows the specified groups to access the canary release.\n* `deny`: Denies the specified groups from accessing the canary release.\n* `header`: The hash will be based on the specified header value.", + "enum": [ + "allow", + "consumer", + "deny", + "header", + "ip", + "none" + ], + "type": "string" + }, + "hash_header": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "percentage": { + "description": "The percentage of traffic to be routed to the canary release.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "start": { + "description": "Future time in seconds since epoch, when the canary release will start. Ignored when `percentage` is set, or when using `allow` or `deny` in `hash`.", + "type": "number" + }, + "steps": { + "default": 1000, + "description": "The number of steps for the canary release.", + "minimum": 1, + "type": "number" + }, + "upstream_fallback": { + "default": false, + "description": "Specifies whether to fallback to the upstream server if the canary release fails.", + "type": "boolean" + }, + "upstream_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "upstream_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "upstream_uri": { + "description": "The URI of the upstream server to be used for the canary release.", + "minLength": 1, + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "hash": { + "description": "Hash algorithm to be used for canary release. `whitelist` is deprecated. Use `allow` instead `blacklist` is deprecated. Use `deny` instead.", + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/canary/3.4.json b/json_schemas/canary/3.4.json new file mode 100644 index 00000000..39072c60 --- /dev/null +++ b/json_schemas/canary/3.4.json @@ -0,0 +1,142 @@ +{ + "properties": { + "config": { + "properties": { + "canary_by_header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "duration": { + "default": 3600, + "description": "The duration of the canary release in seconds.", + "minimum": 0, + "type": "number" + }, + "groups": { + "description": "The groups allowed to access the canary release.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hash": { + "default": "consumer", + "description": "Hash algorithm to be used for canary release.\n\n* `consumer`: The hash will be based on the consumer.\n* `ip`: The hash will be based on the client IP address.\n* `none`: No hash will be applied.\n* `allow`: Allows the specified groups to access the canary release.\n* `deny`: Denies the specified groups from accessing the canary release.\n* `header`: The hash will be based on the specified header value.", + "enum": [ + "allow", + "consumer", + "deny", + "header", + "ip", + "none" + ], + "type": "string" + }, + "hash_header": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "percentage": { + "description": "The percentage of traffic to be routed to the canary release.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "start": { + "description": "Future time in seconds since epoch, when the canary release will start. Ignored when `percentage` is set, or when using `allow` or `deny` in `hash`.", + "type": "number" + }, + "steps": { + "default": 1000, + "description": "The number of steps for the canary release.", + "minimum": 1, + "type": "number" + }, + "upstream_fallback": { + "default": false, + "description": "Specifies whether to fallback to the upstream server if the canary release fails.", + "type": "boolean" + }, + "upstream_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "upstream_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "upstream_uri": { + "description": "The URI of the upstream server to be used for the canary release.", + "minLength": 1, + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "hash": { + "description": "Hash algorithm to be used for canary release. `whitelist` is deprecated. Use `allow` instead `blacklist` is deprecated. Use `deny` instead.", + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/canary/3.7.json b/json_schemas/canary/3.7.json new file mode 100644 index 00000000..39072c60 --- /dev/null +++ b/json_schemas/canary/3.7.json @@ -0,0 +1,142 @@ +{ + "properties": { + "config": { + "properties": { + "canary_by_header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "duration": { + "default": 3600, + "description": "The duration of the canary release in seconds.", + "minimum": 0, + "type": "number" + }, + "groups": { + "description": "The groups allowed to access the canary release.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hash": { + "default": "consumer", + "description": "Hash algorithm to be used for canary release.\n\n* `consumer`: The hash will be based on the consumer.\n* `ip`: The hash will be based on the client IP address.\n* `none`: No hash will be applied.\n* `allow`: Allows the specified groups to access the canary release.\n* `deny`: Denies the specified groups from accessing the canary release.\n* `header`: The hash will be based on the specified header value.", + "enum": [ + "allow", + "consumer", + "deny", + "header", + "ip", + "none" + ], + "type": "string" + }, + "hash_header": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "percentage": { + "description": "The percentage of traffic to be routed to the canary release.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "start": { + "description": "Future time in seconds since epoch, when the canary release will start. Ignored when `percentage` is set, or when using `allow` or `deny` in `hash`.", + "type": "number" + }, + "steps": { + "default": 1000, + "description": "The number of steps for the canary release.", + "minimum": 1, + "type": "number" + }, + "upstream_fallback": { + "default": false, + "description": "Specifies whether to fallback to the upstream server if the canary release fails.", + "type": "boolean" + }, + "upstream_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "upstream_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "upstream_uri": { + "description": "The URI of the upstream server to be used for the canary release.", + "minLength": 1, + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "hash": { + "description": "Hash algorithm to be used for canary release. `whitelist` is deprecated. Use `allow` instead `blacklist` is deprecated. Use `deny` instead.", + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/canary/3.8.json b/json_schemas/canary/3.8.json new file mode 100644 index 00000000..39072c60 --- /dev/null +++ b/json_schemas/canary/3.8.json @@ -0,0 +1,142 @@ +{ + "properties": { + "config": { + "properties": { + "canary_by_header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "duration": { + "default": 3600, + "description": "The duration of the canary release in seconds.", + "minimum": 0, + "type": "number" + }, + "groups": { + "description": "The groups allowed to access the canary release.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hash": { + "default": "consumer", + "description": "Hash algorithm to be used for canary release.\n\n* `consumer`: The hash will be based on the consumer.\n* `ip`: The hash will be based on the client IP address.\n* `none`: No hash will be applied.\n* `allow`: Allows the specified groups to access the canary release.\n* `deny`: Denies the specified groups from accessing the canary release.\n* `header`: The hash will be based on the specified header value.", + "enum": [ + "allow", + "consumer", + "deny", + "header", + "ip", + "none" + ], + "type": "string" + }, + "hash_header": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "percentage": { + "description": "The percentage of traffic to be routed to the canary release.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "start": { + "description": "Future time in seconds since epoch, when the canary release will start. Ignored when `percentage` is set, or when using `allow` or `deny` in `hash`.", + "type": "number" + }, + "steps": { + "default": 1000, + "description": "The number of steps for the canary release.", + "minimum": 1, + "type": "number" + }, + "upstream_fallback": { + "default": false, + "description": "Specifies whether to fallback to the upstream server if the canary release fails.", + "type": "boolean" + }, + "upstream_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "upstream_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "upstream_uri": { + "description": "The URI of the upstream server to be used for the canary release.", + "minLength": 1, + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "hash": { + "description": "Hash algorithm to be used for canary release. `whitelist` is deprecated. Use `allow` instead `blacklist` is deprecated. Use `deny` instead.", + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/canary/3.9.json b/json_schemas/canary/3.9.json new file mode 100644 index 00000000..39072c60 --- /dev/null +++ b/json_schemas/canary/3.9.json @@ -0,0 +1,142 @@ +{ + "properties": { + "config": { + "properties": { + "canary_by_header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "duration": { + "default": 3600, + "description": "The duration of the canary release in seconds.", + "minimum": 0, + "type": "number" + }, + "groups": { + "description": "The groups allowed to access the canary release.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hash": { + "default": "consumer", + "description": "Hash algorithm to be used for canary release.\n\n* `consumer`: The hash will be based on the consumer.\n* `ip`: The hash will be based on the client IP address.\n* `none`: No hash will be applied.\n* `allow`: Allows the specified groups to access the canary release.\n* `deny`: Denies the specified groups from accessing the canary release.\n* `header`: The hash will be based on the specified header value.", + "enum": [ + "allow", + "consumer", + "deny", + "header", + "ip", + "none" + ], + "type": "string" + }, + "hash_header": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "percentage": { + "description": "The percentage of traffic to be routed to the canary release.", + "maximum": 100, + "minimum": 0, + "type": "number" + }, + "start": { + "description": "Future time in seconds since epoch, when the canary release will start. Ignored when `percentage` is set, or when using `allow` or `deny` in `hash`.", + "type": "number" + }, + "steps": { + "default": 1000, + "description": "The number of steps for the canary release.", + "minimum": 1, + "type": "number" + }, + "upstream_fallback": { + "default": false, + "description": "Specifies whether to fallback to the upstream server if the canary release fails.", + "type": "boolean" + }, + "upstream_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "upstream_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "upstream_uri": { + "description": "The URI of the upstream server to be used for the canary release.", + "minLength": 1, + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "hash": { + "description": "Hash algorithm to be used for canary release. `whitelist` is deprecated. Use `allow` instead `blacklist` is deprecated. Use `deny` instead.", + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/confluent-consume/3.10.json b/json_schemas/confluent-consume/3.10.json new file mode 100644 index 00000000..967161aa --- /dev/null +++ b/json_schemas/confluent-consume/3.10.json @@ -0,0 +1,187 @@ +{ + "properties": { + "config": { + "properties": { + "auto_offset_reset": { + "default": "latest", + "description": "The offset to start from when there is no initial offset in the consumer group.", + "enum": [ + "earliest", + "latest" + ], + "type": "string" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_api_key": { + "description": "Username/Apikey for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "cluster_api_secret": { + "description": "Password/ApiSecret for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "commit_strategy": { + "default": "auto", + "description": "The strategy to use for committing offsets.", + "enum": [ + "auto", + "off" + ], + "type": "string" + }, + "confluent_cloud_api_key": { + "description": "Apikey for authentication with Confluent Cloud. This allows for management tasks such as creating topics, ACLs, etc.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "confluent_cloud_api_secret": { + "description": "The corresponding secret for the Confluent Cloud API key.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "message_deserializer": { + "default": "noop", + "description": "The deserializer to use for the consumed messages.", + "enum": [ + "json", + "noop" + ], + "type": "string" + }, + "mode": { + "default": "http-get", + "description": "The mode of operation for the plugin.", + "enum": [ + "http-get", + "server-sent-events" + ], + "type": "string" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topics": { + "description": "The Kafka topics and their configuration you want to consume from.", + "items": { + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + } + }, + "required": [ + "cluster_api_key", + "cluster_api_secret", + "topics" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/confluent-consume/3.11.json b/json_schemas/confluent-consume/3.11.json new file mode 100644 index 00000000..aaff097f --- /dev/null +++ b/json_schemas/confluent-consume/3.11.json @@ -0,0 +1,304 @@ +{ + "properties": { + "config": { + "properties": { + "auto_offset_reset": { + "default": "latest", + "description": "The offset to start from when there is no initial offset in the consumer group.", + "enum": [ + "earliest", + "latest" + ], + "type": "string" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_api_key": { + "description": "Username/Apikey for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "cluster_api_secret": { + "description": "Password/ApiSecret for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "commit_strategy": { + "default": "auto", + "description": "The strategy to use for committing offsets.", + "enum": [ + "auto", + "off" + ], + "type": "string" + }, + "confluent_cloud_api_key": { + "description": "Apikey for authentication with Confluent Cloud. This allows for management tasks such as creating topics, ACLs, etc.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "confluent_cloud_api_secret": { + "description": "The corresponding secret for the Confluent Cloud API key.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "message_deserializer": { + "default": "noop", + "description": "The deserializer to use for the consumed messages.", + "enum": [ + "json", + "noop" + ], + "type": "string" + }, + "mode": { + "default": "http-get", + "description": "The mode of operation for the plugin.", + "enum": [ + "http-get", + "server-sent-events" + ], + "type": "string" + }, + "schema_registry": { + "description": "The plugin-global schema registry configuration.", + "properties": { + "confluent": { + "properties": { + "authentication": { + "properties": { + "basic": { + "properties": { + "password": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "username": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + "password", + "username" + ], + "type": "object" + }, + "mode": { + "default": "none", + "description": "Authentication mode to use with the schema registry.", + "enum": [ + "basic", + "none" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "ssl_verify": { + "default": true, + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "type": "boolean" + }, + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "url": { + "description": "The URL of the schema registry.", + "type": "string" + } + }, + "required": [ + "authentication" + ], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topics": { + "description": "The Kafka topics and their configuration you want to consume from.", + "items": { + "properties": { + "name": { + "type": "string" + }, + "schema_registry": { + "description": "The plugin-global schema registry configuration.", + "properties": { + "confluent": { + "properties": { + "authentication": { + "properties": { + "basic": { + "properties": { + "password": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "username": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + "password", + "username" + ], + "type": "object" + }, + "mode": { + "default": "none", + "description": "Authentication mode to use with the schema registry.", + "enum": [ + "basic", + "none" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "ssl_verify": { + "default": true, + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "type": "boolean" + }, + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "url": { + "description": "The URL of the schema registry.", + "type": "string" + } + }, + "required": [ + "authentication" + ], + "type": "object" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "name", + "schema_registry" + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + } + }, + "required": [ + "cluster_api_key", + "cluster_api_secret", + "topics" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/confluent-consume/3.12.json b/json_schemas/confluent-consume/3.12.json new file mode 100644 index 00000000..5cb0a0a5 --- /dev/null +++ b/json_schemas/confluent-consume/3.12.json @@ -0,0 +1,304 @@ +{ + "properties": { + "config": { + "properties": { + "auto_offset_reset": { + "default": "latest", + "description": "The offset to start from when there is no initial offset in the consumer group.", + "enum": [ + "earliest", + "latest" + ], + "type": "string" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_api_key": { + "description": "Username/Apikey for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "cluster_api_secret": { + "description": "Password/ApiSecret for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "commit_strategy": { + "default": "auto", + "description": "The strategy to use for committing offsets.", + "enum": [ + "auto", + "off" + ], + "type": "string" + }, + "confluent_cloud_api_key": { + "description": "Apikey for authentication with Confluent Cloud. This allows for management tasks such as creating topics, ACLs, etc.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "confluent_cloud_api_secret": { + "description": "The corresponding secret for the Confluent Cloud API key.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "message_deserializer": { + "default": "noop", + "description": "The deserializer to use for the consumed messages.", + "enum": [ + "json", + "noop" + ], + "type": "string" + }, + "mode": { + "default": "http-get", + "description": "The mode of operation for the plugin.", + "enum": [ + "http-get", + "server-sent-events" + ], + "type": "string" + }, + "schema_registry": { + "description": "The plugin-global schema registry configuration.", + "properties": { + "confluent": { + "properties": { + "authentication": { + "properties": { + "basic": { + "properties": { + "password": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "username": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + "password", + "username" + ], + "type": "object" + }, + "mode": { + "default": "none", + "description": "Authentication mode to use with the schema registry.", + "enum": [ + "basic", + "none" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "ssl_verify": { + "default": true, + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "type": "boolean" + }, + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "url": { + "description": "The URL of the schema registry.", + "type": "string" + } + }, + "required": [ + "authentication" + ], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topics": { + "description": "The Kafka topics and their configuration you want to consume from.", + "items": { + "properties": { + "name": { + "type": "string" + }, + "schema_registry": { + "description": "The plugin-global schema registry configuration.", + "properties": { + "confluent": { + "properties": { + "authentication": { + "properties": { + "basic": { + "properties": { + "password": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "username": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + "password", + "username" + ], + "type": "object" + }, + "mode": { + "default": "none", + "description": "Authentication mode to use with the schema registry.", + "enum": [ + "basic", + "none" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "ssl_verify": { + "default": true, + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "type": "boolean" + }, + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "url": { + "description": "The URL of the schema registry.", + "type": "string" + } + }, + "required": [ + "authentication" + ], + "type": "object" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "name", + "schema_registry" + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + } + }, + "required": [ + "cluster_api_key", + "cluster_api_secret", + "topics" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/confluent/3.10.json b/json_schemas/confluent/3.10.json new file mode 100644 index 00000000..b487f7ad --- /dev/null +++ b/json_schemas/confluent/3.10.json @@ -0,0 +1,233 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_topics": { + "description": "The list of allowed topic names to which messages can be sent. The default topic configured in the `topic` field is always allowed, regardless of its inclusion in `allowed_topics`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_api_key": { + "description": "Username/Apikey for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "cluster_api_secret": { + "description": "Password/ApiSecret for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "confluent_cloud_api_key": { + "description": "Apikey for authentication with Confluent Cloud. This allows for management tasks such as creating topics, ACLs, etc.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "confluent_cloud_api_secret": { + "description": "The corresponding secret for the Confluent Cloud API key.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "forward_body": { + "default": true, + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_headers": { + "default": false, + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_method": { + "default": false, + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_uri": { + "default": false, + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "message_by_lua_functions": { + "description": "The Lua functions that manipulates the message being sent to the Kafka topic.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single producer request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The default Kafka topic to publish to if the query parameter defined in the `topics_query_arg` does not exist in the request", + "type": "string" + }, + "topics_query_arg": { + "description": "The request query parameter name that contains the topics to publish to", + "type": "string" + } + }, + "required": [ + "cluster_api_key", + "cluster_api_secret", + "topic" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/confluent/3.11.json b/json_schemas/confluent/3.11.json new file mode 100644 index 00000000..91f31154 --- /dev/null +++ b/json_schemas/confluent/3.11.json @@ -0,0 +1,327 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_topics": { + "description": "The list of allowed topic names to which messages can be sent. The default topic configured in the `topic` field is always allowed, regardless of its inclusion in `allowed_topics`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_api_key": { + "description": "Username/Apikey for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "cluster_api_secret": { + "description": "Password/ApiSecret for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "confluent_cloud_api_key": { + "description": "Apikey for authentication with Confluent Cloud. This allows for management tasks such as creating topics, ACLs, etc.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "confluent_cloud_api_secret": { + "description": "The corresponding secret for the Confluent Cloud API key.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "forward_body": { + "default": true, + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_headers": { + "default": false, + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_method": { + "default": false, + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_uri": { + "default": false, + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "key_query_arg": { + "description": "The request query parameter name that contains the Kafka message key. If specified, messages with the same key will be sent to the same Kafka partition, ensuring consistent ordering.", + "type": "string" + }, + "message_by_lua_functions": { + "description": "The Lua functions that manipulates the message being sent to the Kafka topic.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single producer request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer" + }, + "schema_registry": { + "description": "The plugin-global schema registry configuration. This can be overwritten by the topic configuration.", + "properties": { + "confluent": { + "properties": { + "authentication": { + "properties": { + "basic": { + "properties": { + "password": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "username": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + "password", + "username" + ], + "type": "object" + }, + "mode": { + "default": "none", + "description": "Authentication mode to use with the schema registry.", + "enum": [ + "basic", + "none" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "key_schema": { + "properties": { + "schema_version": { + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "match_any": { + "patterns": [ + "^[0-9]+$", + "^latest$" + ] + }, + "type": "string" + }, + "subject_name": { + "description": "The name of the subject", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "ssl_verify": { + "default": true, + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "type": "boolean" + }, + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "url": { + "description": "The URL of the schema registry.", + "type": "string" + }, + "value_schema": { + "properties": { + "schema_version": { + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "match_any": { + "patterns": [ + "^[0-9]+$", + "^latest$" + ] + }, + "type": "string" + }, + "subject_name": { + "description": "The name of the subject", + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "authentication" + ], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The default Kafka topic to publish to if the query parameter defined in the `topics_query_arg` does not exist in the request", + "type": "string" + }, + "topics_query_arg": { + "description": "The request query parameter name that contains the topics to publish to", + "type": "string" + } + }, + "required": [ + "cluster_api_key", + "cluster_api_secret", + "topic" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/confluent/3.12.json b/json_schemas/confluent/3.12.json new file mode 100644 index 00000000..1f00fb24 --- /dev/null +++ b/json_schemas/confluent/3.12.json @@ -0,0 +1,327 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_topics": { + "description": "The list of allowed topic names to which messages can be sent. The default topic configured in the `topic` field is always allowed, regardless of its inclusion in `allowed_topics`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_api_key": { + "description": "Username/Apikey for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "cluster_api_secret": { + "description": "Password/ApiSecret for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "confluent_cloud_api_key": { + "description": "Apikey for authentication with Confluent Cloud. This allows for management tasks such as creating topics, ACLs, etc.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "confluent_cloud_api_secret": { + "description": "The corresponding secret for the Confluent Cloud API key.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "forward_body": { + "default": true, + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_headers": { + "default": false, + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_method": { + "default": false, + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_uri": { + "default": false, + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "key_query_arg": { + "description": "The request query parameter name that contains the Kafka message key. If specified, messages with the same key will be sent to the same Kafka partition, ensuring consistent ordering.", + "type": "string" + }, + "message_by_lua_functions": { + "description": "The Lua functions that manipulates the message being sent to the Kafka topic.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single producer request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer" + }, + "schema_registry": { + "description": "The plugin-global schema registry configuration. This can be overwritten by the topic configuration.", + "properties": { + "confluent": { + "properties": { + "authentication": { + "properties": { + "basic": { + "properties": { + "password": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "username": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + "password", + "username" + ], + "type": "object" + }, + "mode": { + "default": "none", + "description": "Authentication mode to use with the schema registry.", + "enum": [ + "basic", + "none" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "key_schema": { + "properties": { + "schema_version": { + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "match_any": { + "patterns": [ + "^[0-9]+$", + "^latest$" + ] + }, + "type": "string" + }, + "subject_name": { + "description": "The name of the subject", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "ssl_verify": { + "default": true, + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "type": "boolean" + }, + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "url": { + "description": "The URL of the schema registry.", + "type": "string" + }, + "value_schema": { + "properties": { + "schema_version": { + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "match_any": { + "patterns": [ + "^[0-9]+$", + "^latest$" + ] + }, + "type": "string" + }, + "subject_name": { + "description": "The name of the subject", + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "authentication" + ], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The default Kafka topic to publish to if the query parameter defined in the `topics_query_arg` does not exist in the request", + "type": "string" + }, + "topics_query_arg": { + "description": "The request query parameter name that contains the topics to publish to", + "type": "string" + } + }, + "required": [ + "cluster_api_key", + "cluster_api_secret", + "topic" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/confluent/3.8.json b/json_schemas/confluent/3.8.json new file mode 100644 index 00000000..bbfffe10 --- /dev/null +++ b/json_schemas/confluent/3.8.json @@ -0,0 +1,209 @@ +{ + "properties": { + "config": { + "properties": { + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_api_key": { + "description": "Username/Apikey for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "cluster_api_secret": { + "description": "Password/ApiSecret for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "confluent_cloud_api_key": { + "description": "Apikey for authentication with Confluent Cloud. This allows for management tasks such as creating topics, ACLs, etc.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "confluent_cloud_api_secret": { + "description": "The corresponding secret for the Confluent Cloud API key.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "forward_body": { + "default": true, + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_headers": { + "default": false, + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_method": { + "default": false, + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_uri": { + "default": false, + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single producer request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The Kafka topic to publish to.", + "type": "string" + } + }, + "required": [ + "cluster_api_key", + "cluster_api_secret", + "topic" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/confluent/3.9.json b/json_schemas/confluent/3.9.json new file mode 100644 index 00000000..b8912edd --- /dev/null +++ b/json_schemas/confluent/3.9.json @@ -0,0 +1,209 @@ +{ + "properties": { + "config": { + "properties": { + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_api_key": { + "description": "Username/Apikey for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "cluster_api_secret": { + "description": "Password/ApiSecret for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "confluent_cloud_api_key": { + "description": "Apikey for authentication with Confluent Cloud. This allows for management tasks such as creating topics, ACLs, etc.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "confluent_cloud_api_secret": { + "description": "The corresponding secret for the Confluent Cloud API key.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "forward_body": { + "default": true, + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_headers": { + "default": false, + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_method": { + "default": false, + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_uri": { + "default": false, + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single producer request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The Kafka topic to publish to.", + "type": "string" + } + }, + "required": [ + "cluster_api_key", + "cluster_api_secret", + "topic" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/correlation-id/2.8.json b/json_schemas/correlation-id/2.8.json new file mode 100644 index 00000000..e9827c83 --- /dev/null +++ b/json_schemas/correlation-id/2.8.json @@ -0,0 +1,118 @@ +{ + "properties": { + "config": { + "properties": { + "echo_downstream": { + "default": false, + "description": "Whether to echo the header back to downstream (the client).", + "examples": [ + false + ], + "type": "boolean" + }, + "generator": { + "default": "uuid#counter", + "description": "The generator to use for the correlation ID. Accepted values are `uuid`, `uuid#counter`, and `tracker`. See [Generators](#generators).", + "enum": [ + "tracker", + "uuid", + "uuid#counter" + ], + "examples": [ + "uuid#counter" + ], + "type": "string" + }, + "header_name": { + "default": "Kong-Request-ID", + "description": "The HTTP header name to use for the correlation ID.", + "examples": [ + "Kong-Request-ID" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/correlation-id/3.10.json b/json_schemas/correlation-id/3.10.json new file mode 100644 index 00000000..776a2f3e --- /dev/null +++ b/json_schemas/correlation-id/3.10.json @@ -0,0 +1,96 @@ +{ + "properties": { + "config": { + "properties": { + "echo_downstream": { + "default": false, + "description": "Whether to echo the header back to downstream (the client).", + "type": "boolean" + }, + "generator": { + "default": "uuid#counter", + "description": "The generator to use for the correlation ID. Accepted values are `uuid`, `uuid#counter`, and `tracker`. See [Generators](#generators).", + "enum": [ + "tracker", + "uuid", + "uuid#counter" + ], + "type": "string" + }, + "header_name": { + "default": "Kong-Request-ID", + "description": "The HTTP header name to use for the correlation ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/correlation-id/3.11.json b/json_schemas/correlation-id/3.11.json new file mode 100644 index 00000000..a6dd6f8d --- /dev/null +++ b/json_schemas/correlation-id/3.11.json @@ -0,0 +1,84 @@ +{ + "properties": { + "config": { + "properties": { + "echo_downstream": { + "default": false, + "description": "Whether to echo the header back to downstream (the client).", + "type": "boolean" + }, + "generator": { + "default": "uuid#counter", + "description": "The generator to use for the correlation ID. Accepted values are `uuid`, `uuid#counter`, and `tracker`. See [Generators](#generators).", + "enum": [ + "tracker", + "uuid", + "uuid#counter" + ], + "type": "string" + }, + "header_name": { + "default": "Kong-Request-ID", + "description": "The HTTP header name to use for the correlation ID.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/correlation-id/3.12.json b/json_schemas/correlation-id/3.12.json new file mode 100644 index 00000000..a6dd6f8d --- /dev/null +++ b/json_schemas/correlation-id/3.12.json @@ -0,0 +1,84 @@ +{ + "properties": { + "config": { + "properties": { + "echo_downstream": { + "default": false, + "description": "Whether to echo the header back to downstream (the client).", + "type": "boolean" + }, + "generator": { + "default": "uuid#counter", + "description": "The generator to use for the correlation ID. Accepted values are `uuid`, `uuid#counter`, and `tracker`. See [Generators](#generators).", + "enum": [ + "tracker", + "uuid", + "uuid#counter" + ], + "type": "string" + }, + "header_name": { + "default": "Kong-Request-ID", + "description": "The HTTP header name to use for the correlation ID.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/correlation-id/3.4.json b/json_schemas/correlation-id/3.4.json new file mode 100644 index 00000000..776a2f3e --- /dev/null +++ b/json_schemas/correlation-id/3.4.json @@ -0,0 +1,96 @@ +{ + "properties": { + "config": { + "properties": { + "echo_downstream": { + "default": false, + "description": "Whether to echo the header back to downstream (the client).", + "type": "boolean" + }, + "generator": { + "default": "uuid#counter", + "description": "The generator to use for the correlation ID. Accepted values are `uuid`, `uuid#counter`, and `tracker`. See [Generators](#generators).", + "enum": [ + "tracker", + "uuid", + "uuid#counter" + ], + "type": "string" + }, + "header_name": { + "default": "Kong-Request-ID", + "description": "The HTTP header name to use for the correlation ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/correlation-id/3.7.json b/json_schemas/correlation-id/3.7.json new file mode 100644 index 00000000..776a2f3e --- /dev/null +++ b/json_schemas/correlation-id/3.7.json @@ -0,0 +1,96 @@ +{ + "properties": { + "config": { + "properties": { + "echo_downstream": { + "default": false, + "description": "Whether to echo the header back to downstream (the client).", + "type": "boolean" + }, + "generator": { + "default": "uuid#counter", + "description": "The generator to use for the correlation ID. Accepted values are `uuid`, `uuid#counter`, and `tracker`. See [Generators](#generators).", + "enum": [ + "tracker", + "uuid", + "uuid#counter" + ], + "type": "string" + }, + "header_name": { + "default": "Kong-Request-ID", + "description": "The HTTP header name to use for the correlation ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/correlation-id/3.8.json b/json_schemas/correlation-id/3.8.json new file mode 100644 index 00000000..776a2f3e --- /dev/null +++ b/json_schemas/correlation-id/3.8.json @@ -0,0 +1,96 @@ +{ + "properties": { + "config": { + "properties": { + "echo_downstream": { + "default": false, + "description": "Whether to echo the header back to downstream (the client).", + "type": "boolean" + }, + "generator": { + "default": "uuid#counter", + "description": "The generator to use for the correlation ID. Accepted values are `uuid`, `uuid#counter`, and `tracker`. See [Generators](#generators).", + "enum": [ + "tracker", + "uuid", + "uuid#counter" + ], + "type": "string" + }, + "header_name": { + "default": "Kong-Request-ID", + "description": "The HTTP header name to use for the correlation ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/correlation-id/3.9.json b/json_schemas/correlation-id/3.9.json new file mode 100644 index 00000000..776a2f3e --- /dev/null +++ b/json_schemas/correlation-id/3.9.json @@ -0,0 +1,96 @@ +{ + "properties": { + "config": { + "properties": { + "echo_downstream": { + "default": false, + "description": "Whether to echo the header back to downstream (the client).", + "type": "boolean" + }, + "generator": { + "default": "uuid#counter", + "description": "The generator to use for the correlation ID. Accepted values are `uuid`, `uuid#counter`, and `tracker`. See [Generators](#generators).", + "enum": [ + "tracker", + "uuid", + "uuid#counter" + ], + "type": "string" + }, + "header_name": { + "default": "Kong-Request-ID", + "description": "The HTTP header name to use for the correlation ID.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/cors/2.8.json b/json_schemas/cors/2.8.json new file mode 100644 index 00000000..a637af87 --- /dev/null +++ b/json_schemas/cors/2.8.json @@ -0,0 +1,186 @@ +{ + "properties": { + "config": { + "properties": { + "credentials": { + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Credentials` header should be sent with `true` as the value.", + "examples": [ + true + ], + "type": "boolean" + }, + "exposed_headers": { + "description": "Value for the `Access-Control-Expose-Headers` header. If not specified, no custom headers are exposed.", + "examples": [ + [ + "X-Auth-Token" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "description": "Value for the `Access-Control-Allow-Headers` header.", + "examples": [ + [ + "Accept", + "Accept-Version", + "Content-Length", + "Content-MD5", + "Content-Type", + "Date", + "X-Auth-Token" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "max_age": { + "description": "Indicates how long the results of the preflight request can be cached, in `seconds`.", + "examples": [ + 3600 + ], + "type": "number" + }, + "methods": { + "default": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT", + "TRACE" + ], + "description": "'Value for the `Access-Control-Allow-Methods` header. Available options include `GET`, `HEAD`, `PUT`, `PATCH`, `POST`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT`. By default, all options are allowed.'", + "examples": [ + [ + "GET", + "POST" + ] + ], + "items": { + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT", + "TRACE" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "origins": { + "description": "List of allowed domains for the `Access-Control-Allow-Origin` header. If you want to allow all origins, add `*` as a single value to this configuration field. The accepted values can either be flat strings or PCRE regexes.", + "examples": [ + [ + "http://mockbin.com" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "preflight_continue": { + "default": false, + "description": "A boolean value that instructs the plugin to proxy the `OPTIONS` preflight request to the Upstream service.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/cors/3.10.json b/json_schemas/cors/3.10.json new file mode 100644 index 00000000..dea2367f --- /dev/null +++ b/json_schemas/cors/3.10.json @@ -0,0 +1,150 @@ +{ + "properties": { + "config": { + "properties": { + "allow_origin_absent": { + "default": true, + "description": "A boolean value that skip cors response headers when origin header of request is empty", + "type": "boolean" + }, + "credentials": { + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Credentials` header should be sent with `true` as the value.", + "type": "boolean" + }, + "exposed_headers": { + "description": "Value for the `Access-Control-Expose-Headers` header. If not specified, no custom headers are exposed.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "description": "Value for the `Access-Control-Allow-Headers` header.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "max_age": { + "description": "Indicates how long the results of the preflight request can be cached, in `seconds`.", + "type": "number" + }, + "methods": { + "default": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT", + "TRACE" + ], + "description": "'Value for the `Access-Control-Allow-Methods` header. Available options include `GET`, `HEAD`, `PUT`, `PATCH`, `POST`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT`. By default, all options are allowed.'", + "items": { + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT", + "TRACE" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "origins": { + "description": "List of allowed domains for the `Access-Control-Allow-Origin` header. If you want to allow all origins, add `*` as a single value to this configuration field. The accepted values can either be flat strings or PCRE regexes.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "preflight_continue": { + "default": false, + "description": "A boolean value that instructs the plugin to proxy the `OPTIONS` preflight request to the Upstream service.", + "type": "boolean" + }, + "private_network": { + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Private-Network` header should be sent with `true` as the value.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/cors/3.11.json b/json_schemas/cors/3.11.json new file mode 100644 index 00000000..a836828c --- /dev/null +++ b/json_schemas/cors/3.11.json @@ -0,0 +1,132 @@ +{ + "properties": { + "config": { + "properties": { + "allow_origin_absent": { + "default": true, + "description": "A boolean value that skip cors response headers when origin header of request is empty", + "type": "boolean" + }, + "credentials": { + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Credentials` header should be sent with `true` as the value.", + "type": "boolean" + }, + "exposed_headers": { + "description": "Value for the `Access-Control-Expose-Headers` header. If not specified, no custom headers are exposed.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "description": "Value for the `Access-Control-Allow-Headers` header.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "max_age": { + "description": "Indicates how long the results of the preflight request can be cached, in `seconds`.", + "type": "number" + }, + "methods": { + "default": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT", + "TRACE" + ], + "description": "'Value for the `Access-Control-Allow-Methods` header. Available options include `GET`, `HEAD`, `PUT`, `PATCH`, `POST`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT`. By default, all options are allowed.'", + "items": { + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT", + "TRACE" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "origins": { + "description": "List of allowed domains for the `Access-Control-Allow-Origin` header. If you want to allow all origins, add `*` as a single value to this configuration field. The accepted values can either be flat strings or PCRE regexes.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "preflight_continue": { + "default": false, + "description": "A boolean value that instructs the plugin to proxy the `OPTIONS` preflight request to the Upstream service.", + "type": "boolean" + }, + "private_network": { + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Private-Network` header should be sent with `true` as the value.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "minLength": 1, + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/cors/3.12.json b/json_schemas/cors/3.12.json new file mode 100644 index 00000000..00c880a6 --- /dev/null +++ b/json_schemas/cors/3.12.json @@ -0,0 +1,132 @@ +{ + "properties": { + "config": { + "properties": { + "allow_origin_absent": { + "default": true, + "description": "A boolean value that skip cors response headers when origin header of request is empty", + "type": "boolean" + }, + "credentials": { + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Credentials` header should be sent with `true` as the value.", + "type": "boolean" + }, + "exposed_headers": { + "description": "Value for the `Access-Control-Expose-Headers` header. If not specified, no custom headers are exposed.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "description": "Value for the `Access-Control-Allow-Headers` header.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "max_age": { + "description": "Indicates how long the results of the preflight request can be cached, in `seconds`.", + "type": "number" + }, + "methods": { + "default": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT", + "TRACE" + ], + "description": "'Value for the `Access-Control-Allow-Methods` header. Available options include `GET`, `HEAD`, `PUT`, `PATCH`, `POST`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT`. By default, all options are allowed.'", + "items": { + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT", + "TRACE" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "origins": { + "description": "List of allowed domains for the `Access-Control-Allow-Origin` header. If you want to allow all origins, add `*` as a single value to this configuration field. The accepted values can either be flat strings or PCRE regexes. NOTE: If you don't specify any allowed domains, all origins are allowed.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "preflight_continue": { + "default": false, + "description": "A boolean value that instructs the plugin to proxy the `OPTIONS` preflight request to the Upstream service.", + "type": "boolean" + }, + "private_network": { + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Private-Network` header should be sent with `true` as the value.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "minLength": 1, + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/cors/3.4.json b/json_schemas/cors/3.4.json new file mode 100644 index 00000000..b0254d05 --- /dev/null +++ b/json_schemas/cors/3.4.json @@ -0,0 +1,145 @@ +{ + "properties": { + "config": { + "properties": { + "credentials": { + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Credentials` header should be sent with `true` as the value.", + "type": "boolean" + }, + "exposed_headers": { + "description": "Value for the `Access-Control-Expose-Headers` header. If not specified, no custom headers are exposed.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "description": "Value for the `Access-Control-Allow-Headers` header.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "max_age": { + "description": "Indicates how long the results of the preflight request can be cached, in `seconds`.", + "type": "number" + }, + "methods": { + "default": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT", + "TRACE" + ], + "description": "'Value for the `Access-Control-Allow-Methods` header. Available options include `GET`, `HEAD`, `PUT`, `PATCH`, `POST`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT`. By default, all options are allowed.'", + "items": { + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT", + "TRACE" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "origins": { + "description": "List of allowed domains for the `Access-Control-Allow-Origin` header. If you want to allow all origins, add `*` as a single value to this configuration field. The accepted values can either be flat strings or PCRE regexes.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "preflight_continue": { + "default": false, + "description": "A boolean value that instructs the plugin to proxy the `OPTIONS` preflight request to the Upstream service.", + "type": "boolean" + }, + "private_network": { + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Private-Network` header should be sent with `true` as the value.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/cors/3.7.json b/json_schemas/cors/3.7.json new file mode 100644 index 00000000..b0254d05 --- /dev/null +++ b/json_schemas/cors/3.7.json @@ -0,0 +1,145 @@ +{ + "properties": { + "config": { + "properties": { + "credentials": { + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Credentials` header should be sent with `true` as the value.", + "type": "boolean" + }, + "exposed_headers": { + "description": "Value for the `Access-Control-Expose-Headers` header. If not specified, no custom headers are exposed.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "description": "Value for the `Access-Control-Allow-Headers` header.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "max_age": { + "description": "Indicates how long the results of the preflight request can be cached, in `seconds`.", + "type": "number" + }, + "methods": { + "default": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT", + "TRACE" + ], + "description": "'Value for the `Access-Control-Allow-Methods` header. Available options include `GET`, `HEAD`, `PUT`, `PATCH`, `POST`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT`. By default, all options are allowed.'", + "items": { + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT", + "TRACE" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "origins": { + "description": "List of allowed domains for the `Access-Control-Allow-Origin` header. If you want to allow all origins, add `*` as a single value to this configuration field. The accepted values can either be flat strings or PCRE regexes.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "preflight_continue": { + "default": false, + "description": "A boolean value that instructs the plugin to proxy the `OPTIONS` preflight request to the Upstream service.", + "type": "boolean" + }, + "private_network": { + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Private-Network` header should be sent with `true` as the value.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/cors/3.8.json b/json_schemas/cors/3.8.json new file mode 100644 index 00000000..b0254d05 --- /dev/null +++ b/json_schemas/cors/3.8.json @@ -0,0 +1,145 @@ +{ + "properties": { + "config": { + "properties": { + "credentials": { + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Credentials` header should be sent with `true` as the value.", + "type": "boolean" + }, + "exposed_headers": { + "description": "Value for the `Access-Control-Expose-Headers` header. If not specified, no custom headers are exposed.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "description": "Value for the `Access-Control-Allow-Headers` header.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "max_age": { + "description": "Indicates how long the results of the preflight request can be cached, in `seconds`.", + "type": "number" + }, + "methods": { + "default": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT", + "TRACE" + ], + "description": "'Value for the `Access-Control-Allow-Methods` header. Available options include `GET`, `HEAD`, `PUT`, `PATCH`, `POST`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT`. By default, all options are allowed.'", + "items": { + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT", + "TRACE" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "origins": { + "description": "List of allowed domains for the `Access-Control-Allow-Origin` header. If you want to allow all origins, add `*` as a single value to this configuration field. The accepted values can either be flat strings or PCRE regexes.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "preflight_continue": { + "default": false, + "description": "A boolean value that instructs the plugin to proxy the `OPTIONS` preflight request to the Upstream service.", + "type": "boolean" + }, + "private_network": { + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Private-Network` header should be sent with `true` as the value.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/cors/3.9.json b/json_schemas/cors/3.9.json new file mode 100644 index 00000000..b0254d05 --- /dev/null +++ b/json_schemas/cors/3.9.json @@ -0,0 +1,145 @@ +{ + "properties": { + "config": { + "properties": { + "credentials": { + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Credentials` header should be sent with `true` as the value.", + "type": "boolean" + }, + "exposed_headers": { + "description": "Value for the `Access-Control-Expose-Headers` header. If not specified, no custom headers are exposed.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "description": "Value for the `Access-Control-Allow-Headers` header.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "max_age": { + "description": "Indicates how long the results of the preflight request can be cached, in `seconds`.", + "type": "number" + }, + "methods": { + "default": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT", + "TRACE" + ], + "description": "'Value for the `Access-Control-Allow-Methods` header. Available options include `GET`, `HEAD`, `PUT`, `PATCH`, `POST`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT`. By default, all options are allowed.'", + "items": { + "enum": [ + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "PATCH", + "POST", + "PUT", + "TRACE" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "origins": { + "description": "List of allowed domains for the `Access-Control-Allow-Origin` header. If you want to allow all origins, add `*` as a single value to this configuration field. The accepted values can either be flat strings or PCRE regexes.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "preflight_continue": { + "default": false, + "description": "A boolean value that instructs the plugin to proxy the `OPTIONS` preflight request to the Upstream service.", + "type": "boolean" + }, + "private_network": { + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Private-Network` header should be sent with `true` as the value.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "minLength": 1, + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/datadog-tracing/3.10.json b/json_schemas/datadog-tracing/3.10.json new file mode 100644 index 00000000..b5723945 --- /dev/null +++ b/json_schemas/datadog-tracing/3.10.json @@ -0,0 +1,114 @@ +{ + "properties": { + "config": { + "properties": { + "batch_flush_delay": { + "default": 3, + "type": "integer" + }, + "batch_span_count": { + "default": 200, + "type": "integer" + }, + "connect_timeout": { + "default": 1000, + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "endpoint": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "environment": { + "default": "none", + "type": "string" + }, + "read_timeout": { + "default": 5000, + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 5000, + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "service_name": { + "default": "kong", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/datadog-tracing/3.11.json b/json_schemas/datadog-tracing/3.11.json new file mode 100644 index 00000000..739b190a --- /dev/null +++ b/json_schemas/datadog-tracing/3.11.json @@ -0,0 +1,102 @@ +{ + "properties": { + "config": { + "properties": { + "batch_flush_delay": { + "default": 3, + "type": "integer" + }, + "batch_span_count": { + "default": 200, + "type": "integer" + }, + "connect_timeout": { + "default": 1000, + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "endpoint": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "environment": { + "default": "none", + "type": "string" + }, + "read_timeout": { + "default": 5000, + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 5000, + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "service_name": { + "default": "kong", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/datadog-tracing/3.8.json b/json_schemas/datadog-tracing/3.8.json new file mode 100644 index 00000000..b5723945 --- /dev/null +++ b/json_schemas/datadog-tracing/3.8.json @@ -0,0 +1,114 @@ +{ + "properties": { + "config": { + "properties": { + "batch_flush_delay": { + "default": 3, + "type": "integer" + }, + "batch_span_count": { + "default": 200, + "type": "integer" + }, + "connect_timeout": { + "default": 1000, + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "endpoint": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "environment": { + "default": "none", + "type": "string" + }, + "read_timeout": { + "default": 5000, + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 5000, + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "service_name": { + "default": "kong", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/datadog-tracing/3.9.json b/json_schemas/datadog-tracing/3.9.json new file mode 100644 index 00000000..b5723945 --- /dev/null +++ b/json_schemas/datadog-tracing/3.9.json @@ -0,0 +1,114 @@ +{ + "properties": { + "config": { + "properties": { + "batch_flush_delay": { + "default": 3, + "type": "integer" + }, + "batch_span_count": { + "default": 200, + "type": "integer" + }, + "connect_timeout": { + "default": 1000, + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "endpoint": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "environment": { + "default": "none", + "type": "string" + }, + "read_timeout": { + "default": 5000, + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 5000, + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "service_name": { + "default": "kong", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/datadog/2.8.json b/json_schemas/datadog/2.8.json new file mode 100644 index 00000000..2e413c54 --- /dev/null +++ b/json_schemas/datadog/2.8.json @@ -0,0 +1,201 @@ +{ + "properties": { + "config": { + "properties": { + "consumer_tag": { + "default": "consumer", + "description": "String to be attached as tag of the consumer.", + "type": "string" + }, + "host": { + "default": "localhost", + "description": "The IP address or hostname to send data to.", + "examples": [ + "127.0.0.1" + ], + "type": "string" + }, + "metrics": { + "default": [ + { + "consumer_identifier": "custom_id", + "name": "kong_latency", + "sample_rate": 1, + "stat_type": "timer", + "tags": [ + "app:kong" + ] + } + ], + "description": "List of metrics to be logged. Available values are described at [Metrics](#metrics).\nBy default, the plugin logs all available metrics. If you specify an array of metrics,\nonly the listed metrics are logged.", + "items": { + "properties": { + "consumer_identifier": { + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "enum": [ + "kong_latency", + "latency", + "request_count", + "request_size", + "response_size", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "stat_type": { + "enum": [ + "counter", + "distribution", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "tags": { + "items": { + "pattern": "^.*[^:]$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "The port to send data to on the upstream server.", + "examples": [ + 8125 + ], + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to be attached as a prefix to a metric's name.", + "type": "string" + }, + "service_name_tag": { + "default": "name", + "description": "String to be attached as the name of the service.", + "type": "string" + }, + "status_tag": { + "default": "status", + "description": "String to be attached as the tag of the HTTP status.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/datadog/3.10.json b/json_schemas/datadog/3.10.json new file mode 100644 index 00000000..12d04755 --- /dev/null +++ b/json_schemas/datadog/3.10.json @@ -0,0 +1,263 @@ +{ + "properties": { + "config": { + "properties": { + "consumer_tag": { + "default": "consumer", + "description": "String to be attached as tag of the consumer.", + "type": "string" + }, + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number" + }, + "host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "metrics": { + "default": [ + { + "consumer_identifier": "custom_id", + "name": "kong_latency", + "sample_rate": 1, + "stat_type": "timer", + "tags": [ + "app:kong" + ] + } + ], + "description": "List of metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "description": "Authenticated user detail", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "description": "Datadog metric’s name", + "enum": [ + "kong_latency", + "latency", + "request_count", + "request_size", + "response_size", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "description": "Sampling rate", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "stat_type": { + "description": "Determines what sort of event the metric represents", + "enum": [ + "counter", + "distribution", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "tags": { + "description": "List of tags", + "items": { + "pattern": "^.*[^:]$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to be attached as a prefix to a metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + }, + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer" + }, + "service_name_tag": { + "default": "name", + "description": "String to be attached as the name of the service.", + "type": "string" + }, + "status_tag": { + "default": "status", + "description": "String to be attached as the tag of the HTTP status.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/datadog/3.11.json b/json_schemas/datadog/3.11.json new file mode 100644 index 00000000..e91acd58 --- /dev/null +++ b/json_schemas/datadog/3.11.json @@ -0,0 +1,247 @@ +{ + "properties": { + "config": { + "properties": { + "consumer_tag": { + "default": "consumer", + "description": "String to be attached as tag of the consumer.", + "type": "string" + }, + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number" + }, + "host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "metrics": { + "default": [ + { + "consumer_identifier": "custom_id", + "name": "kong_latency", + "sample_rate": 1, + "stat_type": "timer", + "tags": [ + "app:kong" + ] + } + ], + "description": "List of metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "description": "Authenticated user detail", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "description": "Datadog metric’s name", + "enum": [ + "kong_latency", + "latency", + "request_count", + "request_size", + "response_size", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "description": "Sampling rate", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "stat_type": { + "description": "Determines what sort of event the metric represents", + "enum": [ + "counter", + "distribution", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "tags": { + "description": "List of tags", + "items": { + "pattern": "^.*[^:]$", + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to be attached as a prefix to a metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + }, + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer" + }, + "service_name_tag": { + "default": "name", + "description": "String to be attached as the name of the service.", + "type": "string" + }, + "status_tag": { + "default": "status", + "description": "String to be attached as the tag of the HTTP status.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/datadog/3.12.json b/json_schemas/datadog/3.12.json new file mode 100644 index 00000000..e91acd58 --- /dev/null +++ b/json_schemas/datadog/3.12.json @@ -0,0 +1,247 @@ +{ + "properties": { + "config": { + "properties": { + "consumer_tag": { + "default": "consumer", + "description": "String to be attached as tag of the consumer.", + "type": "string" + }, + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number" + }, + "host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "metrics": { + "default": [ + { + "consumer_identifier": "custom_id", + "name": "kong_latency", + "sample_rate": 1, + "stat_type": "timer", + "tags": [ + "app:kong" + ] + } + ], + "description": "List of metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "description": "Authenticated user detail", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "description": "Datadog metric’s name", + "enum": [ + "kong_latency", + "latency", + "request_count", + "request_size", + "response_size", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "description": "Sampling rate", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "stat_type": { + "description": "Determines what sort of event the metric represents", + "enum": [ + "counter", + "distribution", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "tags": { + "description": "List of tags", + "items": { + "pattern": "^.*[^:]$", + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to be attached as a prefix to a metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + }, + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer" + }, + "service_name_tag": { + "default": "name", + "description": "String to be attached as the name of the service.", + "type": "string" + }, + "status_tag": { + "default": "status", + "description": "String to be attached as the tag of the HTTP status.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/datadog/3.4.json b/json_schemas/datadog/3.4.json new file mode 100644 index 00000000..7ce5f0f9 --- /dev/null +++ b/json_schemas/datadog/3.4.json @@ -0,0 +1,254 @@ +{ + "properties": { + "config": { + "properties": { + "consumer_tag": { + "default": "consumer", + "description": "String to be attached as tag of the consumer.", + "type": "string" + }, + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number" + }, + "host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "metrics": { + "default": [ + { + "consumer_identifier": "custom_id", + "name": "kong_latency", + "sample_rate": 1, + "stat_type": "timer", + "tags": [ + "app:kong" + ] + } + ], + "description": "List of metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "description": "Authenticated user detail", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "description": "Datadog metric’s name", + "enum": [ + "kong_latency", + "latency", + "request_count", + "request_size", + "response_size", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "description": "Sampling rate", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "stat_type": { + "description": "Determines what sort of event the metric represents", + "enum": [ + "counter", + "distribution", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "tags": { + "description": "List of tags", + "items": { + "pattern": "^.*[^:]$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to be attached as a prefix to a metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + }, + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer" + }, + "service_name_tag": { + "default": "name", + "description": "String to be attached as the name of the service.", + "type": "string" + }, + "status_tag": { + "default": "status", + "description": "String to be attached as the tag of the HTTP status.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/datadog/3.7.json b/json_schemas/datadog/3.7.json new file mode 100644 index 00000000..7ce5f0f9 --- /dev/null +++ b/json_schemas/datadog/3.7.json @@ -0,0 +1,254 @@ +{ + "properties": { + "config": { + "properties": { + "consumer_tag": { + "default": "consumer", + "description": "String to be attached as tag of the consumer.", + "type": "string" + }, + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number" + }, + "host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "metrics": { + "default": [ + { + "consumer_identifier": "custom_id", + "name": "kong_latency", + "sample_rate": 1, + "stat_type": "timer", + "tags": [ + "app:kong" + ] + } + ], + "description": "List of metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "description": "Authenticated user detail", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "description": "Datadog metric’s name", + "enum": [ + "kong_latency", + "latency", + "request_count", + "request_size", + "response_size", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "description": "Sampling rate", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "stat_type": { + "description": "Determines what sort of event the metric represents", + "enum": [ + "counter", + "distribution", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "tags": { + "description": "List of tags", + "items": { + "pattern": "^.*[^:]$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to be attached as a prefix to a metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + }, + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer" + }, + "service_name_tag": { + "default": "name", + "description": "String to be attached as the name of the service.", + "type": "string" + }, + "status_tag": { + "default": "status", + "description": "String to be attached as the tag of the HTTP status.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/datadog/3.8.json b/json_schemas/datadog/3.8.json new file mode 100644 index 00000000..12d04755 --- /dev/null +++ b/json_schemas/datadog/3.8.json @@ -0,0 +1,263 @@ +{ + "properties": { + "config": { + "properties": { + "consumer_tag": { + "default": "consumer", + "description": "String to be attached as tag of the consumer.", + "type": "string" + }, + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number" + }, + "host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "metrics": { + "default": [ + { + "consumer_identifier": "custom_id", + "name": "kong_latency", + "sample_rate": 1, + "stat_type": "timer", + "tags": [ + "app:kong" + ] + } + ], + "description": "List of metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "description": "Authenticated user detail", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "description": "Datadog metric’s name", + "enum": [ + "kong_latency", + "latency", + "request_count", + "request_size", + "response_size", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "description": "Sampling rate", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "stat_type": { + "description": "Determines what sort of event the metric represents", + "enum": [ + "counter", + "distribution", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "tags": { + "description": "List of tags", + "items": { + "pattern": "^.*[^:]$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to be attached as a prefix to a metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + }, + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer" + }, + "service_name_tag": { + "default": "name", + "description": "String to be attached as the name of the service.", + "type": "string" + }, + "status_tag": { + "default": "status", + "description": "String to be attached as the tag of the HTTP status.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/datadog/3.9.json b/json_schemas/datadog/3.9.json new file mode 100644 index 00000000..12d04755 --- /dev/null +++ b/json_schemas/datadog/3.9.json @@ -0,0 +1,263 @@ +{ + "properties": { + "config": { + "properties": { + "consumer_tag": { + "default": "consumer", + "description": "String to be attached as tag of the consumer.", + "type": "string" + }, + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number" + }, + "host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "metrics": { + "default": [ + { + "consumer_identifier": "custom_id", + "name": "kong_latency", + "sample_rate": 1, + "stat_type": "timer", + "tags": [ + "app:kong" + ] + } + ], + "description": "List of metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "description": "Authenticated user detail", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "description": "Datadog metric’s name", + "enum": [ + "kong_latency", + "latency", + "request_count", + "request_size", + "response_size", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "description": "Sampling rate", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "stat_type": { + "description": "Determines what sort of event the metric represents", + "enum": [ + "counter", + "distribution", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "tags": { + "description": "List of tags", + "items": { + "pattern": "^.*[^:]$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to be attached as a prefix to a metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + }, + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer" + }, + "service_name_tag": { + "default": "name", + "description": "String to be attached as the name of the service.", + "type": "string" + }, + "status_tag": { + "default": "status", + "description": "String to be attached as the tag of the HTTP status.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/datakit/3.11.json b/json_schemas/datakit/3.11.json new file mode 100644 index 00000000..6e79b5db --- /dev/null +++ b/json_schemas/datakit/3.11.json @@ -0,0 +1,461 @@ +{ + "properties": { + "config": { + "properties": { + "debug": { + "default": false, + "type": "boolean" + }, + "nodes": { + "items": { + "description": "datakit nodes", + "properties": { + "name": { + "description": "A label that uniquely identifies the node within the plugin configuration so that it can be used for input/output connections. Must be valid `snake_case` or `kebab-case`.", + "examples": { + "value": "filter_02" + }, + "match_all": { + "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$" + }, + "maxLength": 255, + "minLength": 1, + "not_one_of": [ + "request", + "response", + "service_request", + "service_response" + ], + "type": "string" + }, + "type": { + "enum": [ + "call", + "exit", + "jq", + "property", + "static" + ], + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "subschema_definitions": { + "call": { + "description": "Make an external HTTP request", + "properties": { + "input": { + "description": "call node input", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "inputs": { + "description": "call node inputs", + "properties": { + "body": { + "description": "HTTP request body", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "headers": { + "description": "HTTP request headers", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "query": { + "description": "HTTP request query", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + } + }, + "required": false, + "type": "object" + }, + "method": { + "default": "GET", + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "maxLength": 32, + "minLength": 1, + "pattern": "^%u+$", + "type": "string" + }, + "output": { + "description": "call node output", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "outputs": { + "description": "call node outputs", + "properties": { + "body": { + "description": "HTTP response body", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "headers": { + "description": "HTTP response headers", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "status": { + "description": "HTTP response status code", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + } + }, + "required": false, + "type": "object" + }, + "ssl_server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": true, + "type": "string" + } + }, + "type": "object" + }, + "exit": { + "description": "Terminate the request and send a response to the client", + "properties": { + "input": { + "description": "exit node input", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "inputs": { + "description": "exit node inputs", + "properties": { + "body": { + "description": "HTTP response body", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "headers": { + "description": "HTTP response headers", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + } + }, + "required": false, + "type": "object" + }, + "status": { + "default": 200, + "description": "HTTP status code", + "maximum": 599, + "minimum": 200, + "type": "integer" + }, + "warn_headers_sent": { + "required": false, + "type": "boolean" + } + }, + "type": "object" + }, + "jq": { + "description": "Process data using `jq` syntax", + "properties": { + "input": { + "description": "filter input(s)", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "inputs": { + "additionalProperties": true, + "description": "filter input(s)", + "required": false, + "type": "object" + }, + "jq": { + "description": "The jq filter text. Refer to https://jqlang.org/manual/ for full documentation.", + "maxLength": 10240, + "minLength": 1, + "required": true, + "type": "string" + }, + "output": { + "description": "filter output(s)", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + } + }, + "type": "object" + }, + "property": { + "description": "Get or set a property", + "properties": { + "content_type": { + "description": "The expected mime type of the property value. When set to `application/json`, SET operations will JSON-encode input data before writing it, and GET operations will JSON-decode output data after reading it. Otherwise, this setting has no effect.", + "enum": [ + "application/json", + "application/octet-stream", + "text/plain" + ], + "required": false, + "type": "string" + }, + "input": { + "description": "Property input source. When connected, this node operates in SET mode and writes input data to the property. Otherwise, the node operates in GET mode and reads the property.", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "output": { + "description": "Property output. This can be connected regardless of whether the node is operating in GET mode or SET mode.", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "property": { + "description": "The property name to get/set", + "maxLength": 255, + "minLength": 1, + "required": true, + "type": "string" + } + }, + "type": "object" + }, + "static": { + "description": "Produce reusable outputs from statically-configured values", + "properties": { + "additionalProperties": true, + "output": { + "description": "The entire `.values` map", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "outputs": { + "additionalProperties": true, + "description": "Individual items from `.values`, referenced by key", + "required": false, + "type": "object" + } + }, + "type": "object" + } + }, + "subschema_error": "unknown node type: %q, expected one of: call, exit, jq, property, static", + "subschema_key": "type", + "subschema_override_parent": true, + "type": "object" + }, + "maxLength": 64, + "minLength": 1, + "type": "array" + } + }, + "required": [ + "nodes" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/datakit/3.12.json b/json_schemas/datakit/3.12.json new file mode 100644 index 00000000..8c97257f --- /dev/null +++ b/json_schemas/datakit/3.12.json @@ -0,0 +1,474 @@ +{ + "properties": { + "config": { + "properties": { + "debug": { + "default": false, + "type": "boolean" + }, + "nodes": { + "items": { + "description": "datakit nodes", + "properties": { + "name": { + "description": "A label that uniquely identifies the node within the plugin configuration so that it can be used for input/output connections. Must be valid `snake_case` or `kebab-case`.", + "examples": { + "value": "filter_02" + }, + "match_all": { + "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$" + }, + "maxLength": 255, + "minLength": 1, + "not_one_of": [ + "request", + "response", + "service_request", + "service_response", + "vault" + ], + "type": "string" + }, + "type": { + "enum": [ + "call", + "exit", + "jq", + "property", + "static" + ], + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "subschema_definitions": { + "call": { + "description": "Make an external HTTP request", + "properties": { + "input": { + "description": "call node input", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "inputs": { + "description": "call node inputs", + "properties": { + "body": { + "description": "HTTP request body", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "headers": { + "description": "HTTP request headers", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "query": { + "description": "HTTP request query", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + } + }, + "required": false, + "type": "object" + }, + "method": { + "default": "GET", + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "maxLength": 32, + "minLength": 1, + "pattern": "^%u+$", + "type": "string" + }, + "output": { + "description": "call node output", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "outputs": { + "description": "call node outputs", + "properties": { + "body": { + "description": "HTTP response body", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "headers": { + "description": "HTTP response headers", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "status": { + "description": "HTTP response status code", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + } + }, + "required": false, + "type": "object" + }, + "ssl_server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": true, + "type": "string" + } + }, + "type": "object" + }, + "exit": { + "description": "Terminate the request and send a response to the client", + "properties": { + "input": { + "description": "exit node input", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "inputs": { + "description": "exit node inputs", + "properties": { + "body": { + "description": "HTTP response body", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "headers": { + "description": "HTTP response headers", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + } + }, + "required": false, + "type": "object" + }, + "status": { + "default": 200, + "description": "HTTP status code", + "maximum": 599, + "minimum": 200, + "type": "integer" + }, + "warn_headers_sent": { + "required": false, + "type": "boolean" + } + }, + "type": "object" + }, + "jq": { + "description": "Process data using `jq` syntax", + "properties": { + "input": { + "description": "filter input(s)", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "inputs": { + "additionalProperties": true, + "description": "filter input(s)", + "required": false, + "type": "object" + }, + "jq": { + "description": "The jq filter text. Refer to https://jqlang.org/manual/ for full documentation.", + "maxLength": 10240, + "minLength": 1, + "required": true, + "type": "string" + }, + "output": { + "description": "filter output(s)", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + } + }, + "type": "object" + }, + "property": { + "description": "Get or set a property", + "properties": { + "content_type": { + "description": "The expected mime type of the property value. When set to `application/json`, SET operations will JSON-encode input data before writing it, and GET operations will JSON-decode output data after reading it. Otherwise, this setting has no effect.", + "enum": [ + "application/json", + "application/octet-stream", + "text/plain" + ], + "required": false, + "type": "string" + }, + "input": { + "description": "Property input source. When connected, this node operates in SET mode and writes input data to the property. Otherwise, the node operates in GET mode and reads the property.", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "output": { + "description": "Property output. This can be connected regardless of whether the node is operating in GET mode or SET mode.", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "property": { + "description": "The property name to get/set", + "maxLength": 255, + "minLength": 1, + "required": true, + "type": "string" + } + }, + "type": "object" + }, + "static": { + "description": "Produce reusable outputs from statically-configured values", + "properties": { + "additionalProperties": true, + "output": { + "description": "The entire `.values` map", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "maxLength": 255, + "minLength": 1, + "required": false, + "type": "string" + }, + "outputs": { + "additionalProperties": true, + "description": "Individual items from `.values`, referenced by key", + "required": false, + "type": "object" + } + }, + "type": "object" + } + }, + "subschema_error": "unknown node type: %q, expected one of: call, exit, jq, property, static", + "subschema_key": "type", + "subschema_override_parent": true, + "type": "object" + }, + "maxLength": 64, + "minLength": 1, + "type": "array" + }, + "resources": { + "properties": { + "vault": { + "additionalProperties": true, + "maxLength": 64, + "minLength": 1, + "type": "object" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "nodes" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/degraphql/2.8.json b/json_schemas/degraphql/2.8.json new file mode 100644 index 00000000..6dde9831 --- /dev/null +++ b/json_schemas/degraphql/2.8.json @@ -0,0 +1,68 @@ +{ + "properties": { + "config": { + "additionalProperties": true, + "properties": { + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/degraphql/3.10.json b/json_schemas/degraphql/3.10.json new file mode 100644 index 00000000..4d44acc6 --- /dev/null +++ b/json_schemas/degraphql/3.10.json @@ -0,0 +1,68 @@ +{ + "properties": { + "config": { + "properties": { + "graphql_server_path": { + "default": "/graphql", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/degraphql/3.11.json b/json_schemas/degraphql/3.11.json new file mode 100644 index 00000000..305dfff1 --- /dev/null +++ b/json_schemas/degraphql/3.11.json @@ -0,0 +1,58 @@ +{ + "properties": { + "config": { + "properties": { + "graphql_server_path": { + "default": "/graphql", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/degraphql/3.12.json b/json_schemas/degraphql/3.12.json new file mode 100644 index 00000000..305dfff1 --- /dev/null +++ b/json_schemas/degraphql/3.12.json @@ -0,0 +1,58 @@ +{ + "properties": { + "config": { + "properties": { + "graphql_server_path": { + "default": "/graphql", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/degraphql/3.4.json b/json_schemas/degraphql/3.4.json new file mode 100644 index 00000000..4d44acc6 --- /dev/null +++ b/json_schemas/degraphql/3.4.json @@ -0,0 +1,68 @@ +{ + "properties": { + "config": { + "properties": { + "graphql_server_path": { + "default": "/graphql", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/degraphql/3.7.json b/json_schemas/degraphql/3.7.json new file mode 100644 index 00000000..4d44acc6 --- /dev/null +++ b/json_schemas/degraphql/3.7.json @@ -0,0 +1,68 @@ +{ + "properties": { + "config": { + "properties": { + "graphql_server_path": { + "default": "/graphql", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/degraphql/3.8.json b/json_schemas/degraphql/3.8.json new file mode 100644 index 00000000..4d44acc6 --- /dev/null +++ b/json_schemas/degraphql/3.8.json @@ -0,0 +1,68 @@ +{ + "properties": { + "config": { + "properties": { + "graphql_server_path": { + "default": "/graphql", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/degraphql/3.9.json b/json_schemas/degraphql/3.9.json new file mode 100644 index 00000000..4d44acc6 --- /dev/null +++ b/json_schemas/degraphql/3.9.json @@ -0,0 +1,68 @@ +{ + "properties": { + "config": { + "properties": { + "graphql_server_path": { + "default": "/graphql", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/exit-transformer/2.8.json b/json_schemas/exit-transformer/2.8.json new file mode 100644 index 00000000..06e9af14 --- /dev/null +++ b/json_schemas/exit-transformer/2.8.json @@ -0,0 +1,92 @@ +{ + "properties": { + "config": { + "properties": { + "functions": { + "description": "Array of functions used to transform any Kong proxy exit response.", + "examples": [ + [ + "return function(status, body, header) return status, body, headers end" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "handle_unexpected": { + "default": false, + "description": "Allow transform to apply to unexpected request (400) responses.", + "type": "boolean" + }, + "handle_unknown": { + "default": false, + "description": "Allow transform to apply to unmatched Service, Route, or Workspace (404) responses.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/exit-transformer/3.10.json b/json_schemas/exit-transformer/3.10.json new file mode 100644 index 00000000..08af8b61 --- /dev/null +++ b/json_schemas/exit-transformer/3.10.json @@ -0,0 +1,95 @@ +{ + "properties": { + "config": { + "properties": { + "functions": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "handle_unexpected": { + "default": false, + "description": "Determines whether to handle unexpected errors by transforming their responses.", + "type": "boolean" + }, + "handle_unknown": { + "default": false, + "description": "Determines whether to handle unknown status codes by transforming their responses.", + "type": "boolean" + } + }, + "required": [ + "functions" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/exit-transformer/3.11.json b/json_schemas/exit-transformer/3.11.json new file mode 100644 index 00000000..42020ce8 --- /dev/null +++ b/json_schemas/exit-transformer/3.11.json @@ -0,0 +1,85 @@ +{ + "properties": { + "config": { + "properties": { + "functions": { + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "handle_unexpected": { + "default": false, + "description": "Determines whether to handle unexpected errors by transforming their responses.", + "type": "boolean" + }, + "handle_unknown": { + "default": false, + "description": "Determines whether to handle unknown status codes by transforming their responses.", + "type": "boolean" + } + }, + "required": [ + "functions" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/exit-transformer/3.12.json b/json_schemas/exit-transformer/3.12.json new file mode 100644 index 00000000..42020ce8 --- /dev/null +++ b/json_schemas/exit-transformer/3.12.json @@ -0,0 +1,85 @@ +{ + "properties": { + "config": { + "properties": { + "functions": { + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "handle_unexpected": { + "default": false, + "description": "Determines whether to handle unexpected errors by transforming their responses.", + "type": "boolean" + }, + "handle_unknown": { + "default": false, + "description": "Determines whether to handle unknown status codes by transforming their responses.", + "type": "boolean" + } + }, + "required": [ + "functions" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/exit-transformer/3.4.json b/json_schemas/exit-transformer/3.4.json new file mode 100644 index 00000000..08af8b61 --- /dev/null +++ b/json_schemas/exit-transformer/3.4.json @@ -0,0 +1,95 @@ +{ + "properties": { + "config": { + "properties": { + "functions": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "handle_unexpected": { + "default": false, + "description": "Determines whether to handle unexpected errors by transforming their responses.", + "type": "boolean" + }, + "handle_unknown": { + "default": false, + "description": "Determines whether to handle unknown status codes by transforming their responses.", + "type": "boolean" + } + }, + "required": [ + "functions" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/exit-transformer/3.7.json b/json_schemas/exit-transformer/3.7.json new file mode 100644 index 00000000..08af8b61 --- /dev/null +++ b/json_schemas/exit-transformer/3.7.json @@ -0,0 +1,95 @@ +{ + "properties": { + "config": { + "properties": { + "functions": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "handle_unexpected": { + "default": false, + "description": "Determines whether to handle unexpected errors by transforming their responses.", + "type": "boolean" + }, + "handle_unknown": { + "default": false, + "description": "Determines whether to handle unknown status codes by transforming their responses.", + "type": "boolean" + } + }, + "required": [ + "functions" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/exit-transformer/3.8.json b/json_schemas/exit-transformer/3.8.json new file mode 100644 index 00000000..08af8b61 --- /dev/null +++ b/json_schemas/exit-transformer/3.8.json @@ -0,0 +1,95 @@ +{ + "properties": { + "config": { + "properties": { + "functions": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "handle_unexpected": { + "default": false, + "description": "Determines whether to handle unexpected errors by transforming their responses.", + "type": "boolean" + }, + "handle_unknown": { + "default": false, + "description": "Determines whether to handle unknown status codes by transforming their responses.", + "type": "boolean" + } + }, + "required": [ + "functions" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/exit-transformer/3.9.json b/json_schemas/exit-transformer/3.9.json new file mode 100644 index 00000000..08af8b61 --- /dev/null +++ b/json_schemas/exit-transformer/3.9.json @@ -0,0 +1,95 @@ +{ + "properties": { + "config": { + "properties": { + "functions": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "handle_unexpected": { + "default": false, + "description": "Determines whether to handle unexpected errors by transforming their responses.", + "type": "boolean" + }, + "handle_unknown": { + "default": false, + "description": "Determines whether to handle unknown status codes by transforming their responses.", + "type": "boolean" + } + }, + "required": [ + "functions" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/file-log/2.8.json b/json_schemas/file-log/2.8.json new file mode 100644 index 00000000..38c1e50f --- /dev/null +++ b/json_schemas/file-log/2.8.json @@ -0,0 +1,111 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "A list of key-value pairs, where the key is the name of a log field and\nthe value is a chunk of Lua code, whose return value sets or replaces\nthe log field value. Requires Kong 2.4.x or above.", + "type": "object" + }, + "path": { + "description": "The file path of the output log file. The plugin creates the log file if it doesn't exist yet. Make sure Kong has write permissions to this file.", + "examples": [ + "/tmp/file.log" + ], + "pattern": "^[^*&%%\\`]+$", + "type": "string" + }, + "reopen": { + "default": false, + "description": "Determines whether the log file is closed and reopened on every request. If the file\nis not reopened, and has been removed/rotated, the plugin keeps writing to the\nstale file descriptor, and hence loses information.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/file-log/3.10.json b/json_schemas/file-log/3.10.json new file mode 100644 index 00000000..6b2e4832 --- /dev/null +++ b/json_schemas/file-log/3.10.json @@ -0,0 +1,98 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "path": { + "description": "The file path of the output log file. The plugin creates the log file if it doesn't exist yet.", + "pattern": "^[^[\\t\\n\\v\\f\\r ]*&%%\\`][^*&%%\\`]*[^[\\t\\n\\v\\f\\r ]*&%%\\`]$", + "type": "string" + }, + "reopen": { + "default": false, + "description": "Determines whether the log file is closed and reopened on every request.", + "type": "boolean" + } + }, + "required": [ + "path" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/file-log/3.11.json b/json_schemas/file-log/3.11.json new file mode 100644 index 00000000..8b36cb45 --- /dev/null +++ b/json_schemas/file-log/3.11.json @@ -0,0 +1,90 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "path": { + "description": "The file path of the output log file. The plugin creates the log file if it doesn't exist yet.", + "pattern": "^[^[\\t\\n\\v\\f\\r ]*&%%\\`][^*&%%\\`]*[^[\\t\\n\\v\\f\\r ]*&%%\\`]$", + "type": "string" + }, + "reopen": { + "default": false, + "description": "Determines whether the log file is closed and reopened on every request.", + "type": "boolean" + } + }, + "required": [ + "path" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/file-log/3.12.json b/json_schemas/file-log/3.12.json new file mode 100644 index 00000000..8b36cb45 --- /dev/null +++ b/json_schemas/file-log/3.12.json @@ -0,0 +1,90 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "path": { + "description": "The file path of the output log file. The plugin creates the log file if it doesn't exist yet.", + "pattern": "^[^[\\t\\n\\v\\f\\r ]*&%%\\`][^*&%%\\`]*[^[\\t\\n\\v\\f\\r ]*&%%\\`]$", + "type": "string" + }, + "reopen": { + "default": false, + "description": "Determines whether the log file is closed and reopened on every request.", + "type": "boolean" + } + }, + "required": [ + "path" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/file-log/3.4.json b/json_schemas/file-log/3.4.json new file mode 100644 index 00000000..566614b3 --- /dev/null +++ b/json_schemas/file-log/3.4.json @@ -0,0 +1,98 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "path": { + "description": "The file path of the output log file. The plugin creates the log file if it doesn't exist yet.", + "pattern": "^[^*&%%\\`]+$", + "type": "string" + }, + "reopen": { + "default": false, + "description": "Determines whether the log file is closed and reopened on every request.", + "type": "boolean" + } + }, + "required": [ + "path" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/file-log/3.7.json b/json_schemas/file-log/3.7.json new file mode 100644 index 00000000..566614b3 --- /dev/null +++ b/json_schemas/file-log/3.7.json @@ -0,0 +1,98 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "path": { + "description": "The file path of the output log file. The plugin creates the log file if it doesn't exist yet.", + "pattern": "^[^*&%%\\`]+$", + "type": "string" + }, + "reopen": { + "default": false, + "description": "Determines whether the log file is closed and reopened on every request.", + "type": "boolean" + } + }, + "required": [ + "path" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/file-log/3.8.json b/json_schemas/file-log/3.8.json new file mode 100644 index 00000000..566614b3 --- /dev/null +++ b/json_schemas/file-log/3.8.json @@ -0,0 +1,98 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "path": { + "description": "The file path of the output log file. The plugin creates the log file if it doesn't exist yet.", + "pattern": "^[^*&%%\\`]+$", + "type": "string" + }, + "reopen": { + "default": false, + "description": "Determines whether the log file is closed and reopened on every request.", + "type": "boolean" + } + }, + "required": [ + "path" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/file-log/3.9.json b/json_schemas/file-log/3.9.json new file mode 100644 index 00000000..566614b3 --- /dev/null +++ b/json_schemas/file-log/3.9.json @@ -0,0 +1,98 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "path": { + "description": "The file path of the output log file. The plugin creates the log file if it doesn't exist yet.", + "pattern": "^[^*&%%\\`]+$", + "type": "string" + }, + "reopen": { + "default": false, + "description": "Determines whether the log file is closed and reopened on every request.", + "type": "boolean" + } + }, + "required": [ + "path" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/forward-proxy/2.8.json b/json_schemas/forward-proxy/2.8.json new file mode 100644 index 00000000..ea31543e --- /dev/null +++ b/json_schemas/forward-proxy/2.8.json @@ -0,0 +1,134 @@ +{ + "properties": { + "config": { + "properties": { + "auth_password": { + "description": "The password to authenticate with, if the forward proxy is protected\nby basic authentication.", + "examples": [ + "example_pass" + ], + "type": "string" + }, + "auth_username": { + "description": "The username to authenticate with, if the forward proxy is protected\nby basic authentication.", + "examples": [ + "example_user" + ], + "type": "string" + }, + "http_proxy_host": { + "description": "The HTTP hostname or IP address of the forward proxy to which to connect.\n Required if `http_proxy_port` is set.\n\nAt least one of `http_proxy_host` or `https_proxy_host` must be specified.\n\nIf `http_proxy_host` isn't set, the plugin falls back to the value\nconfigured in `https_proxy_host`.", + "examples": [ + "example.com" + ], + "type": "string" + }, + "http_proxy_port": { + "description": "The TCP port of the HTTP forward proxy to which to connect.\nRequired if `http_proxy_host` is set.\n\nAt least one of `http_proxy_port` or `https_proxy_port` must be specified.\n\nIf `http_proxy_port` isn't set, the plugin falls back to the value\nconfigured in `https_proxy_port`.", + "examples": [ + 80 + ], + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_proxy_host": { + "description": "The HTTPS hostname or IP address of the forward proxy to which to connect.\nRequired if `https_proxy_port` is set.\n\nAt least one of `http_proxy_host` or `https_proxy_host` must be specified.\n\nIf `https_proxy_host` isn't set, the plugin falls back to the value\nconfigured in `http_proxy_host`.", + "type": "string" + }, + "https_proxy_port": { + "description": "The TCP port of the HTTPS forward proxy to which to connect.\nRequired if `https_proxy_host` is set.\n\nAt least one of `http_proxy_port` or `https_proxy_port` must be specified.\n\nIf `https_proxy_port` isn't set, the plugin falls back to the value\nconfigured in `http_proxy_port`.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": false, + "description": "Whether the server certificate will be verified according to the CA certificates\nspecified in\n[lua_ssl_trusted_certificate](https://www.nginx.com/resources/wiki/modules/lua/#lua-ssl-trusted-certificate).", + "examples": [ + false + ], + "type": "boolean" + }, + "proxy_scheme": { + "default": "http", + "description": "The proxy scheme to use when connecting. Only `http` is supported.", + "enum": [ + "http" + ], + "examples": [ + "http" + ], + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "proxy_host": { + "type": "string" + }, + "proxy_port": { + "type": "integer" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/forward-proxy/3.10.json b/json_schemas/forward-proxy/3.10.json new file mode 100644 index 00000000..c0f4b52a --- /dev/null +++ b/json_schemas/forward-proxy/3.10.json @@ -0,0 +1,135 @@ +{ + "properties": { + "config": { + "properties": { + "auth_password": { + "description": "The password to authenticate with, if the forward proxy is protected\nby basic authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "auth_username": { + "description": "The username to authenticate with, if the forward proxy is protected\nby basic authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": false, + "description": "Whether the server certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "type": "boolean" + }, + "proxy_scheme": { + "default": "http", + "description": "The proxy scheme to use when connecting. Only `http` is supported.", + "enum": [ + "http" + ], + "type": "string" + }, + "x_headers": { + "default": "append", + "description": "Determines how to handle headers when forwarding the request.", + "enum": [ + "append", + "delete", + "transparent" + ], + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "proxy_host": { + "type": "string" + }, + "proxy_port": { + "type": "integer" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/forward-proxy/3.11.json b/json_schemas/forward-proxy/3.11.json new file mode 100644 index 00000000..27a78662 --- /dev/null +++ b/json_schemas/forward-proxy/3.11.json @@ -0,0 +1,123 @@ +{ + "properties": { + "config": { + "properties": { + "auth_password": { + "description": "The password to authenticate with, if the forward proxy is protected\nby basic authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "auth_username": { + "description": "The username to authenticate with, if the forward proxy is protected\nby basic authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": false, + "description": "Whether the server certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "type": "boolean" + }, + "proxy_scheme": { + "default": "http", + "description": "The proxy scheme to use when connecting. Only `http` is supported.", + "enum": [ + "http" + ], + "type": "string" + }, + "x_headers": { + "default": "append", + "description": "Determines how to handle headers when forwarding the request.", + "enum": [ + "append", + "delete", + "transparent" + ], + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "proxy_host": { + "type": "string" + }, + "proxy_port": { + "type": "integer" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/forward-proxy/3.12.json b/json_schemas/forward-proxy/3.12.json new file mode 100644 index 00000000..27a78662 --- /dev/null +++ b/json_schemas/forward-proxy/3.12.json @@ -0,0 +1,123 @@ +{ + "properties": { + "config": { + "properties": { + "auth_password": { + "description": "The password to authenticate with, if the forward proxy is protected\nby basic authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "auth_username": { + "description": "The username to authenticate with, if the forward proxy is protected\nby basic authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": false, + "description": "Whether the server certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "type": "boolean" + }, + "proxy_scheme": { + "default": "http", + "description": "The proxy scheme to use when connecting. Only `http` is supported.", + "enum": [ + "http" + ], + "type": "string" + }, + "x_headers": { + "default": "append", + "description": "Determines how to handle headers when forwarding the request.", + "enum": [ + "append", + "delete", + "transparent" + ], + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "proxy_host": { + "type": "string" + }, + "proxy_port": { + "type": "integer" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/forward-proxy/3.4.json b/json_schemas/forward-proxy/3.4.json new file mode 100644 index 00000000..c0f4b52a --- /dev/null +++ b/json_schemas/forward-proxy/3.4.json @@ -0,0 +1,135 @@ +{ + "properties": { + "config": { + "properties": { + "auth_password": { + "description": "The password to authenticate with, if the forward proxy is protected\nby basic authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "auth_username": { + "description": "The username to authenticate with, if the forward proxy is protected\nby basic authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": false, + "description": "Whether the server certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "type": "boolean" + }, + "proxy_scheme": { + "default": "http", + "description": "The proxy scheme to use when connecting. Only `http` is supported.", + "enum": [ + "http" + ], + "type": "string" + }, + "x_headers": { + "default": "append", + "description": "Determines how to handle headers when forwarding the request.", + "enum": [ + "append", + "delete", + "transparent" + ], + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "proxy_host": { + "type": "string" + }, + "proxy_port": { + "type": "integer" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/forward-proxy/3.7.json b/json_schemas/forward-proxy/3.7.json new file mode 100644 index 00000000..c0f4b52a --- /dev/null +++ b/json_schemas/forward-proxy/3.7.json @@ -0,0 +1,135 @@ +{ + "properties": { + "config": { + "properties": { + "auth_password": { + "description": "The password to authenticate with, if the forward proxy is protected\nby basic authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "auth_username": { + "description": "The username to authenticate with, if the forward proxy is protected\nby basic authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": false, + "description": "Whether the server certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "type": "boolean" + }, + "proxy_scheme": { + "default": "http", + "description": "The proxy scheme to use when connecting. Only `http` is supported.", + "enum": [ + "http" + ], + "type": "string" + }, + "x_headers": { + "default": "append", + "description": "Determines how to handle headers when forwarding the request.", + "enum": [ + "append", + "delete", + "transparent" + ], + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "proxy_host": { + "type": "string" + }, + "proxy_port": { + "type": "integer" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/forward-proxy/3.8.json b/json_schemas/forward-proxy/3.8.json new file mode 100644 index 00000000..c0f4b52a --- /dev/null +++ b/json_schemas/forward-proxy/3.8.json @@ -0,0 +1,135 @@ +{ + "properties": { + "config": { + "properties": { + "auth_password": { + "description": "The password to authenticate with, if the forward proxy is protected\nby basic authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "auth_username": { + "description": "The username to authenticate with, if the forward proxy is protected\nby basic authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": false, + "description": "Whether the server certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "type": "boolean" + }, + "proxy_scheme": { + "default": "http", + "description": "The proxy scheme to use when connecting. Only `http` is supported.", + "enum": [ + "http" + ], + "type": "string" + }, + "x_headers": { + "default": "append", + "description": "Determines how to handle headers when forwarding the request.", + "enum": [ + "append", + "delete", + "transparent" + ], + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "proxy_host": { + "type": "string" + }, + "proxy_port": { + "type": "integer" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/forward-proxy/3.9.json b/json_schemas/forward-proxy/3.9.json new file mode 100644 index 00000000..c0f4b52a --- /dev/null +++ b/json_schemas/forward-proxy/3.9.json @@ -0,0 +1,135 @@ +{ + "properties": { + "config": { + "properties": { + "auth_password": { + "description": "The password to authenticate with, if the forward proxy is protected\nby basic authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "auth_username": { + "description": "The username to authenticate with, if the forward proxy is protected\nby basic authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "https_verify": { + "default": false, + "description": "Whether the server certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "type": "boolean" + }, + "proxy_scheme": { + "default": "http", + "description": "The proxy scheme to use when connecting. Only `http` is supported.", + "enum": [ + "http" + ], + "type": "string" + }, + "x_headers": { + "default": "append", + "description": "Determines how to handle headers when forwarding the request.", + "enum": [ + "append", + "delete", + "transparent" + ], + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "proxy_host": { + "type": "string" + }, + "proxy_port": { + "type": "integer" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/graphql-proxy-cache-advanced/2.8.json b/json_schemas/graphql-proxy-cache-advanced/2.8.json new file mode 100644 index 00000000..af8cce11 --- /dev/null +++ b/json_schemas/graphql-proxy-cache-advanced/2.8.json @@ -0,0 +1,107 @@ +{ + "properties": { + "config": { + "properties": { + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "minimum": 0, + "type": "integer" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note\n that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "strategy": { + "default": "memory", + "description": "The backing data store in which to hold cached entities. Accepted value is `memory`.", + "enum": [ + "memory" + ], + "examples": [ + "memory" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/graphql-proxy-cache-advanced/3.10.json b/json_schemas/graphql-proxy-cache-advanced/3.10.json new file mode 100644 index 00000000..65438cb1 --- /dev/null +++ b/json_schemas/graphql-proxy-cache-advanced/3.10.json @@ -0,0 +1,300 @@ +{ + "properties": { + "config": { + "properties": { + "bypass_on_err": { + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "minimum": 0, + "type": "integer" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. This dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "default": "memory", + "description": "The backing data store in which to hold cached entities. Accepted value is `memory`.", + "enum": [ + "memory", + "redis" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/graphql-proxy-cache-advanced/3.11.json b/json_schemas/graphql-proxy-cache-advanced/3.11.json new file mode 100644 index 00000000..51ffa9b4 --- /dev/null +++ b/json_schemas/graphql-proxy-cache-advanced/3.11.json @@ -0,0 +1,278 @@ +{ + "properties": { + "config": { + "properties": { + "bypass_on_err": { + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "minimum": 0, + "type": "integer" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. This dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "default": "memory", + "description": "The backing data store in which to hold cached entities. Accepted value is `memory`.", + "enum": [ + "memory", + "redis" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/graphql-proxy-cache-advanced/3.12.json b/json_schemas/graphql-proxy-cache-advanced/3.12.json new file mode 100644 index 00000000..51ffa9b4 --- /dev/null +++ b/json_schemas/graphql-proxy-cache-advanced/3.12.json @@ -0,0 +1,278 @@ +{ + "properties": { + "config": { + "properties": { + "bypass_on_err": { + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "minimum": 0, + "type": "integer" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. This dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "default": "memory", + "description": "The backing data store in which to hold cached entities. Accepted value is `memory`.", + "enum": [ + "memory", + "redis" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/graphql-proxy-cache-advanced/3.4.json b/json_schemas/graphql-proxy-cache-advanced/3.4.json new file mode 100644 index 00000000..147f7004 --- /dev/null +++ b/json_schemas/graphql-proxy-cache-advanced/3.4.json @@ -0,0 +1,113 @@ +{ + "properties": { + "config": { + "properties": { + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "minimum": 0, + "type": "integer" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. This dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "strategy": { + "default": "memory", + "description": "The backing data store in which to hold cached entities. Accepted value is `memory`.", + "enum": [ + "memory" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/graphql-proxy-cache-advanced/3.7.json b/json_schemas/graphql-proxy-cache-advanced/3.7.json new file mode 100644 index 00000000..d065c8f3 --- /dev/null +++ b/json_schemas/graphql-proxy-cache-advanced/3.7.json @@ -0,0 +1,245 @@ +{ + "properties": { + "config": { + "properties": { + "bypass_on_err": { + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "minimum": 0, + "type": "integer" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. This dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "cluster_addresses": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_addresses": { + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "strategy": { + "default": "memory", + "description": "The backing data store in which to hold cached entities. Accepted value is `memory`.", + "enum": [ + "memory", + "redis" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/graphql-proxy-cache-advanced/3.8.json b/json_schemas/graphql-proxy-cache-advanced/3.8.json new file mode 100644 index 00000000..82eea9ce --- /dev/null +++ b/json_schemas/graphql-proxy-cache-advanced/3.8.json @@ -0,0 +1,301 @@ +{ + "properties": { + "config": { + "properties": { + "bypass_on_err": { + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "minimum": 0, + "type": "integer" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. This dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "translate_backwards": [ + "connect_timeout" + ], + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "default": "memory", + "description": "The backing data store in which to hold cached entities. Accepted value is `memory`.", + "enum": [ + "memory", + "redis" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/graphql-proxy-cache-advanced/3.9.json b/json_schemas/graphql-proxy-cache-advanced/3.9.json new file mode 100644 index 00000000..65438cb1 --- /dev/null +++ b/json_schemas/graphql-proxy-cache-advanced/3.9.json @@ -0,0 +1,300 @@ +{ + "properties": { + "config": { + "properties": { + "bypass_on_err": { + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "minimum": 0, + "type": "integer" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. This dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "default": "memory", + "description": "The backing data store in which to hold cached entities. Accepted value is `memory`.", + "enum": [ + "memory", + "redis" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/graphql-rate-limiting-advanced/2.8.json b/json_schemas/graphql-rate-limiting-advanced/2.8.json new file mode 100644 index 00000000..fe0ea1aa --- /dev/null +++ b/json_schemas/graphql-rate-limiting-advanced/2.8.json @@ -0,0 +1,294 @@ +{ + "properties": { + "config": { + "properties": { + "cost_strategy": { + "default": "default", + "description": "Strategy to use to evaluate query costs. Either `default` or\n`node_quantifier`. See [default](/hub/kong-inc/graphql-rate-limiting-advanced/#default) and\n[node_quantifier](/hub/kong-inc/graphql-rate-limiting-advanced/#node_quantifier) respectively.", + "enum": [ + "default", + "node_quantifier" + ], + "type": "string" + }, + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters will be stored until the next sync cycle.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers. Available options: `true` or `false`.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "How to define the rate limit key. Can be `ip`, `credential`, `consumer`.", + "enum": [ + "consumer", + "credential", + "ip" + ], + "type": "string" + }, + "limit": { + "description": "One or more requests-per-window limits to apply.", + "examples": [ + [ + 5 + ] + ], + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "max_cost": { + "default": 0, + "description": "A defined maximum cost per query. 0 means unlimited.", + "type": "number" + }, + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter\ndata and sync configuration is shared in a namespace.\n\n{:.important}\n> **Important**: If managing Kong Gateway with **declarative configuration** or running\nKong Gateway in **DB-less mode**, set the `namespace` explicitly in your declarative configuration.\n>

\n> If not set, you will run into the following issues:\n* In DB-less mode, this field will be regenerated automatically on every configuration change.\n* If applying declarative configuration with decK, decK will automatically fail the update and require a\n`namespace` value.", + "examples": [ + "example_namespace" + ], + "type": "string" + }, + "redis": { + "properties": { + "cluster_addresses": { + "description": "Cluster addresses to use for Redis connection when the `redis` strategy is defined. Defining this value implies using Redis cluster.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "database": { + "default": 0, + "description": "Database to use for Redis connection when the `redis` strategy is defined.", + "type": "integer" + }, + "host": { + "description": "Host to use for Redis connection when the `redis` strategy is defined.", + "type": "string" + }, + "keepalive_backlog": { + "description": "If specified, limits the total number of opened connections for a pool. If the\nconnection pool is full, all connection queues beyond the maximum limit go into\nthe backlog queue. Once the backlog queue is full, subsequent connect operations\nwill fail and return `nil`. Queued connect operations resume once the number of\nconnections in the pool is less than `keepalive_pool_size`. Note that queued\nconnect operations are subject to set timeouts.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 30, + "description": "The size limit for every cosocket connection pool associated with every remote\nserver, per worker process. If no `keepalive_pool_size` is specified and no `keepalive_backlog`\nis specified, no pool is created. If no `keepalive_pool_size` is specified and `keepalive_backlog`\nis specified, then the pool uses the default value `30`.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connection when the `redis` strategy is defined.\nIf undefined, no AUTH commands are sent to Redis.", + "type": "string" + }, + "port": { + "description": "Port to use for Redis connection when the `redis` strategy is defined.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_addresses": { + "description": "Sentinel addresses to use for Redis connection when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connection when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_password": { + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connection when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance.\nIf undefined, ACL authentication will not be performed. This requires Redis v6.2.0+.", + "type": "string" + }, + "server_name": { + "description": "Specifies the server name for the new TLS extension Server Name Indication (SNI) when connecting over SSL.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, then uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, then verifies the validity of the server SSL certificate. Note that you need to configure the\n[lua_ssl_trusted_certificate](/gateway/latest/reference/configuration/#lua_ssl_trusted_certificate)\nto specify the CA (or server) certificate used by your redis server. You may also need to configure\n[lua_ssl_verify_depth](/gateway/latest/reference/configuration/#lua_ssl_verify_depth) accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "Connection timeout (in milliseconds) to use for Redis connection when the `redis` strategy is defined.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connection when the `redis` strategy is defined and ACL authentication is desired.\nIf undefined, ACL authentication will not be performed.\n\nThis requires Redis v6.0.0+. The username **cannot** be set to `default`.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "score_factor": { + "default": 1, + "description": "A scoring factor to multiply (or divide) the cost. The `score_factor` must always be greater than 0.", + "minimum": 0, + "type": "number" + }, + "strategy": { + "default": "cluster", + "description": "The rate-limiting strategy to use for retrieving and incrementing the\nlimits. Available values are:\n- `cluster`: Counters are stored in the Kong datastore and shared across\nthe nodes.\n- `redis`: Counters are stored on a Redis server and shared\nacross the nodes.\n\nIn DB-less and hybrid modes, the `cluster` config strategy is not\nsupported.\n\n{:.important}\n> There is no local storage strategy. However, you can achieve local\nrate limiting by using a placeholder `strategy` value (either `cluster` or `redis`)\nand a `sync_rate` of `-1`. This setting stores counters in-memory on the\nnode.\n

If using `redis` as the placeholder value, you must fill in all\nadditional `redis` configuration parameters with placeholder values.\n\nFor details on which strategy should be used, refer to the\n[implementation considerations](/hub/kong-inc/rate-limiting/#implementation-considerations).", + "enum": [ + "cluster", + "redis" + ], + "examples": [ + "cluster" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0\nresults in synchronous behavior; a value of -1 ignores sync behavior\nentirely and only stores counters in node memory. A value greater than\n0 syncs the counters in that many number of seconds.", + "examples": [ + -1 + ], + "type": "number" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds).", + "examples": [ + [ + 30 + ] + ], + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window to either `sliding` or `fixed`.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/graphql-rate-limiting-advanced/3.10.json b/json_schemas/graphql-rate-limiting-advanced/3.10.json new file mode 100644 index 00000000..b7780508 --- /dev/null +++ b/json_schemas/graphql-rate-limiting-advanced/3.10.json @@ -0,0 +1,345 @@ +{ + "properties": { + "config": { + "properties": { + "cost_strategy": { + "default": "default", + "description": "Strategy to use to evaluate query costs. Either `default` or `node_quantifier`.", + "enum": [ + "default", + "node_quantifier" + ], + "type": "string" + }, + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters will be stored until the next sync cycle.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers. Available options: `true` or `false`.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "How to define the rate limit key. Can be `ip`, `credential`, `consumer`.", + "enum": [ + "consumer", + "credential", + "ip" + ], + "type": "string" + }, + "limit": { + "description": "One or more requests-per-window limits to apply.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "max_cost": { + "default": 0, + "description": "A defined maximum cost per query. 0 means unlimited.", + "type": "number" + }, + "namespace": { + "description": "The rate limiting namespace to use for this plugin instance. This namespace is used to share rate limiting counters across different instances. If it is not provided, a random UUID is generated. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same.", + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "score_factor": { + "default": 1, + "description": "A scoring factor to multiply (or divide) the cost. The `score_factor` must always be greater than 0.", + "minimum": 0, + "type": "number" + }, + "strategy": { + "default": "cluster", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 syncs the counters in that many number of seconds.", + "type": "number" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds).", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window to either `sliding` or `fixed`.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "limit", + "sync_rate", + "window_size" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/graphql-rate-limiting-advanced/3.11.json b/json_schemas/graphql-rate-limiting-advanced/3.11.json new file mode 100644 index 00000000..02e2faed --- /dev/null +++ b/json_schemas/graphql-rate-limiting-advanced/3.11.json @@ -0,0 +1,332 @@ +{ + "properties": { + "config": { + "properties": { + "cost_strategy": { + "default": "default", + "description": "Strategy to use to evaluate query costs. Either `default` or `node_quantifier`.", + "enum": [ + "default", + "node_quantifier" + ], + "type": "string" + }, + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters will be stored until the next sync cycle.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers. Available options: `true` or `false`.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "How to define the rate limit key. Can be `ip`, `credential`, `consumer`.", + "enum": [ + "consumer", + "credential", + "ip" + ], + "type": "string" + }, + "limit": { + "description": "One or more requests-per-window limits to apply.", + "items": { + "required": [], + "type": "number" + }, + "type": "array" + }, + "max_cost": { + "default": 0, + "description": "A defined maximum cost per query. 0 means unlimited.", + "type": "number" + }, + "namespace": { + "description": "The rate limiting namespace to use for this plugin instance. This namespace is used to share rate limiting counters across different instances. If it is not provided, a random UUID is generated. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same.", + "type": "string" + }, + "pass_all_downstream_headers": { + "default": false, + "description": "pass all downstream headers to the upstream graphql server in introspection request", + "type": "boolean" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "score_factor": { + "default": 1, + "description": "A scoring factor to multiply (or divide) the cost. The `score_factor` must always be greater than 0.", + "minimum": 0, + "type": "number" + }, + "strategy": { + "default": "cluster", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 syncs the counters in that many number of seconds.", + "type": "number" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds).", + "items": { + "required": [], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window to either `sliding` or `fixed`.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "limit", + "sync_rate", + "window_size" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/graphql-rate-limiting-advanced/3.12.json b/json_schemas/graphql-rate-limiting-advanced/3.12.json new file mode 100644 index 00000000..02e2faed --- /dev/null +++ b/json_schemas/graphql-rate-limiting-advanced/3.12.json @@ -0,0 +1,332 @@ +{ + "properties": { + "config": { + "properties": { + "cost_strategy": { + "default": "default", + "description": "Strategy to use to evaluate query costs. Either `default` or `node_quantifier`.", + "enum": [ + "default", + "node_quantifier" + ], + "type": "string" + }, + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters will be stored until the next sync cycle.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers. Available options: `true` or `false`.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "How to define the rate limit key. Can be `ip`, `credential`, `consumer`.", + "enum": [ + "consumer", + "credential", + "ip" + ], + "type": "string" + }, + "limit": { + "description": "One or more requests-per-window limits to apply.", + "items": { + "required": [], + "type": "number" + }, + "type": "array" + }, + "max_cost": { + "default": 0, + "description": "A defined maximum cost per query. 0 means unlimited.", + "type": "number" + }, + "namespace": { + "description": "The rate limiting namespace to use for this plugin instance. This namespace is used to share rate limiting counters across different instances. If it is not provided, a random UUID is generated. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same.", + "type": "string" + }, + "pass_all_downstream_headers": { + "default": false, + "description": "pass all downstream headers to the upstream graphql server in introspection request", + "type": "boolean" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "score_factor": { + "default": 1, + "description": "A scoring factor to multiply (or divide) the cost. The `score_factor` must always be greater than 0.", + "minimum": 0, + "type": "number" + }, + "strategy": { + "default": "cluster", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 syncs the counters in that many number of seconds.", + "type": "number" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds).", + "items": { + "required": [], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window to either `sliding` or `fixed`.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "limit", + "sync_rate", + "window_size" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/graphql-rate-limiting-advanced/3.4.json b/json_schemas/graphql-rate-limiting-advanced/3.4.json new file mode 100644 index 00000000..42393672 --- /dev/null +++ b/json_schemas/graphql-rate-limiting-advanced/3.4.json @@ -0,0 +1,290 @@ +{ + "properties": { + "config": { + "properties": { + "cost_strategy": { + "default": "default", + "description": "Strategy to use to evaluate query costs. Either `default` or `node_quantifier`.", + "enum": [ + "default", + "node_quantifier" + ], + "type": "string" + }, + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters will be stored until the next sync cycle.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers. Available options: `true` or `false`.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "How to define the rate limit key. Can be `ip`, `credential`, `consumer`.", + "enum": [ + "consumer", + "credential", + "ip" + ], + "type": "string" + }, + "limit": { + "description": "One or more requests-per-window limits to apply.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "max_cost": { + "default": 0, + "description": "A defined maximum cost per query. 0 means unlimited.", + "type": "number" + }, + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same.", + "type": "string" + }, + "redis": { + "properties": { + "cluster_addresses": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_addresses": { + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "score_factor": { + "default": 1, + "description": "A scoring factor to multiply (or divide) the cost. The `score_factor` must always be greater than 0.", + "minimum": 0, + "type": "number" + }, + "strategy": { + "default": "cluster", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 syncs the counters in that many number of seconds.", + "type": "number" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds).", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window to either `sliding` or `fixed`.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "limit", + "sync_rate", + "window_size" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/graphql-rate-limiting-advanced/3.7.json b/json_schemas/graphql-rate-limiting-advanced/3.7.json new file mode 100644 index 00000000..c0517be7 --- /dev/null +++ b/json_schemas/graphql-rate-limiting-advanced/3.7.json @@ -0,0 +1,290 @@ +{ + "properties": { + "config": { + "properties": { + "cost_strategy": { + "default": "default", + "description": "Strategy to use to evaluate query costs. Either `default` or `node_quantifier`.", + "enum": [ + "default", + "node_quantifier" + ], + "type": "string" + }, + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters will be stored until the next sync cycle.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers. Available options: `true` or `false`.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "How to define the rate limit key. Can be `ip`, `credential`, `consumer`.", + "enum": [ + "consumer", + "credential", + "ip" + ], + "type": "string" + }, + "limit": { + "description": "One or more requests-per-window limits to apply.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "max_cost": { + "default": 0, + "description": "A defined maximum cost per query. 0 means unlimited.", + "type": "number" + }, + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same.", + "type": "string" + }, + "redis": { + "properties": { + "cluster_addresses": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_addresses": { + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "score_factor": { + "default": 1, + "description": "A scoring factor to multiply (or divide) the cost. The `score_factor` must always be greater than 0.", + "minimum": 0, + "type": "number" + }, + "strategy": { + "default": "cluster", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 syncs the counters in that many number of seconds.", + "type": "number" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds).", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window to either `sliding` or `fixed`.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "limit", + "sync_rate", + "window_size" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/graphql-rate-limiting-advanced/3.8.json b/json_schemas/graphql-rate-limiting-advanced/3.8.json new file mode 100644 index 00000000..9891ed6d --- /dev/null +++ b/json_schemas/graphql-rate-limiting-advanced/3.8.json @@ -0,0 +1,346 @@ +{ + "properties": { + "config": { + "properties": { + "cost_strategy": { + "default": "default", + "description": "Strategy to use to evaluate query costs. Either `default` or `node_quantifier`.", + "enum": [ + "default", + "node_quantifier" + ], + "type": "string" + }, + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters will be stored until the next sync cycle.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers. Available options: `true` or `false`.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "How to define the rate limit key. Can be `ip`, `credential`, `consumer`.", + "enum": [ + "consumer", + "credential", + "ip" + ], + "type": "string" + }, + "limit": { + "description": "One or more requests-per-window limits to apply.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "max_cost": { + "default": 0, + "description": "A defined maximum cost per query. 0 means unlimited.", + "type": "number" + }, + "namespace": { + "description": "The rate limiting namespace to use for this plugin instance. This namespace is used to share rate limiting counters across different instances. If it is not provided, a random UUID is generated. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same.", + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "translate_backwards": [ + "connect_timeout" + ], + "type": "integer" + } + }, + "type": "object" + }, + "score_factor": { + "default": 1, + "description": "A scoring factor to multiply (or divide) the cost. The `score_factor` must always be greater than 0.", + "minimum": 0, + "type": "number" + }, + "strategy": { + "default": "cluster", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 syncs the counters in that many number of seconds.", + "type": "number" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds).", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window to either `sliding` or `fixed`.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "limit", + "sync_rate", + "window_size" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/graphql-rate-limiting-advanced/3.9.json b/json_schemas/graphql-rate-limiting-advanced/3.9.json new file mode 100644 index 00000000..b7780508 --- /dev/null +++ b/json_schemas/graphql-rate-limiting-advanced/3.9.json @@ -0,0 +1,345 @@ +{ + "properties": { + "config": { + "properties": { + "cost_strategy": { + "default": "default", + "description": "Strategy to use to evaluate query costs. Either `default` or `node_quantifier`.", + "enum": [ + "default", + "node_quantifier" + ], + "type": "string" + }, + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters will be stored until the next sync cycle.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers. Available options: `true` or `false`.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "How to define the rate limit key. Can be `ip`, `credential`, `consumer`.", + "enum": [ + "consumer", + "credential", + "ip" + ], + "type": "string" + }, + "limit": { + "description": "One or more requests-per-window limits to apply.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "max_cost": { + "default": 0, + "description": "A defined maximum cost per query. 0 means unlimited.", + "type": "number" + }, + "namespace": { + "description": "The rate limiting namespace to use for this plugin instance. This namespace is used to share rate limiting counters across different instances. If it is not provided, a random UUID is generated. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same.", + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "score_factor": { + "default": 1, + "description": "A scoring factor to multiply (or divide) the cost. The `score_factor` must always be greater than 0.", + "minimum": 0, + "type": "number" + }, + "strategy": { + "default": "cluster", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 syncs the counters in that many number of seconds.", + "type": "number" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds).", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window to either `sliding` or `fixed`.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "limit", + "sync_rate", + "window_size" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/grpc-gateway/2.8.json b/json_schemas/grpc-gateway/2.8.json new file mode 100644 index 00000000..b3a597b5 --- /dev/null +++ b/json_schemas/grpc-gateway/2.8.json @@ -0,0 +1,74 @@ +{ + "properties": { + "config": { + "properties": { + "proto": { + "description": "Describes the gRPC types and methods.\n[HTTP configuration](https://github.com/googleapis/googleapis/blob/fc37c47e70b83c1cc5cc1616c9a307c4303fe789/google/api/http.proto)\nmust be defined in the file.", + "examples": [ + "path/to/hello.proto" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/grpc-gateway/3.10.json b/json_schemas/grpc-gateway/3.10.json new file mode 100644 index 00000000..2ae37a8c --- /dev/null +++ b/json_schemas/grpc-gateway/3.10.json @@ -0,0 +1,87 @@ +{ + "properties": { + "config": { + "properties": { + "proto": { + "description": "Describes the gRPC types and methods.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/grpc-gateway/3.11.json b/json_schemas/grpc-gateway/3.11.json new file mode 100644 index 00000000..f9b0ae1e --- /dev/null +++ b/json_schemas/grpc-gateway/3.11.json @@ -0,0 +1,75 @@ +{ + "properties": { + "config": { + "properties": { + "proto": { + "description": "Describes the gRPC types and methods.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/grpc-gateway/3.12.json b/json_schemas/grpc-gateway/3.12.json new file mode 100644 index 00000000..f9b0ae1e --- /dev/null +++ b/json_schemas/grpc-gateway/3.12.json @@ -0,0 +1,75 @@ +{ + "properties": { + "config": { + "properties": { + "proto": { + "description": "Describes the gRPC types and methods.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/grpc-gateway/3.4.json b/json_schemas/grpc-gateway/3.4.json new file mode 100644 index 00000000..2ae37a8c --- /dev/null +++ b/json_schemas/grpc-gateway/3.4.json @@ -0,0 +1,87 @@ +{ + "properties": { + "config": { + "properties": { + "proto": { + "description": "Describes the gRPC types and methods.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/grpc-gateway/3.7.json b/json_schemas/grpc-gateway/3.7.json new file mode 100644 index 00000000..2ae37a8c --- /dev/null +++ b/json_schemas/grpc-gateway/3.7.json @@ -0,0 +1,87 @@ +{ + "properties": { + "config": { + "properties": { + "proto": { + "description": "Describes the gRPC types and methods.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/grpc-gateway/3.8.json b/json_schemas/grpc-gateway/3.8.json new file mode 100644 index 00000000..2ae37a8c --- /dev/null +++ b/json_schemas/grpc-gateway/3.8.json @@ -0,0 +1,87 @@ +{ + "properties": { + "config": { + "properties": { + "proto": { + "description": "Describes the gRPC types and methods.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/grpc-gateway/3.9.json b/json_schemas/grpc-gateway/3.9.json new file mode 100644 index 00000000..2ae37a8c --- /dev/null +++ b/json_schemas/grpc-gateway/3.9.json @@ -0,0 +1,87 @@ +{ + "properties": { + "config": { + "properties": { + "proto": { + "description": "Describes the gRPC types and methods.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/grpc-web/2.8.json b/json_schemas/grpc-web/2.8.json new file mode 100644 index 00000000..56a2d422 --- /dev/null +++ b/json_schemas/grpc-web/2.8.json @@ -0,0 +1,83 @@ +{ + "properties": { + "config": { + "properties": { + "allow_origin_header": { + "default": "*", + "description": "The value of the `Access-Control-Allow-Origin` header in the response to\nthe gRPC-Web client. The default of `*` is appropriate for requests without\ncredentials. In other cases, specify the allowed origins of the client code.\nFor more information, see [MDN Web Docs - Access-Control-Allow-Origin](https://developer.mozilla.org/docs/Web/HTTP/Headers/Access-Control-Allow-Origin).", + "type": "string" + }, + "pass_stripped_path": { + "description": "If set to `true` causes the plugin to pass the stripped request path to the upstream gRPC service (see the `strip_path` Route attribute).", + "type": "boolean" + }, + "proto": { + "description": "If present, describes the gRPC types and methods.\nRequired to support payload transcoding. When absent, the\nweb client must use application/grpw-web+proto content.", + "examples": [ + "path/to/hello.proto" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/grpc-web/3.10.json b/json_schemas/grpc-web/3.10.json new file mode 100644 index 00000000..31f56172 --- /dev/null +++ b/json_schemas/grpc-web/3.10.json @@ -0,0 +1,96 @@ +{ + "properties": { + "config": { + "properties": { + "allow_origin_header": { + "default": "*", + "description": "The value of the `Access-Control-Allow-Origin` header in the response to the gRPC-Web client.", + "type": "string" + }, + "pass_stripped_path": { + "description": "If set to `true` causes the plugin to pass the stripped request path to the upstream gRPC service.", + "type": "boolean" + }, + "proto": { + "description": "If present, describes the gRPC types and methods. Required to support payload transcoding. When absent, the web client must use application/grpw-web+proto content.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/grpc-web/3.11.json b/json_schemas/grpc-web/3.11.json new file mode 100644 index 00000000..41a21e62 --- /dev/null +++ b/json_schemas/grpc-web/3.11.json @@ -0,0 +1,84 @@ +{ + "properties": { + "config": { + "properties": { + "allow_origin_header": { + "default": "*", + "description": "The value of the `Access-Control-Allow-Origin` header in the response to the gRPC-Web client.", + "type": "string" + }, + "pass_stripped_path": { + "description": "If set to `true` causes the plugin to pass the stripped request path to the upstream gRPC service.", + "type": "boolean" + }, + "proto": { + "description": "If present, describes the gRPC types and methods. Required to support payload transcoding. When absent, the web client must use application/grpw-web+proto content.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/grpc-web/3.12.json b/json_schemas/grpc-web/3.12.json new file mode 100644 index 00000000..41a21e62 --- /dev/null +++ b/json_schemas/grpc-web/3.12.json @@ -0,0 +1,84 @@ +{ + "properties": { + "config": { + "properties": { + "allow_origin_header": { + "default": "*", + "description": "The value of the `Access-Control-Allow-Origin` header in the response to the gRPC-Web client.", + "type": "string" + }, + "pass_stripped_path": { + "description": "If set to `true` causes the plugin to pass the stripped request path to the upstream gRPC service.", + "type": "boolean" + }, + "proto": { + "description": "If present, describes the gRPC types and methods. Required to support payload transcoding. When absent, the web client must use application/grpw-web+proto content.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/grpc-web/3.4.json b/json_schemas/grpc-web/3.4.json new file mode 100644 index 00000000..31f56172 --- /dev/null +++ b/json_schemas/grpc-web/3.4.json @@ -0,0 +1,96 @@ +{ + "properties": { + "config": { + "properties": { + "allow_origin_header": { + "default": "*", + "description": "The value of the `Access-Control-Allow-Origin` header in the response to the gRPC-Web client.", + "type": "string" + }, + "pass_stripped_path": { + "description": "If set to `true` causes the plugin to pass the stripped request path to the upstream gRPC service.", + "type": "boolean" + }, + "proto": { + "description": "If present, describes the gRPC types and methods. Required to support payload transcoding. When absent, the web client must use application/grpw-web+proto content.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/grpc-web/3.7.json b/json_schemas/grpc-web/3.7.json new file mode 100644 index 00000000..31f56172 --- /dev/null +++ b/json_schemas/grpc-web/3.7.json @@ -0,0 +1,96 @@ +{ + "properties": { + "config": { + "properties": { + "allow_origin_header": { + "default": "*", + "description": "The value of the `Access-Control-Allow-Origin` header in the response to the gRPC-Web client.", + "type": "string" + }, + "pass_stripped_path": { + "description": "If set to `true` causes the plugin to pass the stripped request path to the upstream gRPC service.", + "type": "boolean" + }, + "proto": { + "description": "If present, describes the gRPC types and methods. Required to support payload transcoding. When absent, the web client must use application/grpw-web+proto content.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/grpc-web/3.8.json b/json_schemas/grpc-web/3.8.json new file mode 100644 index 00000000..31f56172 --- /dev/null +++ b/json_schemas/grpc-web/3.8.json @@ -0,0 +1,96 @@ +{ + "properties": { + "config": { + "properties": { + "allow_origin_header": { + "default": "*", + "description": "The value of the `Access-Control-Allow-Origin` header in the response to the gRPC-Web client.", + "type": "string" + }, + "pass_stripped_path": { + "description": "If set to `true` causes the plugin to pass the stripped request path to the upstream gRPC service.", + "type": "boolean" + }, + "proto": { + "description": "If present, describes the gRPC types and methods. Required to support payload transcoding. When absent, the web client must use application/grpw-web+proto content.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/grpc-web/3.9.json b/json_schemas/grpc-web/3.9.json new file mode 100644 index 00000000..31f56172 --- /dev/null +++ b/json_schemas/grpc-web/3.9.json @@ -0,0 +1,96 @@ +{ + "properties": { + "config": { + "properties": { + "allow_origin_header": { + "default": "*", + "description": "The value of the `Access-Control-Allow-Origin` header in the response to the gRPC-Web client.", + "type": "string" + }, + "pass_stripped_path": { + "description": "If set to `true` causes the plugin to pass the stripped request path to the upstream gRPC service.", + "type": "boolean" + }, + "proto": { + "description": "If present, describes the gRPC types and methods. Required to support payload transcoding. When absent, the web client must use application/grpw-web+proto content.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/header-cert-auth/3.10.json b/json_schemas/header-cert-auth/3.10.json new file mode 100644 index 00000000..48520a27 --- /dev/null +++ b/json_schemas/header-cert-auth/3.10.json @@ -0,0 +1,183 @@ +{ + "properties": { + "config": { + "properties": { + "allow_partial_chain": { + "default": false, + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "authenticated_group_by": { + "default": "CN", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "enum": [ + "CN", + "DN" + ], + "type": "string" + }, + "ca_certificates": { + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "items": { + "required": [ + + ], + "type": "string", + "uuid": true + }, + "type": "array" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "cert_cache_ttl": { + "default": 60000, + "description": "The length of time in milliseconds between refreshes of the revocation check status cache.", + "type": "number" + }, + "certificate_header_format": { + "description": "Format of the certificate header. Supported formats: `base64_encoded`, `url_encoded`.", + "enum": [ + "base64_encoded", + "url_encoded" + ], + "type": "string" + }, + "certificate_header_name": { + "description": "Name of the header that contains the certificate, received from the WAF or other L7 downstream proxy.", + "type": "string" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 30000, + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "revocation_check_mode": { + "default": "IGNORE_CA_ERROR", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "enum": [ + "IGNORE_CA_ERROR", + "SKIP", + "STRICT" + ], + "type": "string" + }, + "secure_source": { + "default": true, + "description": "Whether to secure the source of the request. If set to `true`, the plugin will only allow requests from trusted IPs (configured by the `trusted_ips` config option).", + "type": "boolean" + }, + "skip_consumer_lookup": { + "default": false, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "type": "boolean" + } + }, + "required": [ + "ca_certificates", + "certificate_header_format", + "certificate_header_name" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/header-cert-auth/3.11.json b/json_schemas/header-cert-auth/3.11.json new file mode 100644 index 00000000..cb9101ac --- /dev/null +++ b/json_schemas/header-cert-auth/3.11.json @@ -0,0 +1,173 @@ +{ + "properties": { + "config": { + "properties": { + "allow_partial_chain": { + "default": false, + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "authenticated_group_by": { + "default": "CN", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "enum": [ + "CN", + "DN" + ], + "type": "string" + }, + "ca_certificates": { + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "items": { + "required": [], + "type": "string", + "uuid": true + }, + "type": "array" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "cert_cache_ttl": { + "default": 60000, + "description": "The length of time in milliseconds between refreshes of the revocation check status cache.", + "type": "number" + }, + "certificate_header_format": { + "description": "Format of the certificate header. Supported formats: `base64_encoded`, `url_encoded`.", + "enum": [ + "base64_encoded", + "url_encoded" + ], + "type": "string" + }, + "certificate_header_name": { + "description": "Name of the header that contains the certificate, received from the WAF or other L7 downstream proxy.", + "type": "string" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 30000, + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "revocation_check_mode": { + "default": "IGNORE_CA_ERROR", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "enum": [ + "IGNORE_CA_ERROR", + "SKIP", + "STRICT" + ], + "type": "string" + }, + "secure_source": { + "default": true, + "description": "Whether to secure the source of the request. If set to `true`, the plugin will only allow requests from trusted IPs (configured by the `trusted_ips` config option).", + "type": "boolean" + }, + "skip_consumer_lookup": { + "default": false, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "type": "boolean" + } + }, + "required": [ + "ca_certificates", + "certificate_header_format", + "certificate_header_name" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/header-cert-auth/3.12.json b/json_schemas/header-cert-auth/3.12.json new file mode 100644 index 00000000..cb9101ac --- /dev/null +++ b/json_schemas/header-cert-auth/3.12.json @@ -0,0 +1,173 @@ +{ + "properties": { + "config": { + "properties": { + "allow_partial_chain": { + "default": false, + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "authenticated_group_by": { + "default": "CN", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "enum": [ + "CN", + "DN" + ], + "type": "string" + }, + "ca_certificates": { + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "items": { + "required": [], + "type": "string", + "uuid": true + }, + "type": "array" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "cert_cache_ttl": { + "default": 60000, + "description": "The length of time in milliseconds between refreshes of the revocation check status cache.", + "type": "number" + }, + "certificate_header_format": { + "description": "Format of the certificate header. Supported formats: `base64_encoded`, `url_encoded`.", + "enum": [ + "base64_encoded", + "url_encoded" + ], + "type": "string" + }, + "certificate_header_name": { + "description": "Name of the header that contains the certificate, received from the WAF or other L7 downstream proxy.", + "type": "string" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 30000, + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "revocation_check_mode": { + "default": "IGNORE_CA_ERROR", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "enum": [ + "IGNORE_CA_ERROR", + "SKIP", + "STRICT" + ], + "type": "string" + }, + "secure_source": { + "default": true, + "description": "Whether to secure the source of the request. If set to `true`, the plugin will only allow requests from trusted IPs (configured by the `trusted_ips` config option).", + "type": "boolean" + }, + "skip_consumer_lookup": { + "default": false, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "type": "boolean" + } + }, + "required": [ + "ca_certificates", + "certificate_header_format", + "certificate_header_name" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/header-cert-auth/3.8.json b/json_schemas/header-cert-auth/3.8.json new file mode 100644 index 00000000..48520a27 --- /dev/null +++ b/json_schemas/header-cert-auth/3.8.json @@ -0,0 +1,183 @@ +{ + "properties": { + "config": { + "properties": { + "allow_partial_chain": { + "default": false, + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "authenticated_group_by": { + "default": "CN", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "enum": [ + "CN", + "DN" + ], + "type": "string" + }, + "ca_certificates": { + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "items": { + "required": [ + + ], + "type": "string", + "uuid": true + }, + "type": "array" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "cert_cache_ttl": { + "default": 60000, + "description": "The length of time in milliseconds between refreshes of the revocation check status cache.", + "type": "number" + }, + "certificate_header_format": { + "description": "Format of the certificate header. Supported formats: `base64_encoded`, `url_encoded`.", + "enum": [ + "base64_encoded", + "url_encoded" + ], + "type": "string" + }, + "certificate_header_name": { + "description": "Name of the header that contains the certificate, received from the WAF or other L7 downstream proxy.", + "type": "string" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 30000, + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "revocation_check_mode": { + "default": "IGNORE_CA_ERROR", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "enum": [ + "IGNORE_CA_ERROR", + "SKIP", + "STRICT" + ], + "type": "string" + }, + "secure_source": { + "default": true, + "description": "Whether to secure the source of the request. If set to `true`, the plugin will only allow requests from trusted IPs (configured by the `trusted_ips` config option).", + "type": "boolean" + }, + "skip_consumer_lookup": { + "default": false, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "type": "boolean" + } + }, + "required": [ + "ca_certificates", + "certificate_header_format", + "certificate_header_name" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/header-cert-auth/3.9.json b/json_schemas/header-cert-auth/3.9.json new file mode 100644 index 00000000..48520a27 --- /dev/null +++ b/json_schemas/header-cert-auth/3.9.json @@ -0,0 +1,183 @@ +{ + "properties": { + "config": { + "properties": { + "allow_partial_chain": { + "default": false, + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "authenticated_group_by": { + "default": "CN", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "enum": [ + "CN", + "DN" + ], + "type": "string" + }, + "ca_certificates": { + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "items": { + "required": [ + + ], + "type": "string", + "uuid": true + }, + "type": "array" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "cert_cache_ttl": { + "default": 60000, + "description": "The length of time in milliseconds between refreshes of the revocation check status cache.", + "type": "number" + }, + "certificate_header_format": { + "description": "Format of the certificate header. Supported formats: `base64_encoded`, `url_encoded`.", + "enum": [ + "base64_encoded", + "url_encoded" + ], + "type": "string" + }, + "certificate_header_name": { + "description": "Name of the header that contains the certificate, received from the WAF or other L7 downstream proxy.", + "type": "string" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 30000, + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "revocation_check_mode": { + "default": "IGNORE_CA_ERROR", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "enum": [ + "IGNORE_CA_ERROR", + "SKIP", + "STRICT" + ], + "type": "string" + }, + "secure_source": { + "default": true, + "description": "Whether to secure the source of the request. If set to `true`, the plugin will only allow requests from trusted IPs (configured by the `trusted_ips` config option).", + "type": "boolean" + }, + "skip_consumer_lookup": { + "default": false, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "type": "boolean" + } + }, + "required": [ + "ca_certificates", + "certificate_header_format", + "certificate_header_name" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/hmac-auth/2.8.json b/json_schemas/hmac-auth/2.8.json new file mode 100644 index 00000000..f8214fb6 --- /dev/null +++ b/json_schemas/hmac-auth/2.8.json @@ -0,0 +1,134 @@ +{ + "properties": { + "config": { + "properties": { + "algorithms": { + "default": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "description": "A list of HMAC digest algorithms that the user wants to support. Allowed values are `hmac-sha1`, `hmac-sha256`, `hmac-sha384`, and `hmac-sha512`", + "items": { + "enum": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "anonymous": { + "description": "An optional string (consumer UUID) value to use as an anonymous consumer if authentication fails.\nIf empty (default), the request will fail with an authentication failure `4xx`. Note that this value\nmust refer to the consumer `id` attribute that is internal to Kong Gateway, and **not** its `custom_id`.", + "type": "string" + }, + "clock_skew": { + "default": 300, + "description": "[Clock Skew](https://tools.ietf.org/html/draft-cavage-http-signatures-00#section-3.4) in seconds to prevent replay attacks.", + "minimum": 0, + "type": "number" + }, + "enforce_headers": { + "default": [ + + ], + "description": "A list of headers that the client should at least use for HTTP signature creation.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request (i.e. the `Authorization` header) before proxying it.", + "examples": [ + false + ], + "type": "boolean" + }, + "validate_request_body": { + "default": false, + "description": "A boolean value telling the plugin to enable body validation.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/hmac-auth/3.10.json b/json_schemas/hmac-auth/3.10.json new file mode 100644 index 00000000..1e3ae8ec --- /dev/null +++ b/json_schemas/hmac-auth/3.10.json @@ -0,0 +1,126 @@ +{ + "properties": { + "config": { + "properties": { + "algorithms": { + "default": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "description": "A list of HMAC digest algorithms that the user wants to support. Allowed values are `hmac-sha1`, `hmac-sha256`, `hmac-sha384`, and `hmac-sha512`", + "items": { + "enum": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "clock_skew": { + "default": 300, + "description": "Clock skew in seconds to prevent replay attacks.", + "minimum": 0, + "type": "number" + }, + "enforce_headers": { + "default": [ + + ], + "description": "A list of headers that the client should at least use for HTTP signature creation.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "type": "boolean" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "validate_request_body": { + "default": false, + "description": "A boolean value telling the plugin to enable body validation.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/hmac-auth/3.11.json b/json_schemas/hmac-auth/3.11.json new file mode 100644 index 00000000..163911ba --- /dev/null +++ b/json_schemas/hmac-auth/3.11.json @@ -0,0 +1,110 @@ +{ + "properties": { + "config": { + "properties": { + "algorithms": { + "default": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "description": "A list of HMAC digest algorithms that the user wants to support. Allowed values are `hmac-sha1`, `hmac-sha256`, `hmac-sha384`, and `hmac-sha512`", + "items": { + "enum": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "clock_skew": { + "default": 300, + "description": "Clock skew in seconds to prevent replay attacks.", + "minimum": 0, + "type": "number" + }, + "enforce_headers": { + "default": [], + "description": "A list of headers that the client should at least use for HTTP signature creation.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "type": "boolean" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "validate_request_body": { + "default": false, + "description": "A boolean value telling the plugin to enable body validation.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/hmac-auth/3.12.json b/json_schemas/hmac-auth/3.12.json new file mode 100644 index 00000000..163911ba --- /dev/null +++ b/json_schemas/hmac-auth/3.12.json @@ -0,0 +1,110 @@ +{ + "properties": { + "config": { + "properties": { + "algorithms": { + "default": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "description": "A list of HMAC digest algorithms that the user wants to support. Allowed values are `hmac-sha1`, `hmac-sha256`, `hmac-sha384`, and `hmac-sha512`", + "items": { + "enum": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "clock_skew": { + "default": 300, + "description": "Clock skew in seconds to prevent replay attacks.", + "minimum": 0, + "type": "number" + }, + "enforce_headers": { + "default": [], + "description": "A list of headers that the client should at least use for HTTP signature creation.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "type": "boolean" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "validate_request_body": { + "default": false, + "description": "A boolean value telling the plugin to enable body validation.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/hmac-auth/3.4.json b/json_schemas/hmac-auth/3.4.json new file mode 100644 index 00000000..b4b59358 --- /dev/null +++ b/json_schemas/hmac-auth/3.4.json @@ -0,0 +1,122 @@ +{ + "properties": { + "config": { + "properties": { + "algorithms": { + "default": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "description": "A list of HMAC digest algorithms that the user wants to support. Allowed values are `hmac-sha1`, `hmac-sha256`, `hmac-sha384`, and `hmac-sha512`", + "items": { + "enum": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "clock_skew": { + "default": 300, + "description": "Clock skew in seconds to prevent replay attacks.", + "minimum": 0, + "type": "number" + }, + "enforce_headers": { + "default": [ + + ], + "description": "A list of headers that the client should at least use for HTTP signature creation.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "type": "boolean" + }, + "validate_request_body": { + "default": false, + "description": "A boolean value telling the plugin to enable body validation.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/hmac-auth/3.7.json b/json_schemas/hmac-auth/3.7.json new file mode 100644 index 00000000..b4b59358 --- /dev/null +++ b/json_schemas/hmac-auth/3.7.json @@ -0,0 +1,122 @@ +{ + "properties": { + "config": { + "properties": { + "algorithms": { + "default": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "description": "A list of HMAC digest algorithms that the user wants to support. Allowed values are `hmac-sha1`, `hmac-sha256`, `hmac-sha384`, and `hmac-sha512`", + "items": { + "enum": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "clock_skew": { + "default": 300, + "description": "Clock skew in seconds to prevent replay attacks.", + "minimum": 0, + "type": "number" + }, + "enforce_headers": { + "default": [ + + ], + "description": "A list of headers that the client should at least use for HTTP signature creation.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "type": "boolean" + }, + "validate_request_body": { + "default": false, + "description": "A boolean value telling the plugin to enable body validation.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/hmac-auth/3.8.json b/json_schemas/hmac-auth/3.8.json new file mode 100644 index 00000000..1e3ae8ec --- /dev/null +++ b/json_schemas/hmac-auth/3.8.json @@ -0,0 +1,126 @@ +{ + "properties": { + "config": { + "properties": { + "algorithms": { + "default": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "description": "A list of HMAC digest algorithms that the user wants to support. Allowed values are `hmac-sha1`, `hmac-sha256`, `hmac-sha384`, and `hmac-sha512`", + "items": { + "enum": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "clock_skew": { + "default": 300, + "description": "Clock skew in seconds to prevent replay attacks.", + "minimum": 0, + "type": "number" + }, + "enforce_headers": { + "default": [ + + ], + "description": "A list of headers that the client should at least use for HTTP signature creation.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "type": "boolean" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "validate_request_body": { + "default": false, + "description": "A boolean value telling the plugin to enable body validation.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/hmac-auth/3.9.json b/json_schemas/hmac-auth/3.9.json new file mode 100644 index 00000000..1e3ae8ec --- /dev/null +++ b/json_schemas/hmac-auth/3.9.json @@ -0,0 +1,126 @@ +{ + "properties": { + "config": { + "properties": { + "algorithms": { + "default": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "description": "A list of HMAC digest algorithms that the user wants to support. Allowed values are `hmac-sha1`, `hmac-sha256`, `hmac-sha384`, and `hmac-sha512`", + "items": { + "enum": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "clock_skew": { + "default": 300, + "description": "Clock skew in seconds to prevent replay attacks.", + "minimum": 0, + "type": "number" + }, + "enforce_headers": { + "default": [ + + ], + "description": "A list of headers that the client should at least use for HTTP signature creation.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "type": "boolean" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "validate_request_body": { + "default": false, + "description": "A boolean value telling the plugin to enable body validation.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/http-log/2.8.json b/json_schemas/http-log/2.8.json new file mode 100644 index 00000000..939516d1 --- /dev/null +++ b/json_schemas/http-log/2.8.json @@ -0,0 +1,168 @@ +{ + "properties": { + "config": { + "properties": { + "content_type": { + "default": "application/json", + "description": "Indicates the type of data sent. The only available option is `application/json`.", + "enum": [ + "application/json" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "A list of key-value pairs, where the key is the name of a log field and\nthe value is a chunk of Lua code, whose return value sets or replaces\nthe log field value.", + "type": "object" + }, + "flush_timeout": { + "default": 2, + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "examples": [ + 2 + ], + "type": "number" + }, + "headers": { + "additionalProperties": true, + "description": "\nAn optional table of headers added to the HTTP message to the upstream server.\nThe table contains arrays of values, indexed by the header name (multiple values per header).\n\nThe following headers are not allowed: `Host`, `Content-Length`, `Content-Type`.", + "type": "object" + }, + "http_endpoint": { + "description": "The HTTP URL endpoint (including the protocol to use) to which the data is sent.\n\nIf the `http_endpoint` contains a username and password (for example,\n`http://bob:password@example.com/logs`), then Kong Gateway automatically includes\na basic-auth `Authorization` header in the log requests.", + "examples": [ + "http://mockbin.org/bin/:id" + ], + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection will live before being closed.", + "examples": [ + 1000 + ], + "type": "number" + }, + "method": { + "default": "POST", + "description": "An optional method used to send data to the HTTP server. Supported values are\n`POST` (default), `PUT`, and `PATCH`.", + "enum": [ + "PATCH", + "POST", + "PUT" + ], + "examples": [ + "POST" + ], + "type": "string" + }, + "queue_size": { + "default": 1, + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + }, + "retry_count": { + "default": 10, + "description": "Number of times to retry when sending data to the upstream server.", + "examples": [ + 15 + ], + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "examples": [ + 1000 + ], + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/http-log/3.10.json b/json_schemas/http-log/3.10.json new file mode 100644 index 00000000..03b3342b --- /dev/null +++ b/json_schemas/http-log/3.10.json @@ -0,0 +1,199 @@ +{ + "properties": { + "config": { + "properties": { + "content_type": { + "default": "application/json", + "description": "Indicates the type of data sent. The only available option is `application/json`.", + "enum": [ + "application/json", + "application/json; charset=utf-8" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number" + }, + "headers": { + "additionalProperties": true, + "description": "An optional table of headers included in the HTTP message to the upstream server. Values are indexed by header name, and each header name accepts a single string.", + "type": "object" + }, + "http_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection will live before being closed.", + "type": "number" + }, + "method": { + "default": "POST", + "description": "An optional method used to send data to the HTTP server. Supported values are `POST` (default), `PUT`, and `PATCH`.", + "enum": [ + "PATCH", + "POST", + "PUT" + ], + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + }, + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + } + }, + "required": [ + "http_endpoint" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/http-log/3.11.json b/json_schemas/http-log/3.11.json new file mode 100644 index 00000000..fdc45864 --- /dev/null +++ b/json_schemas/http-log/3.11.json @@ -0,0 +1,189 @@ +{ + "properties": { + "config": { + "properties": { + "content_type": { + "default": "application/json", + "description": "Indicates the type of data sent. The only available option is `application/json`.", + "enum": [ + "application/json", + "application/json; charset=utf-8" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number" + }, + "headers": { + "additionalProperties": true, + "description": "An optional table of headers included in the HTTP message to the upstream server. Values are indexed by header name, and each header name accepts a single string.", + "type": "object" + }, + "http_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection will live before being closed.", + "type": "number" + }, + "method": { + "default": "POST", + "description": "An optional method used to send data to the HTTP server. Supported values are `POST` (default), `PUT`, and `PATCH`.", + "enum": [ + "PATCH", + "POST", + "PUT" + ], + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + }, + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + } + }, + "required": [ + "http_endpoint" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/http-log/3.12.json b/json_schemas/http-log/3.12.json new file mode 100644 index 00000000..fdc45864 --- /dev/null +++ b/json_schemas/http-log/3.12.json @@ -0,0 +1,189 @@ +{ + "properties": { + "config": { + "properties": { + "content_type": { + "default": "application/json", + "description": "Indicates the type of data sent. The only available option is `application/json`.", + "enum": [ + "application/json", + "application/json; charset=utf-8" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number" + }, + "headers": { + "additionalProperties": true, + "description": "An optional table of headers included in the HTTP message to the upstream server. Values are indexed by header name, and each header name accepts a single string.", + "type": "object" + }, + "http_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection will live before being closed.", + "type": "number" + }, + "method": { + "default": "POST", + "description": "An optional method used to send data to the HTTP server. Supported values are `POST` (default), `PUT`, and `PATCH`.", + "enum": [ + "PATCH", + "POST", + "PUT" + ], + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + }, + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + } + }, + "required": [ + "http_endpoint" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/http-log/3.4.json b/json_schemas/http-log/3.4.json new file mode 100644 index 00000000..40c97cea --- /dev/null +++ b/json_schemas/http-log/3.4.json @@ -0,0 +1,190 @@ +{ + "properties": { + "config": { + "properties": { + "content_type": { + "default": "application/json", + "description": "Indicates the type of data sent. The only available option is `application/json`.", + "enum": [ + "application/json", + "application/json; charset=utf-8" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number" + }, + "headers": { + "additionalProperties": true, + "description": "An optional table of headers included in the HTTP message to the upstream server. Values are indexed by header name, and each header name accepts a single string.", + "type": "object" + }, + "http_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection will live before being closed.", + "type": "number" + }, + "method": { + "default": "POST", + "description": "An optional method used to send data to the HTTP server. Supported values are `POST` (default), `PUT`, and `PATCH`.", + "enum": [ + "PATCH", + "POST", + "PUT" + ], + "type": "string" + }, + "queue": { + "properties": { + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + }, + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + } + }, + "required": [ + "http_endpoint" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/http-log/3.7.json b/json_schemas/http-log/3.7.json new file mode 100644 index 00000000..40c97cea --- /dev/null +++ b/json_schemas/http-log/3.7.json @@ -0,0 +1,190 @@ +{ + "properties": { + "config": { + "properties": { + "content_type": { + "default": "application/json", + "description": "Indicates the type of data sent. The only available option is `application/json`.", + "enum": [ + "application/json", + "application/json; charset=utf-8" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number" + }, + "headers": { + "additionalProperties": true, + "description": "An optional table of headers included in the HTTP message to the upstream server. Values are indexed by header name, and each header name accepts a single string.", + "type": "object" + }, + "http_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection will live before being closed.", + "type": "number" + }, + "method": { + "default": "POST", + "description": "An optional method used to send data to the HTTP server. Supported values are `POST` (default), `PUT`, and `PATCH`.", + "enum": [ + "PATCH", + "POST", + "PUT" + ], + "type": "string" + }, + "queue": { + "properties": { + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + }, + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + } + }, + "required": [ + "http_endpoint" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/http-log/3.8.json b/json_schemas/http-log/3.8.json new file mode 100644 index 00000000..f69da5eb --- /dev/null +++ b/json_schemas/http-log/3.8.json @@ -0,0 +1,199 @@ +{ + "properties": { + "config": { + "properties": { + "content_type": { + "default": "application/json", + "description": "Indicates the type of data sent. The only available option is `application/json`.", + "enum": [ + "application/json", + "application/json; charset=utf-8" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number" + }, + "headers": { + "additionalProperties": true, + "description": "An optional table of headers included in the HTTP message to the upstream server. Values are indexed by header name, and each header name accepts a single string.", + "type": "object" + }, + "http_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection will live before being closed.", + "type": "number" + }, + "method": { + "default": "POST", + "description": "An optional method used to send data to the HTTP server. Supported values are `POST` (default), `PUT`, and `PATCH`.", + "enum": [ + "PATCH", + "POST", + "PUT" + ], + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + }, + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + } + }, + "required": [ + "http_endpoint" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/http-log/3.9.json b/json_schemas/http-log/3.9.json new file mode 100644 index 00000000..f69da5eb --- /dev/null +++ b/json_schemas/http-log/3.9.json @@ -0,0 +1,199 @@ +{ + "properties": { + "config": { + "properties": { + "content_type": { + "default": "application/json", + "description": "Indicates the type of data sent. The only available option is `application/json`.", + "enum": [ + "application/json", + "application/json; charset=utf-8" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number" + }, + "headers": { + "additionalProperties": true, + "description": "An optional table of headers included in the HTTP message to the upstream server. Values are indexed by header name, and each header name accepts a single string.", + "type": "object" + }, + "http_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection will live before being closed.", + "type": "number" + }, + "method": { + "default": "POST", + "description": "An optional method used to send data to the HTTP server. Supported values are `POST` (default), `PUT`, and `PATCH`.", + "enum": [ + "PATCH", + "POST", + "PUT" + ], + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + }, + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + } + }, + "required": [ + "http_endpoint" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/injection-protection/3.10.json b/json_schemas/injection-protection/3.10.json new file mode 100644 index 00000000..52949341 --- /dev/null +++ b/json_schemas/injection-protection/3.10.json @@ -0,0 +1,146 @@ +{ + "properties": { + "config": { + "properties": { + "custom_injections": { + "default": null, + "description": "Custom regexes to check for.", + "items": { + "properties": { + "name": { + "description": "A unique name for this injection.", + "type": "string" + }, + "regex": { + "description": "The regex to match against.", + "is_regex": true, + "type": "string" + } + }, + "required": [ + "name", + "regex" + ], + "type": "object" + }, + "type": "array" + }, + "enforcement_mode": { + "default": "block", + "description": "Enforcement mode of the security policy.", + "enum": [ + "block", + "log_only" + ], + "type": "string" + }, + "error_message": { + "default": "Bad Request", + "description": "The response message when validation fails", + "type": "string" + }, + "error_status_code": { + "default": 400, + "description": "The response status code when validation fails.", + "maximum": 499, + "minimum": 400, + "type": "integer" + }, + "injection_types": { + "default": [ + "sql" + ], + "description": "The type of injections to check for.", + "items": { + "enum": [ + "java_exception", + "js", + "sql", + "ssi", + "xpath_abbreviated", + "xpath_extended" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "locations": { + "default": [ + "path_and_query" + ], + "description": "The locations to check for injection.", + "items": { + "enum": [ + "body", + "headers", + "path_and_query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/injection-protection/3.11.json b/json_schemas/injection-protection/3.11.json new file mode 100644 index 00000000..199f956b --- /dev/null +++ b/json_schemas/injection-protection/3.11.json @@ -0,0 +1,132 @@ +{ + "properties": { + "config": { + "properties": { + "custom_injections": { + "default": null, + "description": "Custom regexes to check for.", + "items": { + "properties": { + "name": { + "description": "A unique name for this injection.", + "type": "string" + }, + "regex": { + "description": "The regex to match against.", + "is_regex": true, + "type": "string" + } + }, + "required": [ + "name", + "regex" + ], + "type": "object" + }, + "type": "array" + }, + "enforcement_mode": { + "default": "block", + "description": "Enforcement mode of the security policy.", + "enum": [ + "block", + "log_only" + ], + "type": "string" + }, + "error_message": { + "default": "Bad Request", + "description": "The response message when validation fails", + "type": "string" + }, + "error_status_code": { + "default": 400, + "description": "The response status code when validation fails.", + "maximum": 499, + "minimum": 400, + "type": "integer" + }, + "injection_types": { + "default": [ + "sql" + ], + "description": "The type of injections to check for.", + "items": { + "enum": [ + "java_exception", + "js", + "sql", + "ssi", + "xpath_abbreviated", + "xpath_extended" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "locations": { + "default": [ + "path_and_query" + ], + "description": "The locations to check for injection.", + "items": { + "enum": [ + "body", + "headers", + "path_and_query" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/injection-protection/3.12.json b/json_schemas/injection-protection/3.12.json new file mode 100644 index 00000000..199f956b --- /dev/null +++ b/json_schemas/injection-protection/3.12.json @@ -0,0 +1,132 @@ +{ + "properties": { + "config": { + "properties": { + "custom_injections": { + "default": null, + "description": "Custom regexes to check for.", + "items": { + "properties": { + "name": { + "description": "A unique name for this injection.", + "type": "string" + }, + "regex": { + "description": "The regex to match against.", + "is_regex": true, + "type": "string" + } + }, + "required": [ + "name", + "regex" + ], + "type": "object" + }, + "type": "array" + }, + "enforcement_mode": { + "default": "block", + "description": "Enforcement mode of the security policy.", + "enum": [ + "block", + "log_only" + ], + "type": "string" + }, + "error_message": { + "default": "Bad Request", + "description": "The response message when validation fails", + "type": "string" + }, + "error_status_code": { + "default": 400, + "description": "The response status code when validation fails.", + "maximum": 499, + "minimum": 400, + "type": "integer" + }, + "injection_types": { + "default": [ + "sql" + ], + "description": "The type of injections to check for.", + "items": { + "enum": [ + "java_exception", + "js", + "sql", + "ssi", + "xpath_abbreviated", + "xpath_extended" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "locations": { + "default": [ + "path_and_query" + ], + "description": "The locations to check for injection.", + "items": { + "enum": [ + "body", + "headers", + "path_and_query" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/injection-protection/3.9.json b/json_schemas/injection-protection/3.9.json new file mode 100644 index 00000000..52949341 --- /dev/null +++ b/json_schemas/injection-protection/3.9.json @@ -0,0 +1,146 @@ +{ + "properties": { + "config": { + "properties": { + "custom_injections": { + "default": null, + "description": "Custom regexes to check for.", + "items": { + "properties": { + "name": { + "description": "A unique name for this injection.", + "type": "string" + }, + "regex": { + "description": "The regex to match against.", + "is_regex": true, + "type": "string" + } + }, + "required": [ + "name", + "regex" + ], + "type": "object" + }, + "type": "array" + }, + "enforcement_mode": { + "default": "block", + "description": "Enforcement mode of the security policy.", + "enum": [ + "block", + "log_only" + ], + "type": "string" + }, + "error_message": { + "default": "Bad Request", + "description": "The response message when validation fails", + "type": "string" + }, + "error_status_code": { + "default": 400, + "description": "The response status code when validation fails.", + "maximum": 499, + "minimum": 400, + "type": "integer" + }, + "injection_types": { + "default": [ + "sql" + ], + "description": "The type of injections to check for.", + "items": { + "enum": [ + "java_exception", + "js", + "sql", + "ssi", + "xpath_abbreviated", + "xpath_extended" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "locations": { + "default": [ + "path_and_query" + ], + "description": "The locations to check for injection.", + "items": { + "enum": [ + "body", + "headers", + "path_and_query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/ip-restriction/2.8.json b/json_schemas/ip-restriction/2.8.json new file mode 100644 index 00000000..7fb10853 --- /dev/null +++ b/json_schemas/ip-restriction/2.8.json @@ -0,0 +1,139 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified.\n\nNote: We have deprecated the usage of `whitelist` and `blacklist` in favor of `allow` and `deny`.", + "examples": [ + [ + "143.1.0.0/24", + "54.13.21.1" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "deny": { + "description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified.\n\nNote: We have deprecated the usage of `whitelist` and `blacklist` in favor of `allow` and `deny`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "message": { + "description": "The message to send as a response body to rejected requests.", + "type": "string" + }, + "status": { + "description": "The HTTP status of the requests that will be rejected by the plugin.", + "type": "number" + } + }, + "required": [ + + ], + "shorthand_fields": { + "blacklist": { + "items": { + "is_regex": true, + "type": "string" + }, + "type": "array" + }, + "whitelist": { + "items": { + "is_regex": true, + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/ip-restriction/3.10.json b/json_schemas/ip-restriction/3.10.json new file mode 100644 index 00000000..83800949 --- /dev/null +++ b/json_schemas/ip-restriction/3.10.json @@ -0,0 +1,128 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified.", + "items": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "deny": { + "description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified.", + "items": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "message": { + "description": "The message to send as a response body to rejected requests.", + "type": "string" + }, + "status": { + "description": "The HTTP status of the requests that will be rejected by the plugin.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/ip-restriction/3.11.json b/json_schemas/ip-restriction/3.11.json new file mode 100644 index 00000000..00e778e7 --- /dev/null +++ b/json_schemas/ip-restriction/3.11.json @@ -0,0 +1,110 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified.", + "items": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "deny": { + "description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified.", + "items": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "message": { + "description": "The message to send as a response body to rejected requests.", + "type": "string" + }, + "status": { + "description": "The HTTP status of the requests that will be rejected by the plugin.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/ip-restriction/3.12.json b/json_schemas/ip-restriction/3.12.json new file mode 100644 index 00000000..00e778e7 --- /dev/null +++ b/json_schemas/ip-restriction/3.12.json @@ -0,0 +1,110 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified.", + "items": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "deny": { + "description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified.", + "items": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "message": { + "description": "The message to send as a response body to rejected requests.", + "type": "string" + }, + "status": { + "description": "The HTTP status of the requests that will be rejected by the plugin.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/ip-restriction/3.4.json b/json_schemas/ip-restriction/3.4.json new file mode 100644 index 00000000..33ce9add --- /dev/null +++ b/json_schemas/ip-restriction/3.4.json @@ -0,0 +1,115 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified.", + "items": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "deny": { + "description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified.", + "items": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "message": { + "description": "The message to send as a response body to rejected requests.", + "type": "string" + }, + "status": { + "description": "The HTTP status of the requests that will be rejected by the plugin.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/ip-restriction/3.7.json b/json_schemas/ip-restriction/3.7.json new file mode 100644 index 00000000..83800949 --- /dev/null +++ b/json_schemas/ip-restriction/3.7.json @@ -0,0 +1,128 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified.", + "items": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "deny": { + "description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified.", + "items": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "message": { + "description": "The message to send as a response body to rejected requests.", + "type": "string" + }, + "status": { + "description": "The HTTP status of the requests that will be rejected by the plugin.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/ip-restriction/3.8.json b/json_schemas/ip-restriction/3.8.json new file mode 100644 index 00000000..83800949 --- /dev/null +++ b/json_schemas/ip-restriction/3.8.json @@ -0,0 +1,128 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified.", + "items": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "deny": { + "description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified.", + "items": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "message": { + "description": "The message to send as a response body to rejected requests.", + "type": "string" + }, + "status": { + "description": "The HTTP status of the requests that will be rejected by the plugin.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/ip-restriction/3.9.json b/json_schemas/ip-restriction/3.9.json new file mode 100644 index 00000000..83800949 --- /dev/null +++ b/json_schemas/ip-restriction/3.9.json @@ -0,0 +1,128 @@ +{ + "properties": { + "config": { + "properties": { + "allow": { + "description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified.", + "items": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "deny": { + "description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified.", + "items": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "message": { + "description": "The message to send as a response body to rejected requests.", + "type": "string" + }, + "status": { + "description": "The HTTP status of the requests that will be rejected by the plugin.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/jq/2.8.json b/json_schemas/jq/2.8.json new file mode 100644 index 00000000..ebbb7d73 --- /dev/null +++ b/json_schemas/jq/2.8.json @@ -0,0 +1,199 @@ +{ + "properties": { + "config": { + "properties": { + "request_if_media_type": { + "default": [ + "application/json" + ], + "description": "A list of media type strings. The media type included in the `Content-Type` request header **must**\nmatch one of the media types on this list for the program to run.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "request_jq_program": { + "description": "The jq program to run on the request body. For example, `.[0] | { \"X-Foo\": .foo }`.\nEither `request_jq_program` or `response_jq_plugin` **must** be included in the configuration.", + "examples": [ + ".[0]" + ], + "type": "string" + }, + "request_jq_program_options": { + "description": "Boolean option flags to modify the run behavior of the jq program run on the request body.\n- `compact_output`: Returns output in a compact form without additional spacing,\n and with each JSON object on a single line. Defaults to `true`. Set to `false` for 'pretty' output.\n- `raw_output`: Outputs as raw strings, not JSON quoted. Default is `false`.\n- `join_output`: Similar to `raw_output` but does not output newline separators. Default is `false`.\n- `ascii_output`: jq usually outputs non-ASCII Unicode codepoints as UTF-8, even if the input specified\n them as escape sequences (like `μ`). Using this option, you can force jq to produce pure ASCII\n output, replacing every non-ASCII character with the equivalent escape sequence. Default is `false`.\n- `sort_keys`: Outputs the fields of each object with the keys in sorted order. Default is `false`.", + "properties": { + "ascii_output": { + "default": false, + "type": "boolean" + }, + "compact_output": { + "default": true, + "type": "boolean" + }, + "join_output": { + "default": false, + "type": "boolean" + }, + "raw_output": { + "default": false, + "type": "boolean" + }, + "sort_keys": { + "default": false, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "response_if_media_type": { + "default": [ + "application/json" + ], + "description": "A list of media type strings. The media type included in the `Content-Type` response header **must**\nmatch one of the media types on this list for the program to run.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_if_status_code": { + "default": [ + 200 + ], + "description": "A list of HTTP response status codes. The response status code **must**\nmatch one of the response status codes on this list for the program to run.", + "items": { + "maximum": 599, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "type": "array" + }, + "response_jq_program": { + "description": "The jq program to run on the response body. For example, `.[0] | { \"X-Foo\": .foo }`.\nEither `request_jq_program` or `response_jq_plugin` **must** be included in configuration.", + "type": "string" + }, + "response_jq_program_options": { + "description": "Boolean option flags to modify the run behavior of the jq program run on the response body.\n- `compact_output`: Returns output in a compact form without additional spacing,\n and with each JSON object on a single line. Defaults to `true`. Set to `false` for 'pretty' output.\n- `raw_output`: Outputs as raw strings, not JSON quoted. Default is `false`.\n- `join_output`: Similar to `raw_output` but does not output newline separators. Default is `false`.\n- `ascii_output`: jq usually outputs non-ASCII Unicode codepoints as UTF-8, even if the input specified\n them as escape sequences (like `μ`). Using this option, you can force jq to produce pure ASCII\n output, replacing every non-ASCII character with the equivalent escape sequence. Default is `false`.\n- `sort_keys`: Outputs the fields of each object with the keys in sorted order. Default is `false`.", + "properties": { + "ascii_output": { + "default": false, + "type": "boolean" + }, + "compact_output": { + "default": true, + "type": "boolean" + }, + "join_output": { + "default": false, + "type": "boolean" + }, + "raw_output": { + "default": false, + "type": "boolean" + }, + "sort_keys": { + "default": false, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/jq/3.10.json b/json_schemas/jq/3.10.json new file mode 100644 index 00000000..7a686c75 --- /dev/null +++ b/json_schemas/jq/3.10.json @@ -0,0 +1,176 @@ +{ + "properties": { + "config": { + "properties": { + "request_if_media_type": { + "default": [ + "application/json" + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "request_jq_program": { + "type": "string" + }, + "request_jq_program_options": { + "properties": { + "ascii_output": { + "default": false, + "type": "boolean" + }, + "compact_output": { + "default": true, + "type": "boolean" + }, + "join_output": { + "default": false, + "type": "boolean" + }, + "raw_output": { + "default": false, + "type": "boolean" + }, + "sort_keys": { + "default": false, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "response_if_media_type": { + "default": [ + "application/json" + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_if_status_code": { + "default": [ + 200 + ], + "items": { + "maximum": 599, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "type": "array" + }, + "response_jq_program": { + "type": "string" + }, + "response_jq_program_options": { + "properties": { + "ascii_output": { + "default": false, + "type": "boolean" + }, + "compact_output": { + "default": true, + "type": "boolean" + }, + "join_output": { + "default": false, + "type": "boolean" + }, + "raw_output": { + "default": false, + "type": "boolean" + }, + "sort_keys": { + "default": false, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/jq/3.11.json b/json_schemas/jq/3.11.json new file mode 100644 index 00000000..562724b3 --- /dev/null +++ b/json_schemas/jq/3.11.json @@ -0,0 +1,154 @@ +{ + "properties": { + "config": { + "properties": { + "request_if_media_type": { + "default": [ + "application/json" + ], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "request_jq_program": { + "type": "string" + }, + "request_jq_program_options": { + "properties": { + "ascii_output": { + "default": false, + "type": "boolean" + }, + "compact_output": { + "default": true, + "type": "boolean" + }, + "join_output": { + "default": false, + "type": "boolean" + }, + "raw_output": { + "default": false, + "type": "boolean" + }, + "sort_keys": { + "default": false, + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "response_if_media_type": { + "default": [ + "application/json" + ], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "response_if_status_code": { + "default": [ + 200 + ], + "items": { + "maximum": 599, + "minimum": 100, + "required": [], + "type": "integer" + }, + "type": "array" + }, + "response_jq_program": { + "type": "string" + }, + "response_jq_program_options": { + "properties": { + "ascii_output": { + "default": false, + "type": "boolean" + }, + "compact_output": { + "default": true, + "type": "boolean" + }, + "join_output": { + "default": false, + "type": "boolean" + }, + "raw_output": { + "default": false, + "type": "boolean" + }, + "sort_keys": { + "default": false, + "type": "boolean" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/jq/3.12.json b/json_schemas/jq/3.12.json new file mode 100644 index 00000000..562724b3 --- /dev/null +++ b/json_schemas/jq/3.12.json @@ -0,0 +1,154 @@ +{ + "properties": { + "config": { + "properties": { + "request_if_media_type": { + "default": [ + "application/json" + ], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "request_jq_program": { + "type": "string" + }, + "request_jq_program_options": { + "properties": { + "ascii_output": { + "default": false, + "type": "boolean" + }, + "compact_output": { + "default": true, + "type": "boolean" + }, + "join_output": { + "default": false, + "type": "boolean" + }, + "raw_output": { + "default": false, + "type": "boolean" + }, + "sort_keys": { + "default": false, + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "response_if_media_type": { + "default": [ + "application/json" + ], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "response_if_status_code": { + "default": [ + 200 + ], + "items": { + "maximum": 599, + "minimum": 100, + "required": [], + "type": "integer" + }, + "type": "array" + }, + "response_jq_program": { + "type": "string" + }, + "response_jq_program_options": { + "properties": { + "ascii_output": { + "default": false, + "type": "boolean" + }, + "compact_output": { + "default": true, + "type": "boolean" + }, + "join_output": { + "default": false, + "type": "boolean" + }, + "raw_output": { + "default": false, + "type": "boolean" + }, + "sort_keys": { + "default": false, + "type": "boolean" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/jq/3.4.json b/json_schemas/jq/3.4.json new file mode 100644 index 00000000..7a686c75 --- /dev/null +++ b/json_schemas/jq/3.4.json @@ -0,0 +1,176 @@ +{ + "properties": { + "config": { + "properties": { + "request_if_media_type": { + "default": [ + "application/json" + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "request_jq_program": { + "type": "string" + }, + "request_jq_program_options": { + "properties": { + "ascii_output": { + "default": false, + "type": "boolean" + }, + "compact_output": { + "default": true, + "type": "boolean" + }, + "join_output": { + "default": false, + "type": "boolean" + }, + "raw_output": { + "default": false, + "type": "boolean" + }, + "sort_keys": { + "default": false, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "response_if_media_type": { + "default": [ + "application/json" + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_if_status_code": { + "default": [ + 200 + ], + "items": { + "maximum": 599, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "type": "array" + }, + "response_jq_program": { + "type": "string" + }, + "response_jq_program_options": { + "properties": { + "ascii_output": { + "default": false, + "type": "boolean" + }, + "compact_output": { + "default": true, + "type": "boolean" + }, + "join_output": { + "default": false, + "type": "boolean" + }, + "raw_output": { + "default": false, + "type": "boolean" + }, + "sort_keys": { + "default": false, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/jq/3.7.json b/json_schemas/jq/3.7.json new file mode 100644 index 00000000..7a686c75 --- /dev/null +++ b/json_schemas/jq/3.7.json @@ -0,0 +1,176 @@ +{ + "properties": { + "config": { + "properties": { + "request_if_media_type": { + "default": [ + "application/json" + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "request_jq_program": { + "type": "string" + }, + "request_jq_program_options": { + "properties": { + "ascii_output": { + "default": false, + "type": "boolean" + }, + "compact_output": { + "default": true, + "type": "boolean" + }, + "join_output": { + "default": false, + "type": "boolean" + }, + "raw_output": { + "default": false, + "type": "boolean" + }, + "sort_keys": { + "default": false, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "response_if_media_type": { + "default": [ + "application/json" + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_if_status_code": { + "default": [ + 200 + ], + "items": { + "maximum": 599, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "type": "array" + }, + "response_jq_program": { + "type": "string" + }, + "response_jq_program_options": { + "properties": { + "ascii_output": { + "default": false, + "type": "boolean" + }, + "compact_output": { + "default": true, + "type": "boolean" + }, + "join_output": { + "default": false, + "type": "boolean" + }, + "raw_output": { + "default": false, + "type": "boolean" + }, + "sort_keys": { + "default": false, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/jq/3.8.json b/json_schemas/jq/3.8.json new file mode 100644 index 00000000..7a686c75 --- /dev/null +++ b/json_schemas/jq/3.8.json @@ -0,0 +1,176 @@ +{ + "properties": { + "config": { + "properties": { + "request_if_media_type": { + "default": [ + "application/json" + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "request_jq_program": { + "type": "string" + }, + "request_jq_program_options": { + "properties": { + "ascii_output": { + "default": false, + "type": "boolean" + }, + "compact_output": { + "default": true, + "type": "boolean" + }, + "join_output": { + "default": false, + "type": "boolean" + }, + "raw_output": { + "default": false, + "type": "boolean" + }, + "sort_keys": { + "default": false, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "response_if_media_type": { + "default": [ + "application/json" + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_if_status_code": { + "default": [ + 200 + ], + "items": { + "maximum": 599, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "type": "array" + }, + "response_jq_program": { + "type": "string" + }, + "response_jq_program_options": { + "properties": { + "ascii_output": { + "default": false, + "type": "boolean" + }, + "compact_output": { + "default": true, + "type": "boolean" + }, + "join_output": { + "default": false, + "type": "boolean" + }, + "raw_output": { + "default": false, + "type": "boolean" + }, + "sort_keys": { + "default": false, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/jq/3.9.json b/json_schemas/jq/3.9.json new file mode 100644 index 00000000..7a686c75 --- /dev/null +++ b/json_schemas/jq/3.9.json @@ -0,0 +1,176 @@ +{ + "properties": { + "config": { + "properties": { + "request_if_media_type": { + "default": [ + "application/json" + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "request_jq_program": { + "type": "string" + }, + "request_jq_program_options": { + "properties": { + "ascii_output": { + "default": false, + "type": "boolean" + }, + "compact_output": { + "default": true, + "type": "boolean" + }, + "join_output": { + "default": false, + "type": "boolean" + }, + "raw_output": { + "default": false, + "type": "boolean" + }, + "sort_keys": { + "default": false, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "response_if_media_type": { + "default": [ + "application/json" + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_if_status_code": { + "default": [ + 200 + ], + "items": { + "maximum": 599, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "type": "array" + }, + "response_jq_program": { + "type": "string" + }, + "response_jq_program_options": { + "properties": { + "ascii_output": { + "default": false, + "type": "boolean" + }, + "compact_output": { + "default": true, + "type": "boolean" + }, + "join_output": { + "default": false, + "type": "boolean" + }, + "raw_output": { + "default": false, + "type": "boolean" + }, + "sort_keys": { + "default": false, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/json-threat-protection/3.10.json b/json_schemas/json-threat-protection/3.10.json new file mode 100644 index 00000000..14c237d5 --- /dev/null +++ b/json_schemas/json-threat-protection/3.10.json @@ -0,0 +1,131 @@ +{ + "properties": { + "config": { + "properties": { + "allow_duplicate_object_entry_name": { + "default": true, + "description": "Allow or disallow duplicate object entry name.", + "type": "boolean" + }, + "enforcement_mode": { + "default": "block", + "description": "Enforcement mode of the security policy.", + "enum": [ + "block", + "log_only" + ], + "type": "string" + }, + "error_message": { + "default": "Bad Request", + "description": "The response message when validation fails", + "type": "string" + }, + "error_status_code": { + "default": 400, + "description": "The response status code when validation fails.", + "maximum": 499, + "minimum": 400, + "type": "integer" + }, + "max_array_element_count": { + "default": -1, + "description": "Max number of elements in an array. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_body_size": { + "default": 8192, + "description": "Max size of the request body. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_container_depth": { + "default": -1, + "description": "Max nested depth of objects and arrays. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_object_entry_count": { + "default": -1, + "description": "Max number of entries in an object. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_object_entry_name_length": { + "default": -1, + "description": "Max string length of object name. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_string_value_length": { + "default": -1, + "description": "Max string value length. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/json-threat-protection/3.11.json b/json_schemas/json-threat-protection/3.11.json new file mode 100644 index 00000000..841dee77 --- /dev/null +++ b/json_schemas/json-threat-protection/3.11.json @@ -0,0 +1,121 @@ +{ + "properties": { + "config": { + "properties": { + "allow_duplicate_object_entry_name": { + "default": true, + "description": "Allow or disallow duplicate object entry name.", + "type": "boolean" + }, + "enforcement_mode": { + "default": "block", + "description": "Enforcement mode of the security policy.", + "enum": [ + "block", + "log_only" + ], + "type": "string" + }, + "error_message": { + "default": "Bad Request", + "description": "The response message when validation fails", + "type": "string" + }, + "error_status_code": { + "default": 400, + "description": "The response status code when validation fails.", + "maximum": 499, + "minimum": 400, + "type": "integer" + }, + "max_array_element_count": { + "default": -1, + "description": "Max number of elements in an array. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_body_size": { + "default": 8192, + "description": "Max size of the request body. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_container_depth": { + "default": -1, + "description": "Max nested depth of objects and arrays. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_object_entry_count": { + "default": -1, + "description": "Max number of entries in an object. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_object_entry_name_length": { + "default": -1, + "description": "Max string length of object name. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_string_value_length": { + "default": -1, + "description": "Max string value length. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/json-threat-protection/3.12.json b/json_schemas/json-threat-protection/3.12.json new file mode 100644 index 00000000..841dee77 --- /dev/null +++ b/json_schemas/json-threat-protection/3.12.json @@ -0,0 +1,121 @@ +{ + "properties": { + "config": { + "properties": { + "allow_duplicate_object_entry_name": { + "default": true, + "description": "Allow or disallow duplicate object entry name.", + "type": "boolean" + }, + "enforcement_mode": { + "default": "block", + "description": "Enforcement mode of the security policy.", + "enum": [ + "block", + "log_only" + ], + "type": "string" + }, + "error_message": { + "default": "Bad Request", + "description": "The response message when validation fails", + "type": "string" + }, + "error_status_code": { + "default": 400, + "description": "The response status code when validation fails.", + "maximum": 499, + "minimum": 400, + "type": "integer" + }, + "max_array_element_count": { + "default": -1, + "description": "Max number of elements in an array. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_body_size": { + "default": 8192, + "description": "Max size of the request body. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_container_depth": { + "default": -1, + "description": "Max nested depth of objects and arrays. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_object_entry_count": { + "default": -1, + "description": "Max number of entries in an object. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_object_entry_name_length": { + "default": -1, + "description": "Max string length of object name. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_string_value_length": { + "default": -1, + "description": "Max string value length. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/json-threat-protection/3.8.json b/json_schemas/json-threat-protection/3.8.json new file mode 100644 index 00000000..43827bd8 --- /dev/null +++ b/json_schemas/json-threat-protection/3.8.json @@ -0,0 +1,126 @@ +{ + "properties": { + "config": { + "properties": { + "enforcement_mode": { + "default": "block", + "description": "Enforcement mode of the security policy.", + "enum": [ + "block", + "log_only" + ], + "type": "string" + }, + "error_message": { + "default": "Bad Request", + "description": "The response message when validation fails", + "type": "string" + }, + "error_status_code": { + "default": 400, + "description": "The response status code when validation fails.", + "maximum": 499, + "minimum": 400, + "type": "integer" + }, + "max_array_element_count": { + "default": -1, + "description": "Max number of elements in an array. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_body_size": { + "default": 8192, + "description": "Max size of the request body. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_container_depth": { + "default": -1, + "description": "Max nested depth of objects and arrays. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_object_entry_count": { + "default": -1, + "description": "Max number of entries in an object. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_object_entry_name_length": { + "default": -1, + "description": "Max string length of object name. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_string_value_length": { + "default": -1, + "description": "Max string value length. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/json-threat-protection/3.9.json b/json_schemas/json-threat-protection/3.9.json new file mode 100644 index 00000000..43827bd8 --- /dev/null +++ b/json_schemas/json-threat-protection/3.9.json @@ -0,0 +1,126 @@ +{ + "properties": { + "config": { + "properties": { + "enforcement_mode": { + "default": "block", + "description": "Enforcement mode of the security policy.", + "enum": [ + "block", + "log_only" + ], + "type": "string" + }, + "error_message": { + "default": "Bad Request", + "description": "The response message when validation fails", + "type": "string" + }, + "error_status_code": { + "default": 400, + "description": "The response status code when validation fails.", + "maximum": 499, + "minimum": 400, + "type": "integer" + }, + "max_array_element_count": { + "default": -1, + "description": "Max number of elements in an array. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_body_size": { + "default": 8192, + "description": "Max size of the request body. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_container_depth": { + "default": -1, + "description": "Max nested depth of objects and arrays. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_object_entry_count": { + "default": -1, + "description": "Max number of entries in an object. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_object_entry_name_length": { + "default": -1, + "description": "Max string length of object name. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + }, + "max_string_value_length": { + "default": -1, + "description": "Max string value length. -1 means unlimited.", + "maximum": 2147483648, + "minimum": -1, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/jwe-decrypt/3.10.json b/json_schemas/jwe-decrypt/3.10.json new file mode 100644 index 00000000..16d82c56 --- /dev/null +++ b/json_schemas/jwe-decrypt/3.10.json @@ -0,0 +1,88 @@ +{ + "properties": { + "config": { + "properties": { + "forward_header_name": { + "default": "Authorization", + "description": "The name of the header that is used to set the decrypted value.", + "type": "string" + }, + "key_sets": { + "description": "Denote the name or names of all Key Sets that should be inspected when trying to find a suitable key to decrypt the JWE token.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "lookup_header_name": { + "default": "Authorization", + "description": "The name of the header to look for the JWE token.", + "type": "string" + }, + "strict": { + "default": true, + "description": "Defines how the plugin behaves in cases where no token was found in the request. When using `strict` mode, the request requires a token to be present and subsequently raise an error if none could be found.", + "type": "boolean" + } + }, + "required": [ + "key_sets" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/jwe-decrypt/3.11.json b/json_schemas/jwe-decrypt/3.11.json new file mode 100644 index 00000000..00c0a14f --- /dev/null +++ b/json_schemas/jwe-decrypt/3.11.json @@ -0,0 +1,80 @@ +{ + "properties": { + "config": { + "properties": { + "forward_header_name": { + "default": "Authorization", + "description": "The name of the header that is used to set the decrypted value.", + "type": "string" + }, + "key_sets": { + "description": "Denote the name or names of all Key Sets that should be inspected when trying to find a suitable key to decrypt the JWE token.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "lookup_header_name": { + "default": "Authorization", + "description": "The name of the header to look for the JWE token.", + "type": "string" + }, + "strict": { + "default": true, + "description": "Defines how the plugin behaves in cases where no token was found in the request. When using `strict` mode, the request requires a token to be present and subsequently raise an error if none could be found.", + "type": "boolean" + } + }, + "required": [ + "key_sets" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/jwe-decrypt/3.12.json b/json_schemas/jwe-decrypt/3.12.json new file mode 100644 index 00000000..00c0a14f --- /dev/null +++ b/json_schemas/jwe-decrypt/3.12.json @@ -0,0 +1,80 @@ +{ + "properties": { + "config": { + "properties": { + "forward_header_name": { + "default": "Authorization", + "description": "The name of the header that is used to set the decrypted value.", + "type": "string" + }, + "key_sets": { + "description": "Denote the name or names of all Key Sets that should be inspected when trying to find a suitable key to decrypt the JWE token.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "lookup_header_name": { + "default": "Authorization", + "description": "The name of the header to look for the JWE token.", + "type": "string" + }, + "strict": { + "default": true, + "description": "Defines how the plugin behaves in cases where no token was found in the request. When using `strict` mode, the request requires a token to be present and subsequently raise an error if none could be found.", + "type": "boolean" + } + }, + "required": [ + "key_sets" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/jwe-decrypt/3.4.json b/json_schemas/jwe-decrypt/3.4.json new file mode 100644 index 00000000..16d82c56 --- /dev/null +++ b/json_schemas/jwe-decrypt/3.4.json @@ -0,0 +1,88 @@ +{ + "properties": { + "config": { + "properties": { + "forward_header_name": { + "default": "Authorization", + "description": "The name of the header that is used to set the decrypted value.", + "type": "string" + }, + "key_sets": { + "description": "Denote the name or names of all Key Sets that should be inspected when trying to find a suitable key to decrypt the JWE token.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "lookup_header_name": { + "default": "Authorization", + "description": "The name of the header to look for the JWE token.", + "type": "string" + }, + "strict": { + "default": true, + "description": "Defines how the plugin behaves in cases where no token was found in the request. When using `strict` mode, the request requires a token to be present and subsequently raise an error if none could be found.", + "type": "boolean" + } + }, + "required": [ + "key_sets" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/jwe-decrypt/3.7.json b/json_schemas/jwe-decrypt/3.7.json new file mode 100644 index 00000000..16d82c56 --- /dev/null +++ b/json_schemas/jwe-decrypt/3.7.json @@ -0,0 +1,88 @@ +{ + "properties": { + "config": { + "properties": { + "forward_header_name": { + "default": "Authorization", + "description": "The name of the header that is used to set the decrypted value.", + "type": "string" + }, + "key_sets": { + "description": "Denote the name or names of all Key Sets that should be inspected when trying to find a suitable key to decrypt the JWE token.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "lookup_header_name": { + "default": "Authorization", + "description": "The name of the header to look for the JWE token.", + "type": "string" + }, + "strict": { + "default": true, + "description": "Defines how the plugin behaves in cases where no token was found in the request. When using `strict` mode, the request requires a token to be present and subsequently raise an error if none could be found.", + "type": "boolean" + } + }, + "required": [ + "key_sets" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/jwe-decrypt/3.8.json b/json_schemas/jwe-decrypt/3.8.json new file mode 100644 index 00000000..16d82c56 --- /dev/null +++ b/json_schemas/jwe-decrypt/3.8.json @@ -0,0 +1,88 @@ +{ + "properties": { + "config": { + "properties": { + "forward_header_name": { + "default": "Authorization", + "description": "The name of the header that is used to set the decrypted value.", + "type": "string" + }, + "key_sets": { + "description": "Denote the name or names of all Key Sets that should be inspected when trying to find a suitable key to decrypt the JWE token.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "lookup_header_name": { + "default": "Authorization", + "description": "The name of the header to look for the JWE token.", + "type": "string" + }, + "strict": { + "default": true, + "description": "Defines how the plugin behaves in cases where no token was found in the request. When using `strict` mode, the request requires a token to be present and subsequently raise an error if none could be found.", + "type": "boolean" + } + }, + "required": [ + "key_sets" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/jwe-decrypt/3.9.json b/json_schemas/jwe-decrypt/3.9.json new file mode 100644 index 00000000..16d82c56 --- /dev/null +++ b/json_schemas/jwe-decrypt/3.9.json @@ -0,0 +1,88 @@ +{ + "properties": { + "config": { + "properties": { + "forward_header_name": { + "default": "Authorization", + "description": "The name of the header that is used to set the decrypted value.", + "type": "string" + }, + "key_sets": { + "description": "Denote the name or names of all Key Sets that should be inspected when trying to find a suitable key to decrypt the JWE token.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "lookup_header_name": { + "default": "Authorization", + "description": "The name of the header to look for the JWE token.", + "type": "string" + }, + "strict": { + "default": true, + "description": "Defines how the plugin behaves in cases where no token was found in the request. When using `strict` mode, the request requires a token to be present and subsequently raise an error if none could be found.", + "type": "boolean" + } + }, + "required": [ + "key_sets" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/jwt-signer/2.8.json b/json_schemas/jwt-signer/2.8.json new file mode 100644 index 00000000..7aac8639 --- /dev/null +++ b/json_schemas/jwt-signer/2.8.json @@ -0,0 +1,563 @@ +{ + "properties": { + "config": { + "properties": { + "access_token_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to apply an access token to a Kong consumer mapping,\nit tries to find a matching Kong consumer from properties defined using\nthis configuration parameter. The parameter can take an array of\nalues. Valid values are `id`, `username`, and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary\nclaim specified with this configuration parameter (for example, `sub` or `username`) in\nan access token to Kong consumer entity. Kong consumers have an `id`, a `username`,\nand a `custom_id`. The `config.access_token_consumer_by` parameter\ntells the plugin which of these Kong consumer properties can be used for mapping.\nIf this parameter is enabled but the mapping fails, such as when there's\na non-existent Kong consumer, the plugin responds with `403 Forbidden`.\nKong [consumer mapping](#consumer-mapping) is useful when you want to communicate this information\nto other plugins such as [ACL](/hub/kong-inc/acl/) or [rate limiting](/hub/kong-inc/rate-limiting/).\nThe JWT Signer plugin also sets a couple of standard Kong\nupstream consumer headers.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_authorization": { + "description": "If the introspection endpoint requires client authentication (client being\nthe JWT Signer plugin), you can specify the `Authorization` header's value with this\nconfiguration parameter. For example, if you use client credentials, enter\nthe value of `\"Basic base64encode('client_id:client_secret')\"`\nto this configuration parameter. You are responsible for providing the full string\nof the header and doing all of the necessary encodings (such as base64)\nrequired on a given endpoint.", + "type": "string" + }, + "access_token_introspection_body_args": { + "description": "If you need to pass additional body arguments to an introspection endpoint\nwhen the plugin introspects the opaque access token, use this config parameter\nto specify them. You should URL encode the value. For example: `resource=` or `a=1&b=&c`.", + "type": "string" + }, + "access_token_introspection_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do access token introspection results to Kong consumer mapping, it tries to\nfind a matching Kong consumer from properties defined using this configuration parameter. The parameter\ncan take an array of values. Valid values are `id`, `username`, and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary\nclaim specified with this configuration parameter (such as `sub` or `username`)\nin access token introspection results to the Kong consumer entity. Kong consumers\nhave an `id`, a `username`, and a `custom_id`. The\n`config.access_token_introspection_consumer_by` parameter tells the plugin which of these\nKong consumer properties can be used for mapping. If this parameter is enabled\nbut the mapping fails, such as when there's\na non-existent Kong consumer, the plugin responds\nwith `403 Forbidden`. Kong [consumer mapping](#consumer-mapping) is useful when you want to\ncommunicate this information to other plugins such as [ACL](/hub/kong-inc/acl/)\nor [rate limiting](/hub/kong-inc/rate-limiting/). The JWT Signer plugin also\nsets a couple of standard Kong upstream consumer headers.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token\nintrospection, you need to specify the OAuth 2.0 introspection endpoint URI\nwith this configuration parameter. Otherwise, the plugin does not try\nintrospection and returns `401 Unauthorized` instead.", + "type": "string" + }, + "access_token_introspection_hint": { + "default": "access_token", + "description": "If you need to give `hint` parameter when introspecting an access token,\nuse this parameter to specify the value. By default, the plugin\nsends `hint=access_token`.", + "type": "string" + }, + "access_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns an access token in one of the keys\n(or claims) within the introspection results (`JSON`), the plugin can use that value\ninstead of the introspection results when doing expiry verification and\nsigning of the new token issued by Kong. For example, if you specify\n`[ \"token_string\" ]`, which can be given as `\"token_string\"` (form post)\nto this configuration parameter, the plugin looks for key `token_string`\nin JSON of the introspection results and uses that as an access token instead\nof using introspection JSON directly. If the key cannot be found, the\nplugin responds with `401 Unauthorized`. Also if the key is found\nbut cannot be decoded as JWT, it also responds with `401 Unauthorized`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer introspection results\nand Kong. The value is added to introspection results (`JSON`) `exp` claim/property before\nchecking token expiry against Kong servers current time in seconds. You\ncan disable access token introspection `expiry` verification altogether\nwith `config.verify_access_token_introspection_expiry`.", + "type": "number" + }, + "access_token_introspection_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim/property in access token introspection results\n(`JSON`) to be verified against values of `config.access_token_introspection_scopes_required`.\nThis supports nested claims. For example, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`,\nhich can be given as `realm_access,roles` (form post). If the claim is not found in access\ntoken introspection results, and you have specified `config.access_token_introspection_scopes_required`,\nthe plugin responds with `403 Forbidden`.", + "examples": [ + [ + "scope" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by an\nintrospection claim/property specified by `config.access_token_introspection_scopes_claim`.\nFor example, `[ \"employee demo-service\", \"superadmin\" ]` can be given as `\"employee demo-service,superadmin\"`\n(form post) would mean that the claim needs to have values `\"employee\"` and `\"demo-service\"` **OR**\nthat the claim needs to have value of `\"superadmin\"` to be successfully authorized for the upstream\naccess. If required scopes are not found in access token introspection results (`JSON`),\nthe plugin responds with `403 Forbidden`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request.\nThe plugin tries to introspect twice if the first request\nfails for some reason. If both requests timeout, then the plugin runs two times the\n`config.access_token_introspection_timeout` on access token introspection.", + "type": "number" + }, + "access_token_issuer": { + "default": "kong", + "description": "The `iss` claim of a signed or re-signed access token is set to this value.\nOriginal `iss` claim of the incoming token (possibly introspected) is\nstored in `original_iss` claim of the newly signed access token.", + "type": "string" + }, + "access_token_jwks_uri": { + "description": "If you want to use `config.verify_access_token_signature`, you must specify\nthe URI where the plugin can fetch the public keys (JWKS) to verify the\nsignature of the access token. If you don't specify a URI and you pass a\nJWT token to the plugin, then the plugin responds with\n`401 Unauthorized`.", + "type": "string" + }, + "access_token_keyset": { + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "type": "string" + }, + "access_token_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value\nis added to the token's `exp` claim before checking token expiry against\nKong servers' current time in seconds. You can disable access token\n`expiry` verification altogether with `config.verify_access_token_expiry`.", + "type": "number" + }, + "access_token_optional": { + "default": false, + "description": "If an access token is not provided or no `config.access_token_request_header` is specified,\nthe plugin cannot verify the access token. In that case, the plugin normally responds\nwith `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error).\nUse this parameter to allow the request to proceed even when there is no token to check.\nIf the token is provided, then this parameter has no effect (look other parameters to enable and\ndisable checks in that case).", + "type": "boolean" + }, + "access_token_request_header": { + "default": "Authorization", + "description": "This parameter tells the name of the header where to look for the access token.\nBy default, the plugin searches it from `Authorization: Bearer ` header\n(the value being magic key `authorization:bearer`). If you don't want to\ndo anything with `access token`, then you can set this to `null` or `\"\"` (empty string).\nAny header can be used to pass the access token to the plugin. Two predefined\nvalues are `authorization:bearer` and `authorization:basic`.", + "type": "string" + }, + "access_token_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim in an access token to verify against values of\n`config.access_token_scopes_required`. This supports nested claims. For\nexample, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`, which can\nbe given as `realm_access,roles` (form post).\nIf the claim is not found in the access token, and you have specified\n`config.access_token_scopes_required`,\nthe plugin responds with `403 Forbidden`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a\nclaim specified by `config.access_token_scopes_claim`. For example,\n`[ \"employee demo-service\", \"superadmin\" ]` can be given as\n`\"employee demo-service,superadmin\"` (form post) would mean that the claim\nneeds to have values `\"employee\"` and `\"demo-service\"` **OR** that the claim\nneeds to have the value of `\"superadmin\"` to be successfully authorized for\nthe upstream access. If required scopes are\nnot found in access token, the plugin responds with `403 Forbidden`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_signing_algorithm": { + "default": "RS256", + "description": "When this plugin sets the upstream header as specified with `config.access_token_upstream_header`,\nit also re-signs the original access token using the private keys of the JWT Signer plugin.\nSpecify the algorithm that is used to sign the token. Currently\nsupported values:\n- `\"HS256\"`\n- `\"HS384\"`\n- `\"HS512\"`\n- `\"RS256\"`\n- `\"RS512\"`\n- `\"ES256\"`\n- `\"ES384\"`\n- `\"ES512\"`\n- `\"PS256\"`\n- `\"PS384\"`\n- `\"PS512\"`\n- `\"EdDSA\"`\nThe `config.access_token_issuer`\nspecifies which `keyset` is used to sign the new token issued by Kong using\nthe specified signing algorithm.", + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS512" + ], + "type": "string" + }, + "access_token_upstream_header": { + "default": "Authorization:Bearer", + "description": "Removes the `config.access_token_request_header` from the request after reading its\nvalue. With `config.access_token_upstream_header`, you can specify the upstream header where the plugin adds the Kong signed token. If you don't specify a value, such as use `null` or `\"\"` (empty string), the plugin does not even try to sign or re-sign the token.", + "type": "string" + }, + "access_token_upstream_leeway": { + "default": 0, + "description": "If you want to add or perhaps subtract (using a negative value) expiry\ntime (in seconds) of the original access token, you can specify a value that is added to\nthe original access token's `exp` claim.", + "type": "number" + }, + "cache_access_token_introspection": { + "default": true, + "description": "Whether to cache access token introspection results.", + "type": "boolean" + }, + "cache_channel_token_introspection": { + "default": true, + "description": "Whether to cache channel token introspection results.", + "type": "boolean" + }, + "channel_token_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do channel token to Kong consumer mapping, it tries\nto find a matching Kong consumer from properties defined using this configuration parameter.\nThe parameter can take an array of valid values: `id`, `username`, and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with\nthis configuration parameter (such as `sub` or `username`) in a channel token to a Kong consumer entity. Kong\nconsumers have an `id`, a `username`, and a `custom_id`. The `config.channel_token_consumer_by` parameter\ntells the plugin which Kong consumer properties can be used for mapping. If this\nparameter is enabled but the mapping fails, such as when there's\na non-existent Kong consumer, the plugin responds\nwith `403 Forbidden`. Kong [consumer mapping](#consumer-mapping) is useful\nwhen you want to communicate this information\nto other plugins such as [ACL](/hub/kong-inc/acl/) or [rate limiting](/hub/kong-inc/rate-limiting/).\nThe JWT Signer plugin also sets a couple of standard Kong upstream consumer headers.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_authorization": { + "description": "If the introspection endpoint requires client authentication (client being this plugin), you can specify\nthe `Authorization` header's value with this configuration parameter. If you use client credentials,\nyou should enter the value of `\"Basic base64encode('client_id:client_secret')\"` to this configuration parameter.\nYou are responsible for providing the full string of the header and doing\nall the necessary encodings (such as base64) required on a given endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_body_args": { + "description": "If you need to pass additional body arguments to introspection endpoint when the plugin introspects the\nopaque channel token, you can use this config parameter to specify them. You should URL encode the value.\nFor example: `resource=` or `a=1&b=&c`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do channel token introspection results to Kong consumer mapping, it tries to\nfind a matching Kong consumer from properties defined using this configuration parameter. The parameter\ncan take an array of values. Valid values are `id`, `username` and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with\nthis configuration parameter (such as `sub` or `username`) in channel token introspection results to\nKong consumer entity. Kong consumers have an `id`, a `username` and a `custom_id`. The\n`config.channel_token_introspection_consumer_by` parameter tells the plugin which of these\nKong consumer properties can be used for mapping. If this parameter is enabled\nbut the mapping fails, such as when there's\na non-existent Kong consumer, the plugin responds with `403 Forbidden`. Kong\n[consumer mapping](#consumer-mapping)\nis useful when you want to communicate this information to other plugins such as\n[ACL](/hub/kong-inc/acl/) or [rate limiting](/hub/kong-inc/rate-limiting/). The\nJWT Signer plugin also sets a couple of standard\nKong upstream consumer headers.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_endpoint": { + "description": "When using `opaque` channel tokens, and you want to turn on channel token introspection, you need to\nspecify the OAuth 2.0 introspection endpoint URI with this configuration parameter.\nOtherwise the plugin will not try introspection, and instead returns `401 Unauthorized`\nwhen using opaque channel tokens.", + "type": "string" + }, + "channel_token_introspection_hint": { + "description": "If you need to give `hint` parameter when introspecting a channel token, you can use this parameter to\nspecify the value of such parameter. By default, a `hint` isn't sent with channel token introspection.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns a channel token in one of the keys (or claims) in the introspection\nresults (`JSON`), the plugin can use that value instead of the introspection results when doing expiry verification\nand signing of the new token issued by Kong. For example, if you specify `[ \"token_string\" ]`, which can be given as\n`\"token_string\"` (form post) to this configuration parameter, the plugin looks for key `token_string`\nin JSON of the introspection results and uses that as a channel token instead of using introspection JSON\ndirectly. If the key cannot be found, the plugin responds with `401 Unauthorized`. Also if the key\nis found but cannot be decoded as JWT, the plugin responds with `401 Unauthorized`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_leeway": { + "default": 0, + "description": "You can use this parameter to adjust clock skew between the token issuer introspection results and Kong.\nThe value will be added to introspection results (`JSON`) `exp` claim/property before checking token expiry\nagainst Kong servers current time (in seconds). You can disable channel token introspection `expiry`\nverification altogether with `config.verify_channel_token_introspection_expiry`.", + "type": "number" + }, + "channel_token_introspection_scopes_claim": { + "default": [ + "scope" + ], + "description": "Use this parameter to specify the claim/property in channel token introspection results (`JSON`)\nto be verified against values of `config.channel_token_introspection_scopes_required`. This supports\nnested claims. For example, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`, which can be given as\n`realm_access,roles` (form post). If the claim is not found in channel token introspection results,\nand you have specified `config.channel_token_introspection_scopes_required`, the plugin responds\nwith `403 Forbidden`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_scopes_required": { + "description": "Use this parameter to specify the required values (or scopes) that are checked by an introspection\nclaim/property specified by `config.channel_token_introspection_scopes_claim`.\nFor example, `[ \"employee demo-service\", \"superadmin\" ]`, which can be given as `\"employee demo-service,superadmin\"`\n(form post) would mean that the claim needs to have the values `\"employee\"` and `\"demo-service\"` **OR** that the\nclaim needs to have the value of `\"superadmin\"` to be successfully authorized for the upstream access.\nIf required scopes are not found in channel token introspection results (`JSON`), the plugin\nresponds with `403 Forbidden`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request\nfails for some reason. If both requests timeout, then the plugin runs two times the\n`config.access_token_introspection_timeout` on channel token introspection.", + "type": "number" + }, + "channel_token_issuer": { + "default": "kong", + "description": "The `iss` claim of the re-signed channel token is set to this value, which\nis `kong` by default. The original `iss` claim of the incoming token\n(possibly introspected) is stored in the `original_iss` claim of\nthe newly signed channel token.", + "type": "string" + }, + "channel_token_jwks_uri": { + "description": "If you want to use `config.verify_channel_token_signature`, you must specify the URI where\nthe plugin can fetch the public keys (JWKS) to verify the signature of the channel token.\nIf you don't specify a URI and you pass a JWT token to the plugin, then the plugin responds\nwith `401 Unauthorized`.", + "type": "string" + }, + "channel_token_keyset": { + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "type": "string" + }, + "channel_token_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value\nwill be added to token's `exp` claim before checking token expiry against Kong servers current\ntime in seconds. You can disable channel token `expiry` verification altogether with\n`config.verify_channel_token_expiry`.", + "type": "number" + }, + "channel_token_optional": { + "default": false, + "description": "If a channel token is not provided or no `config.channel_token_request_header` is specified,\nthe plugin cannot verify the channel token. In that case, the plugin normally responds\nwith `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error).\nEnable this parameter to allow the request to proceed even when there is no channel token\nto check. If the channel token is provided, then this parameter has no effect\n(look other parameters to enable and disable checks in that case).", + "type": "boolean" + }, + "channel_token_request_header": { + "description": "This parameter tells the name of the header where to look for the channel token.\nBy default, the plugin doesn't look for the channel token. If you don't want to\ndo anything with the channel token, then you can set this to `null` or `\"\"`\n(empty string). Any header can be used to pass the channel\ntoken to this plugin. Two predefined values are `authorization:bearer`\nand `authorization:basic`.", + "type": "string" + }, + "channel_token_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim in a channel token to verify against values of\n`config.channel_token_scopes_required`. This supports nested claims. With Keycloak, you could\nuse `[ \"realm_access\", \"roles\" ]`, which can be given as `realm_access,roles` (form post).\nIf the claim is not found in the channel token, and you have specified `config.channel_token_scopes_required`,\nthe plugin responds with `403 Forbidden`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim\nspecified by `config.channel_token_scopes_claim`. For example, if `[ \"employee demo-service\", \"superadmin\" ]`\nwas given as `\"employee demo-service,superadmin\"` (form post), the claim needs\nto have values `\"employee\"` and `\"demo-service\"`, **OR** that the claim needs to have the value of\n`\"superadmin\"` to be successfully authorized for the upstream access. If required scopes are not\nfound in the channel token, the plugin responds with `403 Forbidden`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_signing_algorithm": { + "default": "RS256", + "description": "When this plugin sets the upstream header as specified with `config.channel_token_upstream_header`,\nit also re-signs the original channel token using private keys of this plugin.\nSpecify the algorithm that is used to sign the token. Currently\nsupported values:\n - `\"HS256\"`\n- `\"HS384\"`\n- `\"HS512\"`\n- `\"RS256\"`\n- `\"RS512\"`\n- `\"ES256\"`\n- `\"ES384\"`\n- `\"ES512\"`\n- `\"PS256\"`\n- `\"PS384\"`\n- `\"PS512\"`\n- `\"EdDSA\"`\n\nThe `config.channel_token_issuer` specifies which `keyset`\nis used to sign the new token issued by Kong using the specified signing algorithm.", + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS512" + ], + "type": "string" + }, + "channel_token_upstream_header": { + "description": "This plugin removes the `config.channel_token_request_header` from the request\nafter reading its value.\nWith `config.channel_token_upstream_header`, you can specify the upstream header where the plugin\nadds the Kong-signed token. If you don't specify a value (so `null` or `\"\"` empty string),\nthe plugin does not attempt to re-sign the token.", + "type": "string" + }, + "channel_token_upstream_leeway": { + "default": 0, + "description": "If you want to add or perhaps subtract (using negative value) expiry time of the original channel token,\nyou can specify a value that is added to the original channel token's `exp` claim.", + "type": "number" + }, + "enable_access_token_introspection": { + "default": true, + "description": "If you don't want to support opaque access tokens, change this\nconfiguration parameter to `false` to disable introspection.", + "type": "boolean" + }, + "enable_channel_token_introspection": { + "default": true, + "description": "If you don't want to support opaque channel tokens, disable introspection by\nchanging this configuration parameter to `false`.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Tokens signed with HMAC algorithms such as `HS256`, `HS384`, or `HS512` are not\naccepted by default. If you need to accept such tokens for verification,\nenable this setting.", + "type": "boolean" + }, + "enable_instrumentation": { + "default": false, + "description": "When you are experiencing problems in production and don't want to change\nthe logging level on Kong nodes, which requires a reload, use this\nparameter to enable instrumentation for the request. The parameter writes\nlog entries with some added information using `ngx.CRIT` (CRITICAL) level.", + "type": "boolean" + }, + "realm": { + "description": "When authentication or authorization fails, or there is an unexpected\nerror, the plugin sends an `WWW-Authenticate` header with the `realm`\nattribute value.", + "type": "string" + }, + "trust_access_token_introspection": { + "default": true, + "description": "When you provide a opaque access token that the plugin introspects, and you do expiry\nand scopes verification on introspection results, you probably don't want to do another\nround of checks on the payload before the plugin signs a new token. Or that you don't\nwant to do checks to a JWT token provided with introspection JSON specified with\n`config.access_token_introspection_jwt_claim`. Use this parameter to enable and\ndisable further checks on a payload before the new token is signed. If you set this\nto `true`, the expiry or scopes are not checked on a payload.", + "type": "boolean" + }, + "trust_channel_token_introspection": { + "default": true, + "description": "When you provide an opaque channel token that the plugin introspects, and you do expiry\nand scopes verification on introspection results, you probably don't want to do another\nround of checks on the payload before the plugin signs a new token. Or you don't\nwant to do checks to a JWT token provided with introspection JSON specified with\n`config.channel_token_introspection_jwt_claim`. Use this parameter to enable or\ndisable further checks on a payload before the new token is signed. If you set this\nto `true` (default), the expiry or scopes are not checked on a payload.", + "type": "boolean" + }, + "verify_access_token_expiry": { + "default": true, + "description": "Quickly turn access token expiry verification off and on as needed.", + "type": "boolean" + }, + "verify_access_token_introspection_expiry": { + "default": true, + "description": "Quickly turn access token introspection expiry verification off and on as needed.", + "type": "boolean" + }, + "verify_access_token_introspection_scopes": { + "default": true, + "description": "Quickly turn off and on the access token\nintrospection scopes verification, specified with\n`config.access_token_introspection_scopes_required`.", + "type": "boolean" + }, + "verify_access_token_scopes": { + "default": true, + "description": "Quickly turn off and on the access token\nrequired scopes verification, specified with `config.access_token_scopes_required`.", + "type": "boolean" + }, + "verify_access_token_signature": { + "default": true, + "description": "Quickly turn access token signature verification off and on as needed.", + "type": "boolean" + }, + "verify_channel_token_expiry": { + "default": true, + "type": "boolean" + }, + "verify_channel_token_introspection_expiry": { + "default": true, + "description": "Quickly turn on/off the channel token introspection expiry\nverification.", + "type": "boolean" + }, + "verify_channel_token_introspection_scopes": { + "default": true, + "description": "Quickly turn on/off the channel token introspection scopes\nverification specified with `config.channel_token_introspection_scopes_required`.", + "type": "boolean" + }, + "verify_channel_token_scopes": { + "default": true, + "description": "Quickly turn on/off the channel token required scopes\nverification specified with `config.channel_token_scopes_required`.", + "type": "boolean" + }, + "verify_channel_token_signature": { + "default": true, + "description": "Quickly turn on/off the channel token signature verification.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/jwt-signer/3.10.json b/json_schemas/jwt-signer/3.10.json new file mode 100644 index 00000000..34d6a776 --- /dev/null +++ b/json_schemas/jwt-signer/3.10.json @@ -0,0 +1,699 @@ +{ + "properties": { + "config": { + "properties": { + "access_token_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to apply an access token to a Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of alues. Valid values are `id`, `username`, and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (for example, `sub` or `username`) in an access token to Kong consumer entity.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_authorization": { + "description": "If the introspection endpoint requires client authentication (client being the JWT Signer plugin), you can specify the `Authorization` header's value with this configuration parameter.", + "type": "string" + }, + "access_token_introspection_body_args": { + "description": "This parameter allows you to pass URL encoded request body arguments. For example: `resource=` or `a=1&b=&c`.", + "type": "string" + }, + "access_token_introspection_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do access token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in access token introspection results to the Kong consumer entity.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter.", + "type": "string" + }, + "access_token_introspection_hint": { + "default": "access_token", + "description": "If you need to give `hint` parameter when introspecting an access token, use this parameter to specify the value. By default, the plugin sends `hint=access_token`.", + "type": "string" + }, + "access_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns an access token in one of the keys (or claims) within the introspection results (`JSON`). If the key cannot be found, the plugin responds with `401 Unauthorized`. Also if the key is found but cannot be decoded as JWT, it also responds with `401 Unauthorized`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer introspection results and Kong. The value is added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time in seconds. You can disable access token introspection `expiry` verification altogether with `config.verify_access_token_introspection_expiry`.", + "type": "number" + }, + "access_token_introspection_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim/property in access token introspection results (`JSON`) to be verified against values of `config.access_token_introspection_scopes_required`. This supports nested claims. For example, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`, hich can be given as `realm_access,roles` (form post). If the claim is not found in access token introspection results, and you have specified `config.access_token_introspection_scopes_required`, the plugin responds with `403 Forbidden`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.access_token_introspection_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on access token introspection.", + "type": "number" + }, + "access_token_issuer": { + "default": "kong", + "description": "The `iss` claim of a signed or re-signed access token is set to this value. Original `iss` claim of the incoming token (possibly introspected) is stored in `original_iss` claim of the newly signed access token.", + "type": "string" + }, + "access_token_jwks_uri": { + "description": "Specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the access token.", + "type": "string" + }, + "access_token_jwks_uri_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "access_token_jwks_uri_client_password": { + "description": "The client password that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_username`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "access_token_jwks_uri_client_username": { + "description": "The client username that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_jwks_uri_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_jwks_uri`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "access_token_keyset": { + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "type": "string" + }, + "access_token_keyset_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_keyset` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "access_token_keyset_client_password": { + "description": "The client password that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_username`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "access_token_keyset_client_username": { + "description": "The client username that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_keyset_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_keyset`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "access_token_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value is added to the token's `exp` claim before checking token expiry against Kong servers' current time in seconds. You can disable access token `expiry` verification altogether with `config.verify_access_token_expiry`.", + "type": "number" + }, + "access_token_optional": { + "default": false, + "description": "If an access token is not provided or no `config.access_token_request_header` is specified, the plugin cannot verify the access token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Use this parameter to allow the request to proceed even when there is no token to check. If the token is provided, then this parameter has no effect", + "type": "boolean" + }, + "access_token_request_header": { + "default": "Authorization", + "description": "This parameter tells the name of the header where to look for the access token.", + "type": "string" + }, + "access_token_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim in an access token to verify against values of `config.access_token_scopes_required`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.access_token_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_signing_algorithm": { + "default": "RS256", + "description": "When this plugin sets the upstream header as specified with `config.access_token_upstream_header`, re-signs the original access token using the private keys of the JWT Signer plugin. Specify the algorithm that is used to sign the token. The `config.access_token_issuer` specifies which `keyset` is used to sign the new token issued by Kong using the specified signing algorithm.", + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS512" + ], + "type": "string" + }, + "access_token_upstream_header": { + "default": "Authorization:Bearer", + "description": "Removes the `config.access_token_request_header` from the request after reading its value. With `config.access_token_upstream_header`, you can specify the upstream header where the plugin adds the Kong signed token. If you don't specify a value, such as use `null` or `\"\"` (empty string), the plugin does not even try to sign or re-sign the token.", + "type": "string" + }, + "access_token_upstream_leeway": { + "default": 0, + "description": "If you want to add or subtract (using a negative value) expiry time (in seconds) of the original access token, you can specify a value that is added to the original access token's `exp` claim.", + "type": "number" + }, + "add_access_token_claims": { + "additionalProperties": true, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "add_channel_token_claims": { + "additionalProperties": true, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "add_claims": { + "additionalProperties": true, + "description": "Add customized claims to both tokens if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "cache_access_token_introspection": { + "default": true, + "description": "Whether to cache access token introspection results.", + "type": "boolean" + }, + "cache_channel_token_introspection": { + "default": true, + "description": "Whether to cache channel token introspection results.", + "type": "boolean" + }, + "channel_token_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do channel token to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of valid values: `id`, `username`, and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter. Kong consumers have an `id`, a `username`, and a `custom_id`. If this parameter is enabled but the mapping fails, such as when there's a non-existent Kong consumer, the plugin responds with `403 Forbidden`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_authorization": { + "description": "When using `opaque` channel tokens, and you want to turn on channel token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise the plugin will not try introspection, and instead returns `401 Unauthorized` when using opaque channel tokens.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_body_args": { + "description": "If you need to pass additional body arguments to introspection endpoint when the plugin introspects the opaque channel token, you can use this config parameter to specify them. You should URL encode the value. For example: `resource=` or `a=1&b=&c`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do channel token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values. Valid values are `id`, `username` and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in channel token introspection results to Kong consumer entity", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise, the plugin does not try introspection and returns `401 Unauthorized` instead.", + "type": "string" + }, + "channel_token_introspection_hint": { + "description": "If you need to give `hint` parameter when introspecting a channel token, you can use this parameter to specify the value of such parameter. By default, a `hint` isn't sent with channel token introspection.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns a channel token in one of the keys (or claims) in the introspection results (`JSON`), the plugin can use that value instead of the introspection results when doing expiry verification and signing of the new token issued by Kong.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_leeway": { + "default": 0, + "description": "You can use this parameter to adjust clock skew between the token issuer introspection results and Kong. The value will be added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time (in seconds). You can disable channel token introspection `expiry` verification altogether with `config.verify_channel_token_introspection_expiry`.", + "type": "number" + }, + "channel_token_introspection_scopes_claim": { + "default": [ + "scope" + ], + "description": "Use this parameter to specify the claim/property in channel token introspection results (`JSON`) to be verified against values of `config.channel_token_introspection_scopes_required`. This supports nested claims.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_scopes_required": { + "description": "Use this parameter to specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.channel_token_introspection_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on channel token introspection.", + "type": "number" + }, + "channel_token_issuer": { + "default": "kong", + "description": "The `iss` claim of the re-signed channel token is set to this value, which is `kong` by default. The original `iss` claim of the incoming token (possibly introspected) is stored in the `original_iss` claim of the newly signed channel token.", + "type": "string" + }, + "channel_token_jwks_uri": { + "description": "If you want to use `config.verify_channel_token_signature`, you must specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the channel token. If you don't specify a URI and you pass a JWT token to the plugin, then the plugin responds with `401 Unauthorized`.", + "type": "string" + }, + "channel_token_jwks_uri_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "channel_token_jwks_uri_client_password": { + "description": "The client password that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_username`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "channel_token_jwks_uri_client_username": { + "description": "The client username that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_jwks_uri_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_jwks_uri`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "channel_token_keyset": { + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "type": "string" + }, + "channel_token_keyset_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `channel_token_keyset` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "channel_token_keyset_client_password": { + "description": "The client password that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_username`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "channel_token_keyset_client_username": { + "description": "The client username that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_keyset_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_keyset`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "channel_token_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value will be added to token's `exp` claim before checking token expiry against Kong servers current time in seconds. You can disable channel token `expiry` verification altogether with `config.verify_channel_token_expiry`.", + "type": "number" + }, + "channel_token_optional": { + "default": false, + "description": "If a channel token is not provided or no `config.channel_token_request_header` is specified, the plugin cannot verify the channel token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Enable this parameter to allow the request to proceed even when there is no channel token to check. If the channel token is provided, then this parameter has no effect", + "type": "boolean" + }, + "channel_token_request_header": { + "description": "This parameter tells the name of the header where to look for the channel token. If you don't want to do anything with the channel token, then you can set this to `null` or `\"\"` (empty string).", + "type": "string" + }, + "channel_token_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim in a channel token to verify against values of `config.channel_token_scopes_required`. This supports nested claims.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.channel_token_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_signing_algorithm": { + "default": "RS256", + "description": "When this plugin sets the upstream header as specified with `config.channel_token_upstream_header`, it also re-signs the original channel token using private keys of this plugin. Specify the algorithm that is used to sign the token.", + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS512" + ], + "type": "string" + }, + "channel_token_upstream_header": { + "description": "This plugin removes the `config.channel_token_request_header` from the request after reading its value.", + "type": "string" + }, + "channel_token_upstream_leeway": { + "default": 0, + "description": "If you want to add or perhaps subtract (using negative value) expiry time of the original channel token, you can specify a value that is added to the original channel token's `exp` claim.", + "type": "number" + }, + "enable_access_token_introspection": { + "default": true, + "description": "If you don't want to support opaque access tokens, change this configuration parameter to `false` to disable introspection.", + "type": "boolean" + }, + "enable_channel_token_introspection": { + "default": true, + "description": "If you don't want to support opaque channel tokens, disable introspection by changing this configuration parameter to `false`.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Tokens signed with HMAC algorithms such as `HS256`, `HS384`, or `HS512` are not accepted by default. If you need to accept such tokens for verification, enable this setting.", + "type": "boolean" + }, + "enable_instrumentation": { + "default": false, + "description": "Writes log entries with some added information using `ngx.CRIT` (CRITICAL) level.", + "type": "boolean" + }, + "original_access_token_upstream_header": { + "description": "The HTTP header name used to store the original access token.", + "type": "string" + }, + "original_channel_token_upstream_header": { + "description": "The HTTP header name used to store the original channel token.", + "type": "string" + }, + "realm": { + "description": "When authentication or authorization fails, or there is an unexpected error, the plugin sends an `WWW-Authenticate` header with the `realm` attribute value.", + "type": "string" + }, + "remove_access_token_claims": { + "default": [ + + ], + "description": "remove claims. It should be an array, and each element is a claim key string.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "remove_channel_token_claims": { + "default": [ + + ], + "description": "remove claims. It should be an array, and each element is a claim key string.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "set_access_token_claims": { + "additionalProperties": true, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "set_channel_token_claims": { + "additionalProperties": true, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "set_claims": { + "additionalProperties": true, + "description": "Set customized claims to both tokens. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "trust_access_token_introspection": { + "default": true, + "description": "Use this parameter to enable and disable further checks on a payload before the new token is signed. If you set this to `true`, the expiry or scopes are not checked on a payload.", + "type": "boolean" + }, + "trust_channel_token_introspection": { + "default": true, + "description": "Providing an opaque channel token for plugin introspection, and verifying expiry and scopes on introspection results may make further payload checks unnecessary before the plugin signs a new token. This also applies when using a JWT token with introspection JSON as per config.channel_token_introspection_jwt_claim. Use this parameter to manage additional payload checks before signing a new token. With true (default), payload's expiry or scopes aren't checked.", + "type": "boolean" + }, + "verify_access_token_expiry": { + "default": true, + "description": "Quickly turn access token expiry verification off and on as needed.", + "type": "boolean" + }, + "verify_access_token_introspection_expiry": { + "default": true, + "description": "Quickly turn access token introspection expiry verification off and on as needed.", + "type": "boolean" + }, + "verify_access_token_introspection_scopes": { + "default": true, + "description": "Quickly turn off and on the access token introspection scopes verification, specified with `config.access_token_introspection_scopes_required`.", + "type": "boolean" + }, + "verify_access_token_scopes": { + "default": true, + "description": "Quickly turn off and on the access token required scopes verification, specified with `config.access_token_scopes_required`.", + "type": "boolean" + }, + "verify_access_token_signature": { + "default": true, + "description": "Quickly turn access token signature verification off and on as needed.", + "type": "boolean" + }, + "verify_channel_token_expiry": { + "default": true, + "type": "boolean" + }, + "verify_channel_token_introspection_expiry": { + "default": true, + "description": "Quickly turn on/off the channel token introspection expiry verification.", + "type": "boolean" + }, + "verify_channel_token_introspection_scopes": { + "default": true, + "description": "Quickly turn on/off the channel token introspection scopes verification specified with `config.channel_token_introspection_scopes_required`.", + "type": "boolean" + }, + "verify_channel_token_scopes": { + "default": true, + "description": "Quickly turn on/off the channel token required scopes verification specified with `config.channel_token_scopes_required`.", + "type": "boolean" + }, + "verify_channel_token_signature": { + "default": true, + "description": "Quickly turn on/off the channel token signature verification.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/jwt-signer/3.11.json b/json_schemas/jwt-signer/3.11.json new file mode 100644 index 00000000..cfb49862 --- /dev/null +++ b/json_schemas/jwt-signer/3.11.json @@ -0,0 +1,639 @@ +{ + "properties": { + "config": { + "properties": { + "access_token_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to apply an access token to a Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of alues. Valid values are `id`, `username`, and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "access_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (for example, `sub` or `username`) in an access token to Kong consumer entity.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_authorization": { + "description": "If the introspection endpoint requires client authentication (client being the JWT Signer plugin), you can specify the `Authorization` header's value with this configuration parameter.", + "type": "string" + }, + "access_token_introspection_body_args": { + "description": "This parameter allows you to pass URL encoded request body arguments. For example: `resource=` or `a=1&b=&c`.", + "type": "string" + }, + "access_token_introspection_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do access token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in access token introspection results to the Kong consumer entity.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter.", + "type": "string" + }, + "access_token_introspection_hint": { + "default": "access_token", + "description": "If you need to give `hint` parameter when introspecting an access token, use this parameter to specify the value. By default, the plugin sends `hint=access_token`.", + "type": "string" + }, + "access_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns an access token in one of the keys (or claims) within the introspection results (`JSON`). If the key cannot be found, the plugin responds with `401 Unauthorized`. Also if the key is found but cannot be decoded as JWT, it also responds with `401 Unauthorized`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer introspection results and Kong. The value is added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time in seconds. You can disable access token introspection `expiry` verification altogether with `config.verify_access_token_introspection_expiry`.", + "type": "number" + }, + "access_token_introspection_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim/property in access token introspection results (`JSON`) to be verified against values of `config.access_token_introspection_scopes_required`. This supports nested claims. For example, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`, hich can be given as `realm_access,roles` (form post). If the claim is not found in access token introspection results, and you have specified `config.access_token_introspection_scopes_required`, the plugin responds with `403 Forbidden`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.access_token_introspection_scopes_claim`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on access token introspection.", + "type": "number" + }, + "access_token_issuer": { + "default": "kong", + "description": "The `iss` claim of a signed or re-signed access token is set to this value. Original `iss` claim of the incoming token (possibly introspected) is stored in `original_iss` claim of the newly signed access token.", + "type": "string" + }, + "access_token_jwks_uri": { + "description": "Specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the access token.", + "type": "string" + }, + "access_token_jwks_uri_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "access_token_jwks_uri_client_password": { + "description": "The client password that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_username`\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_jwks_uri_client_username": { + "description": "The client username that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_jwks_uri_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_jwks_uri`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "access_token_keyset": { + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "type": "string" + }, + "access_token_keyset_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_keyset` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "access_token_keyset_client_password": { + "description": "The client password that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_username`\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_keyset_client_username": { + "description": "The client username that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_keyset_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_keyset`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "access_token_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value is added to the token's `exp` claim before checking token expiry against Kong servers' current time in seconds. You can disable access token `expiry` verification altogether with `config.verify_access_token_expiry`.", + "type": "number" + }, + "access_token_optional": { + "default": false, + "description": "If an access token is not provided or no `config.access_token_request_header` is specified, the plugin cannot verify the access token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Use this parameter to allow the request to proceed even when there is no token to check. If the token is provided, then this parameter has no effect", + "type": "boolean" + }, + "access_token_request_header": { + "default": "Authorization", + "description": "This parameter tells the name of the header where to look for the access token.", + "type": "string" + }, + "access_token_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim in an access token to verify against values of `config.access_token_scopes_required`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "access_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.access_token_scopes_claim`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "access_token_signing_algorithm": { + "default": "RS256", + "description": "When this plugin sets the upstream header as specified with `config.access_token_upstream_header`, re-signs the original access token using the private keys of the JWT Signer plugin. Specify the algorithm that is used to sign the token. The `config.access_token_issuer` specifies which `keyset` is used to sign the new token issued by Kong using the specified signing algorithm.", + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS512" + ], + "type": "string" + }, + "access_token_upstream_header": { + "default": "Authorization:Bearer", + "description": "Removes the `config.access_token_request_header` from the request after reading its value. With `config.access_token_upstream_header`, you can specify the upstream header where the plugin adds the Kong signed token. If you don't specify a value, such as use `null` or `\"\"` (empty string), the plugin does not even try to sign or re-sign the token.", + "type": "string" + }, + "access_token_upstream_leeway": { + "default": 0, + "description": "If you want to add or subtract (using a negative value) expiry time (in seconds) of the original access token, you can specify a value that is added to the original access token's `exp` claim.", + "type": "number" + }, + "add_access_token_claims": { + "additionalProperties": true, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "add_channel_token_claims": { + "additionalProperties": true, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "add_claims": { + "additionalProperties": true, + "description": "Add customized claims to both tokens if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "cache_access_token_introspection": { + "default": true, + "description": "Whether to cache access token introspection results.", + "type": "boolean" + }, + "cache_channel_token_introspection": { + "default": true, + "description": "Whether to cache channel token introspection results.", + "type": "boolean" + }, + "channel_token_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do channel token to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of valid values: `id`, `username`, and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "channel_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter. Kong consumers have an `id`, a `username`, and a `custom_id`. If this parameter is enabled but the mapping fails, such as when there's a non-existent Kong consumer, the plugin responds with `403 Forbidden`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_authorization": { + "description": "When using `opaque` channel tokens, and you want to turn on channel token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise the plugin will not try introspection, and instead returns `401 Unauthorized` when using opaque channel tokens.", + "items": { + "required": [], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_body_args": { + "description": "If you need to pass additional body arguments to introspection endpoint when the plugin introspects the opaque channel token, you can use this config parameter to specify them. You should URL encode the value. For example: `resource=` or `a=1&b=&c`.", + "items": { + "required": [], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do channel token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values. Valid values are `id`, `username` and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in channel token introspection results to Kong consumer entity", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise, the plugin does not try introspection and returns `401 Unauthorized` instead.", + "type": "string" + }, + "channel_token_introspection_hint": { + "description": "If you need to give `hint` parameter when introspecting a channel token, you can use this parameter to specify the value of such parameter. By default, a `hint` isn't sent with channel token introspection.", + "items": { + "required": [], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns a channel token in one of the keys (or claims) in the introspection results (`JSON`), the plugin can use that value instead of the introspection results when doing expiry verification and signing of the new token issued by Kong.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_leeway": { + "default": 0, + "description": "You can use this parameter to adjust clock skew between the token issuer introspection results and Kong. The value will be added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time (in seconds). You can disable channel token introspection `expiry` verification altogether with `config.verify_channel_token_introspection_expiry`.", + "type": "number" + }, + "channel_token_introspection_scopes_claim": { + "default": [ + "scope" + ], + "description": "Use this parameter to specify the claim/property in channel token introspection results (`JSON`) to be verified against values of `config.channel_token_introspection_scopes_required`. This supports nested claims.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_scopes_required": { + "description": "Use this parameter to specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.channel_token_introspection_scopes_claim`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on channel token introspection.", + "type": "number" + }, + "channel_token_issuer": { + "default": "kong", + "description": "The `iss` claim of the re-signed channel token is set to this value, which is `kong` by default. The original `iss` claim of the incoming token (possibly introspected) is stored in the `original_iss` claim of the newly signed channel token.", + "type": "string" + }, + "channel_token_jwks_uri": { + "description": "If you want to use `config.verify_channel_token_signature`, you must specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the channel token. If you don't specify a URI and you pass a JWT token to the plugin, then the plugin responds with `401 Unauthorized`.", + "type": "string" + }, + "channel_token_jwks_uri_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "channel_token_jwks_uri_client_password": { + "description": "The client password that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_username`\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_jwks_uri_client_username": { + "description": "The client username that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_jwks_uri_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_jwks_uri`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "channel_token_keyset": { + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "type": "string" + }, + "channel_token_keyset_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `channel_token_keyset` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "channel_token_keyset_client_password": { + "description": "The client password that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_username`\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_keyset_client_username": { + "description": "The client username that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_keyset_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_keyset`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "channel_token_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value will be added to token's `exp` claim before checking token expiry against Kong servers current time in seconds. You can disable channel token `expiry` verification altogether with `config.verify_channel_token_expiry`.", + "type": "number" + }, + "channel_token_optional": { + "default": false, + "description": "If a channel token is not provided or no `config.channel_token_request_header` is specified, the plugin cannot verify the channel token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Enable this parameter to allow the request to proceed even when there is no channel token to check. If the channel token is provided, then this parameter has no effect", + "type": "boolean" + }, + "channel_token_request_header": { + "description": "This parameter tells the name of the header where to look for the channel token. If you don't want to do anything with the channel token, then you can set this to `null` or `\"\"` (empty string).", + "type": "string" + }, + "channel_token_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim in a channel token to verify against values of `config.channel_token_scopes_required`. This supports nested claims.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "channel_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.channel_token_scopes_claim`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "channel_token_signing_algorithm": { + "default": "RS256", + "description": "When this plugin sets the upstream header as specified with `config.channel_token_upstream_header`, it also re-signs the original channel token using private keys of this plugin. Specify the algorithm that is used to sign the token.", + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS512" + ], + "type": "string" + }, + "channel_token_upstream_header": { + "description": "This plugin removes the `config.channel_token_request_header` from the request after reading its value.", + "type": "string" + }, + "channel_token_upstream_leeway": { + "default": 0, + "description": "If you want to add or perhaps subtract (using negative value) expiry time of the original channel token, you can specify a value that is added to the original channel token's `exp` claim.", + "type": "number" + }, + "enable_access_token_introspection": { + "default": true, + "description": "If you don't want to support opaque access tokens, change this configuration parameter to `false` to disable introspection.", + "type": "boolean" + }, + "enable_channel_token_introspection": { + "default": true, + "description": "If you don't want to support opaque channel tokens, disable introspection by changing this configuration parameter to `false`.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Tokens signed with HMAC algorithms such as `HS256`, `HS384`, or `HS512` are not accepted by default. If you need to accept such tokens for verification, enable this setting.", + "type": "boolean" + }, + "enable_instrumentation": { + "default": false, + "description": "Writes log entries with some added information using `ngx.CRIT` (CRITICAL) level.", + "type": "boolean" + }, + "original_access_token_upstream_header": { + "description": "The HTTP header name used to store the original access token.", + "type": "string" + }, + "original_channel_token_upstream_header": { + "description": "The HTTP header name used to store the original channel token.", + "type": "string" + }, + "realm": { + "description": "When authentication or authorization fails, or there is an unexpected error, the plugin sends an `WWW-Authenticate` header with the `realm` attribute value.", + "type": "string" + }, + "remove_access_token_claims": { + "default": [], + "description": "remove claims. It should be an array, and each element is a claim key string.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "remove_channel_token_claims": { + "default": [], + "description": "remove claims. It should be an array, and each element is a claim key string.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "set_access_token_claims": { + "additionalProperties": true, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "set_channel_token_claims": { + "additionalProperties": true, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "set_claims": { + "additionalProperties": true, + "description": "Set customized claims to both tokens. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "trust_access_token_introspection": { + "default": true, + "description": "Use this parameter to enable and disable further checks on a payload before the new token is signed. If you set this to `true`, the expiry or scopes are not checked on a payload.", + "type": "boolean" + }, + "trust_channel_token_introspection": { + "default": true, + "description": "Providing an opaque channel token for plugin introspection, and verifying expiry and scopes on introspection results may make further payload checks unnecessary before the plugin signs a new token. This also applies when using a JWT token with introspection JSON as per config.channel_token_introspection_jwt_claim. Use this parameter to manage additional payload checks before signing a new token. With true (default), payload's expiry or scopes aren't checked.", + "type": "boolean" + }, + "verify_access_token_expiry": { + "default": true, + "description": "Quickly turn access token expiry verification off and on as needed.", + "type": "boolean" + }, + "verify_access_token_introspection_expiry": { + "default": true, + "description": "Quickly turn access token introspection expiry verification off and on as needed.", + "type": "boolean" + }, + "verify_access_token_introspection_scopes": { + "default": true, + "description": "Quickly turn off and on the access token introspection scopes verification, specified with `config.access_token_introspection_scopes_required`.", + "type": "boolean" + }, + "verify_access_token_scopes": { + "default": true, + "description": "Quickly turn off and on the access token required scopes verification, specified with `config.access_token_scopes_required`.", + "type": "boolean" + }, + "verify_access_token_signature": { + "default": true, + "description": "Quickly turn access token signature verification off and on as needed.", + "type": "boolean" + }, + "verify_channel_token_expiry": { + "default": true, + "type": "boolean" + }, + "verify_channel_token_introspection_expiry": { + "default": true, + "description": "Quickly turn on/off the channel token introspection expiry verification.", + "type": "boolean" + }, + "verify_channel_token_introspection_scopes": { + "default": true, + "description": "Quickly turn on/off the channel token introspection scopes verification specified with `config.channel_token_introspection_scopes_required`.", + "type": "boolean" + }, + "verify_channel_token_scopes": { + "default": true, + "description": "Quickly turn on/off the channel token required scopes verification specified with `config.channel_token_scopes_required`.", + "type": "boolean" + }, + "verify_channel_token_signature": { + "default": true, + "description": "Quickly turn on/off the channel token signature verification.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/jwt-signer/3.12.json b/json_schemas/jwt-signer/3.12.json new file mode 100644 index 00000000..cfb49862 --- /dev/null +++ b/json_schemas/jwt-signer/3.12.json @@ -0,0 +1,639 @@ +{ + "properties": { + "config": { + "properties": { + "access_token_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to apply an access token to a Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of alues. Valid values are `id`, `username`, and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "access_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (for example, `sub` or `username`) in an access token to Kong consumer entity.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_authorization": { + "description": "If the introspection endpoint requires client authentication (client being the JWT Signer plugin), you can specify the `Authorization` header's value with this configuration parameter.", + "type": "string" + }, + "access_token_introspection_body_args": { + "description": "This parameter allows you to pass URL encoded request body arguments. For example: `resource=` or `a=1&b=&c`.", + "type": "string" + }, + "access_token_introspection_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do access token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in access token introspection results to the Kong consumer entity.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter.", + "type": "string" + }, + "access_token_introspection_hint": { + "default": "access_token", + "description": "If you need to give `hint` parameter when introspecting an access token, use this parameter to specify the value. By default, the plugin sends `hint=access_token`.", + "type": "string" + }, + "access_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns an access token in one of the keys (or claims) within the introspection results (`JSON`). If the key cannot be found, the plugin responds with `401 Unauthorized`. Also if the key is found but cannot be decoded as JWT, it also responds with `401 Unauthorized`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer introspection results and Kong. The value is added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time in seconds. You can disable access token introspection `expiry` verification altogether with `config.verify_access_token_introspection_expiry`.", + "type": "number" + }, + "access_token_introspection_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim/property in access token introspection results (`JSON`) to be verified against values of `config.access_token_introspection_scopes_required`. This supports nested claims. For example, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`, hich can be given as `realm_access,roles` (form post). If the claim is not found in access token introspection results, and you have specified `config.access_token_introspection_scopes_required`, the plugin responds with `403 Forbidden`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.access_token_introspection_scopes_claim`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on access token introspection.", + "type": "number" + }, + "access_token_issuer": { + "default": "kong", + "description": "The `iss` claim of a signed or re-signed access token is set to this value. Original `iss` claim of the incoming token (possibly introspected) is stored in `original_iss` claim of the newly signed access token.", + "type": "string" + }, + "access_token_jwks_uri": { + "description": "Specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the access token.", + "type": "string" + }, + "access_token_jwks_uri_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "access_token_jwks_uri_client_password": { + "description": "The client password that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_username`\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_jwks_uri_client_username": { + "description": "The client username that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_jwks_uri_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_jwks_uri`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "access_token_keyset": { + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "type": "string" + }, + "access_token_keyset_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_keyset` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "access_token_keyset_client_password": { + "description": "The client password that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_username`\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_keyset_client_username": { + "description": "The client username that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_keyset_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_keyset`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "access_token_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value is added to the token's `exp` claim before checking token expiry against Kong servers' current time in seconds. You can disable access token `expiry` verification altogether with `config.verify_access_token_expiry`.", + "type": "number" + }, + "access_token_optional": { + "default": false, + "description": "If an access token is not provided or no `config.access_token_request_header` is specified, the plugin cannot verify the access token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Use this parameter to allow the request to proceed even when there is no token to check. If the token is provided, then this parameter has no effect", + "type": "boolean" + }, + "access_token_request_header": { + "default": "Authorization", + "description": "This parameter tells the name of the header where to look for the access token.", + "type": "string" + }, + "access_token_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim in an access token to verify against values of `config.access_token_scopes_required`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "access_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.access_token_scopes_claim`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "access_token_signing_algorithm": { + "default": "RS256", + "description": "When this plugin sets the upstream header as specified with `config.access_token_upstream_header`, re-signs the original access token using the private keys of the JWT Signer plugin. Specify the algorithm that is used to sign the token. The `config.access_token_issuer` specifies which `keyset` is used to sign the new token issued by Kong using the specified signing algorithm.", + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS512" + ], + "type": "string" + }, + "access_token_upstream_header": { + "default": "Authorization:Bearer", + "description": "Removes the `config.access_token_request_header` from the request after reading its value. With `config.access_token_upstream_header`, you can specify the upstream header where the plugin adds the Kong signed token. If you don't specify a value, such as use `null` or `\"\"` (empty string), the plugin does not even try to sign or re-sign the token.", + "type": "string" + }, + "access_token_upstream_leeway": { + "default": 0, + "description": "If you want to add or subtract (using a negative value) expiry time (in seconds) of the original access token, you can specify a value that is added to the original access token's `exp` claim.", + "type": "number" + }, + "add_access_token_claims": { + "additionalProperties": true, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "add_channel_token_claims": { + "additionalProperties": true, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "add_claims": { + "additionalProperties": true, + "description": "Add customized claims to both tokens if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "cache_access_token_introspection": { + "default": true, + "description": "Whether to cache access token introspection results.", + "type": "boolean" + }, + "cache_channel_token_introspection": { + "default": true, + "description": "Whether to cache channel token introspection results.", + "type": "boolean" + }, + "channel_token_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do channel token to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of valid values: `id`, `username`, and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "channel_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter. Kong consumers have an `id`, a `username`, and a `custom_id`. If this parameter is enabled but the mapping fails, such as when there's a non-existent Kong consumer, the plugin responds with `403 Forbidden`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_authorization": { + "description": "When using `opaque` channel tokens, and you want to turn on channel token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise the plugin will not try introspection, and instead returns `401 Unauthorized` when using opaque channel tokens.", + "items": { + "required": [], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_body_args": { + "description": "If you need to pass additional body arguments to introspection endpoint when the plugin introspects the opaque channel token, you can use this config parameter to specify them. You should URL encode the value. For example: `resource=` or `a=1&b=&c`.", + "items": { + "required": [], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do channel token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values. Valid values are `id`, `username` and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in channel token introspection results to Kong consumer entity", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise, the plugin does not try introspection and returns `401 Unauthorized` instead.", + "type": "string" + }, + "channel_token_introspection_hint": { + "description": "If you need to give `hint` parameter when introspecting a channel token, you can use this parameter to specify the value of such parameter. By default, a `hint` isn't sent with channel token introspection.", + "items": { + "required": [], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns a channel token in one of the keys (or claims) in the introspection results (`JSON`), the plugin can use that value instead of the introspection results when doing expiry verification and signing of the new token issued by Kong.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_leeway": { + "default": 0, + "description": "You can use this parameter to adjust clock skew between the token issuer introspection results and Kong. The value will be added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time (in seconds). You can disable channel token introspection `expiry` verification altogether with `config.verify_channel_token_introspection_expiry`.", + "type": "number" + }, + "channel_token_introspection_scopes_claim": { + "default": [ + "scope" + ], + "description": "Use this parameter to specify the claim/property in channel token introspection results (`JSON`) to be verified against values of `config.channel_token_introspection_scopes_required`. This supports nested claims.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_scopes_required": { + "description": "Use this parameter to specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.channel_token_introspection_scopes_claim`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on channel token introspection.", + "type": "number" + }, + "channel_token_issuer": { + "default": "kong", + "description": "The `iss` claim of the re-signed channel token is set to this value, which is `kong` by default. The original `iss` claim of the incoming token (possibly introspected) is stored in the `original_iss` claim of the newly signed channel token.", + "type": "string" + }, + "channel_token_jwks_uri": { + "description": "If you want to use `config.verify_channel_token_signature`, you must specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the channel token. If you don't specify a URI and you pass a JWT token to the plugin, then the plugin responds with `401 Unauthorized`.", + "type": "string" + }, + "channel_token_jwks_uri_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "channel_token_jwks_uri_client_password": { + "description": "The client password that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_username`\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_jwks_uri_client_username": { + "description": "The client username that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_jwks_uri_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_jwks_uri`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "channel_token_keyset": { + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "type": "string" + }, + "channel_token_keyset_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `channel_token_keyset` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "channel_token_keyset_client_password": { + "description": "The client password that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_username`\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_keyset_client_username": { + "description": "The client username that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_keyset_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_keyset`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "channel_token_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value will be added to token's `exp` claim before checking token expiry against Kong servers current time in seconds. You can disable channel token `expiry` verification altogether with `config.verify_channel_token_expiry`.", + "type": "number" + }, + "channel_token_optional": { + "default": false, + "description": "If a channel token is not provided or no `config.channel_token_request_header` is specified, the plugin cannot verify the channel token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Enable this parameter to allow the request to proceed even when there is no channel token to check. If the channel token is provided, then this parameter has no effect", + "type": "boolean" + }, + "channel_token_request_header": { + "description": "This parameter tells the name of the header where to look for the channel token. If you don't want to do anything with the channel token, then you can set this to `null` or `\"\"` (empty string).", + "type": "string" + }, + "channel_token_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim in a channel token to verify against values of `config.channel_token_scopes_required`. This supports nested claims.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "channel_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.channel_token_scopes_claim`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "channel_token_signing_algorithm": { + "default": "RS256", + "description": "When this plugin sets the upstream header as specified with `config.channel_token_upstream_header`, it also re-signs the original channel token using private keys of this plugin. Specify the algorithm that is used to sign the token.", + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS512" + ], + "type": "string" + }, + "channel_token_upstream_header": { + "description": "This plugin removes the `config.channel_token_request_header` from the request after reading its value.", + "type": "string" + }, + "channel_token_upstream_leeway": { + "default": 0, + "description": "If you want to add or perhaps subtract (using negative value) expiry time of the original channel token, you can specify a value that is added to the original channel token's `exp` claim.", + "type": "number" + }, + "enable_access_token_introspection": { + "default": true, + "description": "If you don't want to support opaque access tokens, change this configuration parameter to `false` to disable introspection.", + "type": "boolean" + }, + "enable_channel_token_introspection": { + "default": true, + "description": "If you don't want to support opaque channel tokens, disable introspection by changing this configuration parameter to `false`.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Tokens signed with HMAC algorithms such as `HS256`, `HS384`, or `HS512` are not accepted by default. If you need to accept such tokens for verification, enable this setting.", + "type": "boolean" + }, + "enable_instrumentation": { + "default": false, + "description": "Writes log entries with some added information using `ngx.CRIT` (CRITICAL) level.", + "type": "boolean" + }, + "original_access_token_upstream_header": { + "description": "The HTTP header name used to store the original access token.", + "type": "string" + }, + "original_channel_token_upstream_header": { + "description": "The HTTP header name used to store the original channel token.", + "type": "string" + }, + "realm": { + "description": "When authentication or authorization fails, or there is an unexpected error, the plugin sends an `WWW-Authenticate` header with the `realm` attribute value.", + "type": "string" + }, + "remove_access_token_claims": { + "default": [], + "description": "remove claims. It should be an array, and each element is a claim key string.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "remove_channel_token_claims": { + "default": [], + "description": "remove claims. It should be an array, and each element is a claim key string.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "set_access_token_claims": { + "additionalProperties": true, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "set_channel_token_claims": { + "additionalProperties": true, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "set_claims": { + "additionalProperties": true, + "description": "Set customized claims to both tokens. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "trust_access_token_introspection": { + "default": true, + "description": "Use this parameter to enable and disable further checks on a payload before the new token is signed. If you set this to `true`, the expiry or scopes are not checked on a payload.", + "type": "boolean" + }, + "trust_channel_token_introspection": { + "default": true, + "description": "Providing an opaque channel token for plugin introspection, and verifying expiry and scopes on introspection results may make further payload checks unnecessary before the plugin signs a new token. This also applies when using a JWT token with introspection JSON as per config.channel_token_introspection_jwt_claim. Use this parameter to manage additional payload checks before signing a new token. With true (default), payload's expiry or scopes aren't checked.", + "type": "boolean" + }, + "verify_access_token_expiry": { + "default": true, + "description": "Quickly turn access token expiry verification off and on as needed.", + "type": "boolean" + }, + "verify_access_token_introspection_expiry": { + "default": true, + "description": "Quickly turn access token introspection expiry verification off and on as needed.", + "type": "boolean" + }, + "verify_access_token_introspection_scopes": { + "default": true, + "description": "Quickly turn off and on the access token introspection scopes verification, specified with `config.access_token_introspection_scopes_required`.", + "type": "boolean" + }, + "verify_access_token_scopes": { + "default": true, + "description": "Quickly turn off and on the access token required scopes verification, specified with `config.access_token_scopes_required`.", + "type": "boolean" + }, + "verify_access_token_signature": { + "default": true, + "description": "Quickly turn access token signature verification off and on as needed.", + "type": "boolean" + }, + "verify_channel_token_expiry": { + "default": true, + "type": "boolean" + }, + "verify_channel_token_introspection_expiry": { + "default": true, + "description": "Quickly turn on/off the channel token introspection expiry verification.", + "type": "boolean" + }, + "verify_channel_token_introspection_scopes": { + "default": true, + "description": "Quickly turn on/off the channel token introspection scopes verification specified with `config.channel_token_introspection_scopes_required`.", + "type": "boolean" + }, + "verify_channel_token_scopes": { + "default": true, + "description": "Quickly turn on/off the channel token required scopes verification specified with `config.channel_token_scopes_required`.", + "type": "boolean" + }, + "verify_channel_token_signature": { + "default": true, + "description": "Quickly turn on/off the channel token signature verification.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/jwt-signer/3.4.json b/json_schemas/jwt-signer/3.4.json new file mode 100644 index 00000000..349b7097 --- /dev/null +++ b/json_schemas/jwt-signer/3.4.json @@ -0,0 +1,577 @@ +{ + "properties": { + "config": { + "properties": { + "access_token_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to apply an access token to a Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of alues. Valid values are `id`, `username`, and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (for example, `sub` or `username`) in an access token to Kong consumer entity.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_authorization": { + "description": "If the introspection endpoint requires client authentication (client being the JWT Signer plugin), you can specify the `Authorization` header's value with this configuration parameter.", + "type": "string" + }, + "access_token_introspection_body_args": { + "description": "This parameter allows you to pass URL encoded request body arguments. For example: `resource=` or `a=1&b=&c`.", + "type": "string" + }, + "access_token_introspection_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do access token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in access token introspection results to the Kong consumer entity.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter.", + "type": "string" + }, + "access_token_introspection_hint": { + "default": "access_token", + "description": "If you need to give `hint` parameter when introspecting an access token, use this parameter to specify the value. By default, the plugin sends `hint=access_token`.", + "type": "string" + }, + "access_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns an access token in one of the keys (or claims) within the introspection results (`JSON`). If the key cannot be found, the plugin responds with `401 Unauthorized`. Also if the key is found but cannot be decoded as JWT, it also responds with `401 Unauthorized`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer introspection results and Kong. The value is added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time in seconds. You can disable access token introspection `expiry` verification altogether with `config.verify_access_token_introspection_expiry`.", + "type": "number" + }, + "access_token_introspection_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim/property in access token introspection results (`JSON`) to be verified against values of `config.access_token_introspection_scopes_required`. This supports nested claims. For example, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`, hich can be given as `realm_access,roles` (form post). If the claim is not found in access token introspection results, and you have specified `config.access_token_introspection_scopes_required`, the plugin responds with `403 Forbidden`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.access_token_introspection_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on access token introspection.", + "type": "number" + }, + "access_token_issuer": { + "default": "kong", + "description": "The `iss` claim of a signed or re-signed access token is set to this value. Original `iss` claim of the incoming token (possibly introspected) is stored in `original_iss` claim of the newly signed access token.", + "type": "string" + }, + "access_token_jwks_uri": { + "description": "Specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the access token.", + "type": "string" + }, + "access_token_keyset": { + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "type": "string" + }, + "access_token_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value is added to the token's `exp` claim before checking token expiry against Kong servers' current time in seconds. You can disable access token `expiry` verification altogether with `config.verify_access_token_expiry`.", + "type": "number" + }, + "access_token_optional": { + "default": false, + "description": "If an access token is not provided or no `config.access_token_request_header` is specified, the plugin cannot verify the access token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Use this parameter to allow the request to proceed even when there is no token to check. If the token is provided, then this parameter has no effect", + "type": "boolean" + }, + "access_token_request_header": { + "default": "Authorization", + "description": "This parameter tells the name of the header where to look for the access token.", + "type": "string" + }, + "access_token_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim in an access token to verify against values of `config.access_token_scopes_required`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.access_token_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_signing_algorithm": { + "default": "RS256", + "description": "When this plugin sets the upstream header as specified with `config.access_token_upstream_header`, re-signs the original access token using the private keys of the JWT Signer plugin. Specify the algorithm that is used to sign the token. The `config.access_token_issuer` specifies which `keyset` is used to sign the new token issued by Kong using the specified signing algorithm.", + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS512" + ], + "type": "string" + }, + "access_token_upstream_header": { + "default": "Authorization:Bearer", + "description": "Removes the `config.access_token_request_header` from the request after reading its value. With `config.access_token_upstream_header`, you can specify the upstream header where the plugin adds the Kong signed token. If you don't specify a value, such as use `null` or `\"\"` (empty string), the plugin does not even try to sign or re-sign the token.", + "type": "string" + }, + "access_token_upstream_leeway": { + "default": 0, + "description": "If you want to add or subtract (using a negative value) expiry time (in seconds) of the original access token, you can specify a value that is added to the original access token's `exp` claim.", + "type": "number" + }, + "add_claims": { + "additionalProperties": true, + "description": "Add customized claims if they are not present yet.", + "type": "object" + }, + "cache_access_token_introspection": { + "default": true, + "description": "Whether to cache access token introspection results.", + "type": "boolean" + }, + "cache_channel_token_introspection": { + "default": true, + "description": "Whether to cache channel token introspection results.", + "type": "boolean" + }, + "channel_token_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do channel token to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of valid values: `id`, `username`, and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter. Kong consumers have an `id`, a `username`, and a `custom_id`. If this parameter is enabled but the mapping fails, such as when there's a non-existent Kong consumer, the plugin responds with `403 Forbidden`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_authorization": { + "description": "When using `opaque` channel tokens, and you want to turn on channel token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise the plugin will not try introspection, and instead returns `401 Unauthorized` when using opaque channel tokens.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_body_args": { + "description": "If you need to pass additional body arguments to introspection endpoint when the plugin introspects the opaque channel token, you can use this config parameter to specify them. You should URL encode the value. For example: `resource=` or `a=1&b=&c`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do channel token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values. Valid values are `id`, `username` and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in channel token introspection results to Kong consumer entity", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise, the plugin does not try introspection and returns `401 Unauthorized` instead.", + "type": "string" + }, + "channel_token_introspection_hint": { + "description": "If you need to give `hint` parameter when introspecting a channel token, you can use this parameter to specify the value of such parameter. By default, a `hint` isn't sent with channel token introspection.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns a channel token in one of the keys (or claims) in the introspection results (`JSON`), the plugin can use that value instead of the introspection results when doing expiry verification and signing of the new token issued by Kong.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_leeway": { + "default": 0, + "description": "You can use this parameter to adjust clock skew between the token issuer introspection results and Kong. The value will be added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time (in seconds). You can disable channel token introspection `expiry` verification altogether with `config.verify_channel_token_introspection_expiry`.", + "type": "number" + }, + "channel_token_introspection_scopes_claim": { + "default": [ + "scope" + ], + "description": "Use this parameter to specify the claim/property in channel token introspection results (`JSON`) to be verified against values of `config.channel_token_introspection_scopes_required`. This supports nested claims.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_scopes_required": { + "description": "Use this parameter to specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.channel_token_introspection_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on channel token introspection.", + "type": "number" + }, + "channel_token_issuer": { + "default": "kong", + "description": "The `iss` claim of the re-signed channel token is set to this value, which is `kong` by default. The original `iss` claim of the incoming token (possibly introspected) is stored in the `original_iss` claim of the newly signed channel token.", + "type": "string" + }, + "channel_token_jwks_uri": { + "description": "If you want to use `config.verify_channel_token_signature`, you must specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the channel token. If you don't specify a URI and you pass a JWT token to the plugin, then the plugin responds with `401 Unauthorized`.", + "type": "string" + }, + "channel_token_keyset": { + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "type": "string" + }, + "channel_token_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value will be added to token's `exp` claim before checking token expiry against Kong servers current time in seconds. You can disable channel token `expiry` verification altogether with `config.verify_channel_token_expiry`.", + "type": "number" + }, + "channel_token_optional": { + "default": false, + "description": "If a channel token is not provided or no `config.channel_token_request_header` is specified, the plugin cannot verify the channel token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Enable this parameter to allow the request to proceed even when there is no channel token to check. If the channel token is provided, then this parameter has no effect", + "type": "boolean" + }, + "channel_token_request_header": { + "description": "This parameter tells the name of the header where to look for the channel token. If you don't want to do anything with the channel token, then you can set this to `null` or `\"\"` (empty string).", + "type": "string" + }, + "channel_token_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim in a channel token to verify against values of `config.channel_token_scopes_required`. This supports nested claims.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.channel_token_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_signing_algorithm": { + "default": "RS256", + "description": "When this plugin sets the upstream header as specified with `config.channel_token_upstream_header`, it also re-signs the original channel token using private keys of this plugin. Specify the algorithm that is used to sign the token.", + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS512" + ], + "type": "string" + }, + "channel_token_upstream_header": { + "description": "This plugin removes the `config.channel_token_request_header` from the request after reading its value.", + "type": "string" + }, + "channel_token_upstream_leeway": { + "default": 0, + "description": "If you want to add or perhaps subtract (using negative value) expiry time of the original channel token, you can specify a value that is added to the original channel token's `exp` claim.", + "type": "number" + }, + "enable_access_token_introspection": { + "default": true, + "description": "If you don't want to support opaque access tokens, change this configuration parameter to `false` to disable introspection.", + "type": "boolean" + }, + "enable_channel_token_introspection": { + "default": true, + "description": "If you don't want to support opaque channel tokens, disable introspection by changing this configuration parameter to `false`.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Tokens signed with HMAC algorithms such as `HS256`, `HS384`, or `HS512` are not accepted by default. If you need to accept such tokens for verification, enable this setting.", + "type": "boolean" + }, + "enable_instrumentation": { + "default": false, + "description": "Writes log entries with some added information using `ngx.CRIT` (CRITICAL) level.", + "type": "boolean" + }, + "realm": { + "description": "When authentication or authorization fails, or there is an unexpected error, the plugin sends an `WWW-Authenticate` header with the `realm` attribute value.", + "type": "string" + }, + "set_claims": { + "additionalProperties": true, + "description": "Set customized claims. If a claim is already present, it will be overwritten.", + "type": "object" + }, + "trust_access_token_introspection": { + "default": true, + "description": "Use this parameter to enable and disable further checks on a payload before the new token is signed. If you set this to `true`, the expiry or scopes are not checked on a payload.", + "type": "boolean" + }, + "trust_channel_token_introspection": { + "default": true, + "description": "Providing an opaque channel token for plugin introspection, and verifying expiry and scopes on introspection results may make further payload checks unnecessary before the plugin signs a new token. This also applies when using a JWT token with introspection JSON as per config.channel_token_introspection_jwt_claim. Use this parameter to manage additional payload checks before signing a new token. With true (default), payload's expiry or scopes aren't checked.", + "type": "boolean" + }, + "verify_access_token_expiry": { + "default": true, + "description": "Quickly turn access token expiry verification off and on as needed.", + "type": "boolean" + }, + "verify_access_token_introspection_expiry": { + "default": true, + "description": "Quickly turn access token introspection expiry verification off and on as needed.", + "type": "boolean" + }, + "verify_access_token_introspection_scopes": { + "default": true, + "description": "Quickly turn off and on the access token introspection scopes verification, specified with `config.access_token_introspection_scopes_required`.", + "type": "boolean" + }, + "verify_access_token_scopes": { + "default": true, + "description": "Quickly turn off and on the access token required scopes verification, specified with `config.access_token_scopes_required`.", + "type": "boolean" + }, + "verify_access_token_signature": { + "default": true, + "description": "Quickly turn access token signature verification off and on as needed.", + "type": "boolean" + }, + "verify_channel_token_expiry": { + "default": true, + "type": "boolean" + }, + "verify_channel_token_introspection_expiry": { + "default": true, + "description": "Quickly turn on/off the channel token introspection expiry verification.", + "type": "boolean" + }, + "verify_channel_token_introspection_scopes": { + "default": true, + "description": "Quickly turn on/off the channel token introspection scopes verification specified with `config.channel_token_introspection_scopes_required`.", + "type": "boolean" + }, + "verify_channel_token_scopes": { + "default": true, + "description": "Quickly turn on/off the channel token required scopes verification specified with `config.channel_token_scopes_required`.", + "type": "boolean" + }, + "verify_channel_token_signature": { + "default": true, + "description": "Quickly turn on/off the channel token signature verification.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/jwt-signer/3.7.json b/json_schemas/jwt-signer/3.7.json new file mode 100644 index 00000000..c151d0ca --- /dev/null +++ b/json_schemas/jwt-signer/3.7.json @@ -0,0 +1,699 @@ +{ + "properties": { + "config": { + "properties": { + "access_token_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to apply an access token to a Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of alues. Valid values are `id`, `username`, and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (for example, `sub` or `username`) in an access token to Kong consumer entity.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_authorization": { + "description": "If the introspection endpoint requires client authentication (client being the JWT Signer plugin), you can specify the `Authorization` header's value with this configuration parameter.", + "type": "string" + }, + "access_token_introspection_body_args": { + "description": "This parameter allows you to pass URL encoded request body arguments. For example: `resource=` or `a=1&b=&c`.", + "type": "string" + }, + "access_token_introspection_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do access token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in access token introspection results to the Kong consumer entity.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter.", + "type": "string" + }, + "access_token_introspection_hint": { + "default": "access_token", + "description": "If you need to give `hint` parameter when introspecting an access token, use this parameter to specify the value. By default, the plugin sends `hint=access_token`.", + "type": "string" + }, + "access_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns an access token in one of the keys (or claims) within the introspection results (`JSON`). If the key cannot be found, the plugin responds with `401 Unauthorized`. Also if the key is found but cannot be decoded as JWT, it also responds with `401 Unauthorized`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer introspection results and Kong. The value is added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time in seconds. You can disable access token introspection `expiry` verification altogether with `config.verify_access_token_introspection_expiry`.", + "type": "number" + }, + "access_token_introspection_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim/property in access token introspection results (`JSON`) to be verified against values of `config.access_token_introspection_scopes_required`. This supports nested claims. For example, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`, hich can be given as `realm_access,roles` (form post). If the claim is not found in access token introspection results, and you have specified `config.access_token_introspection_scopes_required`, the plugin responds with `403 Forbidden`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.access_token_introspection_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on access token introspection.", + "type": "number" + }, + "access_token_issuer": { + "default": "kong", + "description": "The `iss` claim of a signed or re-signed access token is set to this value. Original `iss` claim of the incoming token (possibly introspected) is stored in `original_iss` claim of the newly signed access token.", + "type": "string" + }, + "access_token_jwks_uri": { + "description": "Specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the access token.", + "type": "string" + }, + "access_token_jwks_uri_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "access_token_jwks_uri_client_password": { + "description": "The client password that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_username`\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_jwks_uri_client_username": { + "description": "The client username that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_jwks_uri_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_jwks_uri`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "access_token_keyset": { + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "type": "string" + }, + "access_token_keyset_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_keyset` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "access_token_keyset_client_password": { + "description": "The client password that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_username`\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_keyset_client_username": { + "description": "The client username that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_keyset_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_keyset`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "access_token_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value is added to the token's `exp` claim before checking token expiry against Kong servers' current time in seconds. You can disable access token `expiry` verification altogether with `config.verify_access_token_expiry`.", + "type": "number" + }, + "access_token_optional": { + "default": false, + "description": "If an access token is not provided or no `config.access_token_request_header` is specified, the plugin cannot verify the access token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Use this parameter to allow the request to proceed even when there is no token to check. If the token is provided, then this parameter has no effect", + "type": "boolean" + }, + "access_token_request_header": { + "default": "Authorization", + "description": "This parameter tells the name of the header where to look for the access token.", + "type": "string" + }, + "access_token_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim in an access token to verify against values of `config.access_token_scopes_required`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.access_token_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_signing_algorithm": { + "default": "RS256", + "description": "When this plugin sets the upstream header as specified with `config.access_token_upstream_header`, re-signs the original access token using the private keys of the JWT Signer plugin. Specify the algorithm that is used to sign the token. The `config.access_token_issuer` specifies which `keyset` is used to sign the new token issued by Kong using the specified signing algorithm.", + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS512" + ], + "type": "string" + }, + "access_token_upstream_header": { + "default": "Authorization:Bearer", + "description": "Removes the `config.access_token_request_header` from the request after reading its value. With `config.access_token_upstream_header`, you can specify the upstream header where the plugin adds the Kong signed token. If you don't specify a value, such as use `null` or `\"\"` (empty string), the plugin does not even try to sign or re-sign the token.", + "type": "string" + }, + "access_token_upstream_leeway": { + "default": 0, + "description": "If you want to add or subtract (using a negative value) expiry time (in seconds) of the original access token, you can specify a value that is added to the original access token's `exp` claim.", + "type": "number" + }, + "add_access_token_claims": { + "additionalProperties": true, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "add_channel_token_claims": { + "additionalProperties": true, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "add_claims": { + "additionalProperties": true, + "description": "Add customized claims to both tokens if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "cache_access_token_introspection": { + "default": true, + "description": "Whether to cache access token introspection results.", + "type": "boolean" + }, + "cache_channel_token_introspection": { + "default": true, + "description": "Whether to cache channel token introspection results.", + "type": "boolean" + }, + "channel_token_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do channel token to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of valid values: `id`, `username`, and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter. Kong consumers have an `id`, a `username`, and a `custom_id`. If this parameter is enabled but the mapping fails, such as when there's a non-existent Kong consumer, the plugin responds with `403 Forbidden`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_authorization": { + "description": "When using `opaque` channel tokens, and you want to turn on channel token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise the plugin will not try introspection, and instead returns `401 Unauthorized` when using opaque channel tokens.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_body_args": { + "description": "If you need to pass additional body arguments to introspection endpoint when the plugin introspects the opaque channel token, you can use this config parameter to specify them. You should URL encode the value. For example: `resource=` or `a=1&b=&c`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do channel token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values. Valid values are `id`, `username` and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in channel token introspection results to Kong consumer entity", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise, the plugin does not try introspection and returns `401 Unauthorized` instead.", + "type": "string" + }, + "channel_token_introspection_hint": { + "description": "If you need to give `hint` parameter when introspecting a channel token, you can use this parameter to specify the value of such parameter. By default, a `hint` isn't sent with channel token introspection.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns a channel token in one of the keys (or claims) in the introspection results (`JSON`), the plugin can use that value instead of the introspection results when doing expiry verification and signing of the new token issued by Kong.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_leeway": { + "default": 0, + "description": "You can use this parameter to adjust clock skew between the token issuer introspection results and Kong. The value will be added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time (in seconds). You can disable channel token introspection `expiry` verification altogether with `config.verify_channel_token_introspection_expiry`.", + "type": "number" + }, + "channel_token_introspection_scopes_claim": { + "default": [ + "scope" + ], + "description": "Use this parameter to specify the claim/property in channel token introspection results (`JSON`) to be verified against values of `config.channel_token_introspection_scopes_required`. This supports nested claims.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_scopes_required": { + "description": "Use this parameter to specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.channel_token_introspection_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on channel token introspection.", + "type": "number" + }, + "channel_token_issuer": { + "default": "kong", + "description": "The `iss` claim of the re-signed channel token is set to this value, which is `kong` by default. The original `iss` claim of the incoming token (possibly introspected) is stored in the `original_iss` claim of the newly signed channel token.", + "type": "string" + }, + "channel_token_jwks_uri": { + "description": "If you want to use `config.verify_channel_token_signature`, you must specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the channel token. If you don't specify a URI and you pass a JWT token to the plugin, then the plugin responds with `401 Unauthorized`.", + "type": "string" + }, + "channel_token_jwks_uri_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "channel_token_jwks_uri_client_password": { + "description": "The client password that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_username`\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_jwks_uri_client_username": { + "description": "The client username that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_jwks_uri_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_jwks_uri`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "channel_token_keyset": { + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "type": "string" + }, + "channel_token_keyset_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `channel_token_keyset` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "channel_token_keyset_client_password": { + "description": "The client password that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_username`\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_keyset_client_username": { + "description": "The client username that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_keyset_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_keyset`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "channel_token_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value will be added to token's `exp` claim before checking token expiry against Kong servers current time in seconds. You can disable channel token `expiry` verification altogether with `config.verify_channel_token_expiry`.", + "type": "number" + }, + "channel_token_optional": { + "default": false, + "description": "If a channel token is not provided or no `config.channel_token_request_header` is specified, the plugin cannot verify the channel token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Enable this parameter to allow the request to proceed even when there is no channel token to check. If the channel token is provided, then this parameter has no effect", + "type": "boolean" + }, + "channel_token_request_header": { + "description": "This parameter tells the name of the header where to look for the channel token. If you don't want to do anything with the channel token, then you can set this to `null` or `\"\"` (empty string).", + "type": "string" + }, + "channel_token_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim in a channel token to verify against values of `config.channel_token_scopes_required`. This supports nested claims.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.channel_token_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_signing_algorithm": { + "default": "RS256", + "description": "When this plugin sets the upstream header as specified with `config.channel_token_upstream_header`, it also re-signs the original channel token using private keys of this plugin. Specify the algorithm that is used to sign the token.", + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS512" + ], + "type": "string" + }, + "channel_token_upstream_header": { + "description": "This plugin removes the `config.channel_token_request_header` from the request after reading its value.", + "type": "string" + }, + "channel_token_upstream_leeway": { + "default": 0, + "description": "If you want to add or perhaps subtract (using negative value) expiry time of the original channel token, you can specify a value that is added to the original channel token's `exp` claim.", + "type": "number" + }, + "enable_access_token_introspection": { + "default": true, + "description": "If you don't want to support opaque access tokens, change this configuration parameter to `false` to disable introspection.", + "type": "boolean" + }, + "enable_channel_token_introspection": { + "default": true, + "description": "If you don't want to support opaque channel tokens, disable introspection by changing this configuration parameter to `false`.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Tokens signed with HMAC algorithms such as `HS256`, `HS384`, or `HS512` are not accepted by default. If you need to accept such tokens for verification, enable this setting.", + "type": "boolean" + }, + "enable_instrumentation": { + "default": false, + "description": "Writes log entries with some added information using `ngx.CRIT` (CRITICAL) level.", + "type": "boolean" + }, + "original_access_token_upstream_header": { + "description": "The HTTP header name used to store the original access token.", + "type": "string" + }, + "original_channel_token_upstream_header": { + "description": "The HTTP header name used to store the original channel token.", + "type": "string" + }, + "realm": { + "description": "When authentication or authorization fails, or there is an unexpected error, the plugin sends an `WWW-Authenticate` header with the `realm` attribute value.", + "type": "string" + }, + "remove_access_token_claims": { + "default": [ + + ], + "description": "remove claims. It should be an array, and each element is a claim key string.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "remove_channel_token_claims": { + "default": [ + + ], + "description": "remove claims. It should be an array, and each element is a claim key string.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "set_access_token_claims": { + "additionalProperties": true, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "set_channel_token_claims": { + "additionalProperties": true, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "set_claims": { + "additionalProperties": true, + "description": "Set customized claims to both tokens. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "trust_access_token_introspection": { + "default": true, + "description": "Use this parameter to enable and disable further checks on a payload before the new token is signed. If you set this to `true`, the expiry or scopes are not checked on a payload.", + "type": "boolean" + }, + "trust_channel_token_introspection": { + "default": true, + "description": "Providing an opaque channel token for plugin introspection, and verifying expiry and scopes on introspection results may make further payload checks unnecessary before the plugin signs a new token. This also applies when using a JWT token with introspection JSON as per config.channel_token_introspection_jwt_claim. Use this parameter to manage additional payload checks before signing a new token. With true (default), payload's expiry or scopes aren't checked.", + "type": "boolean" + }, + "verify_access_token_expiry": { + "default": true, + "description": "Quickly turn access token expiry verification off and on as needed.", + "type": "boolean" + }, + "verify_access_token_introspection_expiry": { + "default": true, + "description": "Quickly turn access token introspection expiry verification off and on as needed.", + "type": "boolean" + }, + "verify_access_token_introspection_scopes": { + "default": true, + "description": "Quickly turn off and on the access token introspection scopes verification, specified with `config.access_token_introspection_scopes_required`.", + "type": "boolean" + }, + "verify_access_token_scopes": { + "default": true, + "description": "Quickly turn off and on the access token required scopes verification, specified with `config.access_token_scopes_required`.", + "type": "boolean" + }, + "verify_access_token_signature": { + "default": true, + "description": "Quickly turn access token signature verification off and on as needed.", + "type": "boolean" + }, + "verify_channel_token_expiry": { + "default": true, + "type": "boolean" + }, + "verify_channel_token_introspection_expiry": { + "default": true, + "description": "Quickly turn on/off the channel token introspection expiry verification.", + "type": "boolean" + }, + "verify_channel_token_introspection_scopes": { + "default": true, + "description": "Quickly turn on/off the channel token introspection scopes verification specified with `config.channel_token_introspection_scopes_required`.", + "type": "boolean" + }, + "verify_channel_token_scopes": { + "default": true, + "description": "Quickly turn on/off the channel token required scopes verification specified with `config.channel_token_scopes_required`.", + "type": "boolean" + }, + "verify_channel_token_signature": { + "default": true, + "description": "Quickly turn on/off the channel token signature verification.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/jwt-signer/3.8.json b/json_schemas/jwt-signer/3.8.json new file mode 100644 index 00000000..34d6a776 --- /dev/null +++ b/json_schemas/jwt-signer/3.8.json @@ -0,0 +1,699 @@ +{ + "properties": { + "config": { + "properties": { + "access_token_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to apply an access token to a Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of alues. Valid values are `id`, `username`, and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (for example, `sub` or `username`) in an access token to Kong consumer entity.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_authorization": { + "description": "If the introspection endpoint requires client authentication (client being the JWT Signer plugin), you can specify the `Authorization` header's value with this configuration parameter.", + "type": "string" + }, + "access_token_introspection_body_args": { + "description": "This parameter allows you to pass URL encoded request body arguments. For example: `resource=` or `a=1&b=&c`.", + "type": "string" + }, + "access_token_introspection_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do access token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in access token introspection results to the Kong consumer entity.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter.", + "type": "string" + }, + "access_token_introspection_hint": { + "default": "access_token", + "description": "If you need to give `hint` parameter when introspecting an access token, use this parameter to specify the value. By default, the plugin sends `hint=access_token`.", + "type": "string" + }, + "access_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns an access token in one of the keys (or claims) within the introspection results (`JSON`). If the key cannot be found, the plugin responds with `401 Unauthorized`. Also if the key is found but cannot be decoded as JWT, it also responds with `401 Unauthorized`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer introspection results and Kong. The value is added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time in seconds. You can disable access token introspection `expiry` verification altogether with `config.verify_access_token_introspection_expiry`.", + "type": "number" + }, + "access_token_introspection_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim/property in access token introspection results (`JSON`) to be verified against values of `config.access_token_introspection_scopes_required`. This supports nested claims. For example, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`, hich can be given as `realm_access,roles` (form post). If the claim is not found in access token introspection results, and you have specified `config.access_token_introspection_scopes_required`, the plugin responds with `403 Forbidden`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.access_token_introspection_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on access token introspection.", + "type": "number" + }, + "access_token_issuer": { + "default": "kong", + "description": "The `iss` claim of a signed or re-signed access token is set to this value. Original `iss` claim of the incoming token (possibly introspected) is stored in `original_iss` claim of the newly signed access token.", + "type": "string" + }, + "access_token_jwks_uri": { + "description": "Specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the access token.", + "type": "string" + }, + "access_token_jwks_uri_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "access_token_jwks_uri_client_password": { + "description": "The client password that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_username`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "access_token_jwks_uri_client_username": { + "description": "The client username that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_jwks_uri_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_jwks_uri`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "access_token_keyset": { + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "type": "string" + }, + "access_token_keyset_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_keyset` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "access_token_keyset_client_password": { + "description": "The client password that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_username`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "access_token_keyset_client_username": { + "description": "The client username that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_keyset_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_keyset`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "access_token_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value is added to the token's `exp` claim before checking token expiry against Kong servers' current time in seconds. You can disable access token `expiry` verification altogether with `config.verify_access_token_expiry`.", + "type": "number" + }, + "access_token_optional": { + "default": false, + "description": "If an access token is not provided or no `config.access_token_request_header` is specified, the plugin cannot verify the access token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Use this parameter to allow the request to proceed even when there is no token to check. If the token is provided, then this parameter has no effect", + "type": "boolean" + }, + "access_token_request_header": { + "default": "Authorization", + "description": "This parameter tells the name of the header where to look for the access token.", + "type": "string" + }, + "access_token_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim in an access token to verify against values of `config.access_token_scopes_required`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.access_token_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_signing_algorithm": { + "default": "RS256", + "description": "When this plugin sets the upstream header as specified with `config.access_token_upstream_header`, re-signs the original access token using the private keys of the JWT Signer plugin. Specify the algorithm that is used to sign the token. The `config.access_token_issuer` specifies which `keyset` is used to sign the new token issued by Kong using the specified signing algorithm.", + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS512" + ], + "type": "string" + }, + "access_token_upstream_header": { + "default": "Authorization:Bearer", + "description": "Removes the `config.access_token_request_header` from the request after reading its value. With `config.access_token_upstream_header`, you can specify the upstream header where the plugin adds the Kong signed token. If you don't specify a value, such as use `null` or `\"\"` (empty string), the plugin does not even try to sign or re-sign the token.", + "type": "string" + }, + "access_token_upstream_leeway": { + "default": 0, + "description": "If you want to add or subtract (using a negative value) expiry time (in seconds) of the original access token, you can specify a value that is added to the original access token's `exp` claim.", + "type": "number" + }, + "add_access_token_claims": { + "additionalProperties": true, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "add_channel_token_claims": { + "additionalProperties": true, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "add_claims": { + "additionalProperties": true, + "description": "Add customized claims to both tokens if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "cache_access_token_introspection": { + "default": true, + "description": "Whether to cache access token introspection results.", + "type": "boolean" + }, + "cache_channel_token_introspection": { + "default": true, + "description": "Whether to cache channel token introspection results.", + "type": "boolean" + }, + "channel_token_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do channel token to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of valid values: `id`, `username`, and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter. Kong consumers have an `id`, a `username`, and a `custom_id`. If this parameter is enabled but the mapping fails, such as when there's a non-existent Kong consumer, the plugin responds with `403 Forbidden`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_authorization": { + "description": "When using `opaque` channel tokens, and you want to turn on channel token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise the plugin will not try introspection, and instead returns `401 Unauthorized` when using opaque channel tokens.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_body_args": { + "description": "If you need to pass additional body arguments to introspection endpoint when the plugin introspects the opaque channel token, you can use this config parameter to specify them. You should URL encode the value. For example: `resource=` or `a=1&b=&c`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do channel token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values. Valid values are `id`, `username` and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in channel token introspection results to Kong consumer entity", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise, the plugin does not try introspection and returns `401 Unauthorized` instead.", + "type": "string" + }, + "channel_token_introspection_hint": { + "description": "If you need to give `hint` parameter when introspecting a channel token, you can use this parameter to specify the value of such parameter. By default, a `hint` isn't sent with channel token introspection.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns a channel token in one of the keys (or claims) in the introspection results (`JSON`), the plugin can use that value instead of the introspection results when doing expiry verification and signing of the new token issued by Kong.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_leeway": { + "default": 0, + "description": "You can use this parameter to adjust clock skew between the token issuer introspection results and Kong. The value will be added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time (in seconds). You can disable channel token introspection `expiry` verification altogether with `config.verify_channel_token_introspection_expiry`.", + "type": "number" + }, + "channel_token_introspection_scopes_claim": { + "default": [ + "scope" + ], + "description": "Use this parameter to specify the claim/property in channel token introspection results (`JSON`) to be verified against values of `config.channel_token_introspection_scopes_required`. This supports nested claims.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_scopes_required": { + "description": "Use this parameter to specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.channel_token_introspection_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on channel token introspection.", + "type": "number" + }, + "channel_token_issuer": { + "default": "kong", + "description": "The `iss` claim of the re-signed channel token is set to this value, which is `kong` by default. The original `iss` claim of the incoming token (possibly introspected) is stored in the `original_iss` claim of the newly signed channel token.", + "type": "string" + }, + "channel_token_jwks_uri": { + "description": "If you want to use `config.verify_channel_token_signature`, you must specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the channel token. If you don't specify a URI and you pass a JWT token to the plugin, then the plugin responds with `401 Unauthorized`.", + "type": "string" + }, + "channel_token_jwks_uri_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "channel_token_jwks_uri_client_password": { + "description": "The client password that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_username`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "channel_token_jwks_uri_client_username": { + "description": "The client username that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_jwks_uri_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_jwks_uri`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "channel_token_keyset": { + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "type": "string" + }, + "channel_token_keyset_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `channel_token_keyset` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "channel_token_keyset_client_password": { + "description": "The client password that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_username`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "channel_token_keyset_client_username": { + "description": "The client username that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_keyset_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_keyset`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "channel_token_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value will be added to token's `exp` claim before checking token expiry against Kong servers current time in seconds. You can disable channel token `expiry` verification altogether with `config.verify_channel_token_expiry`.", + "type": "number" + }, + "channel_token_optional": { + "default": false, + "description": "If a channel token is not provided or no `config.channel_token_request_header` is specified, the plugin cannot verify the channel token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Enable this parameter to allow the request to proceed even when there is no channel token to check. If the channel token is provided, then this parameter has no effect", + "type": "boolean" + }, + "channel_token_request_header": { + "description": "This parameter tells the name of the header where to look for the channel token. If you don't want to do anything with the channel token, then you can set this to `null` or `\"\"` (empty string).", + "type": "string" + }, + "channel_token_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim in a channel token to verify against values of `config.channel_token_scopes_required`. This supports nested claims.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.channel_token_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_signing_algorithm": { + "default": "RS256", + "description": "When this plugin sets the upstream header as specified with `config.channel_token_upstream_header`, it also re-signs the original channel token using private keys of this plugin. Specify the algorithm that is used to sign the token.", + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS512" + ], + "type": "string" + }, + "channel_token_upstream_header": { + "description": "This plugin removes the `config.channel_token_request_header` from the request after reading its value.", + "type": "string" + }, + "channel_token_upstream_leeway": { + "default": 0, + "description": "If you want to add or perhaps subtract (using negative value) expiry time of the original channel token, you can specify a value that is added to the original channel token's `exp` claim.", + "type": "number" + }, + "enable_access_token_introspection": { + "default": true, + "description": "If you don't want to support opaque access tokens, change this configuration parameter to `false` to disable introspection.", + "type": "boolean" + }, + "enable_channel_token_introspection": { + "default": true, + "description": "If you don't want to support opaque channel tokens, disable introspection by changing this configuration parameter to `false`.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Tokens signed with HMAC algorithms such as `HS256`, `HS384`, or `HS512` are not accepted by default. If you need to accept such tokens for verification, enable this setting.", + "type": "boolean" + }, + "enable_instrumentation": { + "default": false, + "description": "Writes log entries with some added information using `ngx.CRIT` (CRITICAL) level.", + "type": "boolean" + }, + "original_access_token_upstream_header": { + "description": "The HTTP header name used to store the original access token.", + "type": "string" + }, + "original_channel_token_upstream_header": { + "description": "The HTTP header name used to store the original channel token.", + "type": "string" + }, + "realm": { + "description": "When authentication or authorization fails, or there is an unexpected error, the plugin sends an `WWW-Authenticate` header with the `realm` attribute value.", + "type": "string" + }, + "remove_access_token_claims": { + "default": [ + + ], + "description": "remove claims. It should be an array, and each element is a claim key string.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "remove_channel_token_claims": { + "default": [ + + ], + "description": "remove claims. It should be an array, and each element is a claim key string.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "set_access_token_claims": { + "additionalProperties": true, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "set_channel_token_claims": { + "additionalProperties": true, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "set_claims": { + "additionalProperties": true, + "description": "Set customized claims to both tokens. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "trust_access_token_introspection": { + "default": true, + "description": "Use this parameter to enable and disable further checks on a payload before the new token is signed. If you set this to `true`, the expiry or scopes are not checked on a payload.", + "type": "boolean" + }, + "trust_channel_token_introspection": { + "default": true, + "description": "Providing an opaque channel token for plugin introspection, and verifying expiry and scopes on introspection results may make further payload checks unnecessary before the plugin signs a new token. This also applies when using a JWT token with introspection JSON as per config.channel_token_introspection_jwt_claim. Use this parameter to manage additional payload checks before signing a new token. With true (default), payload's expiry or scopes aren't checked.", + "type": "boolean" + }, + "verify_access_token_expiry": { + "default": true, + "description": "Quickly turn access token expiry verification off and on as needed.", + "type": "boolean" + }, + "verify_access_token_introspection_expiry": { + "default": true, + "description": "Quickly turn access token introspection expiry verification off and on as needed.", + "type": "boolean" + }, + "verify_access_token_introspection_scopes": { + "default": true, + "description": "Quickly turn off and on the access token introspection scopes verification, specified with `config.access_token_introspection_scopes_required`.", + "type": "boolean" + }, + "verify_access_token_scopes": { + "default": true, + "description": "Quickly turn off and on the access token required scopes verification, specified with `config.access_token_scopes_required`.", + "type": "boolean" + }, + "verify_access_token_signature": { + "default": true, + "description": "Quickly turn access token signature verification off and on as needed.", + "type": "boolean" + }, + "verify_channel_token_expiry": { + "default": true, + "type": "boolean" + }, + "verify_channel_token_introspection_expiry": { + "default": true, + "description": "Quickly turn on/off the channel token introspection expiry verification.", + "type": "boolean" + }, + "verify_channel_token_introspection_scopes": { + "default": true, + "description": "Quickly turn on/off the channel token introspection scopes verification specified with `config.channel_token_introspection_scopes_required`.", + "type": "boolean" + }, + "verify_channel_token_scopes": { + "default": true, + "description": "Quickly turn on/off the channel token required scopes verification specified with `config.channel_token_scopes_required`.", + "type": "boolean" + }, + "verify_channel_token_signature": { + "default": true, + "description": "Quickly turn on/off the channel token signature verification.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/jwt-signer/3.9.json b/json_schemas/jwt-signer/3.9.json new file mode 100644 index 00000000..c151d0ca --- /dev/null +++ b/json_schemas/jwt-signer/3.9.json @@ -0,0 +1,699 @@ +{ + "properties": { + "config": { + "properties": { + "access_token_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to apply an access token to a Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of alues. Valid values are `id`, `username`, and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (for example, `sub` or `username`) in an access token to Kong consumer entity.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_authorization": { + "description": "If the introspection endpoint requires client authentication (client being the JWT Signer plugin), you can specify the `Authorization` header's value with this configuration parameter.", + "type": "string" + }, + "access_token_introspection_body_args": { + "description": "This parameter allows you to pass URL encoded request body arguments. For example: `resource=` or `a=1&b=&c`.", + "type": "string" + }, + "access_token_introspection_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do access token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in access token introspection results to the Kong consumer entity.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter.", + "type": "string" + }, + "access_token_introspection_hint": { + "default": "access_token", + "description": "If you need to give `hint` parameter when introspecting an access token, use this parameter to specify the value. By default, the plugin sends `hint=access_token`.", + "type": "string" + }, + "access_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns an access token in one of the keys (or claims) within the introspection results (`JSON`). If the key cannot be found, the plugin responds with `401 Unauthorized`. Also if the key is found but cannot be decoded as JWT, it also responds with `401 Unauthorized`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer introspection results and Kong. The value is added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time in seconds. You can disable access token introspection `expiry` verification altogether with `config.verify_access_token_introspection_expiry`.", + "type": "number" + }, + "access_token_introspection_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim/property in access token introspection results (`JSON`) to be verified against values of `config.access_token_introspection_scopes_required`. This supports nested claims. For example, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`, hich can be given as `realm_access,roles` (form post). If the claim is not found in access token introspection results, and you have specified `config.access_token_introspection_scopes_required`, the plugin responds with `403 Forbidden`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.access_token_introspection_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on access token introspection.", + "type": "number" + }, + "access_token_issuer": { + "default": "kong", + "description": "The `iss` claim of a signed or re-signed access token is set to this value. Original `iss` claim of the incoming token (possibly introspected) is stored in `original_iss` claim of the newly signed access token.", + "type": "string" + }, + "access_token_jwks_uri": { + "description": "Specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the access token.", + "type": "string" + }, + "access_token_jwks_uri_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "access_token_jwks_uri_client_password": { + "description": "The client password that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_username`\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_jwks_uri_client_username": { + "description": "The client username that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_jwks_uri_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_jwks_uri`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "access_token_keyset": { + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "type": "string" + }, + "access_token_keyset_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_keyset` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "access_token_keyset_client_password": { + "description": "The client password that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_username`\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_keyset_client_username": { + "description": "The client username that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_keyset_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_keyset`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "access_token_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value is added to the token's `exp` claim before checking token expiry against Kong servers' current time in seconds. You can disable access token `expiry` verification altogether with `config.verify_access_token_expiry`.", + "type": "number" + }, + "access_token_optional": { + "default": false, + "description": "If an access token is not provided or no `config.access_token_request_header` is specified, the plugin cannot verify the access token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Use this parameter to allow the request to proceed even when there is no token to check. If the token is provided, then this parameter has no effect", + "type": "boolean" + }, + "access_token_request_header": { + "default": "Authorization", + "description": "This parameter tells the name of the header where to look for the access token.", + "type": "string" + }, + "access_token_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim in an access token to verify against values of `config.access_token_scopes_required`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.access_token_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "access_token_signing_algorithm": { + "default": "RS256", + "description": "When this plugin sets the upstream header as specified with `config.access_token_upstream_header`, re-signs the original access token using the private keys of the JWT Signer plugin. Specify the algorithm that is used to sign the token. The `config.access_token_issuer` specifies which `keyset` is used to sign the new token issued by Kong using the specified signing algorithm.", + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS512" + ], + "type": "string" + }, + "access_token_upstream_header": { + "default": "Authorization:Bearer", + "description": "Removes the `config.access_token_request_header` from the request after reading its value. With `config.access_token_upstream_header`, you can specify the upstream header where the plugin adds the Kong signed token. If you don't specify a value, such as use `null` or `\"\"` (empty string), the plugin does not even try to sign or re-sign the token.", + "type": "string" + }, + "access_token_upstream_leeway": { + "default": 0, + "description": "If you want to add or subtract (using a negative value) expiry time (in seconds) of the original access token, you can specify a value that is added to the original access token's `exp` claim.", + "type": "number" + }, + "add_access_token_claims": { + "additionalProperties": true, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "add_channel_token_claims": { + "additionalProperties": true, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "add_claims": { + "additionalProperties": true, + "description": "Add customized claims to both tokens if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "cache_access_token_introspection": { + "default": true, + "description": "Whether to cache access token introspection results.", + "type": "boolean" + }, + "cache_channel_token_introspection": { + "default": true, + "description": "Whether to cache channel token introspection results.", + "type": "boolean" + }, + "channel_token_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do channel token to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of valid values: `id`, `username`, and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter. Kong consumers have an `id`, a `username`, and a `custom_id`. If this parameter is enabled but the mapping fails, such as when there's a non-existent Kong consumer, the plugin responds with `403 Forbidden`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_authorization": { + "description": "When using `opaque` channel tokens, and you want to turn on channel token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise the plugin will not try introspection, and instead returns `401 Unauthorized` when using opaque channel tokens.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_body_args": { + "description": "If you need to pass additional body arguments to introspection endpoint when the plugin introspects the opaque channel token, you can use this config parameter to specify them. You should URL encode the value. For example: `resource=` or `a=1&b=&c`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "When the plugin tries to do channel token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values. Valid values are `id`, `username` and `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in channel token introspection results to Kong consumer entity", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise, the plugin does not try introspection and returns `401 Unauthorized` instead.", + "type": "string" + }, + "channel_token_introspection_hint": { + "description": "If you need to give `hint` parameter when introspecting a channel token, you can use this parameter to specify the value of such parameter. By default, a `hint` isn't sent with channel token introspection.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "channel_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns a channel token in one of the keys (or claims) in the introspection results (`JSON`), the plugin can use that value instead of the introspection results when doing expiry verification and signing of the new token issued by Kong.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_leeway": { + "default": 0, + "description": "You can use this parameter to adjust clock skew between the token issuer introspection results and Kong. The value will be added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time (in seconds). You can disable channel token introspection `expiry` verification altogether with `config.verify_channel_token_introspection_expiry`.", + "type": "number" + }, + "channel_token_introspection_scopes_claim": { + "default": [ + "scope" + ], + "description": "Use this parameter to specify the claim/property in channel token introspection results (`JSON`) to be verified against values of `config.channel_token_introspection_scopes_required`. This supports nested claims.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_scopes_required": { + "description": "Use this parameter to specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.channel_token_introspection_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on channel token introspection.", + "type": "number" + }, + "channel_token_issuer": { + "default": "kong", + "description": "The `iss` claim of the re-signed channel token is set to this value, which is `kong` by default. The original `iss` claim of the incoming token (possibly introspected) is stored in the `original_iss` claim of the newly signed channel token.", + "type": "string" + }, + "channel_token_jwks_uri": { + "description": "If you want to use `config.verify_channel_token_signature`, you must specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the channel token. If you don't specify a URI and you pass a JWT token to the plugin, then the plugin responds with `401 Unauthorized`.", + "type": "string" + }, + "channel_token_jwks_uri_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "channel_token_jwks_uri_client_password": { + "description": "The client password that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_username`\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_jwks_uri_client_username": { + "description": "The client username that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_jwks_uri_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_jwks_uri`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "channel_token_keyset": { + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "type": "string" + }, + "channel_token_keyset_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `channel_token_keyset` is an https uri that requires mTLS Auth.", + "type": "string" + }, + "channel_token_keyset_client_password": { + "description": "The client password that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_username`\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_keyset_client_username": { + "description": "The client username that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_password`\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "channel_token_keyset_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_keyset`. The default value 0 means no auto-rotation.", + "type": "number" + }, + "channel_token_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value will be added to token's `exp` claim before checking token expiry against Kong servers current time in seconds. You can disable channel token `expiry` verification altogether with `config.verify_channel_token_expiry`.", + "type": "number" + }, + "channel_token_optional": { + "default": false, + "description": "If a channel token is not provided or no `config.channel_token_request_header` is specified, the plugin cannot verify the channel token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Enable this parameter to allow the request to proceed even when there is no channel token to check. If the channel token is provided, then this parameter has no effect", + "type": "boolean" + }, + "channel_token_request_header": { + "description": "This parameter tells the name of the header where to look for the channel token. If you don't want to do anything with the channel token, then you can set this to `null` or `\"\"` (empty string).", + "type": "string" + }, + "channel_token_scopes_claim": { + "default": [ + "scope" + ], + "description": "Specify the claim in a channel token to verify against values of `config.channel_token_scopes_required`. This supports nested claims.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.channel_token_scopes_claim`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "channel_token_signing_algorithm": { + "default": "RS256", + "description": "When this plugin sets the upstream header as specified with `config.channel_token_upstream_header`, it also re-signs the original channel token using private keys of this plugin. Specify the algorithm that is used to sign the token.", + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS512" + ], + "type": "string" + }, + "channel_token_upstream_header": { + "description": "This plugin removes the `config.channel_token_request_header` from the request after reading its value.", + "type": "string" + }, + "channel_token_upstream_leeway": { + "default": 0, + "description": "If you want to add or perhaps subtract (using negative value) expiry time of the original channel token, you can specify a value that is added to the original channel token's `exp` claim.", + "type": "number" + }, + "enable_access_token_introspection": { + "default": true, + "description": "If you don't want to support opaque access tokens, change this configuration parameter to `false` to disable introspection.", + "type": "boolean" + }, + "enable_channel_token_introspection": { + "default": true, + "description": "If you don't want to support opaque channel tokens, disable introspection by changing this configuration parameter to `false`.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Tokens signed with HMAC algorithms such as `HS256`, `HS384`, or `HS512` are not accepted by default. If you need to accept such tokens for verification, enable this setting.", + "type": "boolean" + }, + "enable_instrumentation": { + "default": false, + "description": "Writes log entries with some added information using `ngx.CRIT` (CRITICAL) level.", + "type": "boolean" + }, + "original_access_token_upstream_header": { + "description": "The HTTP header name used to store the original access token.", + "type": "string" + }, + "original_channel_token_upstream_header": { + "description": "The HTTP header name used to store the original channel token.", + "type": "string" + }, + "realm": { + "description": "When authentication or authorization fails, or there is an unexpected error, the plugin sends an `WWW-Authenticate` header with the `realm` attribute value.", + "type": "string" + }, + "remove_access_token_claims": { + "default": [ + + ], + "description": "remove claims. It should be an array, and each element is a claim key string.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "remove_channel_token_claims": { + "default": [ + + ], + "description": "remove claims. It should be an array, and each element is a claim key string.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "set_access_token_claims": { + "additionalProperties": true, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "set_channel_token_claims": { + "additionalProperties": true, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "set_claims": { + "additionalProperties": true, + "description": "Set customized claims to both tokens. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "type": "object" + }, + "trust_access_token_introspection": { + "default": true, + "description": "Use this parameter to enable and disable further checks on a payload before the new token is signed. If you set this to `true`, the expiry or scopes are not checked on a payload.", + "type": "boolean" + }, + "trust_channel_token_introspection": { + "default": true, + "description": "Providing an opaque channel token for plugin introspection, and verifying expiry and scopes on introspection results may make further payload checks unnecessary before the plugin signs a new token. This also applies when using a JWT token with introspection JSON as per config.channel_token_introspection_jwt_claim. Use this parameter to manage additional payload checks before signing a new token. With true (default), payload's expiry or scopes aren't checked.", + "type": "boolean" + }, + "verify_access_token_expiry": { + "default": true, + "description": "Quickly turn access token expiry verification off and on as needed.", + "type": "boolean" + }, + "verify_access_token_introspection_expiry": { + "default": true, + "description": "Quickly turn access token introspection expiry verification off and on as needed.", + "type": "boolean" + }, + "verify_access_token_introspection_scopes": { + "default": true, + "description": "Quickly turn off and on the access token introspection scopes verification, specified with `config.access_token_introspection_scopes_required`.", + "type": "boolean" + }, + "verify_access_token_scopes": { + "default": true, + "description": "Quickly turn off and on the access token required scopes verification, specified with `config.access_token_scopes_required`.", + "type": "boolean" + }, + "verify_access_token_signature": { + "default": true, + "description": "Quickly turn access token signature verification off and on as needed.", + "type": "boolean" + }, + "verify_channel_token_expiry": { + "default": true, + "type": "boolean" + }, + "verify_channel_token_introspection_expiry": { + "default": true, + "description": "Quickly turn on/off the channel token introspection expiry verification.", + "type": "boolean" + }, + "verify_channel_token_introspection_scopes": { + "default": true, + "description": "Quickly turn on/off the channel token introspection scopes verification specified with `config.channel_token_introspection_scopes_required`.", + "type": "boolean" + }, + "verify_channel_token_scopes": { + "default": true, + "description": "Quickly turn on/off the channel token required scopes verification specified with `config.channel_token_scopes_required`.", + "type": "boolean" + }, + "verify_channel_token_signature": { + "default": true, + "description": "Quickly turn on/off the channel token signature verification.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/jwt/2.8.json b/json_schemas/jwt/2.8.json new file mode 100644 index 00000000..110152b2 --- /dev/null +++ b/json_schemas/jwt/2.8.json @@ -0,0 +1,160 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID) value to use as an anonymous consumer if authentication fails.\nIf empty (default), the request will fail with an authentication failure `4xx`. Note that this value\nmust refer to the consumer `id` attribute that is internal to Kong Gateway, and **not** its `custom_id`.", + "type": "string" + }, + "claims_to_verify": { + "description": "A list of registered claims (according to [RFC 7519](https://tools.ietf.org/html/rfc7519)) that Kong can verify as well. Accepted values: one of `exp` or `nbf`.", + "items": { + "enum": [ + "exp", + "nbf" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "cookie_names": { + "default": [ + + ], + "description": "A list of cookie names that Kong will inspect to retrieve JWTs.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_names": { + "default": [ + "authorization" + ], + "description": "A list of HTTP header names that Kong will inspect to retrieve JWTs.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "key_claim_name": { + "default": "iss", + "description": "The name of the claim in which the `key` identifying the secret **must** be passed. Starting with version `0.13.1`, the plugin will attempt to read this claim from the JWT payload and the header, in that order.", + "type": "string" + }, + "maximum_expiration": { + "default": 0, + "description": "A value between 0 and 31536000 (365 days) limiting the lifetime of the JWT to `maximum_expiration` seconds in the future. Any JWT that has a longer lifetime is rejected (HTTP 403). If this value is specified, `exp` must be specified as well in the `claims_to_verify` property. The default value of `0` represents an indefinite period. Potential clock skew should be considered when configuring this setting.", + "maximum": 31536000, + "minimum": 0, + "type": "number" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + }, + "secret_is_base64": { + "default": false, + "description": "If true, the plugin assumes the credential's `secret` to be base64 encoded. You will need to create a base64-encoded secret for your Consumer, and sign your JWT with the original secret.", + "type": "boolean" + }, + "uri_param_names": { + "default": [ + "jwt" + ], + "description": "A list of querystring parameters that Kong will inspect to retrieve JWTs.", + "examples": [ + [ + "paramName_2.2.x" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/jwt/3.10.json b/json_schemas/jwt/3.10.json new file mode 100644 index 00000000..6a6338ce --- /dev/null +++ b/json_schemas/jwt/3.10.json @@ -0,0 +1,146 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "claims_to_verify": { + "description": "A list of registered claims (according to RFC 7519) that Kong can verify as well. Accepted values: one of exp or nbf.", + "items": { + "enum": [ + "exp", + "nbf" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "cookie_names": { + "default": [ + + ], + "description": "A list of cookie names that Kong will inspect to retrieve JWTs.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_names": { + "default": [ + "authorization" + ], + "description": "A list of HTTP header names that Kong will inspect to retrieve JWTs.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "key_claim_name": { + "default": "iss", + "description": "The name of the claim in which the key identifying the secret must be passed. The plugin will attempt to read this claim from the JWT payload and the header, in that order.", + "type": "string" + }, + "maximum_expiration": { + "default": 0, + "description": "A value between 0 and 31536000 (365 days) limiting the lifetime of the JWT to maximum_expiration seconds in the future.", + "maximum": 31536000, + "minimum": 0, + "type": "number" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONS preflight requests. If set to false, then OPTIONS requests will always be allowed.", + "type": "boolean" + }, + "secret_is_base64": { + "default": false, + "description": "If true, the plugin assumes the credential’s secret to be base64 encoded. You will need to create a base64-encoded secret for your Consumer, and sign your JWT with the original secret.", + "type": "boolean" + }, + "uri_param_names": { + "default": [ + "jwt" + ], + "description": "A list of querystring parameters that Kong will inspect to retrieve JWTs.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/jwt/3.11.json b/json_schemas/jwt/3.11.json new file mode 100644 index 00000000..256f1af8 --- /dev/null +++ b/json_schemas/jwt/3.11.json @@ -0,0 +1,126 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "claims_to_verify": { + "description": "A list of registered claims (according to RFC 7519) that Kong can verify as well. Accepted values: one of exp or nbf.", + "items": { + "enum": [ + "exp", + "nbf" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "cookie_names": { + "default": [], + "description": "A list of cookie names that Kong will inspect to retrieve JWTs.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "header_names": { + "default": [ + "authorization" + ], + "description": "A list of HTTP header names that Kong will inspect to retrieve JWTs.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "key_claim_name": { + "default": "iss", + "description": "The name of the claim in which the key identifying the secret must be passed. The plugin will attempt to read this claim from the JWT payload and the header, in that order.", + "type": "string" + }, + "maximum_expiration": { + "default": 0, + "description": "A value between 0 and 31536000 (365 days) limiting the lifetime of the JWT to maximum_expiration seconds in the future.", + "maximum": 31536000, + "minimum": 0, + "type": "number" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONS preflight requests. If set to false, then OPTIONS requests will always be allowed.", + "type": "boolean" + }, + "secret_is_base64": { + "default": false, + "description": "If true, the plugin assumes the credential’s secret to be base64 encoded. You will need to create a base64-encoded secret for your Consumer, and sign your JWT with the original secret.", + "type": "boolean" + }, + "uri_param_names": { + "default": [ + "jwt" + ], + "description": "A list of querystring parameters that Kong will inspect to retrieve JWTs.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/jwt/3.12.json b/json_schemas/jwt/3.12.json new file mode 100644 index 00000000..256f1af8 --- /dev/null +++ b/json_schemas/jwt/3.12.json @@ -0,0 +1,126 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "claims_to_verify": { + "description": "A list of registered claims (according to RFC 7519) that Kong can verify as well. Accepted values: one of exp or nbf.", + "items": { + "enum": [ + "exp", + "nbf" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "cookie_names": { + "default": [], + "description": "A list of cookie names that Kong will inspect to retrieve JWTs.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "header_names": { + "default": [ + "authorization" + ], + "description": "A list of HTTP header names that Kong will inspect to retrieve JWTs.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "key_claim_name": { + "default": "iss", + "description": "The name of the claim in which the key identifying the secret must be passed. The plugin will attempt to read this claim from the JWT payload and the header, in that order.", + "type": "string" + }, + "maximum_expiration": { + "default": 0, + "description": "A value between 0 and 31536000 (365 days) limiting the lifetime of the JWT to maximum_expiration seconds in the future.", + "maximum": 31536000, + "minimum": 0, + "type": "number" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONS preflight requests. If set to false, then OPTIONS requests will always be allowed.", + "type": "boolean" + }, + "secret_is_base64": { + "default": false, + "description": "If true, the plugin assumes the credential’s secret to be base64 encoded. You will need to create a base64-encoded secret for your Consumer, and sign your JWT with the original secret.", + "type": "boolean" + }, + "uri_param_names": { + "default": [ + "jwt" + ], + "description": "A list of querystring parameters that Kong will inspect to retrieve JWTs.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/jwt/3.4.json b/json_schemas/jwt/3.4.json new file mode 100644 index 00000000..0353cf17 --- /dev/null +++ b/json_schemas/jwt/3.4.json @@ -0,0 +1,142 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "claims_to_verify": { + "description": "A list of registered claims (according to RFC 7519) that Kong can verify as well. Accepted values: one of exp or nbf.", + "items": { + "enum": [ + "exp", + "nbf" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "cookie_names": { + "default": [ + + ], + "description": "A list of cookie names that Kong will inspect to retrieve JWTs.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_names": { + "default": [ + "authorization" + ], + "description": "A list of HTTP header names that Kong will inspect to retrieve JWTs.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "key_claim_name": { + "default": "iss", + "description": "The name of the claim in which the key identifying the secret must be passed. The plugin will attempt to read this claim from the JWT payload and the header, in that order.", + "type": "string" + }, + "maximum_expiration": { + "default": 0, + "description": "A value between 0 and 31536000 (365 days) limiting the lifetime of the JWT to maximum_expiration seconds in the future.", + "maximum": 31536000, + "minimum": 0, + "type": "number" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONS preflight requests. If set to false, then OPTIONS requests will always be allowed.", + "type": "boolean" + }, + "secret_is_base64": { + "default": false, + "description": "If true, the plugin assumes the credential’s secret to be base64 encoded. You will need to create a base64-encoded secret for your Consumer, and sign your JWT with the original secret.", + "type": "boolean" + }, + "uri_param_names": { + "default": [ + "jwt" + ], + "description": "A list of querystring parameters that Kong will inspect to retrieve JWTs.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/jwt/3.7.json b/json_schemas/jwt/3.7.json new file mode 100644 index 00000000..0353cf17 --- /dev/null +++ b/json_schemas/jwt/3.7.json @@ -0,0 +1,142 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "claims_to_verify": { + "description": "A list of registered claims (according to RFC 7519) that Kong can verify as well. Accepted values: one of exp or nbf.", + "items": { + "enum": [ + "exp", + "nbf" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "cookie_names": { + "default": [ + + ], + "description": "A list of cookie names that Kong will inspect to retrieve JWTs.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_names": { + "default": [ + "authorization" + ], + "description": "A list of HTTP header names that Kong will inspect to retrieve JWTs.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "key_claim_name": { + "default": "iss", + "description": "The name of the claim in which the key identifying the secret must be passed. The plugin will attempt to read this claim from the JWT payload and the header, in that order.", + "type": "string" + }, + "maximum_expiration": { + "default": 0, + "description": "A value between 0 and 31536000 (365 days) limiting the lifetime of the JWT to maximum_expiration seconds in the future.", + "maximum": 31536000, + "minimum": 0, + "type": "number" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONS preflight requests. If set to false, then OPTIONS requests will always be allowed.", + "type": "boolean" + }, + "secret_is_base64": { + "default": false, + "description": "If true, the plugin assumes the credential’s secret to be base64 encoded. You will need to create a base64-encoded secret for your Consumer, and sign your JWT with the original secret.", + "type": "boolean" + }, + "uri_param_names": { + "default": [ + "jwt" + ], + "description": "A list of querystring parameters that Kong will inspect to retrieve JWTs.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/jwt/3.8.json b/json_schemas/jwt/3.8.json new file mode 100644 index 00000000..6a6338ce --- /dev/null +++ b/json_schemas/jwt/3.8.json @@ -0,0 +1,146 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "claims_to_verify": { + "description": "A list of registered claims (according to RFC 7519) that Kong can verify as well. Accepted values: one of exp or nbf.", + "items": { + "enum": [ + "exp", + "nbf" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "cookie_names": { + "default": [ + + ], + "description": "A list of cookie names that Kong will inspect to retrieve JWTs.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_names": { + "default": [ + "authorization" + ], + "description": "A list of HTTP header names that Kong will inspect to retrieve JWTs.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "key_claim_name": { + "default": "iss", + "description": "The name of the claim in which the key identifying the secret must be passed. The plugin will attempt to read this claim from the JWT payload and the header, in that order.", + "type": "string" + }, + "maximum_expiration": { + "default": 0, + "description": "A value between 0 and 31536000 (365 days) limiting the lifetime of the JWT to maximum_expiration seconds in the future.", + "maximum": 31536000, + "minimum": 0, + "type": "number" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONS preflight requests. If set to false, then OPTIONS requests will always be allowed.", + "type": "boolean" + }, + "secret_is_base64": { + "default": false, + "description": "If true, the plugin assumes the credential’s secret to be base64 encoded. You will need to create a base64-encoded secret for your Consumer, and sign your JWT with the original secret.", + "type": "boolean" + }, + "uri_param_names": { + "default": [ + "jwt" + ], + "description": "A list of querystring parameters that Kong will inspect to retrieve JWTs.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/jwt/3.9.json b/json_schemas/jwt/3.9.json new file mode 100644 index 00000000..6a6338ce --- /dev/null +++ b/json_schemas/jwt/3.9.json @@ -0,0 +1,146 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "claims_to_verify": { + "description": "A list of registered claims (according to RFC 7519) that Kong can verify as well. Accepted values: one of exp or nbf.", + "items": { + "enum": [ + "exp", + "nbf" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "cookie_names": { + "default": [ + + ], + "description": "A list of cookie names that Kong will inspect to retrieve JWTs.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_names": { + "default": [ + "authorization" + ], + "description": "A list of HTTP header names that Kong will inspect to retrieve JWTs.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "key_claim_name": { + "default": "iss", + "description": "The name of the claim in which the key identifying the secret must be passed. The plugin will attempt to read this claim from the JWT payload and the header, in that order.", + "type": "string" + }, + "maximum_expiration": { + "default": 0, + "description": "A value between 0 and 31536000 (365 days) limiting the lifetime of the JWT to maximum_expiration seconds in the future.", + "maximum": 31536000, + "minimum": 0, + "type": "number" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONS preflight requests. If set to false, then OPTIONS requests will always be allowed.", + "type": "boolean" + }, + "secret_is_base64": { + "default": false, + "description": "If true, the plugin assumes the credential’s secret to be base64 encoded. You will need to create a base64-encoded secret for your Consumer, and sign your JWT with the original secret.", + "type": "boolean" + }, + "uri_param_names": { + "default": [ + "jwt" + ], + "description": "A list of querystring parameters that Kong will inspect to retrieve JWTs.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/kafka-consume/3.10.json b/json_schemas/kafka-consume/3.10.json new file mode 100644 index 00000000..ea60bb4f --- /dev/null +++ b/json_schemas/kafka-consume/3.10.json @@ -0,0 +1,213 @@ +{ + "properties": { + "config": { + "properties": { + "authentication": { + "properties": { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN` or `SCRAM-SHA-256`.", + "enum": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string" + }, + "password": { + "description": "Password for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "enum": [ + "sasl" + ], + "type": "string" + }, + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication", + "type": "boolean" + }, + "user": { + "description": "Username for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "auto_offset_reset": { + "default": "latest", + "description": "The offset to start from when there is no initial offset in the consumer group.", + "enum": [ + "earliest", + "latest" + ], + "type": "string" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster.", + "type": "string" + }, + "commit_strategy": { + "default": "auto", + "description": "The strategy to use for committing offsets.", + "enum": [ + "auto", + "off" + ], + "type": "string" + }, + "message_deserializer": { + "default": "noop", + "description": "The deserializer to use for the consumed messages.", + "enum": [ + "json", + "noop" + ], + "type": "string" + }, + "mode": { + "default": "http-get", + "description": "The mode of operation for the plugin.", + "enum": [ + "http-get", + "server-sent-events" + ], + "type": "string" + }, + "security": { + "properties": { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true + }, + "ssl": { + "description": "Enables TLS.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "topics": { + "description": "The Kafka topics and their configuration you want to consume from.", + "items": { + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + } + }, + "required": [ + "bootstrap_servers", + "topics" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/kafka-consume/3.11.json b/json_schemas/kafka-consume/3.11.json new file mode 100644 index 00000000..aa2aac5f --- /dev/null +++ b/json_schemas/kafka-consume/3.11.json @@ -0,0 +1,327 @@ +{ + "properties": { + "config": { + "properties": { + "authentication": { + "properties": { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN` or `SCRAM-SHA-256`.", + "enum": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string" + }, + "password": { + "description": "Password for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "enum": [ + "sasl" + ], + "type": "string" + }, + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication", + "type": "boolean" + }, + "user": { + "description": "Username for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "auto_offset_reset": { + "default": "latest", + "description": "The offset to start from when there is no initial offset in the consumer group.", + "enum": [ + "earliest", + "latest" + ], + "type": "string" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster.", + "type": "string" + }, + "commit_strategy": { + "default": "auto", + "description": "The strategy to use for committing offsets.", + "enum": [ + "auto", + "off" + ], + "type": "string" + }, + "message_deserializer": { + "default": "noop", + "description": "The deserializer to use for the consumed messages.", + "enum": [ + "json", + "noop" + ], + "type": "string" + }, + "mode": { + "default": "http-get", + "description": "The mode of operation for the plugin.", + "enum": [ + "http-get", + "server-sent-events", + "websocket" + ], + "type": "string" + }, + "schema_registry": { + "description": "The plugin-global schema registry configuration.", + "properties": { + "confluent": { + "properties": { + "authentication": { + "properties": { + "basic": { + "properties": { + "password": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "username": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + "password", + "username" + ], + "type": "object" + }, + "mode": { + "default": "none", + "description": "Authentication mode to use with the schema registry.", + "enum": [ + "basic", + "none" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "ssl_verify": { + "default": true, + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "type": "boolean" + }, + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "url": { + "description": "The URL of the schema registry.", + "type": "string" + } + }, + "required": [ + "authentication" + ], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "security": { + "properties": { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true + }, + "ssl": { + "description": "Enables TLS.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "topics": { + "description": "The Kafka topics and their configuration you want to consume from.", + "items": { + "properties": { + "name": { + "type": "string" + }, + "schema_registry": { + "description": "The plugin-global schema registry configuration.", + "properties": { + "confluent": { + "properties": { + "authentication": { + "properties": { + "basic": { + "properties": { + "password": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "username": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + "password", + "username" + ], + "type": "object" + }, + "mode": { + "default": "none", + "description": "Authentication mode to use with the schema registry.", + "enum": [ + "basic", + "none" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "ssl_verify": { + "default": true, + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "type": "boolean" + }, + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "url": { + "description": "The URL of the schema registry.", + "type": "string" + } + }, + "required": [ + "authentication" + ], + "type": "object" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "name", + "schema_registry" + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + } + }, + "required": [ + "bootstrap_servers", + "topics" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/kafka-consume/3.12.json b/json_schemas/kafka-consume/3.12.json new file mode 100644 index 00000000..11fdd8ae --- /dev/null +++ b/json_schemas/kafka-consume/3.12.json @@ -0,0 +1,327 @@ +{ + "properties": { + "config": { + "properties": { + "authentication": { + "properties": { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN` or `SCRAM-SHA-256`.", + "enum": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string" + }, + "password": { + "description": "Password for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "enum": [ + "sasl" + ], + "type": "string" + }, + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication", + "type": "boolean" + }, + "user": { + "description": "Username for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "auto_offset_reset": { + "default": "latest", + "description": "The offset to start from when there is no initial offset in the consumer group.", + "enum": [ + "earliest", + "latest" + ], + "type": "string" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster.", + "type": "string" + }, + "commit_strategy": { + "default": "auto", + "description": "The strategy to use for committing offsets.", + "enum": [ + "auto", + "off" + ], + "type": "string" + }, + "message_deserializer": { + "default": "noop", + "description": "The deserializer to use for the consumed messages.", + "enum": [ + "json", + "noop" + ], + "type": "string" + }, + "mode": { + "default": "http-get", + "description": "The mode of operation for the plugin.", + "enum": [ + "http-get", + "server-sent-events", + "websocket" + ], + "type": "string" + }, + "schema_registry": { + "description": "The plugin-global schema registry configuration.", + "properties": { + "confluent": { + "properties": { + "authentication": { + "properties": { + "basic": { + "properties": { + "password": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "username": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + "password", + "username" + ], + "type": "object" + }, + "mode": { + "default": "none", + "description": "Authentication mode to use with the schema registry.", + "enum": [ + "basic", + "none" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "ssl_verify": { + "default": true, + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "type": "boolean" + }, + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "url": { + "description": "The URL of the schema registry.", + "type": "string" + } + }, + "required": [ + "authentication" + ], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "security": { + "properties": { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true + }, + "ssl": { + "description": "Enables TLS.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "topics": { + "description": "The Kafka topics and their configuration you want to consume from.", + "items": { + "properties": { + "name": { + "type": "string" + }, + "schema_registry": { + "description": "The plugin-global schema registry configuration.", + "properties": { + "confluent": { + "properties": { + "authentication": { + "properties": { + "basic": { + "properties": { + "password": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "username": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + "password", + "username" + ], + "type": "object" + }, + "mode": { + "default": "none", + "description": "Authentication mode to use with the schema registry.", + "enum": [ + "basic", + "none" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "ssl_verify": { + "default": true, + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "type": "boolean" + }, + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "url": { + "description": "The URL of the schema registry.", + "type": "string" + } + }, + "required": [ + "authentication" + ], + "type": "object" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "name", + "schema_registry" + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + } + }, + "required": [ + "bootstrap_servers", + "topics" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/kafka-log/2.8.json b/json_schemas/kafka-log/2.8.json new file mode 100644 index 00000000..d33a4ece --- /dev/null +++ b/json_schemas/kafka-log/2.8.json @@ -0,0 +1,237 @@ +{ + "properties": { + "config": { + "properties": { + "authentication": { + "properties": { + "mechanism": { + "description": "The SASL authentication mechanism.\n\nSupported options: `PLAIN` or `SCRAM-SHA-256`.", + "enum": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string" + }, + "password": { + "description": "Password for SASL authentication.", + "type": "string" + }, + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "enum": [ + "sasl" + ], + "type": "string" + }, + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication", + "type": "boolean" + }, + "user": { + "description": "Username for SASL authentication.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "type": "string" + }, + "port": { + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a\nrandom string. You can also set your own custom cluster identifier.\n\nIf more than one Kafka plugin is configured without a `cluster_name`\n(that is, if the default autogenerated value is removed),\nthese plugins will use the same producer, and by extension, the same\ncluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "keepalive": { + "default": 60000, + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before\nconsidering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the\nleader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single Produce request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds", + "type": "integer" + }, + "security": { + "properties": { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true + }, + "ssl": { + "description": "Enables TLS.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The Kafka topic to publish to.", + "examples": [ + "TOPIC" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/kafka-log/3.10.json b/json_schemas/kafka-log/3.10.json new file mode 100644 index 00000000..0c4c4f81 --- /dev/null +++ b/json_schemas/kafka-log/3.10.json @@ -0,0 +1,232 @@ +{ + "properties": { + "config": { + "properties": { + "authentication": { + "properties": { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256` or `SCRAM-SHA-512`.", + "enum": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string" + }, + "password": { + "description": "Password for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "enum": [ + "sasl" + ], + "type": "string" + }, + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication", + "type": "boolean" + }, + "user": { + "description": "Username for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "keepalive": { + "default": 60000, + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single Produce request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds", + "type": "integer" + }, + "security": { + "properties": { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true + }, + "ssl": { + "description": "Enables TLS.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The Kafka topic to publish to.", + "type": "string" + } + }, + "required": [ + "topic" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/kafka-log/3.11.json b/json_schemas/kafka-log/3.11.json new file mode 100644 index 00000000..c9e666ae --- /dev/null +++ b/json_schemas/kafka-log/3.11.json @@ -0,0 +1,326 @@ +{ + "properties": { + "config": { + "properties": { + "authentication": { + "properties": { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256` or `SCRAM-SHA-512`.", + "enum": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string" + }, + "password": { + "description": "Password for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "enum": [ + "sasl" + ], + "type": "string" + }, + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication", + "type": "boolean" + }, + "user": { + "description": "Username for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "keepalive": { + "default": 60000, + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "key_query_arg": { + "description": "The request query parameter name that contains the Kafka message key. If specified, messages with the same key will be sent to the same Kafka partition, ensuring consistent ordering.", + "type": "string" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single Produce request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds", + "type": "integer" + }, + "schema_registry": { + "description": "The plugin-global schema registry configuration. This can be overwritten by the topic configuration.", + "properties": { + "confluent": { + "properties": { + "authentication": { + "properties": { + "basic": { + "properties": { + "password": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "username": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + "password", + "username" + ], + "type": "object" + }, + "mode": { + "default": "none", + "description": "Authentication mode to use with the schema registry.", + "enum": [ + "basic", + "none" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "key_schema": { + "properties": { + "schema_version": { + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "match_any": { + "patterns": [ + "^[0-9]+$", + "^latest$" + ] + }, + "type": "string" + }, + "subject_name": { + "description": "The name of the subject", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "ssl_verify": { + "default": true, + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "type": "boolean" + }, + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "url": { + "description": "The URL of the schema registry.", + "type": "string" + }, + "value_schema": { + "properties": { + "schema_version": { + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "match_any": { + "patterns": [ + "^[0-9]+$", + "^latest$" + ] + }, + "type": "string" + }, + "subject_name": { + "description": "The name of the subject", + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "authentication" + ], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "security": { + "properties": { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true + }, + "ssl": { + "description": "Enables TLS.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The Kafka topic to publish to.", + "type": "string" + } + }, + "required": [ + "topic" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/kafka-log/3.12.json b/json_schemas/kafka-log/3.12.json new file mode 100644 index 00000000..e1121c3f --- /dev/null +++ b/json_schemas/kafka-log/3.12.json @@ -0,0 +1,326 @@ +{ + "properties": { + "config": { + "properties": { + "authentication": { + "properties": { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256` or `SCRAM-SHA-512`.", + "enum": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string" + }, + "password": { + "description": "Password for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "enum": [ + "sasl" + ], + "type": "string" + }, + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication", + "type": "boolean" + }, + "user": { + "description": "Username for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "keepalive": { + "default": 60000, + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "key_query_arg": { + "description": "The request query parameter name that contains the Kafka message key. If specified, messages with the same key will be sent to the same Kafka partition, ensuring consistent ordering.", + "type": "string" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single Produce request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds", + "type": "integer" + }, + "schema_registry": { + "description": "The plugin-global schema registry configuration. This can be overwritten by the topic configuration.", + "properties": { + "confluent": { + "properties": { + "authentication": { + "properties": { + "basic": { + "properties": { + "password": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "username": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + "password", + "username" + ], + "type": "object" + }, + "mode": { + "default": "none", + "description": "Authentication mode to use with the schema registry.", + "enum": [ + "basic", + "none" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "key_schema": { + "properties": { + "schema_version": { + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "match_any": { + "patterns": [ + "^[0-9]+$", + "^latest$" + ] + }, + "type": "string" + }, + "subject_name": { + "description": "The name of the subject", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "ssl_verify": { + "default": true, + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "type": "boolean" + }, + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "url": { + "description": "The URL of the schema registry.", + "type": "string" + }, + "value_schema": { + "properties": { + "schema_version": { + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "match_any": { + "patterns": [ + "^[0-9]+$", + "^latest$" + ] + }, + "type": "string" + }, + "subject_name": { + "description": "The name of the subject", + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "authentication" + ], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "security": { + "properties": { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true + }, + "ssl": { + "description": "Enables TLS.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The Kafka topic to publish to.", + "type": "string" + } + }, + "required": [ + "topic" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/kafka-log/3.4.json b/json_schemas/kafka-log/3.4.json new file mode 100644 index 00000000..c522f5eb --- /dev/null +++ b/json_schemas/kafka-log/3.4.json @@ -0,0 +1,232 @@ +{ + "properties": { + "config": { + "properties": { + "authentication": { + "properties": { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN` or `SCRAM-SHA-256`.", + "enum": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string" + }, + "password": { + "description": "Password for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "enum": [ + "sasl" + ], + "type": "string" + }, + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication", + "type": "boolean" + }, + "user": { + "description": "Username for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "keepalive": { + "default": 60000, + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single Produce request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds", + "type": "integer" + }, + "security": { + "properties": { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true + }, + "ssl": { + "description": "Enables TLS.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The Kafka topic to publish to.", + "type": "string" + } + }, + "required": [ + "topic" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/kafka-log/3.7.json b/json_schemas/kafka-log/3.7.json new file mode 100644 index 00000000..c522f5eb --- /dev/null +++ b/json_schemas/kafka-log/3.7.json @@ -0,0 +1,232 @@ +{ + "properties": { + "config": { + "properties": { + "authentication": { + "properties": { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN` or `SCRAM-SHA-256`.", + "enum": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string" + }, + "password": { + "description": "Password for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "enum": [ + "sasl" + ], + "type": "string" + }, + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication", + "type": "boolean" + }, + "user": { + "description": "Username for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "keepalive": { + "default": 60000, + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single Produce request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds", + "type": "integer" + }, + "security": { + "properties": { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true + }, + "ssl": { + "description": "Enables TLS.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The Kafka topic to publish to.", + "type": "string" + } + }, + "required": [ + "topic" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/kafka-log/3.8.json b/json_schemas/kafka-log/3.8.json new file mode 100644 index 00000000..c522f5eb --- /dev/null +++ b/json_schemas/kafka-log/3.8.json @@ -0,0 +1,232 @@ +{ + "properties": { + "config": { + "properties": { + "authentication": { + "properties": { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN` or `SCRAM-SHA-256`.", + "enum": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string" + }, + "password": { + "description": "Password for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "enum": [ + "sasl" + ], + "type": "string" + }, + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication", + "type": "boolean" + }, + "user": { + "description": "Username for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "keepalive": { + "default": 60000, + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single Produce request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds", + "type": "integer" + }, + "security": { + "properties": { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true + }, + "ssl": { + "description": "Enables TLS.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The Kafka topic to publish to.", + "type": "string" + } + }, + "required": [ + "topic" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/kafka-log/3.9.json b/json_schemas/kafka-log/3.9.json new file mode 100644 index 00000000..c522f5eb --- /dev/null +++ b/json_schemas/kafka-log/3.9.json @@ -0,0 +1,232 @@ +{ + "properties": { + "config": { + "properties": { + "authentication": { + "properties": { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN` or `SCRAM-SHA-256`.", + "enum": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string" + }, + "password": { + "description": "Password for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "enum": [ + "sasl" + ], + "type": "string" + }, + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication", + "type": "boolean" + }, + "user": { + "description": "Username for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "keepalive": { + "default": 60000, + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single Produce request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds", + "type": "integer" + }, + "security": { + "properties": { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true + }, + "ssl": { + "description": "Enables TLS.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The Kafka topic to publish to.", + "type": "string" + } + }, + "required": [ + "topic" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/kafka-upstream/2.8.json b/json_schemas/kafka-upstream/2.8.json new file mode 100644 index 00000000..886d69af --- /dev/null +++ b/json_schemas/kafka-upstream/2.8.json @@ -0,0 +1,258 @@ +{ + "properties": { + "config": { + "properties": { + "authentication": { + "properties": { + "mechanism": { + "description": "The SASL authentication mechanism.\n\nSupported options: `PLAIN`, `SCRAM-SHA-256`, or `SCRAM-SHA-512`.", + "enum": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string" + }, + "password": { + "description": "Password for SASL authentication.", + "type": "string" + }, + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "enum": [ + "sasl" + ], + "type": "string" + }, + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication.", + "type": "boolean" + }, + "user": { + "description": "Username for SASL authentication.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "type": "string" + }, + "port": { + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a\nrandom string. You can also set your own custom cluster identifier.\n\nIf more than one Kafka plugin is configured without a `cluster_name`\n(that is, if the default autogenerated value is removed),\nthese plugins will use the same producer, and by extension, the same\ncluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "forward_body": { + "default": true, + "description": "Include the request body in the message. At least one of these must be true:\n`forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_headers": { + "default": false, + "description": "Include the request headers in the message. At least one of these must be true:\n`forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_method": { + "default": false, + "description": "Include the request method in the message. At least one of these must be true:\n`forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_uri": { + "default": false, + "description": "Include the request URI and URI arguments (as in, query arguments) in the message.\nAt least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`,\n`forward_body`.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before\nconsidering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the\nleader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single Produce request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer" + }, + "security": { + "properties": { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true + }, + "ssl": { + "description": "Enables TLS.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The Kafka topic to publish to.", + "examples": [ + "TOPIC" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/kafka-upstream/3.10.json b/json_schemas/kafka-upstream/3.10.json new file mode 100644 index 00000000..5509f1e2 --- /dev/null +++ b/json_schemas/kafka-upstream/3.10.json @@ -0,0 +1,268 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_topics": { + "description": "The list of allowed topic names to which messages can be sent. The default topic configured in the `topic` field is always allowed, regardless of its inclusion in `allowed_topics`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authentication": { + "properties": { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256`, or `SCRAM-SHA-512`.", + "enum": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string" + }, + "password": { + "description": "Password for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "enum": [ + "sasl" + ], + "type": "string" + }, + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication.", + "type": "boolean" + }, + "user": { + "description": "Username for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "forward_body": { + "default": true, + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_headers": { + "default": false, + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_method": { + "default": false, + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_uri": { + "default": false, + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "message_by_lua_functions": { + "description": "The Lua functions that manipulates the message being sent to the Kafka topic.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single producer request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer" + }, + "security": { + "properties": { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true + }, + "ssl": { + "description": "Enables TLS.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The default Kafka topic to publish to if the query parameter defined in the `topics_query_arg` does not exist in the request", + "type": "string" + }, + "topics_query_arg": { + "description": "The request query parameter name that contains the topics to publish to", + "type": "string" + } + }, + "required": [ + "topic" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/kafka-upstream/3.11.json b/json_schemas/kafka-upstream/3.11.json new file mode 100644 index 00000000..bb6b7069 --- /dev/null +++ b/json_schemas/kafka-upstream/3.11.json @@ -0,0 +1,358 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_topics": { + "description": "The list of allowed topic names to which messages can be sent. The default topic configured in the `topic` field is always allowed, regardless of its inclusion in `allowed_topics`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "authentication": { + "properties": { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256`, or `SCRAM-SHA-512`.", + "enum": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string" + }, + "password": { + "description": "Password for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "enum": [ + "sasl" + ], + "type": "string" + }, + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication.", + "type": "boolean" + }, + "user": { + "description": "Username for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "forward_body": { + "default": true, + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_headers": { + "default": false, + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_method": { + "default": false, + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_uri": { + "default": false, + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "key_query_arg": { + "description": "The request query parameter name that contains the Kafka message key. If specified, messages with the same key will be sent to the same Kafka partition, ensuring consistent ordering.", + "type": "string" + }, + "message_by_lua_functions": { + "description": "The Lua functions that manipulates the message being sent to the Kafka topic.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single producer request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer" + }, + "schema_registry": { + "description": "The plugin-global schema registry configuration. This can be overwritten by the topic configuration.", + "properties": { + "confluent": { + "properties": { + "authentication": { + "properties": { + "basic": { + "properties": { + "password": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "username": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + "password", + "username" + ], + "type": "object" + }, + "mode": { + "default": "none", + "description": "Authentication mode to use with the schema registry.", + "enum": [ + "basic", + "none" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "key_schema": { + "properties": { + "schema_version": { + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "match_any": { + "patterns": [ + "^[0-9]+$", + "^latest$" + ] + }, + "type": "string" + }, + "subject_name": { + "description": "The name of the subject", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "ssl_verify": { + "default": true, + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "type": "boolean" + }, + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "url": { + "description": "The URL of the schema registry.", + "type": "string" + }, + "value_schema": { + "properties": { + "schema_version": { + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "match_any": { + "patterns": [ + "^[0-9]+$", + "^latest$" + ] + }, + "type": "string" + }, + "subject_name": { + "description": "The name of the subject", + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "authentication" + ], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "security": { + "properties": { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true + }, + "ssl": { + "description": "Enables TLS.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The default Kafka topic to publish to if the query parameter defined in the `topics_query_arg` does not exist in the request", + "type": "string" + }, + "topics_query_arg": { + "description": "The request query parameter name that contains the topics to publish to", + "type": "string" + } + }, + "required": [ + "topic" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/kafka-upstream/3.12.json b/json_schemas/kafka-upstream/3.12.json new file mode 100644 index 00000000..dcdff454 --- /dev/null +++ b/json_schemas/kafka-upstream/3.12.json @@ -0,0 +1,358 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_topics": { + "description": "The list of allowed topic names to which messages can be sent. The default topic configured in the `topic` field is always allowed, regardless of its inclusion in `allowed_topics`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "authentication": { + "properties": { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256`, or `SCRAM-SHA-512`.", + "enum": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string" + }, + "password": { + "description": "Password for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "enum": [ + "sasl" + ], + "type": "string" + }, + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication.", + "type": "boolean" + }, + "user": { + "description": "Username for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "forward_body": { + "default": true, + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_headers": { + "default": false, + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_method": { + "default": false, + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_uri": { + "default": false, + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "key_query_arg": { + "description": "The request query parameter name that contains the Kafka message key. If specified, messages with the same key will be sent to the same Kafka partition, ensuring consistent ordering.", + "type": "string" + }, + "message_by_lua_functions": { + "description": "The Lua functions that manipulates the message being sent to the Kafka topic.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single producer request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer" + }, + "schema_registry": { + "description": "The plugin-global schema registry configuration. This can be overwritten by the topic configuration.", + "properties": { + "confluent": { + "properties": { + "authentication": { + "properties": { + "basic": { + "properties": { + "password": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "username": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + "password", + "username" + ], + "type": "object" + }, + "mode": { + "default": "none", + "description": "Authentication mode to use with the schema registry.", + "enum": [ + "basic", + "none" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "key_schema": { + "properties": { + "schema_version": { + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "match_any": { + "patterns": [ + "^[0-9]+$", + "^latest$" + ] + }, + "type": "string" + }, + "subject_name": { + "description": "The name of the subject", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "ssl_verify": { + "default": true, + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "type": "boolean" + }, + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "url": { + "description": "The URL of the schema registry.", + "type": "string" + }, + "value_schema": { + "properties": { + "schema_version": { + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "match_any": { + "patterns": [ + "^[0-9]+$", + "^latest$" + ] + }, + "type": "string" + }, + "subject_name": { + "description": "The name of the subject", + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "authentication" + ], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "security": { + "properties": { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true + }, + "ssl": { + "description": "Enables TLS.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The default Kafka topic to publish to if the query parameter defined in the `topics_query_arg` does not exist in the request", + "type": "string" + }, + "topics_query_arg": { + "description": "The request query parameter name that contains the topics to publish to", + "type": "string" + } + }, + "required": [ + "topic" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/kafka-upstream/3.4.json b/json_schemas/kafka-upstream/3.4.json new file mode 100644 index 00000000..a6c7aea9 --- /dev/null +++ b/json_schemas/kafka-upstream/3.4.json @@ -0,0 +1,244 @@ +{ + "properties": { + "config": { + "properties": { + "authentication": { + "properties": { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256`, or `SCRAM-SHA-512`.", + "enum": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string" + }, + "password": { + "description": "Password for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "enum": [ + "sasl" + ], + "type": "string" + }, + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication.", + "type": "boolean" + }, + "user": { + "description": "Username for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "forward_body": { + "default": true, + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_headers": { + "default": false, + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_method": { + "default": false, + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_uri": { + "default": false, + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single producer request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer" + }, + "security": { + "properties": { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true + }, + "ssl": { + "description": "Enables TLS.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The Kafka topic to publish to.", + "type": "string" + } + }, + "required": [ + "topic" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/kafka-upstream/3.7.json b/json_schemas/kafka-upstream/3.7.json new file mode 100644 index 00000000..060e3c7c --- /dev/null +++ b/json_schemas/kafka-upstream/3.7.json @@ -0,0 +1,244 @@ +{ + "properties": { + "config": { + "properties": { + "authentication": { + "properties": { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256`, or `SCRAM-SHA-512`.", + "enum": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string" + }, + "password": { + "description": "Password for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "enum": [ + "sasl" + ], + "type": "string" + }, + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication.", + "type": "boolean" + }, + "user": { + "description": "Username for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "forward_body": { + "default": true, + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_headers": { + "default": false, + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_method": { + "default": false, + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_uri": { + "default": false, + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single producer request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer" + }, + "security": { + "properties": { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true + }, + "ssl": { + "description": "Enables TLS.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The Kafka topic to publish to.", + "type": "string" + } + }, + "required": [ + "topic" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/kafka-upstream/3.8.json b/json_schemas/kafka-upstream/3.8.json new file mode 100644 index 00000000..a6c7aea9 --- /dev/null +++ b/json_schemas/kafka-upstream/3.8.json @@ -0,0 +1,244 @@ +{ + "properties": { + "config": { + "properties": { + "authentication": { + "properties": { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256`, or `SCRAM-SHA-512`.", + "enum": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string" + }, + "password": { + "description": "Password for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "enum": [ + "sasl" + ], + "type": "string" + }, + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication.", + "type": "boolean" + }, + "user": { + "description": "Username for SASL authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "forward_body": { + "default": true, + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_headers": { + "default": false, + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_method": { + "default": false, + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_uri": { + "default": false, + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single producer request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer" + }, + "security": { + "properties": { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true + }, + "ssl": { + "description": "Enables TLS.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The Kafka topic to publish to.", + "type": "string" + } + }, + "required": [ + "topic" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/kafka-upstream/3.9.json b/json_schemas/kafka-upstream/3.9.json new file mode 100644 index 00000000..060e3c7c --- /dev/null +++ b/json_schemas/kafka-upstream/3.9.json @@ -0,0 +1,244 @@ +{ + "properties": { + "config": { + "properties": { + "authentication": { + "properties": { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256`, or `SCRAM-SHA-512`.", + "enum": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string" + }, + "password": { + "description": "Password for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "enum": [ + "sasl" + ], + "type": "string" + }, + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication.", + "type": "boolean" + }, + "user": { + "description": "Username for SASL authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "items": { + "properties": { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "type": "array" + }, + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + }, + "forward_body": { + "default": true, + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_headers": { + "default": false, + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_method": { + "default": false, + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "forward_uri": { + "default": false, + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + }, + "keepalive_enabled": { + "default": false, + "type": "boolean" + }, + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + }, + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + }, + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + }, + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + }, + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single producer request.", + "type": "integer" + }, + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + }, + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + }, + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer" + }, + "security": { + "properties": { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true + }, + "ssl": { + "description": "Enables TLS.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + }, + "topic": { + "description": "The Kafka topic to publish to.", + "type": "string" + } + }, + "required": [ + "topic" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/key-auth-enc/2.8.json b/json_schemas/key-auth-enc/2.8.json new file mode 100644 index 00000000..d610211c --- /dev/null +++ b/json_schemas/key-auth-enc/2.8.json @@ -0,0 +1,125 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID) value to use as an anonymous consumer if authentication fails.\nIf empty (default), the request will fail with an authentication failure `4xx`. Note that this value\nmust refer to the consumer `id` attribute that is internal to Kong Gateway, and **not** its `custom_id`.", + "legacy": true, + "type": "string", + "uuid": true + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`,\nthe plugin strips the credential from the request (i.e., the header, query string, or request body containing the key) before proxying it.", + "type": "boolean" + }, + "key_in_body": { + "default": false, + "description": "If enabled, the plugin reads the request body (if said request has one and its MIME type is supported) and tries to find the key in it. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "key_in_header": { + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean" + }, + "key_in_query": { + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "Describes an array of parameter names where the plugin will look for a key. The client must send the\nauthentication key in one of those key names, and the plugin will try to read the credential from a\nheader, request body, or query string parameter with the same name.\n\nKey names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "examples": [ + [ + "apikey" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests.\nIf set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/key-auth-enc/3.10.json b/json_schemas/key-auth-enc/3.10.json new file mode 100644 index 00000000..393987e0 --- /dev/null +++ b/json_schemas/key-auth-enc/3.10.json @@ -0,0 +1,114 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request (i.e., the header, query string, or request body containing the key) before proxying it.", + "type": "boolean" + }, + "key_in_body": { + "default": false, + "description": "If enabled, the plugin reads the request body (if said request has one and its MIME type is supported) and tries to find the key in it. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "key_in_header": { + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean" + }, + "key_in_query": { + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "Describes an array of parameter names where the plugin will look for a key. The client must send the authentication key in one of those key names, and the plugin will try to read the credential from a header, request body, or query string parameter with the same name. Key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/key-auth-enc/3.11.json b/json_schemas/key-auth-enc/3.11.json new file mode 100644 index 00000000..e436fd07 --- /dev/null +++ b/json_schemas/key-auth-enc/3.11.json @@ -0,0 +1,102 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request (i.e., the header, query string, or request body containing the key) before proxying it.", + "type": "boolean" + }, + "key_in_body": { + "default": false, + "description": "If enabled, the plugin reads the request body (if said request has one and its MIME type is supported) and tries to find the key in it. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "key_in_header": { + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean" + }, + "key_in_query": { + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "Describes an array of parameter names where the plugin will look for a key. The client must send the authentication key in one of those key names, and the plugin will try to read the credential from a header, request body, or query string parameter with the same name. Key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/key-auth-enc/3.12.json b/json_schemas/key-auth-enc/3.12.json new file mode 100644 index 00000000..e436fd07 --- /dev/null +++ b/json_schemas/key-auth-enc/3.12.json @@ -0,0 +1,102 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request (i.e., the header, query string, or request body containing the key) before proxying it.", + "type": "boolean" + }, + "key_in_body": { + "default": false, + "description": "If enabled, the plugin reads the request body (if said request has one and its MIME type is supported) and tries to find the key in it. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "key_in_header": { + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean" + }, + "key_in_query": { + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "Describes an array of parameter names where the plugin will look for a key. The client must send the authentication key in one of those key names, and the plugin will try to read the credential from a header, request body, or query string parameter with the same name. Key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/key-auth-enc/3.4.json b/json_schemas/key-auth-enc/3.4.json new file mode 100644 index 00000000..4feac78a --- /dev/null +++ b/json_schemas/key-auth-enc/3.4.json @@ -0,0 +1,110 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request (i.e., the header, query string, or request body containing the key) before proxying it.", + "type": "boolean" + }, + "key_in_body": { + "default": false, + "description": "If enabled, the plugin reads the request body (if said request has one and its MIME type is supported) and tries to find the key in it. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "key_in_header": { + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean" + }, + "key_in_query": { + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "Describes an array of parameter names where the plugin will look for a key. The client must send the authentication key in one of those key names, and the plugin will try to read the credential from a header, request body, or query string parameter with the same name. Key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/key-auth-enc/3.7.json b/json_schemas/key-auth-enc/3.7.json new file mode 100644 index 00000000..4feac78a --- /dev/null +++ b/json_schemas/key-auth-enc/3.7.json @@ -0,0 +1,110 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request (i.e., the header, query string, or request body containing the key) before proxying it.", + "type": "boolean" + }, + "key_in_body": { + "default": false, + "description": "If enabled, the plugin reads the request body (if said request has one and its MIME type is supported) and tries to find the key in it. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "key_in_header": { + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean" + }, + "key_in_query": { + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "Describes an array of parameter names where the plugin will look for a key. The client must send the authentication key in one of those key names, and the plugin will try to read the credential from a header, request body, or query string parameter with the same name. Key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/key-auth-enc/3.8.json b/json_schemas/key-auth-enc/3.8.json new file mode 100644 index 00000000..393987e0 --- /dev/null +++ b/json_schemas/key-auth-enc/3.8.json @@ -0,0 +1,114 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request (i.e., the header, query string, or request body containing the key) before proxying it.", + "type": "boolean" + }, + "key_in_body": { + "default": false, + "description": "If enabled, the plugin reads the request body (if said request has one and its MIME type is supported) and tries to find the key in it. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "key_in_header": { + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean" + }, + "key_in_query": { + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "Describes an array of parameter names where the plugin will look for a key. The client must send the authentication key in one of those key names, and the plugin will try to read the credential from a header, request body, or query string parameter with the same name. Key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/key-auth-enc/3.9.json b/json_schemas/key-auth-enc/3.9.json new file mode 100644 index 00000000..393987e0 --- /dev/null +++ b/json_schemas/key-auth-enc/3.9.json @@ -0,0 +1,114 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request (i.e., the header, query string, or request body containing the key) before proxying it.", + "type": "boolean" + }, + "key_in_body": { + "default": false, + "description": "If enabled, the plugin reads the request body (if said request has one and its MIME type is supported) and tries to find the key in it. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "key_in_header": { + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean" + }, + "key_in_query": { + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "Describes an array of parameter names where the plugin will look for a key. The client must send the authentication key in one of those key names, and the plugin will try to read the credential from a header, request body, or query string parameter with the same name. Key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/key-auth/2.8.json b/json_schemas/key-auth/2.8.json new file mode 100644 index 00000000..059254fa --- /dev/null +++ b/json_schemas/key-auth/2.8.json @@ -0,0 +1,123 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID) value to use as an anonymous consumer if authentication fails.\nIf empty (default), the request will fail with an authentication failure `4xx`. Note that this value\nmust refer to the consumer `id` attribute that is internal to Kong Gateway, and **not** its `custom_id`.\nFor more information, see [Anonymous Access](/gateway/latest/kong-plugins/authentication/reference/#anonymous-access).", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`,\nthe plugin strips the credential from the request (i.e., the header, query string, or request body containing the key) before proxying it.", + "type": "boolean" + }, + "key_in_body": { + "default": false, + "description": "If enabled, the plugin reads the request body (if said request has one and its MIME type is supported) and tries to find the key in it. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "key_in_header": { + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean" + }, + "key_in_query": { + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "Describes an array of parameter names where the plugin will look for a key. The client must send the\nauthentication key in one of those key names, and the plugin will try to read the credential from a\nheader, request body, or query string parameter with the same name.\n
**Note**: The key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "examples": [ + [ + "apikey" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests.\nIf set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/key-auth/3.10.json b/json_schemas/key-auth/3.10.json new file mode 100644 index 00000000..c1800b24 --- /dev/null +++ b/json_schemas/key-auth/3.10.json @@ -0,0 +1,148 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request.", + "type": "boolean" + }, + "identity_realms": { + "default": [ + { + "id": null, + "region": null, + "scope": "cp" + } + ], + "description": "A configuration of Konnect Identity Realms that indicate where to source a consumer from.", + "items": { + "properties": { + "id": { + "description": "A string representing a UUID (universally unique identifier).", + "type": "string", + "uuid": true + }, + "region": { + "type": "string" + }, + "scope": { + "enum": [ + "cp", + "realm" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "type": "array" + }, + "key_in_body": { + "default": false, + "description": "If enabled, the plugin reads the request body. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "key_in_header": { + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean" + }, + "key_in_query": { + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "Describes an array of parameter names where the plugin will look for a key. The key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/key-auth/3.11.json b/json_schemas/key-auth/3.11.json new file mode 100644 index 00000000..68476431 --- /dev/null +++ b/json_schemas/key-auth/3.11.json @@ -0,0 +1,134 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request.", + "type": "boolean" + }, + "identity_realms": { + "default": [ + { + "id": null, + "region": null, + "scope": "cp" + } + ], + "description": "A configuration of Konnect Identity Realms that indicate where to source a consumer from.", + "items": { + "properties": { + "id": { + "description": "A string representing a UUID (universally unique identifier).", + "type": "string", + "uuid": true + }, + "region": { + "type": "string" + }, + "scope": { + "enum": [ + "cp", + "realm" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "type": "array" + }, + "key_in_body": { + "default": false, + "description": "If enabled, the plugin reads the request body. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "key_in_header": { + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean" + }, + "key_in_query": { + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "Describes an array of parameter names where the plugin will look for a key. The key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/key-auth/3.12.json b/json_schemas/key-auth/3.12.json new file mode 100644 index 00000000..68476431 --- /dev/null +++ b/json_schemas/key-auth/3.12.json @@ -0,0 +1,134 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request.", + "type": "boolean" + }, + "identity_realms": { + "default": [ + { + "id": null, + "region": null, + "scope": "cp" + } + ], + "description": "A configuration of Konnect Identity Realms that indicate where to source a consumer from.", + "items": { + "properties": { + "id": { + "description": "A string representing a UUID (universally unique identifier).", + "type": "string", + "uuid": true + }, + "region": { + "type": "string" + }, + "scope": { + "enum": [ + "cp", + "realm" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "type": "array" + }, + "key_in_body": { + "default": false, + "description": "If enabled, the plugin reads the request body. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "key_in_header": { + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean" + }, + "key_in_query": { + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "Describes an array of parameter names where the plugin will look for a key. The key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/key-auth/3.4.json b/json_schemas/key-auth/3.4.json new file mode 100644 index 00000000..b2ccc4be --- /dev/null +++ b/json_schemas/key-auth/3.4.json @@ -0,0 +1,110 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request.", + "type": "boolean" + }, + "key_in_body": { + "default": false, + "description": "If enabled, the plugin reads the request body. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "key_in_header": { + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean" + }, + "key_in_query": { + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "Describes an array of parameter names where the plugin will look for a key. The key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/key-auth/3.7.json b/json_schemas/key-auth/3.7.json new file mode 100644 index 00000000..a37eb540 --- /dev/null +++ b/json_schemas/key-auth/3.7.json @@ -0,0 +1,114 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request.", + "type": "boolean" + }, + "key_in_body": { + "default": false, + "description": "If enabled, the plugin reads the request body. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "key_in_header": { + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean" + }, + "key_in_query": { + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "Describes an array of parameter names where the plugin will look for a key. The key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/key-auth/3.8.json b/json_schemas/key-auth/3.8.json new file mode 100644 index 00000000..a37eb540 --- /dev/null +++ b/json_schemas/key-auth/3.8.json @@ -0,0 +1,114 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request.", + "type": "boolean" + }, + "key_in_body": { + "default": false, + "description": "If enabled, the plugin reads the request body. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "key_in_header": { + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean" + }, + "key_in_query": { + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "Describes an array of parameter names where the plugin will look for a key. The key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/key-auth/3.9.json b/json_schemas/key-auth/3.9.json new file mode 100644 index 00000000..a37eb540 --- /dev/null +++ b/json_schemas/key-auth/3.9.json @@ -0,0 +1,114 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request.", + "type": "boolean" + }, + "key_in_body": { + "default": false, + "description": "If enabled, the plugin reads the request body. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "key_in_header": { + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean" + }, + "key_in_query": { + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "Describes an array of parameter names where the plugin will look for a key. The key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/konnect-application-auth/3.10.json b/json_schemas/konnect-application-auth/3.10.json new file mode 100644 index 00000000..75a573b3 --- /dev/null +++ b/json_schemas/konnect-application-auth/3.10.json @@ -0,0 +1,2343 @@ +{ + "properties": { + "config": { + "properties": { + "auth_type": { + "default": "openid-connect", + "description": "The type of authentication to be performed. Possible values are: 'openid-connect', 'key-auth', 'v2-strategies'.", + "enum": [ + "key-auth", + "openid-connect", + "v2-strategies" + ], + "type": "string" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scope": { + "description": "The unique scope identifier for the plugin configuration.", + "type": "string" + }, + "v2_strategies": { + "description": "The map of v2 strategies.", + "properties": { + "key_auth": { + "description": "List of key_auth strategies.", + "items": { + "properties": { + "config": { + "properties": { + "key_names": { + "default": [ + "apikey" + ], + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "strategy_id": { + "description": "The strategy id the config is tied to.", + "type": "string" + } + }, + "required": [ + "config", + "strategy_id" + ], + "type": "object" + }, + "type": "array" + }, + "openid_connect": { + "description": "List of openid_connect strategies.", + "items": { + "properties": { + "config": { + "description": "openid-connect plugin configuration.", + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "audience": { + "description": "The audience passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_claim": { + "default": [ + "aud" + ], + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "auth_methods": { + "default": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "description": "Types of credentials/grants to enable.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string" + }, + "authorization_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "authorization_cookie_name": { + "default": "authorization", + "description": "The authorization cookie name.", + "type": "string" + }, + "authorization_cookie_path": { + "default": "/", + "description": "The authorization cookie Path flag.", + "type": "string" + }, + "authorization_cookie_same_site": { + "default": "Default", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_rolling_timeout": { + "default": 600, + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string" + }, + "bearer_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the bearer token: - `header`: search the `Authorization`, `access-token`, and `x-access-token` HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "items": { + "enum": [ + "body", + "cookie", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "by_username_ignore_case": { + "default": false, + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "type": "boolean" + }, + "cache_introspection": { + "default": true, + "description": "Cache the introspection endpoint requests.", + "type": "boolean" + }, + "cache_token_exchange": { + "default": true, + "description": "Cache the token exchange endpoint requests.", + "type": "boolean" + }, + "cache_tokens": { + "default": true, + "description": "Cache the token endpoint requests.", + "type": "boolean" + }, + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "type": "string" + }, + "cache_ttl": { + "default": 3600, + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "type": "number" + }, + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number" + }, + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number" + }, + "cache_user_info": { + "default": true, + "description": "Cache the user info requests.", + "type": "boolean" + }, + "claims_forbidden": { + "description": "If given, these claims are forbidden in the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_alg": { + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "items": { + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS384", + "RS512" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_arg": { + "default": "client_id", + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "type": "string" + }, + "client_auth": { + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "items": { + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_credentials_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_jwk": { + "description": "The JWK used for the private_key_jwt authentication.", + "items": { + "properties": { + "alg": { + "type": "string" + }, + "crv": { + "type": "string" + }, + "d": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "dp": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "dq": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "e": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "k": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "key_ops": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "kid": { + "type": "string" + }, + "kty": { + "type": "string" + }, + "n": { + "type": "string" + }, + "oth": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "p": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "q": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "qi": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "r": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "t": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "use": { + "type": "string" + }, + "x": { + "type": "string" + }, + "x5c": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "x5t": { + "type": "string" + }, + "x5t#S256": { + "type": "string" + }, + "x5u": { + "type": "string" + }, + "y": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "cluster_cache_redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "cluster_cache_strategy": { + "default": "off", + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "enum": [ + "off", + "redis" + ], + "type": "string" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_claim": { + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Do not terminate the request if consumer mapping fails.", + "type": "boolean" + }, + "credential_claim": { + "default": [ + "sub" + ], + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "display_errors": { + "default": false, + "description": "Display errors on failure responses.", + "type": "boolean" + }, + "domains": { + "description": "The allowed values for the `hd` claim.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string" + }, + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string" + }, + "downstream_headers_claims": { + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string" + }, + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string" + }, + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string" + }, + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "type": "string" + }, + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string" + }, + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string" + }, + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string" + }, + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "dpop_proof_lifetime": { + "default": 300, + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "type": "number" + }, + "dpop_use_nonce": { + "default": false, + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "type": "boolean" + }, + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "expose_error_code": { + "default": true, + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "type": "boolean" + }, + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "forbidden_destroy_session": { + "default": true, + "description": "Destroy any active session for the forbidden requests.", + "type": "boolean" + }, + "forbidden_error_message": { + "default": "Forbidden", + "description": "The error message for the forbidden requests (when not using the redirection).", + "type": "string" + }, + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_claim": { + "default": [ + "groups" + ], + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "type": "boolean" + }, + "http_proxy": { + "description": "The HTTP proxy.", + "type": "string" + }, + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "http_version": { + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "type": "number" + }, + "https_proxy": { + "description": "The HTTPS proxy.", + "type": "string" + }, + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string" + }, + "id_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_signature": { + "default": [ + + ], + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "introspection", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspect_jwt_tokens": { + "default": false, + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "type": "boolean" + }, + "introspection_accept": { + "default": "application/json", + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt", + "application/token-introspection+jwt" + ], + "type": "string" + }, + "introspection_check_active": { + "default": true, + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "type": "boolean" + }, + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_values": { + "description": "Extra header values passed to the introspection endpoint.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_hint": { + "default": "access_token", + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "type": "string" + }, + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_client_headers": { + "description": "Extra post arguments passed from the client headers to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for introspection.", + "type": "string" + }, + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "type": "string" + }, + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "jwt_session_claim": { + "default": "sid", + "description": "The claim to match against the JWT session cookie.", + "type": "string" + }, + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string" + }, + "keepalive": { + "default": true, + "description": "Use keepalive with the HTTP client.", + "type": "boolean" + }, + "leeway": { + "default": 0, + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "type": "number" + }, + "login_action": { + "default": "upstream", + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "enum": [ + "redirect", + "response", + "upstream" + ], + "type": "string" + }, + "login_methods": { + "default": [ + "authorization_code" + ], + "description": "Enable login functionality with specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_redirect_mode": { + "default": "fragment", + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "enum": [ + "fragment", + "query" + ], + "type": "string" + }, + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_tokens": { + "default": [ + "id_token" + ], + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "items": { + "enum": [ + "access_token", + "id_token", + "introspection", + "refresh_token", + "tokens" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string" + }, + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string" + }, + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_revoke": { + "default": false, + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "type": "boolean" + }, + "logout_revoke_access_token": { + "default": true, + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_revoke_refresh_token": { + "default": true, + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string" + }, + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number" + }, + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string" + }, + "password_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "preserve_query_args": { + "default": false, + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "type": "boolean" + }, + "proof_of_possession_auth_methods_validation": { + "default": true, + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "type": "boolean" + }, + "proof_of_possession_dpop": { + "default": "off", + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "proof_of_possession_mtls": { + "default": "off", + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "pushed_authorization_request_endpoint_auth_method": { + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "rediscovery_lifetime": { + "default": 30, + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "type": "number" + }, + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string" + }, + "refresh_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "refresh_tokens": { + "default": true, + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "type": "boolean" + }, + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean" + }, + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean" + }, + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean" + }, + "resolve_distributed_claims": { + "default": false, + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "type": "boolean" + }, + "response_mode": { + "default": "query", + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "enum": [ + "form_post", + "form_post.jwt", + "fragment", + "fragment.jwt", + "jwt", + "query", + "query.jwt" + ], + "type": "string" + }, + "response_type": { + "default": [ + "code" + ], + "description": "The response type passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "reverify": { + "default": false, + "description": "Specifies whether to always verify tokens stored in the session.", + "type": "boolean" + }, + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "revocation_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for revocation.", + "type": "string" + }, + "roles_claim": { + "default": [ + "roles" + ], + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "run_on_preflight": { + "default": true, + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "type": "boolean" + }, + "scopes": { + "default": [ + "openid" + ], + "description": "The scopes passed to the authorization and token endpoints.", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_claim": { + "default": [ + "scope" + ], + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "search_user_info": { + "default": false, + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "type": "boolean" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "The session cookie Path flag.", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "The memcached port.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "type": "number" + }, + "session_request_headers": { + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "session_secret": { + "description": "The session secret.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "tls_client_auth_cert_id": { + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "type": "string", + "uuid": true + }, + "tls_client_auth_ssl_verify": { + "default": true, + "description": "Verify identity provider server certificate during mTLS client authentication.", + "type": "boolean" + }, + "token_cache_key_include_scope": { + "default": false, + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean" + }, + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "type": "string" + }, + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "password", + "refresh_token" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string" + }, + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unauthorized_destroy_session": { + "default": true, + "description": "Destroy any active session for the unauthorized requests.", + "type": "boolean" + }, + "unauthorized_error_message": { + "default": "Unauthorized", + "description": "The error message for the unauthorized requests (when not using the redirection).", + "type": "string" + }, + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_access_token_header": { + "default": "authorization:bearer", + "description": "The upstream access token header.", + "type": "string" + }, + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string" + }, + "upstream_headers_claims": { + "description": "The upstream header claims. Only top level claims are supported.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string" + }, + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string" + }, + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string" + }, + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "type": "string" + }, + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string" + }, + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string" + }, + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string" + }, + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "userinfo_accept": { + "default": "application/json", + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt" + ], + "type": "string" + }, + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "using_pseudo_issuer": { + "default": false, + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "type": "boolean" + }, + "verify_claims": { + "default": true, + "description": "Verify tokens for standard claims.", + "type": "boolean" + }, + "verify_nonce": { + "default": true, + "description": "Verify nonce on authorization code flow.", + "type": "boolean" + }, + "verify_parameters": { + "default": false, + "description": "Verify plugin configuration against discovery.", + "type": "boolean" + }, + "verify_signature": { + "default": true, + "description": "Verify signature of tokens.", + "type": "boolean" + } + }, + "required": [ + "issuer" + ], + "type": "object" + }, + "strategy_id": { + "description": "The strategy id the config is tied to.", + "type": "string" + } + }, + "required": [ + "strategy_id" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "scope" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/konnect-application-auth/3.11.json b/json_schemas/konnect-application-auth/3.11.json new file mode 100644 index 00000000..d8f45b67 --- /dev/null +++ b/json_schemas/konnect-application-auth/3.11.json @@ -0,0 +1,2167 @@ +{ + "properties": { + "config": { + "properties": { + "auth_type": { + "default": "openid-connect", + "description": "The type of authentication to be performed. Possible values are: 'openid-connect', 'key-auth', 'v2-strategies'.", + "enum": [ + "key-auth", + "openid-connect", + "v2-strategies" + ], + "type": "string" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "scope": { + "description": "The unique scope identifier for the plugin configuration.", + "type": "string" + }, + "v2_strategies": { + "description": "The map of v2 strategies.", + "properties": { + "key_auth": { + "description": "List of key_auth strategies.", + "items": { + "properties": { + "config": { + "properties": { + "key_names": { + "default": [ + "apikey" + ], + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "strategy_id": { + "description": "The strategy id the config is tied to.", + "type": "string" + } + }, + "required": [ + "config", + "strategy_id" + ], + "type": "object" + }, + "type": "array" + }, + "openid_connect": { + "description": "List of openid_connect strategies.", + "items": { + "properties": { + "config": { + "description": "openid-connect plugin configuration.", + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "audience": { + "description": "The audience passed to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "audience_claim": { + "default": [ + "aud" + ], + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "auth_methods": { + "default": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "description": "Types of credentials/grants to enable.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string" + }, + "authorization_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "authorization_cookie_name": { + "default": "authorization", + "description": "The authorization cookie name.", + "type": "string" + }, + "authorization_cookie_path": { + "default": "/", + "description": "The authorization cookie Path flag.", + "type": "string" + }, + "authorization_cookie_same_site": { + "default": "Default", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "authorization_rolling_timeout": { + "default": 600, + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string" + }, + "bearer_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the bearer token: - `header`: search the `Authorization`, `access-token`, and `x-access-token` HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "items": { + "enum": [ + "body", + "cookie", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "by_username_ignore_case": { + "default": false, + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "type": "boolean" + }, + "cache_introspection": { + "default": true, + "description": "Cache the introspection endpoint requests.", + "type": "boolean" + }, + "cache_token_exchange": { + "default": true, + "description": "Cache the token exchange endpoint requests.", + "type": "boolean" + }, + "cache_tokens": { + "default": true, + "description": "Cache the token endpoint requests.", + "type": "boolean" + }, + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "type": "string" + }, + "cache_ttl": { + "default": 3600, + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "type": "number" + }, + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number" + }, + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number" + }, + "cache_user_info": { + "default": true, + "description": "Cache the user info requests.", + "type": "boolean" + }, + "claims_forbidden": { + "description": "If given, these claims are forbidden in the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_alg": { + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "items": { + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS384", + "RS512" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_arg": { + "default": "client_id", + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "type": "string" + }, + "client_auth": { + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "items": { + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_credentials_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_jwk": { + "description": "The JWK used for the private_key_jwt authentication.", + "items": { + "properties": { + "alg": { + "type": "string" + }, + "crv": { + "type": "string" + }, + "d": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dp": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dq": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "e": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "k": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "key_ops": { + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "kid": { + "type": "string" + }, + "kty": { + "type": "string" + }, + "n": { + "type": "string" + }, + "oth": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "p": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "q": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "qi": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "r": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "t": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "use": { + "type": "string" + }, + "x": { + "type": "string" + }, + "x5c": { + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "x5t": { + "type": "string" + }, + "x5t#S256": { + "type": "string" + }, + "x5u": { + "type": "string" + }, + "y": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "cluster_cache_redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "cluster_cache_strategy": { + "default": "off", + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "enum": [ + "off", + "redis" + ], + "type": "string" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "consumer_claim": { + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Do not terminate the request if consumer mapping fails.", + "type": "boolean" + }, + "credential_claim": { + "default": [ + "sub" + ], + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "display_errors": { + "default": false, + "description": "Display errors on failure responses.", + "type": "boolean" + }, + "domains": { + "description": "The allowed values for the `hd` claim.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string" + }, + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string" + }, + "downstream_headers_claims": { + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string" + }, + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string" + }, + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string" + }, + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "type": "string" + }, + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string" + }, + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string" + }, + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string" + }, + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "dpop_proof_lifetime": { + "default": 300, + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "type": "number" + }, + "dpop_use_nonce": { + "default": false, + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "type": "boolean" + }, + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "expose_error_code": { + "default": true, + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "type": "boolean" + }, + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "forbidden_destroy_session": { + "default": true, + "description": "Destroy any active session for the forbidden requests.", + "type": "boolean" + }, + "forbidden_error_message": { + "default": "Forbidden", + "description": "The error message for the forbidden requests (when not using the redirection).", + "type": "string" + }, + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "groups_claim": { + "default": [ + "groups" + ], + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "type": "boolean" + }, + "http_proxy": { + "description": "The HTTP proxy.", + "type": "string" + }, + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "http_version": { + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "type": "number" + }, + "https_proxy": { + "description": "The HTTPS proxy.", + "type": "string" + }, + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string" + }, + "id_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "ignore_signature": { + "default": [], + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "introspection", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspect_jwt_tokens": { + "default": false, + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "type": "boolean" + }, + "introspection_accept": { + "default": "application/json", + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt", + "application/token-introspection+jwt" + ], + "type": "string" + }, + "introspection_check_active": { + "default": true, + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "type": "boolean" + }, + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_values": { + "description": "Extra header values passed to the introspection endpoint.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_hint": { + "default": "access_token", + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "type": "string" + }, + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_client_headers": { + "description": "Extra post arguments passed from the client headers to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for introspection.", + "type": "string" + }, + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "type": "string" + }, + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "jwt_session_claim": { + "default": "sid", + "description": "The claim to match against the JWT session cookie.", + "type": "string" + }, + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string" + }, + "keepalive": { + "default": true, + "description": "Use keepalive with the HTTP client.", + "type": "boolean" + }, + "leeway": { + "default": 0, + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "type": "number" + }, + "login_action": { + "default": "upstream", + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "enum": [ + "redirect", + "response", + "upstream" + ], + "type": "string" + }, + "login_methods": { + "default": [ + "authorization_code" + ], + "description": "Enable login functionality with specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "login_redirect_mode": { + "default": "fragment", + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "enum": [ + "fragment", + "query" + ], + "type": "string" + }, + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "login_tokens": { + "default": [ + "id_token" + ], + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "items": { + "enum": [ + "access_token", + "id_token", + "introspection", + "refresh_token", + "tokens" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string" + }, + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string" + }, + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "logout_revoke": { + "default": false, + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "type": "boolean" + }, + "logout_revoke_access_token": { + "default": true, + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_revoke_refresh_token": { + "default": true, + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string" + }, + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number" + }, + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string" + }, + "password_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "preserve_query_args": { + "default": false, + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "type": "boolean" + }, + "proof_of_possession_auth_methods_validation": { + "default": true, + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "type": "boolean" + }, + "proof_of_possession_dpop": { + "default": "off", + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "proof_of_possession_mtls": { + "default": "off", + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "pushed_authorization_request_endpoint_auth_method": { + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "rediscovery_lifetime": { + "default": 30, + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "type": "number" + }, + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string" + }, + "refresh_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "refresh_tokens": { + "default": true, + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "type": "boolean" + }, + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean" + }, + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean" + }, + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean" + }, + "resolve_distributed_claims": { + "default": false, + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "type": "boolean" + }, + "response_mode": { + "default": "query", + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "enum": [ + "form_post", + "form_post.jwt", + "fragment", + "fragment.jwt", + "jwt", + "query", + "query.jwt" + ], + "type": "string" + }, + "response_type": { + "default": [ + "code" + ], + "description": "The response type passed to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "reverify": { + "default": false, + "description": "Specifies whether to always verify tokens stored in the session.", + "type": "boolean" + }, + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "revocation_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for revocation.", + "type": "string" + }, + "roles_claim": { + "default": [ + "roles" + ], + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "run_on_preflight": { + "default": true, + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "type": "boolean" + }, + "scopes": { + "default": [ + "openid" + ], + "description": "The scopes passed to the authorization and token endpoints.", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "scopes_claim": { + "default": [ + "scope" + ], + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "search_user_info": { + "default": false, + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "type": "boolean" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "The session cookie Path flag.", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "The memcached port.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "type": "number" + }, + "session_request_headers": { + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "session_secret": { + "description": "The session secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "tls_client_auth_cert_id": { + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "type": "string", + "uuid": true + }, + "tls_client_auth_ssl_verify": { + "default": true, + "description": "Verify identity provider server certificate during mTLS client authentication.", + "type": "boolean" + }, + "token_cache_key_include_scope": { + "default": false, + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean" + }, + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "type": "string" + }, + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "password", + "refresh_token" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string" + }, + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "unauthorized_destroy_session": { + "default": true, + "description": "Destroy any active session for the unauthorized requests.", + "type": "boolean" + }, + "unauthorized_error_message": { + "default": "Unauthorized", + "description": "The error message for the unauthorized requests (when not using the redirection).", + "type": "string" + }, + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "upstream_access_token_header": { + "default": "authorization:bearer", + "description": "The upstream access token header.", + "type": "string" + }, + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string" + }, + "upstream_headers_claims": { + "description": "The upstream header claims. Only top level claims are supported.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string" + }, + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string" + }, + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string" + }, + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "type": "string" + }, + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string" + }, + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string" + }, + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string" + }, + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "userinfo_accept": { + "default": "application/json", + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt" + ], + "type": "string" + }, + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "using_pseudo_issuer": { + "default": false, + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "type": "boolean" + }, + "verify_claims": { + "default": true, + "description": "Verify tokens for standard claims.", + "type": "boolean" + }, + "verify_nonce": { + "default": true, + "description": "Verify nonce on authorization code flow.", + "type": "boolean" + }, + "verify_parameters": { + "default": false, + "description": "Verify plugin configuration against discovery.", + "type": "boolean" + }, + "verify_signature": { + "default": true, + "description": "Verify signature of tokens.", + "type": "boolean" + } + }, + "required": [ + "cluster_cache_redis", + "issuer", + "redis" + ], + "type": "object" + }, + "strategy_id": { + "description": "The strategy id the config is tied to.", + "type": "string" + } + }, + "required": [ + "strategy_id" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "scope" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/konnect-application-auth/3.12.json b/json_schemas/konnect-application-auth/3.12.json new file mode 100644 index 00000000..80e28e6c --- /dev/null +++ b/json_schemas/konnect-application-auth/3.12.json @@ -0,0 +1,2167 @@ +{ + "properties": { + "config": { + "properties": { + "auth_type": { + "default": "openid-connect", + "description": "The type of authentication to be performed. Possible values are: 'openid-connect', 'key-auth', 'v2-strategies'.", + "enum": [ + "key-auth", + "openid-connect", + "v2-strategies" + ], + "type": "string" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "scope": { + "description": "The unique scope identifier for the plugin configuration.", + "type": "string" + }, + "v2_strategies": { + "description": "The map of v2 strategies.", + "properties": { + "key_auth": { + "description": "List of key_auth strategies.", + "items": { + "properties": { + "config": { + "properties": { + "key_names": { + "default": [ + "apikey" + ], + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "strategy_id": { + "description": "The strategy id the config is tied to.", + "type": "string" + } + }, + "required": [ + "config", + "strategy_id" + ], + "type": "object" + }, + "type": "array" + }, + "openid_connect": { + "description": "List of openid_connect strategies.", + "items": { + "properties": { + "config": { + "description": "openid-connect plugin configuration.", + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "audience": { + "description": "The audience passed to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "audience_claim": { + "default": [ + "aud" + ], + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "auth_methods": { + "default": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "description": "Types of credentials/grants to enable.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string" + }, + "authorization_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "authorization_cookie_name": { + "default": "authorization", + "description": "The authorization cookie name.", + "type": "string" + }, + "authorization_cookie_path": { + "default": "/", + "description": "The authorization cookie Path flag.", + "type": "string" + }, + "authorization_cookie_same_site": { + "default": "Default", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "authorization_rolling_timeout": { + "default": 600, + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string" + }, + "bearer_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the bearer token: - `header`: search the `Authorization`, `access-token`, and `x-access-token` HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "items": { + "enum": [ + "body", + "cookie", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "by_username_ignore_case": { + "default": false, + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "type": "boolean" + }, + "cache_introspection": { + "default": true, + "description": "Cache the introspection endpoint requests.", + "type": "boolean" + }, + "cache_token_exchange": { + "default": true, + "description": "Cache the token exchange endpoint requests.", + "type": "boolean" + }, + "cache_tokens": { + "default": true, + "description": "Cache the token endpoint requests.", + "type": "boolean" + }, + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "type": "string" + }, + "cache_ttl": { + "default": 3600, + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "type": "number" + }, + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number" + }, + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number" + }, + "cache_user_info": { + "default": true, + "description": "Cache the user info requests.", + "type": "boolean" + }, + "claims_forbidden": { + "description": "If given, these claims are forbidden in the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_alg": { + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "items": { + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS384", + "RS512" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_arg": { + "default": "client_id", + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "type": "string" + }, + "client_auth": { + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "items": { + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_credentials_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_jwk": { + "description": "The JWK used for the private_key_jwt authentication.", + "items": { + "properties": { + "alg": { + "type": "string" + }, + "crv": { + "type": "string" + }, + "d": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dp": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dq": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "e": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "k": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "key_ops": { + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "kid": { + "type": "string" + }, + "kty": { + "type": "string" + }, + "n": { + "type": "string" + }, + "oth": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "p": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "q": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "qi": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "r": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "t": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "use": { + "type": "string" + }, + "x": { + "type": "string" + }, + "x5c": { + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "x5t": { + "type": "string" + }, + "x5t#S256": { + "type": "string" + }, + "x5u": { + "type": "string" + }, + "y": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "cluster_cache_redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "cluster_cache_strategy": { + "default": "off", + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "enum": [ + "off", + "redis" + ], + "type": "string" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "consumer_claim": { + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Do not terminate the request if consumer mapping fails.", + "type": "boolean" + }, + "credential_claim": { + "default": [ + "sub" + ], + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "display_errors": { + "default": false, + "description": "Display errors on failure responses.", + "type": "boolean" + }, + "domains": { + "description": "The allowed values for the `hd` claim.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string" + }, + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string" + }, + "downstream_headers_claims": { + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string" + }, + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string" + }, + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string" + }, + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "type": "string" + }, + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string" + }, + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string" + }, + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string" + }, + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "dpop_proof_lifetime": { + "default": 300, + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "type": "number" + }, + "dpop_use_nonce": { + "default": false, + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "type": "boolean" + }, + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "expose_error_code": { + "default": true, + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "type": "boolean" + }, + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "forbidden_destroy_session": { + "default": true, + "description": "Destroy any active session for the forbidden requests.", + "type": "boolean" + }, + "forbidden_error_message": { + "default": "Forbidden", + "description": "The error message for the forbidden requests (when not using the redirection).", + "type": "string" + }, + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "groups_claim": { + "default": [ + "groups" + ], + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "type": "boolean" + }, + "http_proxy": { + "description": "The HTTP proxy.", + "type": "string" + }, + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "http_version": { + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "type": "number" + }, + "https_proxy": { + "description": "The HTTPS proxy.", + "type": "string" + }, + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string" + }, + "id_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "ignore_signature": { + "default": [], + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "introspection", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspect_jwt_tokens": { + "default": false, + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "type": "boolean" + }, + "introspection_accept": { + "default": "application/json", + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt", + "application/token-introspection+jwt" + ], + "type": "string" + }, + "introspection_check_active": { + "default": true, + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "type": "boolean" + }, + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_values": { + "description": "Extra header values passed to the introspection endpoint.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_hint": { + "default": "access_token", + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "type": "string" + }, + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_client_headers": { + "description": "Extra post arguments passed from the client headers to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for introspection.", + "type": "string" + }, + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "type": "string" + }, + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "jwt_session_claim": { + "default": "sid", + "description": "The claim to match against the JWT session cookie.", + "type": "string" + }, + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string" + }, + "keepalive": { + "default": true, + "description": "Use keepalive with the HTTP client.", + "type": "boolean" + }, + "leeway": { + "default": 0, + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "type": "number" + }, + "login_action": { + "default": "upstream", + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "enum": [ + "redirect", + "response", + "upstream" + ], + "type": "string" + }, + "login_methods": { + "default": [ + "authorization_code" + ], + "description": "Enable login functionality with specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "login_redirect_mode": { + "default": "fragment", + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "enum": [ + "fragment", + "query" + ], + "type": "string" + }, + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "login_tokens": { + "default": [ + "id_token" + ], + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "items": { + "enum": [ + "access_token", + "id_token", + "introspection", + "refresh_token", + "tokens" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string" + }, + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string" + }, + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "logout_revoke": { + "default": false, + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "type": "boolean" + }, + "logout_revoke_access_token": { + "default": true, + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_revoke_refresh_token": { + "default": true, + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string" + }, + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number" + }, + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string" + }, + "password_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "preserve_query_args": { + "default": false, + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "type": "boolean" + }, + "proof_of_possession_auth_methods_validation": { + "default": true, + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "type": "boolean" + }, + "proof_of_possession_dpop": { + "default": "off", + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "proof_of_possession_mtls": { + "default": "off", + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "pushed_authorization_request_endpoint_auth_method": { + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "rediscovery_lifetime": { + "default": 30, + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "type": "number" + }, + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string" + }, + "refresh_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "refresh_tokens": { + "default": true, + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "type": "boolean" + }, + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean" + }, + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean" + }, + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean" + }, + "resolve_distributed_claims": { + "default": false, + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "type": "boolean" + }, + "response_mode": { + "default": "query", + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "enum": [ + "form_post", + "form_post.jwt", + "fragment", + "fragment.jwt", + "jwt", + "query", + "query.jwt" + ], + "type": "string" + }, + "response_type": { + "default": [ + "code" + ], + "description": "The response type passed to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "reverify": { + "default": false, + "description": "Specifies whether to always verify tokens stored in the session.", + "type": "boolean" + }, + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "revocation_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for revocation.", + "type": "string" + }, + "roles_claim": { + "default": [ + "roles" + ], + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "run_on_preflight": { + "default": true, + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "type": "boolean" + }, + "scopes": { + "default": [ + "openid" + ], + "description": "The scopes passed to the authorization and token endpoints.", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "scopes_claim": { + "default": [ + "scope" + ], + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "search_user_info": { + "default": false, + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "type": "boolean" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "The session cookie Path flag.", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "The memcached port.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "type": "number" + }, + "session_request_headers": { + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "session_secret": { + "description": "The session secret.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "tls_client_auth_cert_id": { + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "type": "string", + "uuid": true + }, + "tls_client_auth_ssl_verify": { + "default": true, + "description": "Verify identity provider server certificate during mTLS client authentication.", + "type": "boolean" + }, + "token_cache_key_include_scope": { + "default": false, + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean" + }, + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "type": "string" + }, + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "password", + "refresh_token" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string" + }, + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "unauthorized_destroy_session": { + "default": true, + "description": "Destroy any active session for the unauthorized requests.", + "type": "boolean" + }, + "unauthorized_error_message": { + "default": "Unauthorized", + "description": "The error message for the unauthorized requests (when not using the redirection).", + "type": "string" + }, + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "upstream_access_token_header": { + "default": "authorization:bearer", + "description": "The upstream access token header.", + "type": "string" + }, + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string" + }, + "upstream_headers_claims": { + "description": "The upstream header claims. Only top level claims are supported.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string" + }, + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string" + }, + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string" + }, + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "type": "string" + }, + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string" + }, + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string" + }, + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string" + }, + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "userinfo_accept": { + "default": "application/json", + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt" + ], + "type": "string" + }, + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "using_pseudo_issuer": { + "default": false, + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "type": "boolean" + }, + "verify_claims": { + "default": true, + "description": "Verify tokens for standard claims.", + "type": "boolean" + }, + "verify_nonce": { + "default": true, + "description": "Verify nonce on authorization code flow.", + "type": "boolean" + }, + "verify_parameters": { + "default": false, + "description": "Verify plugin configuration against discovery.", + "type": "boolean" + }, + "verify_signature": { + "default": true, + "description": "Verify signature of tokens.", + "type": "boolean" + } + }, + "required": [ + "cluster_cache_redis", + "issuer", + "redis" + ], + "type": "object" + }, + "strategy_id": { + "description": "The strategy id the config is tied to.", + "type": "string" + } + }, + "required": [ + "strategy_id" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "scope" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/konnect-application-auth/3.4.json b/json_schemas/konnect-application-auth/3.4.json new file mode 100644 index 00000000..710e4275 --- /dev/null +++ b/json_schemas/konnect-application-auth/3.4.json @@ -0,0 +1,77 @@ +{ + "properties": { + "config": { + "properties": { + "auth_type": { + "default": "openid-connect", + "description": "The type of authentication to be performed. Possible values are: 'openid-connect', 'key-auth'.", + "enum": [ + "key-auth", + "openid-connect" + ], + "type": "string" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scope": { + "description": "The unique scope identifier for the plugin configuration.", + "type": "string" + } + }, + "required": [ + "scope" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/konnect-application-auth/3.7.json b/json_schemas/konnect-application-auth/3.7.json new file mode 100644 index 00000000..eb5275ed --- /dev/null +++ b/json_schemas/konnect-application-auth/3.7.json @@ -0,0 +1,2026 @@ +{ + "properties": { + "config": { + "properties": { + "auth_type": { + "default": "openid-connect", + "description": "The type of authentication to be performed. Possible values are: 'openid-connect', 'key-auth', 'v2-strategies'.", + "enum": [ + "key-auth", + "openid-connect", + "v2-strategies" + ], + "type": "string" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scope": { + "description": "The unique scope identifier for the plugin configuration.", + "type": "string" + }, + "v2_strategies": { + "description": "The map of v2 strategies.", + "properties": { + "key_auth": { + "description": "List of key_auth strategies.", + "items": { + "properties": { + "config": { + "properties": { + "key_names": { + "default": [ + "apikey" + ], + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "strategy_id": { + "description": "The strategy id the config is tied to.", + "type": "string" + } + }, + "required": [ + "config", + "strategy_id" + ], + "type": "object" + }, + "type": "array" + }, + "openid_connect": { + "description": "List of openid_connect strategies.", + "items": { + "properties": { + "config": { + "description": "openid-connect plugin configuration.", + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "audience": { + "description": "The audience passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_claim": { + "default": [ + "aud" + ], + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "auth_methods": { + "default": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "description": "Types of credentials/grants to enable.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string" + }, + "authorization_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "authorization_cookie_name": { + "default": "authorization", + "description": "The authorization cookie name.", + "type": "string" + }, + "authorization_cookie_path": { + "default": "/", + "description": "The authorization cookie Path flag.", + "type": "string" + }, + "authorization_cookie_same_site": { + "default": "Default", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_rolling_timeout": { + "default": 600, + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string" + }, + "bearer_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the bearer token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "items": { + "enum": [ + "body", + "cookie", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "by_username_ignore_case": { + "default": false, + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "type": "boolean" + }, + "cache_introspection": { + "default": true, + "description": "Cache the introspection endpoint requests.", + "type": "boolean" + }, + "cache_token_exchange": { + "default": true, + "description": "Cache the token exchange endpoint requests.", + "type": "boolean" + }, + "cache_tokens": { + "default": true, + "description": "Cache the token endpoint requests.", + "type": "boolean" + }, + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "type": "string" + }, + "cache_ttl": { + "default": 3600, + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "type": "number" + }, + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number" + }, + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number" + }, + "cache_user_info": { + "default": true, + "description": "Cache the user info requests.", + "type": "boolean" + }, + "client_alg": { + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "items": { + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS384", + "RS512" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_arg": { + "default": "client_id", + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "type": "string" + }, + "client_auth": { + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "items": { + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_credentials_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_jwk": { + "description": "The JWK used for the private_key_jwt authentication.", + "items": { + "properties": { + "alg": { + "type": "string" + }, + "crv": { + "type": "string" + }, + "d": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dp": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dq": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "e": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "k": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "key_ops": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "kid": { + "type": "string" + }, + "kty": { + "type": "string" + }, + "n": { + "type": "string" + }, + "oth": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "p": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "q": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "qi": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "r": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "t": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "use": { + "type": "string" + }, + "x": { + "type": "string" + }, + "x5c": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "x5t": { + "type": "string" + }, + "x5t#S256": { + "type": "string" + }, + "x5u": { + "type": "string" + }, + "y": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_claim": { + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Do not terminate the request if consumer mapping fails.", + "type": "boolean" + }, + "credential_claim": { + "default": [ + "sub" + ], + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "display_errors": { + "default": false, + "description": "Display errors on failure responses.", + "type": "boolean" + }, + "domains": { + "description": "The allowed values for the `hd` claim.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string" + }, + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string" + }, + "downstream_headers_claims": { + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string" + }, + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string" + }, + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string" + }, + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "type": "string" + }, + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string" + }, + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string" + }, + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string" + }, + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "dpop_proof_lifetime": { + "default": 300, + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "type": "number" + }, + "dpop_use_nonce": { + "default": false, + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "type": "boolean" + }, + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "expose_error_code": { + "default": true, + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "type": "boolean" + }, + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "forbidden_destroy_session": { + "default": true, + "description": "Destroy any active session for the forbidden requests.", + "type": "boolean" + }, + "forbidden_error_message": { + "default": "Forbidden", + "description": "The error message for the forbidden requests (when not using the redirection).", + "type": "string" + }, + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_claim": { + "default": [ + "groups" + ], + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "type": "boolean" + }, + "http_proxy": { + "description": "The HTTP proxy.", + "type": "string" + }, + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.", + "type": "string" + }, + "http_version": { + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "type": "number" + }, + "https_proxy": { + "description": "The HTTPS proxy.", + "type": "string" + }, + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.", + "type": "string" + }, + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string" + }, + "id_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_signature": { + "default": [ + + ], + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "introspection", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspect_jwt_tokens": { + "default": false, + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "type": "boolean" + }, + "introspection_accept": { + "default": "application/json", + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt", + "application/token-introspection+jwt" + ], + "type": "string" + }, + "introspection_check_active": { + "default": true, + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "type": "boolean" + }, + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_values": { + "description": "Extra header values passed to the introspection endpoint.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_hint": { + "default": "access_token", + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "type": "string" + }, + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for introspection.", + "type": "string" + }, + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "type": "string" + }, + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "jwt_session_claim": { + "default": "sid", + "description": "The claim to match against the JWT session cookie.", + "type": "string" + }, + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string" + }, + "keepalive": { + "default": true, + "description": "Use keepalive with the HTTP client.", + "type": "boolean" + }, + "leeway": { + "default": 0, + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "type": "number" + }, + "login_action": { + "default": "upstream", + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "enum": [ + "redirect", + "response", + "upstream" + ], + "type": "string" + }, + "login_methods": { + "default": [ + "authorization_code" + ], + "description": "Enable login functionality with specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_redirect_mode": { + "default": "fragment", + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "enum": [ + "fragment", + "query" + ], + "type": "string" + }, + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_tokens": { + "default": [ + "id_token" + ], + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "items": { + "enum": [ + "access_token", + "id_token", + "introspection", + "refresh_token", + "tokens" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string" + }, + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string" + }, + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_revoke": { + "default": false, + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "type": "boolean" + }, + "logout_revoke_access_token": { + "default": true, + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_revoke_refresh_token": { + "default": true, + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string" + }, + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number" + }, + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string" + }, + "password_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "preserve_query_args": { + "default": false, + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "type": "boolean" + }, + "proof_of_possession_auth_methods_validation": { + "default": true, + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "type": "boolean" + }, + "proof_of_possession_dpop": { + "default": "off", + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "proof_of_possession_mtls": { + "default": "off", + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "pushed_authorization_request_endpoint_auth_method": { + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rediscovery_lifetime": { + "default": 30, + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "type": "number" + }, + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string" + }, + "refresh_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "refresh_tokens": { + "default": true, + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "type": "boolean" + }, + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean" + }, + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean" + }, + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean" + }, + "resolve_distributed_claims": { + "default": false, + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "type": "boolean" + }, + "response_mode": { + "default": "query", + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "enum": [ + "form_post", + "form_post.jwt", + "fragment", + "fragment.jwt", + "jwt", + "query", + "query.jwt" + ], + "type": "string" + }, + "response_type": { + "default": [ + "code" + ], + "description": "The response type passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "reverify": { + "default": false, + "description": "Specifies whether to always verify tokens stored in the session.", + "type": "boolean" + }, + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "revocation_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for revocation.", + "type": "string" + }, + "roles_claim": { + "default": [ + "roles" + ], + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "run_on_preflight": { + "default": true, + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "type": "boolean" + }, + "scopes": { + "default": [ + "openid" + ], + "description": "The scopes passed to the authorization and token endpoints.", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_claim": { + "default": [ + "scope" + ], + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "search_user_info": { + "default": false, + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "type": "boolean" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "The session cookie Path flag.", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "The memcached port.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_redis_cluster_max_redirections": { + "description": "The Redis cluster maximum redirects.", + "type": "integer" + }, + "session_redis_cluster_nodes": { + "description": "The Redis cluster node host. Takes an array of host records, with either `ip` or `host`, and `port` values.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "type": "array" + }, + "session_redis_connect_timeout": { + "description": "Session redis connection timeout in milliseconds.", + "type": "integer" + }, + "session_redis_host": { + "default": "127.0.0.1", + "description": "The Redis host.", + "type": "string" + }, + "session_redis_password": { + "description": "Password to use for Redis connection when the `redis` session storage is defined. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "session_redis_port": { + "default": 6379, + "description": "The Redis port.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_redis_prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "session_redis_read_timeout": { + "description": "Session redis read timeout in milliseconds.", + "type": "integer" + }, + "session_redis_send_timeout": { + "description": "Session redis send timeout in milliseconds.", + "type": "integer" + }, + "session_redis_server_name": { + "description": "The SNI used for connecting the Redis server.", + "type": "string" + }, + "session_redis_socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "session_redis_ssl": { + "default": false, + "description": "Use SSL/TLS for Redis connection.", + "type": "boolean" + }, + "session_redis_ssl_verify": { + "default": false, + "description": "Verify identity provider server certificate.", + "type": "boolean" + }, + "session_redis_username": { + "description": "Username to use for Redis connection when the `redis` session storage is defined and ACL authentication is desired. If undefined, ACL authentication will not be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "type": "number" + }, + "session_request_headers": { + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "session_secret": { + "description": "The session secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "tls_client_auth_cert_id": { + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "type": "string", + "uuid": true + }, + "tls_client_auth_ssl_verify": { + "default": true, + "description": "Verify identity provider server certificate during mTLS client authentication.", + "type": "boolean" + }, + "token_cache_key_include_scope": { + "default": false, + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean" + }, + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "type": "string" + }, + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "password", + "refresh_token" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string" + }, + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unauthorized_destroy_session": { + "default": true, + "description": "Destroy any active session for the unauthorized requests.", + "type": "boolean" + }, + "unauthorized_error_message": { + "default": "Unauthorized", + "description": "The error message for the unauthorized requests (when not using the redirection).", + "type": "string" + }, + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_access_token_header": { + "default": "authorization:bearer", + "description": "The upstream access token header.", + "type": "string" + }, + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string" + }, + "upstream_headers_claims": { + "description": "The upstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string" + }, + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string" + }, + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string" + }, + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "type": "string" + }, + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string" + }, + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string" + }, + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string" + }, + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "userinfo_accept": { + "default": "application/json", + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt" + ], + "type": "string" + }, + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "using_pseudo_issuer": { + "default": false, + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "type": "boolean" + }, + "verify_claims": { + "default": true, + "description": "Verify tokens for standard claims.", + "type": "boolean" + }, + "verify_nonce": { + "default": true, + "description": "Verify nonce on authorization code flow.", + "type": "boolean" + }, + "verify_parameters": { + "default": false, + "description": "Verify plugin configuration against discovery.", + "type": "boolean" + }, + "verify_signature": { + "default": true, + "description": "Verify signature of tokens.", + "type": "boolean" + } + }, + "required": [ + "issuer" + ], + "type": "object" + }, + "strategy_id": { + "description": "The strategy id the config is tied to.", + "type": "string" + } + }, + "required": [ + "strategy_id" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "scope" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/konnect-application-auth/3.8.json b/json_schemas/konnect-application-auth/3.8.json new file mode 100644 index 00000000..dc17835a --- /dev/null +++ b/json_schemas/konnect-application-auth/3.8.json @@ -0,0 +1,2337 @@ +{ + "properties": { + "config": { + "properties": { + "auth_type": { + "default": "openid-connect", + "description": "The type of authentication to be performed. Possible values are: 'openid-connect', 'key-auth', 'v2-strategies'.", + "enum": [ + "key-auth", + "openid-connect", + "v2-strategies" + ], + "type": "string" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scope": { + "description": "The unique scope identifier for the plugin configuration.", + "type": "string" + }, + "v2_strategies": { + "description": "The map of v2 strategies.", + "properties": { + "key_auth": { + "description": "List of key_auth strategies.", + "items": { + "properties": { + "config": { + "properties": { + "key_names": { + "default": [ + "apikey" + ], + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "strategy_id": { + "description": "The strategy id the config is tied to.", + "type": "string" + } + }, + "required": [ + "config", + "strategy_id" + ], + "type": "object" + }, + "type": "array" + }, + "openid_connect": { + "description": "List of openid_connect strategies.", + "items": { + "properties": { + "config": { + "description": "openid-connect plugin configuration.", + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "audience": { + "description": "The audience passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_claim": { + "default": [ + "aud" + ], + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "auth_methods": { + "default": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "description": "Types of credentials/grants to enable.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string" + }, + "authorization_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "authorization_cookie_name": { + "default": "authorization", + "description": "The authorization cookie name.", + "type": "string" + }, + "authorization_cookie_path": { + "default": "/", + "description": "The authorization cookie Path flag.", + "type": "string" + }, + "authorization_cookie_same_site": { + "default": "Default", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_rolling_timeout": { + "default": 600, + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string" + }, + "bearer_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the bearer token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "items": { + "enum": [ + "body", + "cookie", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "by_username_ignore_case": { + "default": false, + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "type": "boolean" + }, + "cache_introspection": { + "default": true, + "description": "Cache the introspection endpoint requests.", + "type": "boolean" + }, + "cache_token_exchange": { + "default": true, + "description": "Cache the token exchange endpoint requests.", + "type": "boolean" + }, + "cache_tokens": { + "default": true, + "description": "Cache the token endpoint requests.", + "type": "boolean" + }, + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "type": "string" + }, + "cache_ttl": { + "default": 3600, + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "type": "number" + }, + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number" + }, + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number" + }, + "cache_user_info": { + "default": true, + "description": "Cache the user info requests.", + "type": "boolean" + }, + "claims_forbidden": { + "description": "If given, these claims are forbidden in the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_alg": { + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "items": { + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS384", + "RS512" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_arg": { + "default": "client_id", + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "type": "string" + }, + "client_auth": { + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "items": { + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_credentials_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_jwk": { + "description": "The JWK used for the private_key_jwt authentication.", + "items": { + "properties": { + "alg": { + "type": "string" + }, + "crv": { + "type": "string" + }, + "d": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dp": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dq": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "e": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "k": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "key_ops": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "kid": { + "type": "string" + }, + "kty": { + "type": "string" + }, + "n": { + "type": "string" + }, + "oth": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "p": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "q": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "qi": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "r": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "t": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "use": { + "type": "string" + }, + "x": { + "type": "string" + }, + "x5c": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "x5t": { + "type": "string" + }, + "x5t#S256": { + "type": "string" + }, + "x5u": { + "type": "string" + }, + "y": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "cluster_cache_redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "translate_backwards": [ + "connect_timeout" + ], + "type": "integer" + } + }, + "type": "object" + }, + "cluster_cache_strategy": { + "default": "off", + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "enum": [ + "off", + "redis" + ], + "type": "string" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_claim": { + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Do not terminate the request if consumer mapping fails.", + "type": "boolean" + }, + "credential_claim": { + "default": [ + "sub" + ], + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "display_errors": { + "default": false, + "description": "Display errors on failure responses.", + "type": "boolean" + }, + "domains": { + "description": "The allowed values for the `hd` claim.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string" + }, + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string" + }, + "downstream_headers_claims": { + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string" + }, + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string" + }, + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string" + }, + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "type": "string" + }, + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string" + }, + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string" + }, + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string" + }, + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "dpop_proof_lifetime": { + "default": 300, + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "type": "number" + }, + "dpop_use_nonce": { + "default": false, + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "type": "boolean" + }, + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "expose_error_code": { + "default": true, + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "type": "boolean" + }, + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "forbidden_destroy_session": { + "default": true, + "description": "Destroy any active session for the forbidden requests.", + "type": "boolean" + }, + "forbidden_error_message": { + "default": "Forbidden", + "description": "The error message for the forbidden requests (when not using the redirection).", + "type": "string" + }, + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_claim": { + "default": [ + "groups" + ], + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "type": "boolean" + }, + "http_proxy": { + "description": "The HTTP proxy.", + "type": "string" + }, + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.", + "type": "string" + }, + "http_version": { + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "type": "number" + }, + "https_proxy": { + "description": "The HTTPS proxy.", + "type": "string" + }, + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.", + "type": "string" + }, + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string" + }, + "id_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_signature": { + "default": [ + + ], + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "introspection", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspect_jwt_tokens": { + "default": false, + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "type": "boolean" + }, + "introspection_accept": { + "default": "application/json", + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt", + "application/token-introspection+jwt" + ], + "type": "string" + }, + "introspection_check_active": { + "default": true, + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "type": "boolean" + }, + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_values": { + "description": "Extra header values passed to the introspection endpoint.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_hint": { + "default": "access_token", + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "type": "string" + }, + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for introspection.", + "type": "string" + }, + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "type": "string" + }, + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "jwt_session_claim": { + "default": "sid", + "description": "The claim to match against the JWT session cookie.", + "type": "string" + }, + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string" + }, + "keepalive": { + "default": true, + "description": "Use keepalive with the HTTP client.", + "type": "boolean" + }, + "leeway": { + "default": 0, + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "type": "number" + }, + "login_action": { + "default": "upstream", + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "enum": [ + "redirect", + "response", + "upstream" + ], + "type": "string" + }, + "login_methods": { + "default": [ + "authorization_code" + ], + "description": "Enable login functionality with specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_redirect_mode": { + "default": "fragment", + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "enum": [ + "fragment", + "query" + ], + "type": "string" + }, + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_tokens": { + "default": [ + "id_token" + ], + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "items": { + "enum": [ + "access_token", + "id_token", + "introspection", + "refresh_token", + "tokens" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string" + }, + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string" + }, + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_revoke": { + "default": false, + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "type": "boolean" + }, + "logout_revoke_access_token": { + "default": true, + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_revoke_refresh_token": { + "default": true, + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string" + }, + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number" + }, + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string" + }, + "password_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "preserve_query_args": { + "default": false, + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "type": "boolean" + }, + "proof_of_possession_auth_methods_validation": { + "default": true, + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "type": "boolean" + }, + "proof_of_possession_dpop": { + "default": "off", + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "proof_of_possession_mtls": { + "default": "off", + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "pushed_authorization_request_endpoint_auth_method": { + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "translate_backwards": [ + "connect_timeout" + ], + "type": "integer" + } + }, + "type": "object" + }, + "rediscovery_lifetime": { + "default": 30, + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "type": "number" + }, + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string" + }, + "refresh_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "refresh_tokens": { + "default": true, + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "type": "boolean" + }, + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean" + }, + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean" + }, + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean" + }, + "resolve_distributed_claims": { + "default": false, + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "type": "boolean" + }, + "response_mode": { + "default": "query", + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "enum": [ + "form_post", + "form_post.jwt", + "fragment", + "fragment.jwt", + "jwt", + "query", + "query.jwt" + ], + "type": "string" + }, + "response_type": { + "default": [ + "code" + ], + "description": "The response type passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "reverify": { + "default": false, + "description": "Specifies whether to always verify tokens stored in the session.", + "type": "boolean" + }, + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "revocation_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for revocation.", + "type": "string" + }, + "roles_claim": { + "default": [ + "roles" + ], + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "run_on_preflight": { + "default": true, + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "type": "boolean" + }, + "scopes": { + "default": [ + "openid" + ], + "description": "The scopes passed to the authorization and token endpoints.", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_claim": { + "default": [ + "scope" + ], + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "search_user_info": { + "default": false, + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "type": "boolean" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "The session cookie Path flag.", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "The memcached port.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "type": "number" + }, + "session_request_headers": { + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "session_secret": { + "description": "The session secret.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "tls_client_auth_cert_id": { + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "type": "string", + "uuid": true + }, + "tls_client_auth_ssl_verify": { + "default": true, + "description": "Verify identity provider server certificate during mTLS client authentication.", + "type": "boolean" + }, + "token_cache_key_include_scope": { + "default": false, + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean" + }, + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "type": "string" + }, + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "password", + "refresh_token" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string" + }, + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unauthorized_destroy_session": { + "default": true, + "description": "Destroy any active session for the unauthorized requests.", + "type": "boolean" + }, + "unauthorized_error_message": { + "default": "Unauthorized", + "description": "The error message for the unauthorized requests (when not using the redirection).", + "type": "string" + }, + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_access_token_header": { + "default": "authorization:bearer", + "description": "The upstream access token header.", + "type": "string" + }, + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string" + }, + "upstream_headers_claims": { + "description": "The upstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string" + }, + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string" + }, + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string" + }, + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "type": "string" + }, + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string" + }, + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string" + }, + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string" + }, + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "userinfo_accept": { + "default": "application/json", + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt" + ], + "type": "string" + }, + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "using_pseudo_issuer": { + "default": false, + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "type": "boolean" + }, + "verify_claims": { + "default": true, + "description": "Verify tokens for standard claims.", + "type": "boolean" + }, + "verify_nonce": { + "default": true, + "description": "Verify nonce on authorization code flow.", + "type": "boolean" + }, + "verify_parameters": { + "default": false, + "description": "Verify plugin configuration against discovery.", + "type": "boolean" + }, + "verify_signature": { + "default": true, + "description": "Verify signature of tokens.", + "type": "boolean" + } + }, + "required": [ + "cluster_cache_redis", + "issuer", + "redis" + ], + "type": "object" + }, + "strategy_id": { + "description": "The strategy id the config is tied to.", + "type": "string" + } + }, + "required": [ + "strategy_id" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "scope" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/konnect-application-auth/3.9.json b/json_schemas/konnect-application-auth/3.9.json new file mode 100644 index 00000000..48b128a0 --- /dev/null +++ b/json_schemas/konnect-application-auth/3.9.json @@ -0,0 +1,2345 @@ +{ + "properties": { + "config": { + "properties": { + "auth_type": { + "default": "openid-connect", + "description": "The type of authentication to be performed. Possible values are: 'openid-connect', 'key-auth', 'v2-strategies'.", + "enum": [ + "key-auth", + "openid-connect", + "v2-strategies" + ], + "type": "string" + }, + "key_names": { + "default": [ + "apikey" + ], + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scope": { + "description": "The unique scope identifier for the plugin configuration.", + "type": "string" + }, + "v2_strategies": { + "description": "The map of v2 strategies.", + "properties": { + "key_auth": { + "description": "List of key_auth strategies.", + "items": { + "properties": { + "config": { + "properties": { + "key_names": { + "default": [ + "apikey" + ], + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "strategy_id": { + "description": "The strategy id the config is tied to.", + "type": "string" + } + }, + "required": [ + "config", + "strategy_id" + ], + "type": "object" + }, + "type": "array" + }, + "openid_connect": { + "description": "List of openid_connect strategies.", + "items": { + "properties": { + "config": { + "description": "openid-connect plugin configuration.", + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "audience": { + "description": "The audience passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_claim": { + "default": [ + "aud" + ], + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "auth_methods": { + "default": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "description": "Types of credentials/grants to enable.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string" + }, + "authorization_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "authorization_cookie_name": { + "default": "authorization", + "description": "The authorization cookie name.", + "type": "string" + }, + "authorization_cookie_path": { + "default": "/", + "description": "The authorization cookie Path flag.", + "type": "string" + }, + "authorization_cookie_same_site": { + "default": "Default", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_rolling_timeout": { + "default": 600, + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string" + }, + "bearer_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the bearer token: - `header`: search the `Authorization`, `access-token`, and `x-access-token` HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "items": { + "enum": [ + "body", + "cookie", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "by_username_ignore_case": { + "default": false, + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "type": "boolean" + }, + "cache_introspection": { + "default": true, + "description": "Cache the introspection endpoint requests.", + "type": "boolean" + }, + "cache_token_exchange": { + "default": true, + "description": "Cache the token exchange endpoint requests.", + "type": "boolean" + }, + "cache_tokens": { + "default": true, + "description": "Cache the token endpoint requests.", + "type": "boolean" + }, + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "type": "string" + }, + "cache_ttl": { + "default": 3600, + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "type": "number" + }, + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number" + }, + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number" + }, + "cache_user_info": { + "default": true, + "description": "Cache the user info requests.", + "type": "boolean" + }, + "claims_forbidden": { + "description": "If given, these claims are forbidden in the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_alg": { + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "items": { + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS384", + "RS512" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_arg": { + "default": "client_id", + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "type": "string" + }, + "client_auth": { + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "items": { + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_credentials_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_jwk": { + "description": "The JWK used for the private_key_jwt authentication.", + "items": { + "properties": { + "alg": { + "type": "string" + }, + "crv": { + "type": "string" + }, + "d": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dp": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dq": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "e": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "k": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "key_ops": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "kid": { + "type": "string" + }, + "kty": { + "type": "string" + }, + "n": { + "type": "string" + }, + "oth": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "p": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "q": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "qi": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "r": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "t": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "use": { + "type": "string" + }, + "x": { + "type": "string" + }, + "x5c": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "x5t": { + "type": "string" + }, + "x5t#S256": { + "type": "string" + }, + "x5u": { + "type": "string" + }, + "y": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "cluster_cache_redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "cluster_cache_strategy": { + "default": "off", + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "enum": [ + "off", + "redis" + ], + "type": "string" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_claim": { + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Do not terminate the request if consumer mapping fails.", + "type": "boolean" + }, + "credential_claim": { + "default": [ + "sub" + ], + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "display_errors": { + "default": false, + "description": "Display errors on failure responses.", + "type": "boolean" + }, + "domains": { + "description": "The allowed values for the `hd` claim.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string" + }, + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string" + }, + "downstream_headers_claims": { + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string" + }, + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string" + }, + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string" + }, + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "type": "string" + }, + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string" + }, + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string" + }, + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string" + }, + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "dpop_proof_lifetime": { + "default": 300, + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "type": "number" + }, + "dpop_use_nonce": { + "default": false, + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "type": "boolean" + }, + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "expose_error_code": { + "default": true, + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "type": "boolean" + }, + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "forbidden_destroy_session": { + "default": true, + "description": "Destroy any active session for the forbidden requests.", + "type": "boolean" + }, + "forbidden_error_message": { + "default": "Forbidden", + "description": "The error message for the forbidden requests (when not using the redirection).", + "type": "string" + }, + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_claim": { + "default": [ + "groups" + ], + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "type": "boolean" + }, + "http_proxy": { + "description": "The HTTP proxy.", + "type": "string" + }, + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "http_version": { + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "type": "number" + }, + "https_proxy": { + "description": "The HTTPS proxy.", + "type": "string" + }, + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string" + }, + "id_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_signature": { + "default": [ + + ], + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "introspection", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspect_jwt_tokens": { + "default": false, + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "type": "boolean" + }, + "introspection_accept": { + "default": "application/json", + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt", + "application/token-introspection+jwt" + ], + "type": "string" + }, + "introspection_check_active": { + "default": true, + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "type": "boolean" + }, + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_values": { + "description": "Extra header values passed to the introspection endpoint.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_hint": { + "default": "access_token", + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "type": "string" + }, + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_client_headers": { + "description": "Extra post arguments passed from the client headers to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for introspection.", + "type": "string" + }, + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "type": "string" + }, + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "jwt_session_claim": { + "default": "sid", + "description": "The claim to match against the JWT session cookie.", + "type": "string" + }, + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string" + }, + "keepalive": { + "default": true, + "description": "Use keepalive with the HTTP client.", + "type": "boolean" + }, + "leeway": { + "default": 0, + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "type": "number" + }, + "login_action": { + "default": "upstream", + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "enum": [ + "redirect", + "response", + "upstream" + ], + "type": "string" + }, + "login_methods": { + "default": [ + "authorization_code" + ], + "description": "Enable login functionality with specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_redirect_mode": { + "default": "fragment", + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "enum": [ + "fragment", + "query" + ], + "type": "string" + }, + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_tokens": { + "default": [ + "id_token" + ], + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "items": { + "enum": [ + "access_token", + "id_token", + "introspection", + "refresh_token", + "tokens" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string" + }, + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string" + }, + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_revoke": { + "default": false, + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "type": "boolean" + }, + "logout_revoke_access_token": { + "default": true, + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_revoke_refresh_token": { + "default": true, + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string" + }, + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number" + }, + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string" + }, + "password_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "preserve_query_args": { + "default": false, + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "type": "boolean" + }, + "proof_of_possession_auth_methods_validation": { + "default": true, + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "type": "boolean" + }, + "proof_of_possession_dpop": { + "default": "off", + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "proof_of_possession_mtls": { + "default": "off", + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "pushed_authorization_request_endpoint_auth_method": { + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "rediscovery_lifetime": { + "default": 30, + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "type": "number" + }, + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string" + }, + "refresh_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "refresh_tokens": { + "default": true, + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "type": "boolean" + }, + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean" + }, + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean" + }, + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean" + }, + "resolve_distributed_claims": { + "default": false, + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "type": "boolean" + }, + "response_mode": { + "default": "query", + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "enum": [ + "form_post", + "form_post.jwt", + "fragment", + "fragment.jwt", + "jwt", + "query", + "query.jwt" + ], + "type": "string" + }, + "response_type": { + "default": [ + "code" + ], + "description": "The response type passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "reverify": { + "default": false, + "description": "Specifies whether to always verify tokens stored in the session.", + "type": "boolean" + }, + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "revocation_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for revocation.", + "type": "string" + }, + "roles_claim": { + "default": [ + "roles" + ], + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "run_on_preflight": { + "default": true, + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "type": "boolean" + }, + "scopes": { + "default": [ + "openid" + ], + "description": "The scopes passed to the authorization and token endpoints.", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_claim": { + "default": [ + "scope" + ], + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "search_user_info": { + "default": false, + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "type": "boolean" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "The session cookie Path flag.", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "The memcached port.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "type": "number" + }, + "session_request_headers": { + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "session_secret": { + "description": "The session secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "tls_client_auth_cert_id": { + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "type": "string", + "uuid": true + }, + "tls_client_auth_ssl_verify": { + "default": true, + "description": "Verify identity provider server certificate during mTLS client authentication.", + "type": "boolean" + }, + "token_cache_key_include_scope": { + "default": false, + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean" + }, + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "type": "string" + }, + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "password", + "refresh_token" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string" + }, + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unauthorized_destroy_session": { + "default": true, + "description": "Destroy any active session for the unauthorized requests.", + "type": "boolean" + }, + "unauthorized_error_message": { + "default": "Unauthorized", + "description": "The error message for the unauthorized requests (when not using the redirection).", + "type": "string" + }, + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_access_token_header": { + "default": "authorization:bearer", + "description": "The upstream access token header.", + "type": "string" + }, + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string" + }, + "upstream_headers_claims": { + "description": "The upstream header claims. Only top level claims are supported.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string" + }, + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string" + }, + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string" + }, + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "type": "string" + }, + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string" + }, + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string" + }, + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string" + }, + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "userinfo_accept": { + "default": "application/json", + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt" + ], + "type": "string" + }, + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "using_pseudo_issuer": { + "default": false, + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "type": "boolean" + }, + "verify_claims": { + "default": true, + "description": "Verify tokens for standard claims.", + "type": "boolean" + }, + "verify_nonce": { + "default": true, + "description": "Verify nonce on authorization code flow.", + "type": "boolean" + }, + "verify_parameters": { + "default": false, + "description": "Verify plugin configuration against discovery.", + "type": "boolean" + }, + "verify_signature": { + "default": true, + "description": "Verify signature of tokens.", + "type": "boolean" + } + }, + "required": [ + "cluster_cache_redis", + "issuer", + "redis" + ], + "type": "object" + }, + "strategy_id": { + "description": "The strategy id the config is tied to.", + "type": "string" + } + }, + "required": [ + "strategy_id" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "scope" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ldap-auth-advanced/2.8.json b/json_schemas/ldap-auth-advanced/2.8.json new file mode 100644 index 00000000..f24ef15a --- /dev/null +++ b/json_schemas/ldap-auth-advanced/2.8.json @@ -0,0 +1,190 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "default": "", + "description": "An optional string (consumer UUID) value to use as an anonymous consumer if authentication fails.\nIf empty (default), the request will fail with an authentication failure `4xx`. Note that this value\nmust refer to the consumer `id` attribute that is internal to Kong Gateway, and **not** its `custom_id`.", + "minLength": 0, + "type": "string" + }, + "attribute": { + "description": "Attribute to be used to search the user; e.g., \"cn\".", + "examples": [ + "cn" + ], + "type": "string" + }, + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., \"dc=example,dc=com\".", + "examples": [ + "dc=example,dc=com" + ], + "type": "string" + }, + "bind_dn": { + "description": "The DN to bind to. Used to perform LDAP search of user. This `bind_dn`\nshould have permissions to search for the user being authenticated.", + "type": "string" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "examples": [ + 60 + ], + "type": "number" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to authenticate consumers based on `username`, `custom_id`, or both.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Whether consumer mapping is optional. If `consumer_optional=true`, the plugin will not attempt to associate a consumer with the\nLDAP authenticated user. If `consumer_optional=false`, LDAP authenticated users can still access upstream resources.\n\nTo prevent access from LDAP users that are not associated with consumers, set `consumer_optional=false`, set the `anonymous` field to an\nexisting `consumer_id`, then use the [Request Termination plugin](/hub/kong-inc/request-termination/) to deny any requests from the anonymous consumer.", + "type": "boolean" + }, + "group_base_dn": { + "description": "Sets a distinguished name (DN) for the entry where LDAP searches for groups begin. This field is case-insensitive.", + "type": "string" + }, + "group_member_attribute": { + "default": "memberOf", + "description": "Sets the attribute holding the members of the LDAP group. This field is case-sensitive.", + "type": "string" + }, + "group_name_attribute": { + "description": "Sets the attribute holding the name of a group, typically\ncalled `name` (in Active Directory) or `cn` (in OpenLDAP). This\nfield is case-insensitive.", + "type": "string" + }, + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this:\n`Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be\n`Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `\"ldap\"` and `\"basic\"`.", + "examples": [ + "ldap" + ], + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + }, + "ldap_host": { + "description": "Host on which the LDAP server is running.", + "examples": [ + "ldap.example.com" + ], + "type": "string" + }, + "ldap_password": { + "description": "The password to the LDAP server.", + "type": "string" + }, + "ldap_port": { + "default": 389, + "description": "TCP port where the LDAP server is listening. 389 is the default\nport for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is\nconfigured, you must use port 636.", + "examples": [ + 389 + ], + "type": "number" + }, + "ldaps": { + "default": false, + "description": "Set it to `true` to use `ldaps`, a secure protocol (that can be configured\nto TLS) to connect to the LDAP server. When `ldaps` is\nconfigured, you must use port 636. If the `ldap` setting is enabled, ensure the\n`start_tls` setting is disabled.", + "type": "boolean" + }, + "log_search_results": { + "default": false, + "description": "Displays all the LDAP search results received from the LDAP\nserver for debugging purposes. Not recommended to be enabled in\na production environment.", + "type": "boolean" + }, + "start_tls": { + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation\nover `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps`\nsetting is disabled.", + "examples": [ + true + ], + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + }, + "verify_ldap_host": { + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "examples": [ + false + ], + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/ldap-auth-advanced/3.10.json b/json_schemas/ldap-auth-advanced/3.10.json new file mode 100644 index 00000000..ac43f2de --- /dev/null +++ b/json_schemas/ldap-auth-advanced/3.10.json @@ -0,0 +1,195 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "minLength": 0, + "type": "string" + }, + "attribute": { + "description": "Attribute to be used to search the user; e.g., \"cn\".", + "type": "string" + }, + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., 'dc=example,dc=com'.", + "type": "string" + }, + "bind_dn": { + "description": "The DN to bind to. Used to perform LDAP search of user. This `bind_dn` should have permissions to search for the user being authenticated.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to authenticate consumers based on `username`, `custom_id`, or both.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Whether consumer mapping is optional. If `consumer_optional=true`, the plugin will not attempt to associate a consumer with the LDAP authenticated user.", + "type": "boolean" + }, + "group_base_dn": { + "description": "Sets a distinguished name (DN) for the entry where LDAP searches for groups begin. This field is case-insensitive.',dc=com'.", + "type": "string" + }, + "group_member_attribute": { + "default": "memberOf", + "description": "Sets the attribute holding the members of the LDAP group. This field is case-sensitive.", + "type": "string" + }, + "group_name_attribute": { + "description": "Sets the attribute holding the name of a group, typically called `name` (in Active Directory) or `cn` (in OpenLDAP). This field is case-insensitive.", + "type": "string" + }, + "groups_required": { + "description": "The groups required to be present in the LDAP search result for successful authorization. This config parameter works in both **AND** / **OR** cases. - When `[\"group1 group2\"]` are in the same array indices, both `group1` AND `group2` need to be present in the LDAP search result. - When `[\"group1\", \"group2\"]` are in different array indices, either `group1` OR `group2` need to be present in the LDAP search result.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this: `Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be `Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `'ldap'` and `'basic'`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + }, + "ldap_host": { + "description": "Host on which the LDAP server is running.", + "type": "string" + }, + "ldap_password": { + "description": "The password to the LDAP server.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "ldap_port": { + "default": 389, + "description": "TCP port where the LDAP server is listening. 389 is the default port for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is configured, you must use port 636.", + "type": "number" + }, + "ldaps": { + "default": false, + "description": "Set it to `true` to use `ldaps`, a secure protocol (that can be configured to TLS) to connect to the LDAP server. When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean" + }, + "log_search_results": { + "default": false, + "description": "Displays all the LDAP search results received from the LDAP server for debugging purposes. Not recommended to be enabled in a production environment.", + "type": "boolean" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "start_tls": { + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + }, + "verify_ldap_host": { + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean" + } + }, + "required": [ + "attribute", + "base_dn", + "ldap_host" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ldap-auth-advanced/3.11.json b/json_schemas/ldap-auth-advanced/3.11.json new file mode 100644 index 00000000..bdc0cbb6 --- /dev/null +++ b/json_schemas/ldap-auth-advanced/3.11.json @@ -0,0 +1,185 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "minLength": 0, + "type": "string" + }, + "attribute": { + "description": "Attribute to be used to search the user; e.g., \"cn\".", + "type": "string" + }, + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., 'dc=example,dc=com'.", + "type": "string" + }, + "bind_dn": { + "description": "The DN to bind to. Used to perform LDAP search of user. This `bind_dn` should have permissions to search for the user being authenticated.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to authenticate consumers based on `username`, `custom_id`, or both.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Whether consumer mapping is optional. If `consumer_optional=true`, the plugin will not attempt to associate a consumer with the LDAP authenticated user.", + "type": "boolean" + }, + "group_base_dn": { + "description": "Sets a distinguished name (DN) for the entry where LDAP searches for groups begin. This field is case-insensitive.',dc=com'.", + "type": "string" + }, + "group_member_attribute": { + "default": "memberOf", + "description": "Sets the attribute holding the members of the LDAP group. This field is case-sensitive.", + "type": "string" + }, + "group_name_attribute": { + "description": "Sets the attribute holding the name of a group, typically called `name` (in Active Directory) or `cn` (in OpenLDAP). This field is case-insensitive.", + "type": "string" + }, + "groups_required": { + "description": "The groups required to be present in the LDAP search result for successful authorization. This config parameter works in both **AND** / **OR** cases. - When `[\"group1 group2\"]` are in the same array indices, both `group1` AND `group2` need to be present in the LDAP search result. - When `[\"group1\", \"group2\"]` are in different array indices, either `group1` OR `group2` need to be present in the LDAP search result.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this: `Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be `Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `'ldap'` and `'basic'`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + }, + "ldap_host": { + "description": "Host on which the LDAP server is running.", + "type": "string" + }, + "ldap_password": { + "description": "The password to the LDAP server.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "ldap_port": { + "default": 389, + "description": "TCP port where the LDAP server is listening. 389 is the default port for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is configured, you must use port 636.", + "type": "number" + }, + "ldaps": { + "default": false, + "description": "Set it to `true` to use `ldaps`, a secure protocol (that can be configured to TLS) to connect to the LDAP server. When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean" + }, + "log_search_results": { + "default": false, + "description": "Displays all the LDAP search results received from the LDAP server for debugging purposes. Not recommended to be enabled in a production environment.", + "type": "boolean" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "start_tls": { + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + }, + "verify_ldap_host": { + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean" + } + }, + "required": [ + "attribute", + "base_dn", + "ldap_host" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ldap-auth-advanced/3.12.json b/json_schemas/ldap-auth-advanced/3.12.json new file mode 100644 index 00000000..7cc1bfc1 --- /dev/null +++ b/json_schemas/ldap-auth-advanced/3.12.json @@ -0,0 +1,185 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "minLength": 0, + "type": "string" + }, + "attribute": { + "description": "Attribute to be used to search the user; e.g., \"cn\".", + "type": "string" + }, + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., 'dc=example,dc=com'.", + "type": "string" + }, + "bind_dn": { + "description": "The DN to bind to. Used to perform LDAP search of user. This `bind_dn` should have permissions to search for the user being authenticated.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to authenticate consumers based on `username`, `custom_id`, or both.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Whether consumer mapping is optional. If `consumer_optional=true`, the plugin will not attempt to associate a consumer with the LDAP authenticated user.", + "type": "boolean" + }, + "group_base_dn": { + "description": "Sets a distinguished name (DN) for the entry where LDAP searches for groups begin. This field is case-insensitive.',dc=com'.", + "type": "string" + }, + "group_member_attribute": { + "default": "memberOf", + "description": "Sets the attribute holding the members of the LDAP group. This field is case-sensitive.", + "type": "string" + }, + "group_name_attribute": { + "description": "Sets the attribute holding the name of a group, typically called `name` (in Active Directory) or `cn` (in OpenLDAP). This field is case-insensitive.", + "type": "string" + }, + "groups_required": { + "description": "The groups required to be present in the LDAP search result for successful authorization. This config parameter works in both **AND** / **OR** cases. - When `[\"group1 group2\"]` are in the same array indices, both `group1` AND `group2` need to be present in the LDAP search result. - When `[\"group1\", \"group2\"]` are in different array indices, either `group1` OR `group2` need to be present in the LDAP search result.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this: `Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be `Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `'ldap'` and `'basic'`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + }, + "ldap_host": { + "description": "Host on which the LDAP server is running.", + "type": "string" + }, + "ldap_password": { + "description": "The password to the LDAP server.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "ldap_port": { + "default": 389, + "description": "TCP port where the LDAP server is listening. 389 is the default port for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is configured, you must use port 636.", + "type": "number" + }, + "ldaps": { + "default": false, + "description": "Set it to `true` to use `ldaps`, a secure protocol (that can be configured to TLS) to connect to the LDAP server. When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean" + }, + "log_search_results": { + "default": false, + "description": "Displays all the LDAP search results received from the LDAP server for debugging purposes. Not recommended to be enabled in a production environment.", + "type": "boolean" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "start_tls": { + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + }, + "verify_ldap_host": { + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean" + } + }, + "required": [ + "attribute", + "base_dn", + "ldap_host" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ldap-auth-advanced/3.4.json b/json_schemas/ldap-auth-advanced/3.4.json new file mode 100644 index 00000000..22f15e6e --- /dev/null +++ b/json_schemas/ldap-auth-advanced/3.4.json @@ -0,0 +1,191 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "minLength": 0, + "type": "string" + }, + "attribute": { + "description": "Attribute to be used to search the user; e.g., \"cn\".", + "type": "string" + }, + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., 'dc=example,dc=com'.", + "type": "string" + }, + "bind_dn": { + "description": "The DN to bind to. Used to perform LDAP search of user. This `bind_dn` should have permissions to search for the user being authenticated.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to authenticate consumers based on `username`, `custom_id`, or both.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Whether consumer mapping is optional. If `consumer_optional=true`, the plugin will not attempt to associate a consumer with the LDAP authenticated user.", + "type": "boolean" + }, + "group_base_dn": { + "description": "Sets a distinguished name (DN) for the entry where LDAP searches for groups begin. This field is case-insensitive.',dc=com'.", + "type": "string" + }, + "group_member_attribute": { + "default": "memberOf", + "description": "Sets the attribute holding the members of the LDAP group. This field is case-sensitive.", + "type": "string" + }, + "group_name_attribute": { + "description": "Sets the attribute holding the name of a group, typically called `name` (in Active Directory) or `cn` (in OpenLDAP). This field is case-insensitive.", + "type": "string" + }, + "groups_required": { + "description": "The groups required to be present in the LDAP search result for successful authorization. This config parameter works in both **AND** / **OR** cases. - When `[\"group1 group2\"]` are in the same array indices, both `group1` AND `group2` need to be present in the LDAP search result. - When `[\"group1\", \"group2\"]` are in different array indices, either `group1` OR `group2` need to be present in the LDAP search result.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this: `Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be `Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `'ldap'` and `'basic'`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + }, + "ldap_host": { + "description": "Host on which the LDAP server is running.", + "type": "string" + }, + "ldap_password": { + "description": "The password to the LDAP server.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "ldap_port": { + "default": 389, + "description": "TCP port where the LDAP server is listening. 389 is the default port for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is configured, you must use port 636.", + "type": "number" + }, + "ldaps": { + "default": false, + "description": "Set it to `true` to use `ldaps`, a secure protocol (that can be configured to TLS) to connect to the LDAP server. When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean" + }, + "log_search_results": { + "default": false, + "description": "Displays all the LDAP search results received from the LDAP server for debugging purposes. Not recommended to be enabled in a production environment.", + "type": "boolean" + }, + "start_tls": { + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + }, + "verify_ldap_host": { + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean" + } + }, + "required": [ + "attribute", + "base_dn", + "ldap_host" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ldap-auth-advanced/3.7.json b/json_schemas/ldap-auth-advanced/3.7.json new file mode 100644 index 00000000..e0e97a8d --- /dev/null +++ b/json_schemas/ldap-auth-advanced/3.7.json @@ -0,0 +1,191 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "minLength": 0, + "type": "string" + }, + "attribute": { + "description": "Attribute to be used to search the user; e.g., \"cn\".", + "type": "string" + }, + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., 'dc=example,dc=com'.", + "type": "string" + }, + "bind_dn": { + "description": "The DN to bind to. Used to perform LDAP search of user. This `bind_dn` should have permissions to search for the user being authenticated.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to authenticate consumers based on `username`, `custom_id`, or both.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Whether consumer mapping is optional. If `consumer_optional=true`, the plugin will not attempt to associate a consumer with the LDAP authenticated user.", + "type": "boolean" + }, + "group_base_dn": { + "description": "Sets a distinguished name (DN) for the entry where LDAP searches for groups begin. This field is case-insensitive.',dc=com'.", + "type": "string" + }, + "group_member_attribute": { + "default": "memberOf", + "description": "Sets the attribute holding the members of the LDAP group. This field is case-sensitive.", + "type": "string" + }, + "group_name_attribute": { + "description": "Sets the attribute holding the name of a group, typically called `name` (in Active Directory) or `cn` (in OpenLDAP). This field is case-insensitive.", + "type": "string" + }, + "groups_required": { + "description": "The groups required to be present in the LDAP search result for successful authorization. This config parameter works in both **AND** / **OR** cases. - When `[\"group1 group2\"]` are in the same array indices, both `group1` AND `group2` need to be present in the LDAP search result. - When `[\"group1\", \"group2\"]` are in different array indices, either `group1` OR `group2` need to be present in the LDAP search result.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this: `Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be `Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `'ldap'` and `'basic'`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + }, + "ldap_host": { + "description": "Host on which the LDAP server is running.", + "type": "string" + }, + "ldap_password": { + "description": "The password to the LDAP server.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "ldap_port": { + "default": 389, + "description": "TCP port where the LDAP server is listening. 389 is the default port for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is configured, you must use port 636.", + "type": "number" + }, + "ldaps": { + "default": false, + "description": "Set it to `true` to use `ldaps`, a secure protocol (that can be configured to TLS) to connect to the LDAP server. When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean" + }, + "log_search_results": { + "default": false, + "description": "Displays all the LDAP search results received from the LDAP server for debugging purposes. Not recommended to be enabled in a production environment.", + "type": "boolean" + }, + "start_tls": { + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + }, + "verify_ldap_host": { + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean" + } + }, + "required": [ + "attribute", + "base_dn", + "ldap_host" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ldap-auth-advanced/3.8.json b/json_schemas/ldap-auth-advanced/3.8.json new file mode 100644 index 00000000..ac43f2de --- /dev/null +++ b/json_schemas/ldap-auth-advanced/3.8.json @@ -0,0 +1,195 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "minLength": 0, + "type": "string" + }, + "attribute": { + "description": "Attribute to be used to search the user; e.g., \"cn\".", + "type": "string" + }, + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., 'dc=example,dc=com'.", + "type": "string" + }, + "bind_dn": { + "description": "The DN to bind to. Used to perform LDAP search of user. This `bind_dn` should have permissions to search for the user being authenticated.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to authenticate consumers based on `username`, `custom_id`, or both.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Whether consumer mapping is optional. If `consumer_optional=true`, the plugin will not attempt to associate a consumer with the LDAP authenticated user.", + "type": "boolean" + }, + "group_base_dn": { + "description": "Sets a distinguished name (DN) for the entry where LDAP searches for groups begin. This field is case-insensitive.',dc=com'.", + "type": "string" + }, + "group_member_attribute": { + "default": "memberOf", + "description": "Sets the attribute holding the members of the LDAP group. This field is case-sensitive.", + "type": "string" + }, + "group_name_attribute": { + "description": "Sets the attribute holding the name of a group, typically called `name` (in Active Directory) or `cn` (in OpenLDAP). This field is case-insensitive.", + "type": "string" + }, + "groups_required": { + "description": "The groups required to be present in the LDAP search result for successful authorization. This config parameter works in both **AND** / **OR** cases. - When `[\"group1 group2\"]` are in the same array indices, both `group1` AND `group2` need to be present in the LDAP search result. - When `[\"group1\", \"group2\"]` are in different array indices, either `group1` OR `group2` need to be present in the LDAP search result.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this: `Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be `Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `'ldap'` and `'basic'`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + }, + "ldap_host": { + "description": "Host on which the LDAP server is running.", + "type": "string" + }, + "ldap_password": { + "description": "The password to the LDAP server.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "ldap_port": { + "default": 389, + "description": "TCP port where the LDAP server is listening. 389 is the default port for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is configured, you must use port 636.", + "type": "number" + }, + "ldaps": { + "default": false, + "description": "Set it to `true` to use `ldaps`, a secure protocol (that can be configured to TLS) to connect to the LDAP server. When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean" + }, + "log_search_results": { + "default": false, + "description": "Displays all the LDAP search results received from the LDAP server for debugging purposes. Not recommended to be enabled in a production environment.", + "type": "boolean" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "start_tls": { + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + }, + "verify_ldap_host": { + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean" + } + }, + "required": [ + "attribute", + "base_dn", + "ldap_host" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ldap-auth-advanced/3.9.json b/json_schemas/ldap-auth-advanced/3.9.json new file mode 100644 index 00000000..ac43f2de --- /dev/null +++ b/json_schemas/ldap-auth-advanced/3.9.json @@ -0,0 +1,195 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "minLength": 0, + "type": "string" + }, + "attribute": { + "description": "Attribute to be used to search the user; e.g., \"cn\".", + "type": "string" + }, + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., 'dc=example,dc=com'.", + "type": "string" + }, + "bind_dn": { + "description": "The DN to bind to. Used to perform LDAP search of user. This `bind_dn` should have permissions to search for the user being authenticated.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to authenticate consumers based on `username`, `custom_id`, or both.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Whether consumer mapping is optional. If `consumer_optional=true`, the plugin will not attempt to associate a consumer with the LDAP authenticated user.", + "type": "boolean" + }, + "group_base_dn": { + "description": "Sets a distinguished name (DN) for the entry where LDAP searches for groups begin. This field is case-insensitive.',dc=com'.", + "type": "string" + }, + "group_member_attribute": { + "default": "memberOf", + "description": "Sets the attribute holding the members of the LDAP group. This field is case-sensitive.", + "type": "string" + }, + "group_name_attribute": { + "description": "Sets the attribute holding the name of a group, typically called `name` (in Active Directory) or `cn` (in OpenLDAP). This field is case-insensitive.", + "type": "string" + }, + "groups_required": { + "description": "The groups required to be present in the LDAP search result for successful authorization. This config parameter works in both **AND** / **OR** cases. - When `[\"group1 group2\"]` are in the same array indices, both `group1` AND `group2` need to be present in the LDAP search result. - When `[\"group1\", \"group2\"]` are in different array indices, either `group1` OR `group2` need to be present in the LDAP search result.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this: `Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be `Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `'ldap'` and `'basic'`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + }, + "ldap_host": { + "description": "Host on which the LDAP server is running.", + "type": "string" + }, + "ldap_password": { + "description": "The password to the LDAP server.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "ldap_port": { + "default": 389, + "description": "TCP port where the LDAP server is listening. 389 is the default port for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is configured, you must use port 636.", + "type": "number" + }, + "ldaps": { + "default": false, + "description": "Set it to `true` to use `ldaps`, a secure protocol (that can be configured to TLS) to connect to the LDAP server. When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean" + }, + "log_search_results": { + "default": false, + "description": "Displays all the LDAP search results received from the LDAP server for debugging purposes. Not recommended to be enabled in a production environment.", + "type": "boolean" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "start_tls": { + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + }, + "verify_ldap_host": { + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean" + } + }, + "required": [ + "attribute", + "base_dn", + "ldap_host" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ldap-auth/2.8.json b/json_schemas/ldap-auth/2.8.json new file mode 100644 index 00000000..0d4a8a3b --- /dev/null +++ b/json_schemas/ldap-auth/2.8.json @@ -0,0 +1,157 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID) value to use as an anonymous consumer if authentication fails.\nIf empty (default), the request fails with an authentication failure `4xx`. Note that this value\nmust refer to the consumer `id` attribute that is internal to Kong Gateway, and **not** its `custom_id`.", + "type": "string" + }, + "attribute": { + "description": "Attribute to be used to search the user; e.g., \"cn\".", + "examples": [ + "cn" + ], + "type": "string" + }, + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., \"dc=example,dc=com\".", + "examples": [ + "dc=example,dc=com" + ], + "type": "string" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this: `Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be `Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `\"ldap\"` and `\"basic\"`.", + "examples": [ + "ldap" + ], + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "examples": [ + true + ], + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + }, + "ldap_host": { + "description": "Host on which the LDAP server is running.", + "examples": [ + "ldap.example.com" + ], + "type": "string" + }, + "ldap_port": { + "default": 389, + "description": "TCP port where the LDAP server is listening. 389 is the default\nport for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is\nconfigured, you must use port 636.", + "examples": [ + 389 + ], + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "ldaps": { + "default": false, + "description": "Set to `true` to connect using the LDAPS protocol (LDAP over TLS). When `ldaps` is\nconfigured, you must use port 636. If the `ldap` setting is enabled, ensure the\n`start_tls` setting is disabled.", + "type": "boolean" + }, + "start_tls": { + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap`\nconnection. If the `start_tls` setting is enabled, ensure the `ldaps`\nsetting is disabled.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + }, + "verify_ldap_host": { + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/ldap-auth/3.10.json b/json_schemas/ldap-auth/3.10.json new file mode 100644 index 00000000..848b6e63 --- /dev/null +++ b/json_schemas/ldap-auth/3.10.json @@ -0,0 +1,136 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`.", + "type": "string" + }, + "attribute": { + "description": "Attribute to be used to search the user; e.g. cn", + "type": "string" + }, + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., dc=example,dc=com", + "type": "string" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + }, + "ldap_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "ldap_port": { + "default": 389, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "ldaps": { + "default": false, + "description": "Set to `true` to connect using the LDAPS protocol (LDAP over TLS). When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "start_tls": { + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + }, + "verify_ldap_host": { + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean" + } + }, + "required": [ + "attribute", + "base_dn", + "ldap_host" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ldap-auth/3.11.json b/json_schemas/ldap-auth/3.11.json new file mode 100644 index 00000000..83df8da2 --- /dev/null +++ b/json_schemas/ldap-auth/3.11.json @@ -0,0 +1,130 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`.", + "type": "string" + }, + "attribute": { + "description": "Attribute to be used to search the user; e.g. cn", + "type": "string" + }, + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., dc=example,dc=com", + "type": "string" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + }, + "ldap_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "ldap_port": { + "default": 389, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "ldaps": { + "default": false, + "description": "Set to `true` to connect using the LDAPS protocol (LDAP over TLS). When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "start_tls": { + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + }, + "verify_ldap_host": { + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean" + } + }, + "required": [ + "attribute", + "base_dn", + "ldap_host" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ldap-auth/3.12.json b/json_schemas/ldap-auth/3.12.json new file mode 100644 index 00000000..83df8da2 --- /dev/null +++ b/json_schemas/ldap-auth/3.12.json @@ -0,0 +1,130 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`.", + "type": "string" + }, + "attribute": { + "description": "Attribute to be used to search the user; e.g. cn", + "type": "string" + }, + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., dc=example,dc=com", + "type": "string" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + }, + "ldap_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "ldap_port": { + "default": 389, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "ldaps": { + "default": false, + "description": "Set to `true` to connect using the LDAPS protocol (LDAP over TLS). When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "start_tls": { + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + }, + "verify_ldap_host": { + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean" + } + }, + "required": [ + "attribute", + "base_dn", + "ldap_host" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ldap-auth/3.4.json b/json_schemas/ldap-auth/3.4.json new file mode 100644 index 00000000..3a6a79e2 --- /dev/null +++ b/json_schemas/ldap-auth/3.4.json @@ -0,0 +1,132 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`.", + "type": "string" + }, + "attribute": { + "description": "Attribute to be used to search the user; e.g. cn", + "type": "string" + }, + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., dc=example,dc=com", + "type": "string" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + }, + "ldap_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "ldap_port": { + "default": 389, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "ldaps": { + "default": false, + "description": "Set to `true` to connect using the LDAPS protocol (LDAP over TLS). When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean" + }, + "start_tls": { + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + }, + "verify_ldap_host": { + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean" + } + }, + "required": [ + "attribute", + "base_dn", + "ldap_host" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ldap-auth/3.7.json b/json_schemas/ldap-auth/3.7.json new file mode 100644 index 00000000..3a6a79e2 --- /dev/null +++ b/json_schemas/ldap-auth/3.7.json @@ -0,0 +1,132 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`.", + "type": "string" + }, + "attribute": { + "description": "Attribute to be used to search the user; e.g. cn", + "type": "string" + }, + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., dc=example,dc=com", + "type": "string" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + }, + "ldap_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "ldap_port": { + "default": 389, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "ldaps": { + "default": false, + "description": "Set to `true` to connect using the LDAPS protocol (LDAP over TLS). When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean" + }, + "start_tls": { + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + }, + "verify_ldap_host": { + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean" + } + }, + "required": [ + "attribute", + "base_dn", + "ldap_host" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ldap-auth/3.8.json b/json_schemas/ldap-auth/3.8.json new file mode 100644 index 00000000..848b6e63 --- /dev/null +++ b/json_schemas/ldap-auth/3.8.json @@ -0,0 +1,136 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`.", + "type": "string" + }, + "attribute": { + "description": "Attribute to be used to search the user; e.g. cn", + "type": "string" + }, + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., dc=example,dc=com", + "type": "string" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + }, + "ldap_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "ldap_port": { + "default": 389, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "ldaps": { + "default": false, + "description": "Set to `true` to connect using the LDAPS protocol (LDAP over TLS). When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "start_tls": { + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + }, + "verify_ldap_host": { + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean" + } + }, + "required": [ + "attribute", + "base_dn", + "ldap_host" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/ldap-auth/3.9.json b/json_schemas/ldap-auth/3.9.json new file mode 100644 index 00000000..848b6e63 --- /dev/null +++ b/json_schemas/ldap-auth/3.9.json @@ -0,0 +1,136 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`.", + "type": "string" + }, + "attribute": { + "description": "Attribute to be used to search the user; e.g. cn", + "type": "string" + }, + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., dc=example,dc=com", + "type": "string" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + }, + "ldap_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "ldap_port": { + "default": 389, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "ldaps": { + "default": false, + "description": "Set to `true` to connect using the LDAPS protocol (LDAP over TLS). When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "start_tls": { + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + }, + "verify_ldap_host": { + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean" + } + }, + "required": [ + "attribute", + "base_dn", + "ldap_host" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/loggly/2.8.json b/json_schemas/loggly/2.8.json new file mode 100644 index 00000000..e3027264 --- /dev/null +++ b/json_schemas/loggly/2.8.json @@ -0,0 +1,195 @@ +{ + "properties": { + "config": { + "properties": { + "client_errors_severity": { + "default": "info", + "description": "An optional logging severity assigned to all the failed requests with a response\nstatus code 400 or higher but less than 500. Available options: `debug`, `info`,\n`notice`, `warning`, `err`, `crit`, `alert`, `emerg`.", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "A list of key-value pairs, where the key is the name of a log field and\nthe value is a chunk of Lua code, whose return value sets or replaces\nthe log field value.", + "type": "object" + }, + "host": { + "default": "logs-01.loggly.com", + "description": "The IP address or hostname of Loggly server.", + "type": "string" + }, + "key": { + "description": "Loggly [customer token](https://www.loggly.com/docs/customer-token-authentication-token/).", + "examples": [ + "YOUR_LOGGLY_SERVICE_TOKEN" + ], + "type": "string" + }, + "log_level": { + "default": "info", + "description": "An optional logging severity, any request with equal or higher severity will be\nlogged to Loggly. Available options: `debug`, `info`, `notice`, `warning`, `err`,\n`crit`, `alert`, `emerg`.", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "port": { + "default": 514, + "description": "The UDP port to send data to on the Loggly server.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_errors_severity": { + "default": "info", + "description": "An optional logging severity assigned to all the failed requests with response status\ncode 500 or higher. Available options: `debug`, `info`, `notice`, `warning`, `err`,\n`crit`, `alert`, `emerg`.", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "successful_severity": { + "default": "info", + "description": "An optional logging severity assigned to all the successful requests with a response\nstatus code 400. Available options: `debug`, `info`, `notice`, `warning`, `err`,\n`crit`, `alert`, `emerg`.", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "tags": { + "default": [ + "kong" + ], + "description": "An optional list of [tags](https://www.loggly.com/docs/tags/) to support segmentation and filtering of logs.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the Loggly server.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/loggly/3.10.json b/json_schemas/loggly/3.10.json new file mode 100644 index 00000000..1f59ef01 --- /dev/null +++ b/json_schemas/loggly/3.10.json @@ -0,0 +1,176 @@ +{ + "properties": { + "config": { + "properties": { + "client_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "host": { + "default": "logs-01.loggly.com", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "key": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "log_level": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "port": { + "default": 514, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "successful_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "tags": { + "default": [ + "kong" + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "timeout": { + "default": 10000, + "type": "number" + } + }, + "required": [ + "key" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/loggly/3.11.json b/json_schemas/loggly/3.11.json new file mode 100644 index 00000000..85be5531 --- /dev/null +++ b/json_schemas/loggly/3.11.json @@ -0,0 +1,166 @@ +{ + "properties": { + "config": { + "properties": { + "client_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "host": { + "default": "logs-01.loggly.com", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "key": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "log_level": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "port": { + "default": 514, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "successful_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "tags": { + "default": [ + "kong" + ], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "timeout": { + "default": 10000, + "type": "number" + } + }, + "required": [ + "key" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/loggly/3.12.json b/json_schemas/loggly/3.12.json new file mode 100644 index 00000000..85be5531 --- /dev/null +++ b/json_schemas/loggly/3.12.json @@ -0,0 +1,166 @@ +{ + "properties": { + "config": { + "properties": { + "client_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "host": { + "default": "logs-01.loggly.com", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "key": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "log_level": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "port": { + "default": 514, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "successful_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "tags": { + "default": [ + "kong" + ], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "timeout": { + "default": 10000, + "type": "number" + } + }, + "required": [ + "key" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/loggly/3.4.json b/json_schemas/loggly/3.4.json new file mode 100644 index 00000000..a8c4aa74 --- /dev/null +++ b/json_schemas/loggly/3.4.json @@ -0,0 +1,176 @@ +{ + "properties": { + "config": { + "properties": { + "client_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "host": { + "default": "logs-01.loggly.com", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "key": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "log_level": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "port": { + "default": 514, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "successful_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "tags": { + "default": [ + "kong" + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "timeout": { + "default": 10000, + "type": "number" + } + }, + "required": [ + "key" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/loggly/3.7.json b/json_schemas/loggly/3.7.json new file mode 100644 index 00000000..a8c4aa74 --- /dev/null +++ b/json_schemas/loggly/3.7.json @@ -0,0 +1,176 @@ +{ + "properties": { + "config": { + "properties": { + "client_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "host": { + "default": "logs-01.loggly.com", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "key": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "log_level": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "port": { + "default": 514, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "successful_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "tags": { + "default": [ + "kong" + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "timeout": { + "default": 10000, + "type": "number" + } + }, + "required": [ + "key" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/loggly/3.8.json b/json_schemas/loggly/3.8.json new file mode 100644 index 00000000..1f59ef01 --- /dev/null +++ b/json_schemas/loggly/3.8.json @@ -0,0 +1,176 @@ +{ + "properties": { + "config": { + "properties": { + "client_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "host": { + "default": "logs-01.loggly.com", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "key": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "log_level": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "port": { + "default": 514, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "successful_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "tags": { + "default": [ + "kong" + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "timeout": { + "default": 10000, + "type": "number" + } + }, + "required": [ + "key" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/loggly/3.9.json b/json_schemas/loggly/3.9.json new file mode 100644 index 00000000..a8c4aa74 --- /dev/null +++ b/json_schemas/loggly/3.9.json @@ -0,0 +1,176 @@ +{ + "properties": { + "config": { + "properties": { + "client_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "host": { + "default": "logs-01.loggly.com", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "key": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "log_level": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "port": { + "default": 514, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "successful_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "tags": { + "default": [ + "kong" + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "timeout": { + "default": 10000, + "type": "number" + } + }, + "required": [ + "key" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/mocking/2.8.json b/json_schemas/mocking/2.8.json new file mode 100644 index 00000000..14d6c3d2 --- /dev/null +++ b/json_schemas/mocking/2.8.json @@ -0,0 +1,110 @@ +{ + "properties": { + "config": { + "properties": { + "api_specification": { + "description": "The contents of the specification file. You must use this option for hybrid or DB-less mode.\nWith this configuration option, you can include the full specification as part of the configuration,\ninstead of referring to a separate file with `api_specification_filename` that lives next to the Kong Gateway.\nIn Kong Manager, you can copy and paste the contents of the spec directly into\nthe `Config.Api Specification` text field.", + "examples": [ + "openapi: 3.0.1\ninfo:\n title: OpenAPI 3.0 API\n description: This is a simple API\n contact:\n email: example@example.com\n version: 1.0.0\n" + ], + "type": "string" + }, + "api_specification_filename": { + "description": "The path and name of the specification file loaded into Kong Gateway's database. You cannot\nuse this option for DB-less or hybrid mode.", + "type": "string" + }, + "max_delay_time": { + "default": 1, + "description": "The maximum value in seconds of delay time. Set this value when `random_delay` is enabled\nand you want to adjust the default. The value must be greater than the\n`min_delay_time`.", + "examples": [ + 1 + ], + "type": "number" + }, + "min_delay_time": { + "default": 0.001, + "description": "The minimum value in seconds of delay time. Set this value when `random_delay` is enabled\nand you want to adjust the default. The value must be less than the\n`max_delay_time`.", + "examples": [ + 0.001 + ], + "type": "number" + }, + "random_delay": { + "default": false, + "description": "Enables a random delay in the mocked response. Introduces delays to simulate\nreal-time response times by APIs.", + "examples": [ + true + ], + "type": "boolean" + }, + "random_examples": { + "default": false, + "description": "Randomly selects one example and returns it. This parameter requires the spec to have multiple examples configured.", + "examples": [ + true + ], + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/mocking/3.10.json b/json_schemas/mocking/3.10.json new file mode 100644 index 00000000..ceb3d3a9 --- /dev/null +++ b/json_schemas/mocking/3.10.json @@ -0,0 +1,128 @@ +{ + "properties": { + "config": { + "properties": { + "api_specification": { + "description": "The contents of the specification file. You must use this option for hybrid or DB-less mode. You can include the full specification as part of the configuration. In Kong Manager, you can copy and paste the contents of the spec directly into the `Config.Api Specification` text field.", + "type": "string" + }, + "api_specification_filename": { + "description": "The path and name of the specification file loaded into Kong Gateway's database. You cannot use this option for DB-less or hybrid mode.", + "type": "string" + }, + "custom_base_path": { + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "type": "string" + }, + "include_base_path": { + "default": false, + "description": "Indicates whether to include the base path when performing path match evaluation.", + "type": "boolean" + }, + "included_status_codes": { + "description": "A global list of the HTTP status codes that can only be selected and returned.", + "items": { + "required": [ + + ], + "type": "integer" + }, + "type": "array" + }, + "max_delay_time": { + "default": 1, + "description": "The maximum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be greater than the `min_delay_time`.", + "type": "number" + }, + "min_delay_time": { + "default": 0.001, + "description": "The minimum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be less than the `max_delay_time`.", + "type": "number" + }, + "random_delay": { + "default": false, + "description": "Enables a random delay in the mocked response. Introduces delays to simulate real-time response times by APIs.", + "type": "boolean" + }, + "random_examples": { + "default": false, + "description": "Randomly selects one example and returns it. This parameter requires the spec to have multiple examples configured.", + "type": "boolean" + }, + "random_status_code": { + "default": false, + "description": "Determines whether to randomly select an HTTP status code from the responses of the corresponding API method. The default value is `false`, which means the minimum HTTP status code is always selected and returned.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/mocking/3.11.json b/json_schemas/mocking/3.11.json new file mode 100644 index 00000000..ef0dfd5c --- /dev/null +++ b/json_schemas/mocking/3.11.json @@ -0,0 +1,114 @@ +{ + "properties": { + "config": { + "properties": { + "api_specification": { + "description": "The contents of the specification file. You must use this option for hybrid or DB-less mode. You can include the full specification as part of the configuration. In Kong Manager, you can copy and paste the contents of the spec directly into the `Config.Api Specification` text field.", + "type": "string" + }, + "api_specification_filename": { + "description": "The path and name of the specification file loaded into Kong Gateway's database. You cannot use this option for DB-less or hybrid mode.", + "type": "string" + }, + "custom_base_path": { + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "type": "string" + }, + "include_base_path": { + "default": false, + "description": "Indicates whether to include the base path when performing path match evaluation.", + "type": "boolean" + }, + "included_status_codes": { + "description": "A global list of the HTTP status codes that can only be selected and returned.", + "items": { + "required": [], + "type": "integer" + }, + "type": "array" + }, + "max_delay_time": { + "default": 1, + "description": "The maximum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be greater than the `min_delay_time`.", + "type": "number" + }, + "min_delay_time": { + "default": 0.001, + "description": "The minimum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be less than the `max_delay_time`.", + "type": "number" + }, + "random_delay": { + "default": false, + "description": "Enables a random delay in the mocked response. Introduces delays to simulate real-time response times by APIs.", + "type": "boolean" + }, + "random_examples": { + "default": false, + "description": "Randomly selects one example and returns it. This parameter requires the spec to have multiple examples configured.", + "type": "boolean" + }, + "random_status_code": { + "default": false, + "description": "Determines whether to randomly select an HTTP status code from the responses of the corresponding API method. The default value is `false`, which means the minimum HTTP status code is always selected and returned.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/mocking/3.12.json b/json_schemas/mocking/3.12.json new file mode 100644 index 00000000..ef0dfd5c --- /dev/null +++ b/json_schemas/mocking/3.12.json @@ -0,0 +1,114 @@ +{ + "properties": { + "config": { + "properties": { + "api_specification": { + "description": "The contents of the specification file. You must use this option for hybrid or DB-less mode. You can include the full specification as part of the configuration. In Kong Manager, you can copy and paste the contents of the spec directly into the `Config.Api Specification` text field.", + "type": "string" + }, + "api_specification_filename": { + "description": "The path and name of the specification file loaded into Kong Gateway's database. You cannot use this option for DB-less or hybrid mode.", + "type": "string" + }, + "custom_base_path": { + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "type": "string" + }, + "include_base_path": { + "default": false, + "description": "Indicates whether to include the base path when performing path match evaluation.", + "type": "boolean" + }, + "included_status_codes": { + "description": "A global list of the HTTP status codes that can only be selected and returned.", + "items": { + "required": [], + "type": "integer" + }, + "type": "array" + }, + "max_delay_time": { + "default": 1, + "description": "The maximum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be greater than the `min_delay_time`.", + "type": "number" + }, + "min_delay_time": { + "default": 0.001, + "description": "The minimum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be less than the `max_delay_time`.", + "type": "number" + }, + "random_delay": { + "default": false, + "description": "Enables a random delay in the mocked response. Introduces delays to simulate real-time response times by APIs.", + "type": "boolean" + }, + "random_examples": { + "default": false, + "description": "Randomly selects one example and returns it. This parameter requires the spec to have multiple examples configured.", + "type": "boolean" + }, + "random_status_code": { + "default": false, + "description": "Determines whether to randomly select an HTTP status code from the responses of the corresponding API method. The default value is `false`, which means the minimum HTTP status code is always selected and returned.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/mocking/3.4.json b/json_schemas/mocking/3.4.json new file mode 100644 index 00000000..154ebb66 --- /dev/null +++ b/json_schemas/mocking/3.4.json @@ -0,0 +1,119 @@ +{ + "properties": { + "config": { + "properties": { + "api_specification": { + "description": "The contents of the specification file. You must use this option for hybrid or DB-less mode. You can include the full specification as part of the configuration. In Kong Manager, you can copy and paste the contents of the spec directly into the `Config.Api Specification` text field.", + "type": "string" + }, + "api_specification_filename": { + "description": "The path and name of the specification file loaded into Kong Gateway's database. You cannot use this option for DB-less or hybrid mode.", + "type": "string" + }, + "included_status_codes": { + "description": "A global list of the HTTP status codes that can only be selected and returned.", + "items": { + "required": [ + + ], + "type": "integer" + }, + "type": "array" + }, + "max_delay_time": { + "default": 1, + "description": "The maximum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be greater than the `min_delay_time`.", + "type": "number" + }, + "min_delay_time": { + "default": 0.001, + "description": "The minimum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be less than the `max_delay_time`.", + "type": "number" + }, + "random_delay": { + "default": false, + "description": "Enables a random delay in the mocked response. Introduces delays to simulate real-time response times by APIs.", + "type": "boolean" + }, + "random_examples": { + "default": false, + "description": "Randomly selects one example and returns it. This parameter requires the spec to have multiple examples configured.", + "type": "boolean" + }, + "random_status_code": { + "default": false, + "description": "Determines whether to randomly select an HTTP status code from the responses of the corresponding API method. The default value is `false`, which means the minimum HTTP status code is always selected and returned.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/mocking/3.7.json b/json_schemas/mocking/3.7.json new file mode 100644 index 00000000..ceb3d3a9 --- /dev/null +++ b/json_schemas/mocking/3.7.json @@ -0,0 +1,128 @@ +{ + "properties": { + "config": { + "properties": { + "api_specification": { + "description": "The contents of the specification file. You must use this option for hybrid or DB-less mode. You can include the full specification as part of the configuration. In Kong Manager, you can copy and paste the contents of the spec directly into the `Config.Api Specification` text field.", + "type": "string" + }, + "api_specification_filename": { + "description": "The path and name of the specification file loaded into Kong Gateway's database. You cannot use this option for DB-less or hybrid mode.", + "type": "string" + }, + "custom_base_path": { + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "type": "string" + }, + "include_base_path": { + "default": false, + "description": "Indicates whether to include the base path when performing path match evaluation.", + "type": "boolean" + }, + "included_status_codes": { + "description": "A global list of the HTTP status codes that can only be selected and returned.", + "items": { + "required": [ + + ], + "type": "integer" + }, + "type": "array" + }, + "max_delay_time": { + "default": 1, + "description": "The maximum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be greater than the `min_delay_time`.", + "type": "number" + }, + "min_delay_time": { + "default": 0.001, + "description": "The minimum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be less than the `max_delay_time`.", + "type": "number" + }, + "random_delay": { + "default": false, + "description": "Enables a random delay in the mocked response. Introduces delays to simulate real-time response times by APIs.", + "type": "boolean" + }, + "random_examples": { + "default": false, + "description": "Randomly selects one example and returns it. This parameter requires the spec to have multiple examples configured.", + "type": "boolean" + }, + "random_status_code": { + "default": false, + "description": "Determines whether to randomly select an HTTP status code from the responses of the corresponding API method. The default value is `false`, which means the minimum HTTP status code is always selected and returned.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/mocking/3.8.json b/json_schemas/mocking/3.8.json new file mode 100644 index 00000000..ceb3d3a9 --- /dev/null +++ b/json_schemas/mocking/3.8.json @@ -0,0 +1,128 @@ +{ + "properties": { + "config": { + "properties": { + "api_specification": { + "description": "The contents of the specification file. You must use this option for hybrid or DB-less mode. You can include the full specification as part of the configuration. In Kong Manager, you can copy and paste the contents of the spec directly into the `Config.Api Specification` text field.", + "type": "string" + }, + "api_specification_filename": { + "description": "The path and name of the specification file loaded into Kong Gateway's database. You cannot use this option for DB-less or hybrid mode.", + "type": "string" + }, + "custom_base_path": { + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "type": "string" + }, + "include_base_path": { + "default": false, + "description": "Indicates whether to include the base path when performing path match evaluation.", + "type": "boolean" + }, + "included_status_codes": { + "description": "A global list of the HTTP status codes that can only be selected and returned.", + "items": { + "required": [ + + ], + "type": "integer" + }, + "type": "array" + }, + "max_delay_time": { + "default": 1, + "description": "The maximum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be greater than the `min_delay_time`.", + "type": "number" + }, + "min_delay_time": { + "default": 0.001, + "description": "The minimum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be less than the `max_delay_time`.", + "type": "number" + }, + "random_delay": { + "default": false, + "description": "Enables a random delay in the mocked response. Introduces delays to simulate real-time response times by APIs.", + "type": "boolean" + }, + "random_examples": { + "default": false, + "description": "Randomly selects one example and returns it. This parameter requires the spec to have multiple examples configured.", + "type": "boolean" + }, + "random_status_code": { + "default": false, + "description": "Determines whether to randomly select an HTTP status code from the responses of the corresponding API method. The default value is `false`, which means the minimum HTTP status code is always selected and returned.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/mocking/3.9.json b/json_schemas/mocking/3.9.json new file mode 100644 index 00000000..ceb3d3a9 --- /dev/null +++ b/json_schemas/mocking/3.9.json @@ -0,0 +1,128 @@ +{ + "properties": { + "config": { + "properties": { + "api_specification": { + "description": "The contents of the specification file. You must use this option for hybrid or DB-less mode. You can include the full specification as part of the configuration. In Kong Manager, you can copy and paste the contents of the spec directly into the `Config.Api Specification` text field.", + "type": "string" + }, + "api_specification_filename": { + "description": "The path and name of the specification file loaded into Kong Gateway's database. You cannot use this option for DB-less or hybrid mode.", + "type": "string" + }, + "custom_base_path": { + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "type": "string" + }, + "include_base_path": { + "default": false, + "description": "Indicates whether to include the base path when performing path match evaluation.", + "type": "boolean" + }, + "included_status_codes": { + "description": "A global list of the HTTP status codes that can only be selected and returned.", + "items": { + "required": [ + + ], + "type": "integer" + }, + "type": "array" + }, + "max_delay_time": { + "default": 1, + "description": "The maximum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be greater than the `min_delay_time`.", + "type": "number" + }, + "min_delay_time": { + "default": 0.001, + "description": "The minimum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be less than the `max_delay_time`.", + "type": "number" + }, + "random_delay": { + "default": false, + "description": "Enables a random delay in the mocked response. Introduces delays to simulate real-time response times by APIs.", + "type": "boolean" + }, + "random_examples": { + "default": false, + "description": "Randomly selects one example and returns it. This parameter requires the spec to have multiple examples configured.", + "type": "boolean" + }, + "random_status_code": { + "default": false, + "description": "Determines whether to randomly select an HTTP status code from the responses of the corresponding API method. The default value is `false`, which means the minimum HTTP status code is always selected and returned.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/mtls-auth/2.8.json b/json_schemas/mtls-auth/2.8.json new file mode 100644 index 00000000..40e99943 --- /dev/null +++ b/json_schemas/mtls-auth/2.8.json @@ -0,0 +1,180 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID) value to use as an \"anonymous\" consumer if authentication fails.\nIf the request is left empty (which it is by default), it fails with an authentication failure of either\n`HTTP 495` if the client presented a certificate that is not acceptable, or `HTTP 496` if the client failed\nto present certificate as requested. Please note that this value must refer to the consumer `id`\nattribute, which is internal to Kong, and **not** its `custom_id`.", + "legacy": true, + "type": "string", + "uuid": true + }, + "authenticated_group_by": { + "default": "CN", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or\n`DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a\nvalid certificate can access the Service/API. To restrict usage to only some of the authenticated users,\nalso add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "enum": [ + "CN", + "DN" + ], + "type": "string" + }, + "ca_certificates": { + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate.\nAt least one is required but you can specify as many as needed. The value of this array is comprised\nof primary keys (`id`).", + "examples": [ + [ + "fdac360e-7b19-4ade-a553-6dd22937c82f" + ] + ], + "items": { + "required": [ + + ], + "type": "string", + "uuid": true + }, + "type": "array" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "cert_cache_ttl": { + "default": 60000, + "description": "The length of time in milliseconds between refreshes of the revocation check status cache.", + "type": "number" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "http_proxy_host": { + "examples": [ + "example" + ], + "type": "string" + }, + "http_proxy_port": { + "description": "The HTTP hostname or IP address of a proxy. Use this setting with\n`http_proxy_port` to access a certificate revocation list\n(CRL) or an OCSP server.\n\nRequired if `http_proxy_port` is set.", + "examples": [ + 80 + ], + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 30000, + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number" + }, + "https_proxy_host": { + "description": "The HTTPS hostname or IP address of a proxy. Use this setting with\n`https_proxy_port` to access a certificate revocation list\n(CRL) or an OCSP server.\n\nRequired if `https_proxy_port` is set.", + "type": "string" + }, + "https_proxy_port": { + "description": "The TCP port of the HTTPS proxy.\n\nRequired if `https_proxy_host` is set.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "revocation_check_mode": { + "default": "IGNORE_CA_ERROR", + "description": ">**Known Issue:** The default value `IGNORE_CA_ERROR` has a known issue in versions 1.5.0.0 and later.m As a workaround, manually set the value to `SKIP`.\n\nControls client certificate revocation check behavior. Valid values are `SKIP`, `IGNORE_CA_ERROR`, or `STRICT`.\nIf set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects\nthe revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`,\nthe plugin only treats the certificate as valid when it's able to verify the revocation status, and a missing\nOCSP or CRL URL in the certificate or a failure to connect to the server results in a revoked status.\nIf both OCSP and CRL URL are set, the plugin always checks OCSP first, and only checks the CRL URL if\nit can't communicate with the OCSP server.", + "enum": [ + "IGNORE_CA_ERROR", + "SKIP", + "STRICT" + ], + "type": "string" + }, + "skip_consumer_lookup": { + "default": false, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/mtls-auth/3.10.json b/json_schemas/mtls-auth/3.10.json new file mode 100644 index 00000000..b27f2271 --- /dev/null +++ b/json_schemas/mtls-auth/3.10.json @@ -0,0 +1,169 @@ +{ + "properties": { + "config": { + "properties": { + "allow_partial_chain": { + "default": false, + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "authenticated_group_by": { + "default": "CN", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "enum": [ + "CN", + "DN" + ], + "type": "string" + }, + "ca_certificates": { + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "items": { + "required": [ + + ], + "type": "string", + "uuid": true + }, + "type": "array" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "cert_cache_ttl": { + "default": 60000, + "description": "The length of time in seconds between refreshes of the revocation check status cache.", + "type": "number" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 30000, + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "revocation_check_mode": { + "default": "IGNORE_CA_ERROR", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "enum": [ + "IGNORE_CA_ERROR", + "SKIP", + "STRICT" + ], + "type": "string" + }, + "send_ca_dn": { + "default": false, + "description": "Sends the distinguished names (DN) of the configured CA list in the TLS handshake message.", + "type": "boolean" + }, + "skip_consumer_lookup": { + "default": false, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "type": "boolean" + } + }, + "required": [ + "ca_certificates" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/mtls-auth/3.11.json b/json_schemas/mtls-auth/3.11.json new file mode 100644 index 00000000..966f2058 --- /dev/null +++ b/json_schemas/mtls-auth/3.11.json @@ -0,0 +1,159 @@ +{ + "properties": { + "config": { + "properties": { + "allow_partial_chain": { + "default": false, + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "authenticated_group_by": { + "default": "CN", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "enum": [ + "CN", + "DN" + ], + "type": "string" + }, + "ca_certificates": { + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "items": { + "required": [], + "type": "string", + "uuid": true + }, + "type": "array" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "cert_cache_ttl": { + "default": 60000, + "description": "The length of time in seconds between refreshes of the revocation check status cache.", + "type": "number" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 30000, + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "revocation_check_mode": { + "default": "IGNORE_CA_ERROR", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "enum": [ + "IGNORE_CA_ERROR", + "SKIP", + "STRICT" + ], + "type": "string" + }, + "send_ca_dn": { + "default": false, + "description": "Sends the distinguished names (DN) of the configured CA list in the TLS handshake message.", + "type": "boolean" + }, + "skip_consumer_lookup": { + "default": false, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "type": "boolean" + } + }, + "required": [ + "ca_certificates" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/mtls-auth/3.12.json b/json_schemas/mtls-auth/3.12.json new file mode 100644 index 00000000..966f2058 --- /dev/null +++ b/json_schemas/mtls-auth/3.12.json @@ -0,0 +1,159 @@ +{ + "properties": { + "config": { + "properties": { + "allow_partial_chain": { + "default": false, + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "authenticated_group_by": { + "default": "CN", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "enum": [ + "CN", + "DN" + ], + "type": "string" + }, + "ca_certificates": { + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "items": { + "required": [], + "type": "string", + "uuid": true + }, + "type": "array" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "cert_cache_ttl": { + "default": 60000, + "description": "The length of time in seconds between refreshes of the revocation check status cache.", + "type": "number" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 30000, + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "revocation_check_mode": { + "default": "IGNORE_CA_ERROR", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "enum": [ + "IGNORE_CA_ERROR", + "SKIP", + "STRICT" + ], + "type": "string" + }, + "send_ca_dn": { + "default": false, + "description": "Sends the distinguished names (DN) of the configured CA list in the TLS handshake message.", + "type": "boolean" + }, + "skip_consumer_lookup": { + "default": false, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "type": "boolean" + } + }, + "required": [ + "ca_certificates" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/mtls-auth/3.4.json b/json_schemas/mtls-auth/3.4.json new file mode 100644 index 00000000..dc596b6f --- /dev/null +++ b/json_schemas/mtls-auth/3.4.json @@ -0,0 +1,169 @@ +{ + "properties": { + "config": { + "properties": { + "allow_partial_chain": { + "default": false, + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "authenticated_group_by": { + "default": "CN", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "enum": [ + "CN", + "DN" + ], + "type": "string" + }, + "ca_certificates": { + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "items": { + "required": [ + + ], + "type": "string", + "uuid": true + }, + "type": "array" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "cert_cache_ttl": { + "default": 60000, + "description": "The length of time in milliseconds between refreshes of the revocation check status cache.", + "type": "number" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 30000, + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "revocation_check_mode": { + "default": "IGNORE_CA_ERROR", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "enum": [ + "IGNORE_CA_ERROR", + "SKIP", + "STRICT" + ], + "type": "string" + }, + "send_ca_dn": { + "default": false, + "description": "Sends the distinguished names (DN) of the configured CA list in the TLS handshake message.", + "type": "boolean" + }, + "skip_consumer_lookup": { + "default": false, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "type": "boolean" + } + }, + "required": [ + "ca_certificates" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/mtls-auth/3.7.json b/json_schemas/mtls-auth/3.7.json new file mode 100644 index 00000000..dc596b6f --- /dev/null +++ b/json_schemas/mtls-auth/3.7.json @@ -0,0 +1,169 @@ +{ + "properties": { + "config": { + "properties": { + "allow_partial_chain": { + "default": false, + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "authenticated_group_by": { + "default": "CN", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "enum": [ + "CN", + "DN" + ], + "type": "string" + }, + "ca_certificates": { + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "items": { + "required": [ + + ], + "type": "string", + "uuid": true + }, + "type": "array" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "cert_cache_ttl": { + "default": 60000, + "description": "The length of time in milliseconds between refreshes of the revocation check status cache.", + "type": "number" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 30000, + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "revocation_check_mode": { + "default": "IGNORE_CA_ERROR", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "enum": [ + "IGNORE_CA_ERROR", + "SKIP", + "STRICT" + ], + "type": "string" + }, + "send_ca_dn": { + "default": false, + "description": "Sends the distinguished names (DN) of the configured CA list in the TLS handshake message.", + "type": "boolean" + }, + "skip_consumer_lookup": { + "default": false, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "type": "boolean" + } + }, + "required": [ + "ca_certificates" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/mtls-auth/3.8.json b/json_schemas/mtls-auth/3.8.json new file mode 100644 index 00000000..dc596b6f --- /dev/null +++ b/json_schemas/mtls-auth/3.8.json @@ -0,0 +1,169 @@ +{ + "properties": { + "config": { + "properties": { + "allow_partial_chain": { + "default": false, + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "authenticated_group_by": { + "default": "CN", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "enum": [ + "CN", + "DN" + ], + "type": "string" + }, + "ca_certificates": { + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "items": { + "required": [ + + ], + "type": "string", + "uuid": true + }, + "type": "array" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "cert_cache_ttl": { + "default": 60000, + "description": "The length of time in milliseconds between refreshes of the revocation check status cache.", + "type": "number" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 30000, + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "revocation_check_mode": { + "default": "IGNORE_CA_ERROR", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "enum": [ + "IGNORE_CA_ERROR", + "SKIP", + "STRICT" + ], + "type": "string" + }, + "send_ca_dn": { + "default": false, + "description": "Sends the distinguished names (DN) of the configured CA list in the TLS handshake message.", + "type": "boolean" + }, + "skip_consumer_lookup": { + "default": false, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "type": "boolean" + } + }, + "required": [ + "ca_certificates" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/mtls-auth/3.9.json b/json_schemas/mtls-auth/3.9.json new file mode 100644 index 00000000..b27f2271 --- /dev/null +++ b/json_schemas/mtls-auth/3.9.json @@ -0,0 +1,169 @@ +{ + "properties": { + "config": { + "properties": { + "allow_partial_chain": { + "default": false, + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "authenticated_group_by": { + "default": "CN", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "enum": [ + "CN", + "DN" + ], + "type": "string" + }, + "ca_certificates": { + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "items": { + "required": [ + + ], + "type": "string", + "uuid": true + }, + "type": "array" + }, + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "type": "number" + }, + "cert_cache_ttl": { + "default": 60000, + "description": "The length of time in seconds between refreshes of the revocation check status cache.", + "type": "number" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "items": { + "enum": [ + "custom_id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "http_timeout": { + "default": 30000, + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number" + }, + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "revocation_check_mode": { + "default": "IGNORE_CA_ERROR", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "enum": [ + "IGNORE_CA_ERROR", + "SKIP", + "STRICT" + ], + "type": "string" + }, + "send_ca_dn": { + "default": false, + "description": "Sends the distinguished names (DN) of the configured CA list in the TLS handshake message.", + "type": "boolean" + }, + "skip_consumer_lookup": { + "default": false, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "type": "boolean" + } + }, + "required": [ + "ca_certificates" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oas-validation/3.10.json b/json_schemas/oas-validation/3.10.json new file mode 100644 index 00000000..c8409584 --- /dev/null +++ b/json_schemas/oas-validation/3.10.json @@ -0,0 +1,149 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_header_parameters": { + "default": "Host,Content-Type,User-Agent,Accept,Content-Length", + "description": "List of header parameters in the request that will be ignored when performing HTTP header validation. These are additional headers added to an API request beyond those defined in the API specification. For example, you might include the HTTP header `User-Agent`, which lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.", + "type": "string" + }, + "api_spec": { + "description": "The API specification defined using either Swagger or the OpenAPI. This can be either a JSON or YAML based file. If using a YAML file, the spec needs to be URI-Encoded to preserve the YAML format.", + "type": "string" + }, + "api_spec_encoded": { + "default": true, + "description": "Indicates whether the api_spec is URI-Encoded.", + "type": "boolean" + }, + "custom_base_path": { + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "type": "string" + }, + "header_parameter_check": { + "default": false, + "description": "If set to true, checks if HTTP header parameters in the request exist in the API specification.", + "type": "boolean" + }, + "include_base_path": { + "default": false, + "description": "Indicates whether to include the base path when performing path match evaluation.", + "type": "boolean" + }, + "notify_only_request_validation_failure": { + "default": false, + "description": "If set to true, notifications via event hooks are enabled, but request based validation failures don't affect the request flow.", + "type": "boolean" + }, + "notify_only_response_body_validation_failure": { + "default": false, + "description": "If set to true, notifications via event hooks are enabled, but response validation failures don't affect the response flow.", + "type": "boolean" + }, + "query_parameter_check": { + "default": false, + "description": "If set to true, checks if query parameters in the request exist in the API specification.", + "type": "boolean" + }, + "validate_request_body": { + "default": true, + "description": "If set to true, validates the request body content against the API specification.", + "type": "boolean" + }, + "validate_request_header_params": { + "default": true, + "description": "If set to true, validates HTTP header parameters against the API specification.", + "type": "boolean" + }, + "validate_request_query_params": { + "default": true, + "description": "If set to true, validates query parameters against the API specification.", + "type": "boolean" + }, + "validate_request_uri_params": { + "default": true, + "description": "If set to true, validates URI parameters in the request against the API specification.", + "type": "boolean" + }, + "validate_response_body": { + "default": false, + "description": "If set to true, validates the response from the upstream services against the API specification. If validation fails, it results in an `HTTP 406 Not Acceptable` status code.", + "type": "boolean" + }, + "verbose_response": { + "default": false, + "description": "If set to true, returns a detailed error message for invalid requests & responses. This is useful while testing.", + "type": "boolean" + } + }, + "required": [ + "api_spec" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oas-validation/3.11.json b/json_schemas/oas-validation/3.11.json new file mode 100644 index 00000000..e354f47a --- /dev/null +++ b/json_schemas/oas-validation/3.11.json @@ -0,0 +1,141 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_header_parameters": { + "default": "Host,Content-Type,User-Agent,Accept,Content-Length", + "description": "List of header parameters in the request that will be ignored when performing HTTP header validation. These are additional headers added to an API request beyond those defined in the API specification. For example, you might include the HTTP header `User-Agent`, which lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.", + "type": "string" + }, + "api_spec": { + "description": "The API specification defined using either Swagger or the OpenAPI. This can be either a JSON or YAML based file. If using a YAML file, the spec needs to be URI-Encoded to preserve the YAML format.", + "type": "string" + }, + "api_spec_encoded": { + "default": true, + "description": "Indicates whether the api_spec is URI-Encoded.", + "type": "boolean" + }, + "custom_base_path": { + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "type": "string" + }, + "header_parameter_check": { + "default": false, + "description": "If set to true, checks if HTTP header parameters in the request exist in the API specification.", + "type": "boolean" + }, + "include_base_path": { + "default": false, + "description": "Indicates whether to include the base path when performing path match evaluation.", + "type": "boolean" + }, + "notify_only_request_validation_failure": { + "default": false, + "description": "If set to true, notifications via event hooks are enabled, but request based validation failures don't affect the request flow.", + "type": "boolean" + }, + "notify_only_response_body_validation_failure": { + "default": false, + "description": "If set to true, notifications via event hooks are enabled, but response validation failures don't affect the response flow.", + "type": "boolean" + }, + "query_parameter_check": { + "default": false, + "description": "If set to true, checks if query parameters in the request exist in the API specification.", + "type": "boolean" + }, + "validate_request_body": { + "default": true, + "description": "If set to true, validates the request body content against the API specification.", + "type": "boolean" + }, + "validate_request_header_params": { + "default": true, + "description": "If set to true, validates HTTP header parameters against the API specification.", + "type": "boolean" + }, + "validate_request_query_params": { + "default": true, + "description": "If set to true, validates query parameters against the API specification.", + "type": "boolean" + }, + "validate_request_uri_params": { + "default": true, + "description": "If set to true, validates URI parameters in the request against the API specification.", + "type": "boolean" + }, + "validate_response_body": { + "default": false, + "description": "If set to true, validates the response from the upstream services against the API specification. If validation fails, it results in an `HTTP 406 Not Acceptable` status code.", + "type": "boolean" + }, + "verbose_response": { + "default": false, + "description": "If set to true, returns a detailed error message for invalid requests & responses. This is useful while testing.", + "type": "boolean" + } + }, + "required": [ + "api_spec" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oas-validation/3.12.json b/json_schemas/oas-validation/3.12.json new file mode 100644 index 00000000..e354f47a --- /dev/null +++ b/json_schemas/oas-validation/3.12.json @@ -0,0 +1,141 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_header_parameters": { + "default": "Host,Content-Type,User-Agent,Accept,Content-Length", + "description": "List of header parameters in the request that will be ignored when performing HTTP header validation. These are additional headers added to an API request beyond those defined in the API specification. For example, you might include the HTTP header `User-Agent`, which lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.", + "type": "string" + }, + "api_spec": { + "description": "The API specification defined using either Swagger or the OpenAPI. This can be either a JSON or YAML based file. If using a YAML file, the spec needs to be URI-Encoded to preserve the YAML format.", + "type": "string" + }, + "api_spec_encoded": { + "default": true, + "description": "Indicates whether the api_spec is URI-Encoded.", + "type": "boolean" + }, + "custom_base_path": { + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "type": "string" + }, + "header_parameter_check": { + "default": false, + "description": "If set to true, checks if HTTP header parameters in the request exist in the API specification.", + "type": "boolean" + }, + "include_base_path": { + "default": false, + "description": "Indicates whether to include the base path when performing path match evaluation.", + "type": "boolean" + }, + "notify_only_request_validation_failure": { + "default": false, + "description": "If set to true, notifications via event hooks are enabled, but request based validation failures don't affect the request flow.", + "type": "boolean" + }, + "notify_only_response_body_validation_failure": { + "default": false, + "description": "If set to true, notifications via event hooks are enabled, but response validation failures don't affect the response flow.", + "type": "boolean" + }, + "query_parameter_check": { + "default": false, + "description": "If set to true, checks if query parameters in the request exist in the API specification.", + "type": "boolean" + }, + "validate_request_body": { + "default": true, + "description": "If set to true, validates the request body content against the API specification.", + "type": "boolean" + }, + "validate_request_header_params": { + "default": true, + "description": "If set to true, validates HTTP header parameters against the API specification.", + "type": "boolean" + }, + "validate_request_query_params": { + "default": true, + "description": "If set to true, validates query parameters against the API specification.", + "type": "boolean" + }, + "validate_request_uri_params": { + "default": true, + "description": "If set to true, validates URI parameters in the request against the API specification.", + "type": "boolean" + }, + "validate_response_body": { + "default": false, + "description": "If set to true, validates the response from the upstream services against the API specification. If validation fails, it results in an `HTTP 406 Not Acceptable` status code.", + "type": "boolean" + }, + "verbose_response": { + "default": false, + "description": "If set to true, returns a detailed error message for invalid requests & responses. This is useful while testing.", + "type": "boolean" + } + }, + "required": [ + "api_spec" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oas-validation/3.4.json b/json_schemas/oas-validation/3.4.json new file mode 100644 index 00000000..01beee4b --- /dev/null +++ b/json_schemas/oas-validation/3.4.json @@ -0,0 +1,145 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_header_parameters": { + "default": "Host,Content-Type,User-Agent,Accept,Content-Length", + "description": "List of header parameters in the request that will be ignored when performing HTTP header validation. These are additional headers added to an API request beyond those defined in the API specification. For example, you might include the HTTP header `User-Agent`, which lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.", + "type": "string" + }, + "api_spec": { + "description": "The API specification defined using either Swagger or the OpenAPI. This can be either a JSON or YAML based file. If using a YAML file, the spec needs to be URI-Encoded to preserve the YAML format.", + "type": "string" + }, + "api_spec_encoded": { + "default": true, + "description": "Indicates whether the api_spec is URI-Encoded.", + "type": "boolean" + }, + "header_parameter_check": { + "default": false, + "description": "If set to true, checks if HTTP header parameters in the request exist in the API specification.", + "type": "boolean" + }, + "include_base_path": { + "default": false, + "description": "Indicates whether to include the base path when performing path match evaluation.", + "type": "boolean" + }, + "notify_only_request_validation_failure": { + "default": false, + "description": "If set to true, notifications via event hooks are enabled, but request based validation failures don't affect the request flow.", + "type": "boolean" + }, + "notify_only_response_body_validation_failure": { + "default": false, + "description": "If set to true, notifications via event hooks are enabled, but response validation failures don't affect the response flow.", + "type": "boolean" + }, + "query_parameter_check": { + "default": false, + "description": "If set to true, checks if query parameters in the request exist in the API specification.", + "type": "boolean" + }, + "validate_request_body": { + "default": true, + "description": "If set to true, validates the request body content against the API specification.", + "type": "boolean" + }, + "validate_request_header_params": { + "default": true, + "description": "If set to true, validates HTTP header parameters against the API specification.", + "type": "boolean" + }, + "validate_request_query_params": { + "default": true, + "description": "If set to true, validates query parameters against the API specification.", + "type": "boolean" + }, + "validate_request_uri_params": { + "default": true, + "description": "If set to true, validates URI parameters in the request against the API specification.", + "type": "boolean" + }, + "validate_response_body": { + "default": false, + "description": "If set to true, validates the response from the upstream services against the API specification. If validation fails, it results in an `HTTP 406 Not Acceptable` status code.", + "type": "boolean" + }, + "verbose_response": { + "default": false, + "description": "If set to true, returns a detailed error message for invalid requests & responses. This is useful while testing.", + "type": "boolean" + } + }, + "required": [ + "api_spec" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oas-validation/3.7.json b/json_schemas/oas-validation/3.7.json new file mode 100644 index 00000000..c8409584 --- /dev/null +++ b/json_schemas/oas-validation/3.7.json @@ -0,0 +1,149 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_header_parameters": { + "default": "Host,Content-Type,User-Agent,Accept,Content-Length", + "description": "List of header parameters in the request that will be ignored when performing HTTP header validation. These are additional headers added to an API request beyond those defined in the API specification. For example, you might include the HTTP header `User-Agent`, which lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.", + "type": "string" + }, + "api_spec": { + "description": "The API specification defined using either Swagger or the OpenAPI. This can be either a JSON or YAML based file. If using a YAML file, the spec needs to be URI-Encoded to preserve the YAML format.", + "type": "string" + }, + "api_spec_encoded": { + "default": true, + "description": "Indicates whether the api_spec is URI-Encoded.", + "type": "boolean" + }, + "custom_base_path": { + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "type": "string" + }, + "header_parameter_check": { + "default": false, + "description": "If set to true, checks if HTTP header parameters in the request exist in the API specification.", + "type": "boolean" + }, + "include_base_path": { + "default": false, + "description": "Indicates whether to include the base path when performing path match evaluation.", + "type": "boolean" + }, + "notify_only_request_validation_failure": { + "default": false, + "description": "If set to true, notifications via event hooks are enabled, but request based validation failures don't affect the request flow.", + "type": "boolean" + }, + "notify_only_response_body_validation_failure": { + "default": false, + "description": "If set to true, notifications via event hooks are enabled, but response validation failures don't affect the response flow.", + "type": "boolean" + }, + "query_parameter_check": { + "default": false, + "description": "If set to true, checks if query parameters in the request exist in the API specification.", + "type": "boolean" + }, + "validate_request_body": { + "default": true, + "description": "If set to true, validates the request body content against the API specification.", + "type": "boolean" + }, + "validate_request_header_params": { + "default": true, + "description": "If set to true, validates HTTP header parameters against the API specification.", + "type": "boolean" + }, + "validate_request_query_params": { + "default": true, + "description": "If set to true, validates query parameters against the API specification.", + "type": "boolean" + }, + "validate_request_uri_params": { + "default": true, + "description": "If set to true, validates URI parameters in the request against the API specification.", + "type": "boolean" + }, + "validate_response_body": { + "default": false, + "description": "If set to true, validates the response from the upstream services against the API specification. If validation fails, it results in an `HTTP 406 Not Acceptable` status code.", + "type": "boolean" + }, + "verbose_response": { + "default": false, + "description": "If set to true, returns a detailed error message for invalid requests & responses. This is useful while testing.", + "type": "boolean" + } + }, + "required": [ + "api_spec" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oas-validation/3.8.json b/json_schemas/oas-validation/3.8.json new file mode 100644 index 00000000..c8409584 --- /dev/null +++ b/json_schemas/oas-validation/3.8.json @@ -0,0 +1,149 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_header_parameters": { + "default": "Host,Content-Type,User-Agent,Accept,Content-Length", + "description": "List of header parameters in the request that will be ignored when performing HTTP header validation. These are additional headers added to an API request beyond those defined in the API specification. For example, you might include the HTTP header `User-Agent`, which lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.", + "type": "string" + }, + "api_spec": { + "description": "The API specification defined using either Swagger or the OpenAPI. This can be either a JSON or YAML based file. If using a YAML file, the spec needs to be URI-Encoded to preserve the YAML format.", + "type": "string" + }, + "api_spec_encoded": { + "default": true, + "description": "Indicates whether the api_spec is URI-Encoded.", + "type": "boolean" + }, + "custom_base_path": { + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "type": "string" + }, + "header_parameter_check": { + "default": false, + "description": "If set to true, checks if HTTP header parameters in the request exist in the API specification.", + "type": "boolean" + }, + "include_base_path": { + "default": false, + "description": "Indicates whether to include the base path when performing path match evaluation.", + "type": "boolean" + }, + "notify_only_request_validation_failure": { + "default": false, + "description": "If set to true, notifications via event hooks are enabled, but request based validation failures don't affect the request flow.", + "type": "boolean" + }, + "notify_only_response_body_validation_failure": { + "default": false, + "description": "If set to true, notifications via event hooks are enabled, but response validation failures don't affect the response flow.", + "type": "boolean" + }, + "query_parameter_check": { + "default": false, + "description": "If set to true, checks if query parameters in the request exist in the API specification.", + "type": "boolean" + }, + "validate_request_body": { + "default": true, + "description": "If set to true, validates the request body content against the API specification.", + "type": "boolean" + }, + "validate_request_header_params": { + "default": true, + "description": "If set to true, validates HTTP header parameters against the API specification.", + "type": "boolean" + }, + "validate_request_query_params": { + "default": true, + "description": "If set to true, validates query parameters against the API specification.", + "type": "boolean" + }, + "validate_request_uri_params": { + "default": true, + "description": "If set to true, validates URI parameters in the request against the API specification.", + "type": "boolean" + }, + "validate_response_body": { + "default": false, + "description": "If set to true, validates the response from the upstream services against the API specification. If validation fails, it results in an `HTTP 406 Not Acceptable` status code.", + "type": "boolean" + }, + "verbose_response": { + "default": false, + "description": "If set to true, returns a detailed error message for invalid requests & responses. This is useful while testing.", + "type": "boolean" + } + }, + "required": [ + "api_spec" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oas-validation/3.9.json b/json_schemas/oas-validation/3.9.json new file mode 100644 index 00000000..c8409584 --- /dev/null +++ b/json_schemas/oas-validation/3.9.json @@ -0,0 +1,149 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_header_parameters": { + "default": "Host,Content-Type,User-Agent,Accept,Content-Length", + "description": "List of header parameters in the request that will be ignored when performing HTTP header validation. These are additional headers added to an API request beyond those defined in the API specification. For example, you might include the HTTP header `User-Agent`, which lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.", + "type": "string" + }, + "api_spec": { + "description": "The API specification defined using either Swagger or the OpenAPI. This can be either a JSON or YAML based file. If using a YAML file, the spec needs to be URI-Encoded to preserve the YAML format.", + "type": "string" + }, + "api_spec_encoded": { + "default": true, + "description": "Indicates whether the api_spec is URI-Encoded.", + "type": "boolean" + }, + "custom_base_path": { + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "type": "string" + }, + "header_parameter_check": { + "default": false, + "description": "If set to true, checks if HTTP header parameters in the request exist in the API specification.", + "type": "boolean" + }, + "include_base_path": { + "default": false, + "description": "Indicates whether to include the base path when performing path match evaluation.", + "type": "boolean" + }, + "notify_only_request_validation_failure": { + "default": false, + "description": "If set to true, notifications via event hooks are enabled, but request based validation failures don't affect the request flow.", + "type": "boolean" + }, + "notify_only_response_body_validation_failure": { + "default": false, + "description": "If set to true, notifications via event hooks are enabled, but response validation failures don't affect the response flow.", + "type": "boolean" + }, + "query_parameter_check": { + "default": false, + "description": "If set to true, checks if query parameters in the request exist in the API specification.", + "type": "boolean" + }, + "validate_request_body": { + "default": true, + "description": "If set to true, validates the request body content against the API specification.", + "type": "boolean" + }, + "validate_request_header_params": { + "default": true, + "description": "If set to true, validates HTTP header parameters against the API specification.", + "type": "boolean" + }, + "validate_request_query_params": { + "default": true, + "description": "If set to true, validates query parameters against the API specification.", + "type": "boolean" + }, + "validate_request_uri_params": { + "default": true, + "description": "If set to true, validates URI parameters in the request against the API specification.", + "type": "boolean" + }, + "validate_response_body": { + "default": false, + "description": "If set to true, validates the response from the upstream services against the API specification. If validation fails, it results in an `HTTP 406 Not Acceptable` status code.", + "type": "boolean" + }, + "verbose_response": { + "default": false, + "description": "If set to true, returns a detailed error message for invalid requests & responses. This is useful while testing.", + "type": "boolean" + } + }, + "required": [ + "api_spec" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oauth2-introspection/2.8.json b/json_schemas/oauth2-introspection/2.8.json new file mode 100644 index 00000000..8b869261 --- /dev/null +++ b/json_schemas/oauth2-introspection/2.8.json @@ -0,0 +1,138 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "default": "", + "description": "An optional string (consumer UUID) value to use as an anonymous consumer if authentication fails. If empty (default), the request fails with an authentication failure `4xx`.", + "minLength": 0, + "type": "string" + }, + "authorization_value": { + "description": "The value to set as the `Authorization` header when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is the `client_id` and `client_secret` as a Base64-encoded Basic Auth string (`Basic MG9hNWl...`).", + "examples": [ + "Basic MG9hNWlpbjpPcGVuU2VzYW1l" + ], + "type": "string" + }, + "consumer_by": { + "default": "username", + "description": "A string indicating whether to associate OAuth2 `username` or `client_id`\nwith the consumer's username. OAuth2 `username` is mapped to a consumer's\n`username` field, while an OAuth2 `client_id` maps to a consumer's\n`custom_id`.", + "enum": [ + "client_id", + "username" + ], + "examples": [ + "username" + ], + "type": "string" + }, + "custom_claims_forward": { + "default": [ + + ], + "description": "A list of custom claims to be forwarded from the introspection response\nto the upstream request. Claims are forwarded in headers with prefix\n`X-Credential-{claim-name}`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "custom_introspection_headers": { + "additionalProperties": true, + "description": "A list of custom headers to be added in the introspection request.", + "type": "object" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream API server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "introspect_request": { + "default": false, + "description": "A boolean indicating whether to forward information about the current\ndownstream request to the introspect endpoint. If true, headers\n`X-Request-Path` and `X-Request-Http-Method` will be inserted into the\nintrospect request.", + "type": "boolean" + }, + "introspection_url": { + "description": "The full URL to the third-party introspection endpoint.\n\nIf the introspection endpoint is `https`, [`lua_ssl_trusted_certificate`](/gateway/latest/reference/configuration/#lua_ssl_trusted_certificate)\nmust be set in `kong.conf` to ensure the plugin can connect\nto the endpoint. The CA bundle file location depends on your OS. See the\n[configuration reference](/gateway/latest/reference/configuration/#lua_ssl_trusted_certificate) for a list.\n\nStarting with Kong v2.2, users can set `lua_ssl_trusted_certificate=system`\nto automatically use the CA bundle from the OS.", + "examples": [ + "https://example-url.com" + ], + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "integer" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "integer" + }, + "token_type_hint": { + "description": "The `token_type_hint` value to associate to introspection requests.", + "type": "string" + }, + "ttl": { + "default": 30, + "description": "The TTL in seconds for the introspection response. Set to 0 to disable the expiration.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/oauth2-introspection/3.10.json b/json_schemas/oauth2-introspection/3.10.json new file mode 100644 index 00000000..9c374df3 --- /dev/null +++ b/json_schemas/oauth2-introspection/3.10.json @@ -0,0 +1,139 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "minLength": 0, + "type": "string" + }, + "authorization_value": { + "description": "The value to set as the `Authorization` header when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is the `client_id` and `client_secret` as a Base64-encoded Basic Auth string (`Basic MG9hNWl...`).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "consumer_by": { + "default": "username", + "description": "A string indicating whether to associate OAuth2 `username` or `client_id` with the consumer's username. OAuth2 `username` is mapped to a consumer's `username` field, while an OAuth2 `client_id` maps to a consumer's `custom_id`.", + "enum": [ + "client_id", + "username" + ], + "type": "string" + }, + "custom_claims_forward": { + "default": [ + + ], + "description": "A list of custom claims to be forwarded from the introspection response to the upstream request. Claims are forwarded in headers with prefix `X-Credential-{claim-name}`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "custom_introspection_headers": { + "additionalProperties": true, + "description": "A list of custom headers to be added in the introspection request.", + "type": "object" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream API server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "introspect_request": { + "default": false, + "description": "A boolean indicating whether to forward information about the current downstream request to the introspect endpoint. If true, headers `X-Request-Path` and `X-Request-Http-Method` will be inserted into the introspect request.", + "type": "boolean" + }, + "introspection_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "integer" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "integer" + }, + "token_type_hint": { + "description": "The `token_type_hint` value to associate to introspection requests.", + "type": "string" + }, + "ttl": { + "default": 30, + "description": "The TTL in seconds for the introspection response. Set to 0 to disable the expiration.", + "type": "number" + } + }, + "required": [ + "authorization_value", + "introspection_url" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oauth2-introspection/3.11.json b/json_schemas/oauth2-introspection/3.11.json new file mode 100644 index 00000000..2f7b7743 --- /dev/null +++ b/json_schemas/oauth2-introspection/3.11.json @@ -0,0 +1,129 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "minLength": 0, + "type": "string" + }, + "authorization_value": { + "description": "The value to set as the `Authorization` header when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is the `client_id` and `client_secret` as a Base64-encoded Basic Auth string (`Basic MG9hNWl...`).\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "consumer_by": { + "default": "username", + "description": "A string indicating whether to associate OAuth2 `username` or `client_id` with the consumer's username. OAuth2 `username` is mapped to a consumer's `username` field, while an OAuth2 `client_id` maps to a consumer's `custom_id`.", + "enum": [ + "client_id", + "username" + ], + "type": "string" + }, + "custom_claims_forward": { + "default": [], + "description": "A list of custom claims to be forwarded from the introspection response to the upstream request. Claims are forwarded in headers with prefix `X-Credential-{claim-name}`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "custom_introspection_headers": { + "additionalProperties": true, + "description": "A list of custom headers to be added in the introspection request.", + "type": "object" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream API server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "introspect_request": { + "default": false, + "description": "A boolean indicating whether to forward information about the current downstream request to the introspect endpoint. If true, headers `X-Request-Path` and `X-Request-Http-Method` will be inserted into the introspect request.", + "type": "boolean" + }, + "introspection_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "integer" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "integer" + }, + "token_type_hint": { + "description": "The `token_type_hint` value to associate to introspection requests.", + "type": "string" + }, + "ttl": { + "default": 30, + "description": "The TTL in seconds for the introspection response. Set to 0 to disable the expiration.", + "type": "number" + } + }, + "required": [ + "authorization_value", + "introspection_url" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oauth2-introspection/3.12.json b/json_schemas/oauth2-introspection/3.12.json new file mode 100644 index 00000000..a3100db7 --- /dev/null +++ b/json_schemas/oauth2-introspection/3.12.json @@ -0,0 +1,129 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "minLength": 0, + "type": "string" + }, + "authorization_value": { + "description": "The value to set as the `Authorization` header when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is the `client_id` and `client_secret` as a Base64-encoded Basic Auth string (`Basic MG9hNWl...`).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "consumer_by": { + "default": "username", + "description": "A string indicating whether to associate OAuth2 `username` or `client_id` with the consumer's username. OAuth2 `username` is mapped to a consumer's `username` field, while an OAuth2 `client_id` maps to a consumer's `custom_id`.", + "enum": [ + "client_id", + "username" + ], + "type": "string" + }, + "custom_claims_forward": { + "default": [], + "description": "A list of custom claims to be forwarded from the introspection response to the upstream request. Claims are forwarded in headers with prefix `X-Credential-{claim-name}`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "custom_introspection_headers": { + "additionalProperties": true, + "description": "A list of custom headers to be added in the introspection request.", + "type": "object" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream API server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "introspect_request": { + "default": false, + "description": "A boolean indicating whether to forward information about the current downstream request to the introspect endpoint. If true, headers `X-Request-Path` and `X-Request-Http-Method` will be inserted into the introspect request.", + "type": "boolean" + }, + "introspection_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "integer" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "integer" + }, + "token_type_hint": { + "description": "The `token_type_hint` value to associate to introspection requests.", + "type": "string" + }, + "ttl": { + "default": 30, + "description": "The TTL in seconds for the introspection response. Set to 0 to disable the expiration.", + "type": "number" + } + }, + "required": [ + "authorization_value", + "introspection_url" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oauth2-introspection/3.4.json b/json_schemas/oauth2-introspection/3.4.json new file mode 100644 index 00000000..9c374df3 --- /dev/null +++ b/json_schemas/oauth2-introspection/3.4.json @@ -0,0 +1,139 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "minLength": 0, + "type": "string" + }, + "authorization_value": { + "description": "The value to set as the `Authorization` header when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is the `client_id` and `client_secret` as a Base64-encoded Basic Auth string (`Basic MG9hNWl...`).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "consumer_by": { + "default": "username", + "description": "A string indicating whether to associate OAuth2 `username` or `client_id` with the consumer's username. OAuth2 `username` is mapped to a consumer's `username` field, while an OAuth2 `client_id` maps to a consumer's `custom_id`.", + "enum": [ + "client_id", + "username" + ], + "type": "string" + }, + "custom_claims_forward": { + "default": [ + + ], + "description": "A list of custom claims to be forwarded from the introspection response to the upstream request. Claims are forwarded in headers with prefix `X-Credential-{claim-name}`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "custom_introspection_headers": { + "additionalProperties": true, + "description": "A list of custom headers to be added in the introspection request.", + "type": "object" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream API server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "introspect_request": { + "default": false, + "description": "A boolean indicating whether to forward information about the current downstream request to the introspect endpoint. If true, headers `X-Request-Path` and `X-Request-Http-Method` will be inserted into the introspect request.", + "type": "boolean" + }, + "introspection_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "integer" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "integer" + }, + "token_type_hint": { + "description": "The `token_type_hint` value to associate to introspection requests.", + "type": "string" + }, + "ttl": { + "default": 30, + "description": "The TTL in seconds for the introspection response. Set to 0 to disable the expiration.", + "type": "number" + } + }, + "required": [ + "authorization_value", + "introspection_url" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oauth2-introspection/3.7.json b/json_schemas/oauth2-introspection/3.7.json new file mode 100644 index 00000000..fc8b6d85 --- /dev/null +++ b/json_schemas/oauth2-introspection/3.7.json @@ -0,0 +1,139 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "minLength": 0, + "type": "string" + }, + "authorization_value": { + "description": "The value to set as the `Authorization` header when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is the `client_id` and `client_secret` as a Base64-encoded Basic Auth string (`Basic MG9hNWl...`).\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "consumer_by": { + "default": "username", + "description": "A string indicating whether to associate OAuth2 `username` or `client_id` with the consumer's username. OAuth2 `username` is mapped to a consumer's `username` field, while an OAuth2 `client_id` maps to a consumer's `custom_id`.", + "enum": [ + "client_id", + "username" + ], + "type": "string" + }, + "custom_claims_forward": { + "default": [ + + ], + "description": "A list of custom claims to be forwarded from the introspection response to the upstream request. Claims are forwarded in headers with prefix `X-Credential-{claim-name}`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "custom_introspection_headers": { + "additionalProperties": true, + "description": "A list of custom headers to be added in the introspection request.", + "type": "object" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream API server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "introspect_request": { + "default": false, + "description": "A boolean indicating whether to forward information about the current downstream request to the introspect endpoint. If true, headers `X-Request-Path` and `X-Request-Http-Method` will be inserted into the introspect request.", + "type": "boolean" + }, + "introspection_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "integer" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "integer" + }, + "token_type_hint": { + "description": "The `token_type_hint` value to associate to introspection requests.", + "type": "string" + }, + "ttl": { + "default": 30, + "description": "The TTL in seconds for the introspection response. Set to 0 to disable the expiration.", + "type": "number" + } + }, + "required": [ + "authorization_value", + "introspection_url" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oauth2-introspection/3.8.json b/json_schemas/oauth2-introspection/3.8.json new file mode 100644 index 00000000..9c374df3 --- /dev/null +++ b/json_schemas/oauth2-introspection/3.8.json @@ -0,0 +1,139 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "minLength": 0, + "type": "string" + }, + "authorization_value": { + "description": "The value to set as the `Authorization` header when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is the `client_id` and `client_secret` as a Base64-encoded Basic Auth string (`Basic MG9hNWl...`).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "consumer_by": { + "default": "username", + "description": "A string indicating whether to associate OAuth2 `username` or `client_id` with the consumer's username. OAuth2 `username` is mapped to a consumer's `username` field, while an OAuth2 `client_id` maps to a consumer's `custom_id`.", + "enum": [ + "client_id", + "username" + ], + "type": "string" + }, + "custom_claims_forward": { + "default": [ + + ], + "description": "A list of custom claims to be forwarded from the introspection response to the upstream request. Claims are forwarded in headers with prefix `X-Credential-{claim-name}`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "custom_introspection_headers": { + "additionalProperties": true, + "description": "A list of custom headers to be added in the introspection request.", + "type": "object" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream API server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "introspect_request": { + "default": false, + "description": "A boolean indicating whether to forward information about the current downstream request to the introspect endpoint. If true, headers `X-Request-Path` and `X-Request-Http-Method` will be inserted into the introspect request.", + "type": "boolean" + }, + "introspection_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "integer" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "integer" + }, + "token_type_hint": { + "description": "The `token_type_hint` value to associate to introspection requests.", + "type": "string" + }, + "ttl": { + "default": 30, + "description": "The TTL in seconds for the introspection response. Set to 0 to disable the expiration.", + "type": "number" + } + }, + "required": [ + "authorization_value", + "introspection_url" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oauth2-introspection/3.9.json b/json_schemas/oauth2-introspection/3.9.json new file mode 100644 index 00000000..fc8b6d85 --- /dev/null +++ b/json_schemas/oauth2-introspection/3.9.json @@ -0,0 +1,139 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "minLength": 0, + "type": "string" + }, + "authorization_value": { + "description": "The value to set as the `Authorization` header when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is the `client_id` and `client_secret` as a Base64-encoded Basic Auth string (`Basic MG9hNWl...`).\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "consumer_by": { + "default": "username", + "description": "A string indicating whether to associate OAuth2 `username` or `client_id` with the consumer's username. OAuth2 `username` is mapped to a consumer's `username` field, while an OAuth2 `client_id` maps to a consumer's `custom_id`.", + "enum": [ + "client_id", + "username" + ], + "type": "string" + }, + "custom_claims_forward": { + "default": [ + + ], + "description": "A list of custom claims to be forwarded from the introspection response to the upstream request. Claims are forwarded in headers with prefix `X-Credential-{claim-name}`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "custom_introspection_headers": { + "additionalProperties": true, + "description": "A list of custom headers to be added in the introspection request.", + "type": "object" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream API server. It will be removed by Kong before proxying the request.", + "type": "boolean" + }, + "introspect_request": { + "default": false, + "description": "A boolean indicating whether to forward information about the current downstream request to the introspect endpoint. If true, headers `X-Request-Path` and `X-Request-Http-Method` will be inserted into the introspect request.", + "type": "boolean" + }, + "introspection_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "integer" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "integer" + }, + "token_type_hint": { + "description": "The `token_type_hint` value to associate to introspection requests.", + "type": "string" + }, + "ttl": { + "default": 30, + "description": "The TTL in seconds for the introspection response. Set to 0 to disable the expiration.", + "type": "number" + } + }, + "required": [ + "authorization_value", + "introspection_url" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oauth2/2.8.json b/json_schemas/oauth2/2.8.json new file mode 100644 index 00000000..e4d348ad --- /dev/null +++ b/json_schemas/oauth2/2.8.json @@ -0,0 +1,184 @@ +{ + "properties": { + "config": { + "properties": { + "accept_http_if_already_terminated": { + "default": false, + "description": "Accepts HTTPs requests that have already been terminated by a proxy or load balancer and the\n`x-forwarded-proto: https` header has been added to the request. Only enable this option\nif the Kong server cannot be publicly accessed and the only entry point is such proxy or load balancer.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID) value to use as an anonymous consumer if authentication fails.\nIf empty (default), the request fails with an authentication failure `4xx`. Note that this value\nmust refer to the consumer `id` attribute that is internal to Kong Gateway, and **not** its `custom_id`.", + "type": "string" + }, + "auth_header_name": { + "default": "authorization", + "description": "The name of the header that is supposed to carry the access token. Default: `authorization`.", + "type": "string" + }, + "enable_authorization_code": { + "default": false, + "description": "An optional boolean value to enable the three-legged Authorization Code flow ([RFC 6742 Section 4.1](https://tools.ietf.org/html/rfc6749#section-4.1)).", + "examples": [ + true + ], + "type": "boolean" + }, + "enable_client_credentials": { + "default": false, + "description": "An optional boolean value to enable the Client Credentials Grant flow ([RFC 6742 Section 4.4](https://tools.ietf.org/html/rfc6749#section-4.4)).", + "type": "boolean" + }, + "enable_implicit_grant": { + "default": false, + "description": "An optional boolean value to enable the Implicit Grant flow which allows to provision a token as a result of the authorization process ([RFC 6742 Section 4.2](https://tools.ietf.org/html/rfc6749#section-4.2)).", + "type": "boolean" + }, + "enable_password_grant": { + "default": false, + "description": "An optional boolean value to enable the Resource Owner Password Credentials Grant flow ([RFC 6742 Section 4.3](https://tools.ietf.org/html/rfc6749#section-4.3)).", + "type": "boolean" + }, + "global_credentials": { + "default": false, + "description": "An optional boolean value that allows using the same OAuth credentials generated by the plugin with\nany other Service whose OAuth 2.0 plugin configuration also has `config.global_credentials=true`.", + "type": "boolean" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.\nIf `true`, the plugin will strip the credential from the request (the header containing the client credentials)\nbefore proxying it.", + "type": "boolean" + }, + "mandatory_scope": { + "default": false, + "description": "An optional boolean value telling the plugin to require at least one `scope` to be authorized by the end user.", + "examples": [ + true + ], + "type": "boolean" + }, + "persistent_refresh_token": { + "default": false, + "type": "boolean" + }, + "pkce": { + "default": "lax", + "description": "Specifies a mode of how the Proof Key for Code Exchange (PKCE) should be\nhandled by the plugin. The possible modes are `none`, `lax`, and `strict`.\nThe `strict` mode enforces PKCE on both authorization and token endpoints for\nall the clients. The `lax` mode enforces PKCE for public clients, but it does\nnot enforce it for confidential clients. The `none` mode does not enforce PKCE\non any client. In any case, if a client asks for PKCE on authorization\nendpoint, the PKCE is also enforced on token endpoint.", + "enum": [ + "lax", + "none", + "strict" + ], + "type": "string" + }, + "provision_key": { + "description": "The unique key the plugin has generated when it has been added to the Service.", + "examples": [ + "" + ], + "type": "string" + }, + "refresh_token_ttl": { + "default": 1209600, + "description": "An optional integer value telling the plugin how many seconds a token/refresh token pair is valid for,\nand can be used to generate a new access token. Default value is 2 weeks. Set to `0` to keep the token/refresh\ntoken pair valid indefinitely.", + "type": "number" + }, + "reuse_refresh_token": { + "default": false, + "description": "An optional boolean value that indicates whether an OAuth refresh token is\nreused when refreshing an access token.", + "type": "boolean" + }, + "scopes": { + "description": "Describes an array of scope names that will be available to the end user. If `mandatory_scope` is\nset to `true`, then `scopes` are required.", + "examples": [ + [ + "address", + "email", + "phone" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_expiration": { + "default": 7200, + "description": "An optional integer value telling the plugin how many seconds a token should last, after which the client will\nneed to refresh the token. Set to `0` to disable the expiration.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/oauth2/3.10.json b/json_schemas/oauth2/3.10.json new file mode 100644 index 00000000..b09630ea --- /dev/null +++ b/json_schemas/oauth2/3.10.json @@ -0,0 +1,165 @@ +{ + "properties": { + "config": { + "properties": { + "accept_http_if_already_terminated": { + "default": false, + "description": "Accepts HTTPs requests that have already been terminated by a proxy or load balancer.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "auth_header_name": { + "default": "authorization", + "description": "The name of the header that is supposed to carry the access token.", + "type": "string" + }, + "enable_authorization_code": { + "default": false, + "description": "An optional boolean value to enable the three-legged Authorization Code flow (RFC 6742 Section 4.1).", + "type": "boolean" + }, + "enable_client_credentials": { + "default": false, + "description": "An optional boolean value to enable the Client Credentials Grant flow (RFC 6742 Section 4.4).", + "type": "boolean" + }, + "enable_implicit_grant": { + "default": false, + "description": "An optional boolean value to enable the Implicit Grant flow which allows to provision a token as a result of the authorization process (RFC 6742 Section 4.2).", + "type": "boolean" + }, + "enable_password_grant": { + "default": false, + "description": "An optional boolean value to enable the Resource Owner Password Credentials Grant flow (RFC 6742 Section 4.3).", + "type": "boolean" + }, + "global_credentials": { + "default": false, + "description": "An optional boolean value that allows using the same OAuth credentials generated by the plugin with any other service whose OAuth 2.0 plugin configuration also has `config.global_credentials=true`.", + "type": "boolean" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "type": "boolean" + }, + "mandatory_scope": { + "default": false, + "description": "An optional boolean value telling the plugin to require at least one `scope` to be authorized by the end user.", + "type": "boolean" + }, + "persistent_refresh_token": { + "default": false, + "type": "boolean" + }, + "pkce": { + "default": "lax", + "description": "Specifies a mode of how the Proof Key for Code Exchange (PKCE) should be handled by the plugin.", + "enum": [ + "lax", + "none", + "strict" + ], + "type": "string" + }, + "provision_key": { + "description": "The unique key the plugin has generated when it has been added to the Service.\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "refresh_token_ttl": { + "default": 1209600, + "description": "Time-to-live value for data", + "maximum": 100000000, + "minimum": 0, + "type": "number" + }, + "reuse_refresh_token": { + "default": false, + "description": "An optional boolean value that indicates whether an OAuth refresh token is reused when refreshing an access token.", + "type": "boolean" + }, + "scopes": { + "description": "Describes an array of scope names that will be available to the end user. If `mandatory_scope` is set to `true`, then `scopes` are required.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_expiration": { + "default": 7200, + "description": "An optional integer value telling the plugin how many seconds a token should last, after which the client will need to refresh the token. Set to `0` to disable the expiration.", + "type": "number" + } + }, + "required": [ + "provision_key" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oauth2/3.11.json b/json_schemas/oauth2/3.11.json new file mode 100644 index 00000000..2ac0659a --- /dev/null +++ b/json_schemas/oauth2/3.11.json @@ -0,0 +1,153 @@ +{ + "properties": { + "config": { + "properties": { + "accept_http_if_already_terminated": { + "default": false, + "description": "Accepts HTTPs requests that have already been terminated by a proxy or load balancer.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "auth_header_name": { + "default": "authorization", + "description": "The name of the header that is supposed to carry the access token.", + "type": "string" + }, + "enable_authorization_code": { + "default": false, + "description": "An optional boolean value to enable the three-legged Authorization Code flow (RFC 6742 Section 4.1).", + "type": "boolean" + }, + "enable_client_credentials": { + "default": false, + "description": "An optional boolean value to enable the Client Credentials Grant flow (RFC 6742 Section 4.4).", + "type": "boolean" + }, + "enable_implicit_grant": { + "default": false, + "description": "An optional boolean value to enable the Implicit Grant flow which allows to provision a token as a result of the authorization process (RFC 6742 Section 4.2).", + "type": "boolean" + }, + "enable_password_grant": { + "default": false, + "description": "An optional boolean value to enable the Resource Owner Password Credentials Grant flow (RFC 6742 Section 4.3).", + "type": "boolean" + }, + "global_credentials": { + "default": false, + "description": "An optional boolean value that allows using the same OAuth credentials generated by the plugin with any other service whose OAuth 2.0 plugin configuration also has `config.global_credentials=true`.", + "type": "boolean" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "type": "boolean" + }, + "mandatory_scope": { + "default": false, + "description": "An optional boolean value telling the plugin to require at least one `scope` to be authorized by the end user.", + "type": "boolean" + }, + "persistent_refresh_token": { + "default": false, + "type": "boolean" + }, + "pkce": { + "default": "lax", + "description": "Specifies a mode of how the Proof Key for Code Exchange (PKCE) should be handled by the plugin.", + "enum": [ + "lax", + "none", + "strict" + ], + "type": "string" + }, + "provision_key": { + "description": "The unique key the plugin has generated when it has been added to the Service.\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "refresh_token_ttl": { + "default": 1209600, + "description": "Time-to-live value for data", + "maximum": 100000000, + "minimum": 0, + "type": "number" + }, + "reuse_refresh_token": { + "default": false, + "description": "An optional boolean value that indicates whether an OAuth refresh token is reused when refreshing an access token.", + "type": "boolean" + }, + "scopes": { + "description": "Describes an array of scope names that will be available to the end user. If `mandatory_scope` is set to `true`, then `scopes` are required.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_expiration": { + "default": 7200, + "description": "An optional integer value telling the plugin how many seconds a token should last, after which the client will need to refresh the token. Set to `0` to disable the expiration.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/oauth2/3.12.json b/json_schemas/oauth2/3.12.json new file mode 100644 index 00000000..6f45d27f --- /dev/null +++ b/json_schemas/oauth2/3.12.json @@ -0,0 +1,157 @@ +{ + "properties": { + "config": { + "properties": { + "accept_http_if_already_terminated": { + "default": false, + "description": "Accepts HTTPs requests that have already been terminated by a proxy or load balancer.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "auth_header_name": { + "default": "authorization", + "description": "The name of the header that is supposed to carry the access token.", + "type": "string" + }, + "enable_authorization_code": { + "default": false, + "description": "An optional boolean value to enable the three-legged Authorization Code flow (RFC 6742 Section 4.1).", + "type": "boolean" + }, + "enable_client_credentials": { + "default": false, + "description": "An optional boolean value to enable the Client Credentials Grant flow (RFC 6742 Section 4.4).", + "type": "boolean" + }, + "enable_implicit_grant": { + "default": false, + "description": "An optional boolean value to enable the Implicit Grant flow which allows to provision a token as a result of the authorization process (RFC 6742 Section 4.2).", + "type": "boolean" + }, + "enable_password_grant": { + "default": false, + "description": "An optional boolean value to enable the Resource Owner Password Credentials Grant flow (RFC 6742 Section 4.3).", + "type": "boolean" + }, + "global_credentials": { + "default": false, + "description": "An optional boolean value that allows using the same OAuth credentials generated by the plugin with any other service whose OAuth 2.0 plugin configuration also has `config.global_credentials=true`.", + "type": "boolean" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "type": "boolean" + }, + "mandatory_scope": { + "default": false, + "description": "An optional boolean value telling the plugin to require at least one `scope` to be authorized by the end user.", + "type": "boolean" + }, + "persistent_refresh_token": { + "default": false, + "type": "boolean" + }, + "pkce": { + "default": "lax", + "description": "Specifies a mode of how the Proof Key for Code Exchange (PKCE) should be handled by the plugin.", + "enum": [ + "lax", + "none", + "strict" + ], + "type": "string" + }, + "provision_key": { + "description": "The unique key the plugin has generated when it has been added to the Service.\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "refresh_token_ttl": { + "default": 1209600, + "description": "Time-to-live value for data", + "maximum": 100000000, + "minimum": 0, + "type": "number" + }, + "reuse_refresh_token": { + "default": false, + "description": "An optional boolean value that indicates whether an OAuth refresh token is reused when refreshing an access token.", + "type": "boolean" + }, + "scopes": { + "description": "Describes an array of scope names that will be available to the end user. If `mandatory_scope` is set to `true`, then `scopes` are required.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_expiration": { + "default": 7200, + "description": "An optional integer value telling the plugin how many seconds a token should last, after which the client will need to refresh the token. Set to `0` to disable the expiration.", + "type": "number" + } + }, + "required": [ + "provision_key" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oauth2/3.4.json b/json_schemas/oauth2/3.4.json new file mode 100644 index 00000000..d7188ba4 --- /dev/null +++ b/json_schemas/oauth2/3.4.json @@ -0,0 +1,161 @@ +{ + "properties": { + "config": { + "properties": { + "accept_http_if_already_terminated": { + "default": false, + "description": "Accepts HTTPs requests that have already been terminated by a proxy or load balancer.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "auth_header_name": { + "default": "authorization", + "description": "The name of the header that is supposed to carry the access token.", + "type": "string" + }, + "enable_authorization_code": { + "default": false, + "description": "An optional boolean value to enable the three-legged Authorization Code flow (RFC 6742 Section 4.1).", + "type": "boolean" + }, + "enable_client_credentials": { + "default": false, + "description": "An optional boolean value to enable the Client Credentials Grant flow (RFC 6742 Section 4.4).", + "type": "boolean" + }, + "enable_implicit_grant": { + "default": false, + "description": "An optional boolean value to enable the Implicit Grant flow which allows to provision a token as a result of the authorization process (RFC 6742 Section 4.2).", + "type": "boolean" + }, + "enable_password_grant": { + "default": false, + "description": "An optional boolean value to enable the Resource Owner Password Credentials Grant flow (RFC 6742 Section 4.3).", + "type": "boolean" + }, + "global_credentials": { + "default": false, + "description": "An optional boolean value that allows using the same OAuth credentials generated by the plugin with any other service whose OAuth 2.0 plugin configuration also has `config.global_credentials=true`.", + "type": "boolean" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "type": "boolean" + }, + "mandatory_scope": { + "default": false, + "description": "An optional boolean value telling the plugin to require at least one `scope` to be authorized by the end user.", + "type": "boolean" + }, + "persistent_refresh_token": { + "default": false, + "type": "boolean" + }, + "pkce": { + "default": "lax", + "description": "Specifies a mode of how the Proof Key for Code Exchange (PKCE) should be handled by the plugin.", + "enum": [ + "lax", + "none", + "strict" + ], + "type": "string" + }, + "provision_key": { + "description": "The unique key the plugin has generated when it has been added to the Service.\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "refresh_token_ttl": { + "default": 1209600, + "description": "Time-to-live value for data", + "maximum": 100000000, + "minimum": 0, + "type": "number" + }, + "reuse_refresh_token": { + "default": false, + "description": "An optional boolean value that indicates whether an OAuth refresh token is reused when refreshing an access token.", + "type": "boolean" + }, + "scopes": { + "description": "Describes an array of scope names that will be available to the end user. If `mandatory_scope` is set to `true`, then `scopes` are required.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_expiration": { + "default": 7200, + "description": "An optional integer value telling the plugin how many seconds a token should last, after which the client will need to refresh the token. Set to `0` to disable the expiration.", + "type": "number" + } + }, + "required": [ + "provision_key" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oauth2/3.7.json b/json_schemas/oauth2/3.7.json new file mode 100644 index 00000000..d7188ba4 --- /dev/null +++ b/json_schemas/oauth2/3.7.json @@ -0,0 +1,161 @@ +{ + "properties": { + "config": { + "properties": { + "accept_http_if_already_terminated": { + "default": false, + "description": "Accepts HTTPs requests that have already been terminated by a proxy or load balancer.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "auth_header_name": { + "default": "authorization", + "description": "The name of the header that is supposed to carry the access token.", + "type": "string" + }, + "enable_authorization_code": { + "default": false, + "description": "An optional boolean value to enable the three-legged Authorization Code flow (RFC 6742 Section 4.1).", + "type": "boolean" + }, + "enable_client_credentials": { + "default": false, + "description": "An optional boolean value to enable the Client Credentials Grant flow (RFC 6742 Section 4.4).", + "type": "boolean" + }, + "enable_implicit_grant": { + "default": false, + "description": "An optional boolean value to enable the Implicit Grant flow which allows to provision a token as a result of the authorization process (RFC 6742 Section 4.2).", + "type": "boolean" + }, + "enable_password_grant": { + "default": false, + "description": "An optional boolean value to enable the Resource Owner Password Credentials Grant flow (RFC 6742 Section 4.3).", + "type": "boolean" + }, + "global_credentials": { + "default": false, + "description": "An optional boolean value that allows using the same OAuth credentials generated by the plugin with any other service whose OAuth 2.0 plugin configuration also has `config.global_credentials=true`.", + "type": "boolean" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "type": "boolean" + }, + "mandatory_scope": { + "default": false, + "description": "An optional boolean value telling the plugin to require at least one `scope` to be authorized by the end user.", + "type": "boolean" + }, + "persistent_refresh_token": { + "default": false, + "type": "boolean" + }, + "pkce": { + "default": "lax", + "description": "Specifies a mode of how the Proof Key for Code Exchange (PKCE) should be handled by the plugin.", + "enum": [ + "lax", + "none", + "strict" + ], + "type": "string" + }, + "provision_key": { + "description": "The unique key the plugin has generated when it has been added to the Service.\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "refresh_token_ttl": { + "default": 1209600, + "description": "Time-to-live value for data", + "maximum": 100000000, + "minimum": 0, + "type": "number" + }, + "reuse_refresh_token": { + "default": false, + "description": "An optional boolean value that indicates whether an OAuth refresh token is reused when refreshing an access token.", + "type": "boolean" + }, + "scopes": { + "description": "Describes an array of scope names that will be available to the end user. If `mandatory_scope` is set to `true`, then `scopes` are required.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_expiration": { + "default": 7200, + "description": "An optional integer value telling the plugin how many seconds a token should last, after which the client will need to refresh the token. Set to `0` to disable the expiration.", + "type": "number" + } + }, + "required": [ + "provision_key" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oauth2/3.8.json b/json_schemas/oauth2/3.8.json new file mode 100644 index 00000000..b09630ea --- /dev/null +++ b/json_schemas/oauth2/3.8.json @@ -0,0 +1,165 @@ +{ + "properties": { + "config": { + "properties": { + "accept_http_if_already_terminated": { + "default": false, + "description": "Accepts HTTPs requests that have already been terminated by a proxy or load balancer.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "auth_header_name": { + "default": "authorization", + "description": "The name of the header that is supposed to carry the access token.", + "type": "string" + }, + "enable_authorization_code": { + "default": false, + "description": "An optional boolean value to enable the three-legged Authorization Code flow (RFC 6742 Section 4.1).", + "type": "boolean" + }, + "enable_client_credentials": { + "default": false, + "description": "An optional boolean value to enable the Client Credentials Grant flow (RFC 6742 Section 4.4).", + "type": "boolean" + }, + "enable_implicit_grant": { + "default": false, + "description": "An optional boolean value to enable the Implicit Grant flow which allows to provision a token as a result of the authorization process (RFC 6742 Section 4.2).", + "type": "boolean" + }, + "enable_password_grant": { + "default": false, + "description": "An optional boolean value to enable the Resource Owner Password Credentials Grant flow (RFC 6742 Section 4.3).", + "type": "boolean" + }, + "global_credentials": { + "default": false, + "description": "An optional boolean value that allows using the same OAuth credentials generated by the plugin with any other service whose OAuth 2.0 plugin configuration also has `config.global_credentials=true`.", + "type": "boolean" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "type": "boolean" + }, + "mandatory_scope": { + "default": false, + "description": "An optional boolean value telling the plugin to require at least one `scope` to be authorized by the end user.", + "type": "boolean" + }, + "persistent_refresh_token": { + "default": false, + "type": "boolean" + }, + "pkce": { + "default": "lax", + "description": "Specifies a mode of how the Proof Key for Code Exchange (PKCE) should be handled by the plugin.", + "enum": [ + "lax", + "none", + "strict" + ], + "type": "string" + }, + "provision_key": { + "description": "The unique key the plugin has generated when it has been added to the Service.\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "refresh_token_ttl": { + "default": 1209600, + "description": "Time-to-live value for data", + "maximum": 100000000, + "minimum": 0, + "type": "number" + }, + "reuse_refresh_token": { + "default": false, + "description": "An optional boolean value that indicates whether an OAuth refresh token is reused when refreshing an access token.", + "type": "boolean" + }, + "scopes": { + "description": "Describes an array of scope names that will be available to the end user. If `mandatory_scope` is set to `true`, then `scopes` are required.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_expiration": { + "default": 7200, + "description": "An optional integer value telling the plugin how many seconds a token should last, after which the client will need to refresh the token. Set to `0` to disable the expiration.", + "type": "number" + } + }, + "required": [ + "provision_key" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/oauth2/3.9.json b/json_schemas/oauth2/3.9.json new file mode 100644 index 00000000..b09630ea --- /dev/null +++ b/json_schemas/oauth2/3.9.json @@ -0,0 +1,165 @@ +{ + "properties": { + "config": { + "properties": { + "accept_http_if_already_terminated": { + "default": false, + "description": "Accepts HTTPs requests that have already been terminated by a proxy or load balancer.", + "type": "boolean" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + }, + "auth_header_name": { + "default": "authorization", + "description": "The name of the header that is supposed to carry the access token.", + "type": "string" + }, + "enable_authorization_code": { + "default": false, + "description": "An optional boolean value to enable the three-legged Authorization Code flow (RFC 6742 Section 4.1).", + "type": "boolean" + }, + "enable_client_credentials": { + "default": false, + "description": "An optional boolean value to enable the Client Credentials Grant flow (RFC 6742 Section 4.4).", + "type": "boolean" + }, + "enable_implicit_grant": { + "default": false, + "description": "An optional boolean value to enable the Implicit Grant flow which allows to provision a token as a result of the authorization process (RFC 6742 Section 4.2).", + "type": "boolean" + }, + "enable_password_grant": { + "default": false, + "description": "An optional boolean value to enable the Resource Owner Password Credentials Grant flow (RFC 6742 Section 4.3).", + "type": "boolean" + }, + "global_credentials": { + "default": false, + "description": "An optional boolean value that allows using the same OAuth credentials generated by the plugin with any other service whose OAuth 2.0 plugin configuration also has `config.global_credentials=true`.", + "type": "boolean" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "type": "boolean" + }, + "mandatory_scope": { + "default": false, + "description": "An optional boolean value telling the plugin to require at least one `scope` to be authorized by the end user.", + "type": "boolean" + }, + "persistent_refresh_token": { + "default": false, + "type": "boolean" + }, + "pkce": { + "default": "lax", + "description": "Specifies a mode of how the Proof Key for Code Exchange (PKCE) should be handled by the plugin.", + "enum": [ + "lax", + "none", + "strict" + ], + "type": "string" + }, + "provision_key": { + "description": "The unique key the plugin has generated when it has been added to the Service.\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + }, + "refresh_token_ttl": { + "default": 1209600, + "description": "Time-to-live value for data", + "maximum": 100000000, + "minimum": 0, + "type": "number" + }, + "reuse_refresh_token": { + "default": false, + "description": "An optional boolean value that indicates whether an OAuth refresh token is reused when refreshing an access token.", + "type": "boolean" + }, + "scopes": { + "description": "Describes an array of scope names that will be available to the end user. If `mandatory_scope` is set to `true`, then `scopes` are required.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_expiration": { + "default": 7200, + "description": "An optional integer value telling the plugin how many seconds a token should last, after which the client will need to refresh the token. Set to `0` to disable the expiration.", + "type": "number" + } + }, + "required": [ + "provision_key" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/opa/2.8.json b/json_schemas/opa/2.8.json new file mode 100644 index 00000000..d86a93d7 --- /dev/null +++ b/json_schemas/opa/2.8.json @@ -0,0 +1,125 @@ +{ + "properties": { + "config": { + "properties": { + "include_consumer_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Consumer object in use for the current request (if any) is included as input to OPA.", + "type": "boolean" + }, + "include_route_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Route object in use for the current request is included as input to OPA.", + "type": "boolean" + }, + "include_service_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Service object in use for the current request is included as input to OPA.", + "type": "boolean" + }, + "opa_host": { + "default": "localhost", + "description": "The DNS name or IP address of the OPA server.", + "examples": [ + "localhost" + ], + "type": "string" + }, + "opa_path": { + "description": "The HTTP path to use when making a request to the OPA server. This is usually the path to the policy and rule to evaluate, prefixed with `/v1/data/`. For example,\nif you want to evaluate the `allow` rule inside `example.kong` package, then the path would be `/v1/data/example/kong/allowBoolean`.", + "examples": [ + "/v1/data/example/kong/allowBoolean" + ], + "type": "string" + }, + "opa_port": { + "default": 8181, + "description": "The port of the OPA server.", + "examples": [ + 8181 + ], + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "opa_protocol": { + "default": "http", + "description": "The protocol to use when talking to Open Policy Agent (OPA) server. Allowed protocols are `http` and `https`.", + "enum": [ + "http", + "https" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/opa/3.10.json b/json_schemas/opa/3.10.json new file mode 100644 index 00000000..a739ea83 --- /dev/null +++ b/json_schemas/opa/3.10.json @@ -0,0 +1,122 @@ +{ + "properties": { + "config": { + "properties": { + "include_body_in_opa_input": { + "default": false, + "type": "boolean" + }, + "include_consumer_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Consumer object in use for the current request (if any) is included as input to OPA.", + "type": "boolean" + }, + "include_parsed_json_body_in_opa_input": { + "default": false, + "description": "If set to true and the `Content-Type` header of the current request is `application/json`, the request body will be JSON decoded and the decoded struct is included as input to OPA.", + "type": "boolean" + }, + "include_route_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Route object in use for the current request is included as input to OPA.", + "type": "boolean" + }, + "include_service_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Service object in use for the current request is included as input to OPA.", + "type": "boolean" + }, + "include_uri_captures_in_opa_input": { + "default": false, + "description": "If set to true, the regex capture groups captured on the Kong Gateway Route's path field in the current request (if any) are included as input to OPA.", + "type": "boolean" + }, + "opa_host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "opa_path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "opa_port": { + "default": 8181, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "opa_protocol": { + "default": "http", + "description": "The protocol to use when talking to Open Policy Agent (OPA) server. Allowed protocols are `http` and `https`.", + "enum": [ + "http", + "https" + ], + "type": "string" + }, + "ssl_verify": { + "default": true, + "description": "If set to true, the OPA certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "type": "boolean" + } + }, + "required": [ + "opa_path" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/opa/3.11.json b/json_schemas/opa/3.11.json new file mode 100644 index 00000000..84f6a1fe --- /dev/null +++ b/json_schemas/opa/3.11.json @@ -0,0 +1,116 @@ +{ + "properties": { + "config": { + "properties": { + "include_body_in_opa_input": { + "default": false, + "type": "boolean" + }, + "include_consumer_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Consumer object in use for the current request (if any) is included as input to OPA.", + "type": "boolean" + }, + "include_parsed_json_body_in_opa_input": { + "default": false, + "description": "If set to true and the `Content-Type` header of the current request is `application/json`, the request body will be JSON decoded and the decoded struct is included as input to OPA.", + "type": "boolean" + }, + "include_route_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Route object in use for the current request is included as input to OPA.", + "type": "boolean" + }, + "include_service_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Service object in use for the current request is included as input to OPA.", + "type": "boolean" + }, + "include_uri_captures_in_opa_input": { + "default": false, + "description": "If set to true, the regex capture groups captured on the Kong Gateway Route's path field in the current request (if any) are included as input to OPA.", + "type": "boolean" + }, + "opa_host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "opa_path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "opa_port": { + "default": 8181, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "opa_protocol": { + "default": "http", + "description": "The protocol to use when talking to Open Policy Agent (OPA) server. Allowed protocols are `http` and `https`.", + "enum": [ + "http", + "https" + ], + "type": "string" + }, + "ssl_verify": { + "default": true, + "description": "If set to true, the OPA certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "type": "boolean" + } + }, + "required": [ + "opa_path" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/opa/3.12.json b/json_schemas/opa/3.12.json new file mode 100644 index 00000000..84f6a1fe --- /dev/null +++ b/json_schemas/opa/3.12.json @@ -0,0 +1,116 @@ +{ + "properties": { + "config": { + "properties": { + "include_body_in_opa_input": { + "default": false, + "type": "boolean" + }, + "include_consumer_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Consumer object in use for the current request (if any) is included as input to OPA.", + "type": "boolean" + }, + "include_parsed_json_body_in_opa_input": { + "default": false, + "description": "If set to true and the `Content-Type` header of the current request is `application/json`, the request body will be JSON decoded and the decoded struct is included as input to OPA.", + "type": "boolean" + }, + "include_route_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Route object in use for the current request is included as input to OPA.", + "type": "boolean" + }, + "include_service_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Service object in use for the current request is included as input to OPA.", + "type": "boolean" + }, + "include_uri_captures_in_opa_input": { + "default": false, + "description": "If set to true, the regex capture groups captured on the Kong Gateway Route's path field in the current request (if any) are included as input to OPA.", + "type": "boolean" + }, + "opa_host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "opa_path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "opa_port": { + "default": 8181, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "opa_protocol": { + "default": "http", + "description": "The protocol to use when talking to Open Policy Agent (OPA) server. Allowed protocols are `http` and `https`.", + "enum": [ + "http", + "https" + ], + "type": "string" + }, + "ssl_verify": { + "default": true, + "description": "If set to true, the OPA certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "type": "boolean" + } + }, + "required": [ + "opa_path" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/opa/3.4.json b/json_schemas/opa/3.4.json new file mode 100644 index 00000000..a739ea83 --- /dev/null +++ b/json_schemas/opa/3.4.json @@ -0,0 +1,122 @@ +{ + "properties": { + "config": { + "properties": { + "include_body_in_opa_input": { + "default": false, + "type": "boolean" + }, + "include_consumer_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Consumer object in use for the current request (if any) is included as input to OPA.", + "type": "boolean" + }, + "include_parsed_json_body_in_opa_input": { + "default": false, + "description": "If set to true and the `Content-Type` header of the current request is `application/json`, the request body will be JSON decoded and the decoded struct is included as input to OPA.", + "type": "boolean" + }, + "include_route_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Route object in use for the current request is included as input to OPA.", + "type": "boolean" + }, + "include_service_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Service object in use for the current request is included as input to OPA.", + "type": "boolean" + }, + "include_uri_captures_in_opa_input": { + "default": false, + "description": "If set to true, the regex capture groups captured on the Kong Gateway Route's path field in the current request (if any) are included as input to OPA.", + "type": "boolean" + }, + "opa_host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "opa_path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "opa_port": { + "default": 8181, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "opa_protocol": { + "default": "http", + "description": "The protocol to use when talking to Open Policy Agent (OPA) server. Allowed protocols are `http` and `https`.", + "enum": [ + "http", + "https" + ], + "type": "string" + }, + "ssl_verify": { + "default": true, + "description": "If set to true, the OPA certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "type": "boolean" + } + }, + "required": [ + "opa_path" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/opa/3.7.json b/json_schemas/opa/3.7.json new file mode 100644 index 00000000..a739ea83 --- /dev/null +++ b/json_schemas/opa/3.7.json @@ -0,0 +1,122 @@ +{ + "properties": { + "config": { + "properties": { + "include_body_in_opa_input": { + "default": false, + "type": "boolean" + }, + "include_consumer_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Consumer object in use for the current request (if any) is included as input to OPA.", + "type": "boolean" + }, + "include_parsed_json_body_in_opa_input": { + "default": false, + "description": "If set to true and the `Content-Type` header of the current request is `application/json`, the request body will be JSON decoded and the decoded struct is included as input to OPA.", + "type": "boolean" + }, + "include_route_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Route object in use for the current request is included as input to OPA.", + "type": "boolean" + }, + "include_service_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Service object in use for the current request is included as input to OPA.", + "type": "boolean" + }, + "include_uri_captures_in_opa_input": { + "default": false, + "description": "If set to true, the regex capture groups captured on the Kong Gateway Route's path field in the current request (if any) are included as input to OPA.", + "type": "boolean" + }, + "opa_host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "opa_path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "opa_port": { + "default": 8181, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "opa_protocol": { + "default": "http", + "description": "The protocol to use when talking to Open Policy Agent (OPA) server. Allowed protocols are `http` and `https`.", + "enum": [ + "http", + "https" + ], + "type": "string" + }, + "ssl_verify": { + "default": true, + "description": "If set to true, the OPA certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "type": "boolean" + } + }, + "required": [ + "opa_path" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/opa/3.8.json b/json_schemas/opa/3.8.json new file mode 100644 index 00000000..a739ea83 --- /dev/null +++ b/json_schemas/opa/3.8.json @@ -0,0 +1,122 @@ +{ + "properties": { + "config": { + "properties": { + "include_body_in_opa_input": { + "default": false, + "type": "boolean" + }, + "include_consumer_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Consumer object in use for the current request (if any) is included as input to OPA.", + "type": "boolean" + }, + "include_parsed_json_body_in_opa_input": { + "default": false, + "description": "If set to true and the `Content-Type` header of the current request is `application/json`, the request body will be JSON decoded and the decoded struct is included as input to OPA.", + "type": "boolean" + }, + "include_route_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Route object in use for the current request is included as input to OPA.", + "type": "boolean" + }, + "include_service_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Service object in use for the current request is included as input to OPA.", + "type": "boolean" + }, + "include_uri_captures_in_opa_input": { + "default": false, + "description": "If set to true, the regex capture groups captured on the Kong Gateway Route's path field in the current request (if any) are included as input to OPA.", + "type": "boolean" + }, + "opa_host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "opa_path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "opa_port": { + "default": 8181, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "opa_protocol": { + "default": "http", + "description": "The protocol to use when talking to Open Policy Agent (OPA) server. Allowed protocols are `http` and `https`.", + "enum": [ + "http", + "https" + ], + "type": "string" + }, + "ssl_verify": { + "default": true, + "description": "If set to true, the OPA certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "type": "boolean" + } + }, + "required": [ + "opa_path" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/opa/3.9.json b/json_schemas/opa/3.9.json new file mode 100644 index 00000000..a739ea83 --- /dev/null +++ b/json_schemas/opa/3.9.json @@ -0,0 +1,122 @@ +{ + "properties": { + "config": { + "properties": { + "include_body_in_opa_input": { + "default": false, + "type": "boolean" + }, + "include_consumer_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Consumer object in use for the current request (if any) is included as input to OPA.", + "type": "boolean" + }, + "include_parsed_json_body_in_opa_input": { + "default": false, + "description": "If set to true and the `Content-Type` header of the current request is `application/json`, the request body will be JSON decoded and the decoded struct is included as input to OPA.", + "type": "boolean" + }, + "include_route_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Route object in use for the current request is included as input to OPA.", + "type": "boolean" + }, + "include_service_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Service object in use for the current request is included as input to OPA.", + "type": "boolean" + }, + "include_uri_captures_in_opa_input": { + "default": false, + "description": "If set to true, the regex capture groups captured on the Kong Gateway Route's path field in the current request (if any) are included as input to OPA.", + "type": "boolean" + }, + "opa_host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "opa_path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "opa_port": { + "default": 8181, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "opa_protocol": { + "default": "http", + "description": "The protocol to use when talking to Open Policy Agent (OPA) server. Allowed protocols are `http` and `https`.", + "enum": [ + "http", + "https" + ], + "type": "string" + }, + "ssl_verify": { + "default": true, + "description": "If set to true, the OPA certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "type": "boolean" + } + }, + "required": [ + "opa_path" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/openid-connect/2.8.json b/json_schemas/openid-connect/2.8.json new file mode 100644 index 00000000..355cf7e3 --- /dev/null +++ b/json_schemas/openid-connect/2.8.json @@ -0,0 +1,1759 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID) value to use as an anonymous consumer if authentication fails.\nIf empty (default), the request will fail with an authentication failure `4xx`. Note that this value\nmust refer to the consumer `id` attribute that is internal to Kong Gateway, and **not** its `custom_id`.", + "legacy": true, + "type": "string", + "uuid": true + }, + "audience": { + "description": "The audience passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_claim": { + "default": [ + "aud" + ], + "description": "The claim that contains the audience.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.\n- When `[\"audience1 audience2\"]` are in the same array indices, both `audience1` AND `audience2` need to be present in access token (or introspection results).\n- When `[\"audience1\", \"audience2\"]` are in different array indices, either `audience1` OR `audience2` need to be present in access token (or introspection results).", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "auth_methods": { + "default": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "description": "Types of credentials/grants to enable:\n- `password`: OAuth legacy password grant\n- `client_credentials`: OAuth client credentials grant\n- `authorization_code`: authorization code flow\n- `bearer`: JWT access token verification\n- `introspection`: OAuth introspection\n- `userinfo`: OpenID Connect user info endpoint authentication\n- `kong_oauth2`: Kong OAuth plugin issued tokens verification\n- `refresh_token`: OAuth refresh token grant\n- `session`: session cookie authentication", + "examples": [ + [ + "authorization_code", + "session" + ] + ], + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together\nwith ACL plugin, but it also enables IdP managed groups with other applications\nand integrations (for example, Kong Manager and Dev Portal). The OpenID Connect\nplugin itself does not do anything other than set the context value.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string" + }, + "authorization_cookie_httponly": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "authorization_cookie_lifetime": { + "default": 600, + "description": "The authorization cookie lifetime in seconds.", + "type": "number" + }, + "authorization_cookie_name": { + "default": "authorization", + "description": "The authorization cookie name.", + "type": "string" + }, + "authorization_cookie_path": { + "default": "/", + "description": "The authorization cookie Path flag.", + "type": "string" + }, + "authorization_cookie_samesite": { + "default": "off", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks:\n- `Strict`: Cookies will only be sent in a first-party context and not be sent along with requests initiated by third party websites.\n- `Lax`: Cookies are not sent on normal cross-site subrequests (for example to load images or frames into a third party site), but are sent when a user is navigating to the origin site (for instance, when following a link).\n- `None`: Cookies will be sent in all contexts, for example in responses to both first-party and cross-origin requests. If `SameSite=None` is set, the cookie Secure attribute must also be set (or the cookie will be blocked).\n- `off`: Do not set the SameSite flag.", + "enum": [ + "Lax", + "None", + "Strict", + "off" + ], + "type": "string" + }, + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost),\nand therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "authorization_endpoint": { + "description": "The authorization endpoint.", + "type": "string" + }, + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string" + }, + "bearer_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the bearer token:\n- `header`: search the HTTP headers\n- `query`: search the URL's query string\n- `body`: search the HTTP request body\n- `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`", + "items": { + "enum": [ + "body", + "cookie", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "by_username_ignore_case": { + "default": false, + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "type": "boolean" + }, + "cache_introspection": { + "default": true, + "description": "Cache the introspection endpoint requests.", + "type": "boolean" + }, + "cache_token_exchange": { + "default": true, + "description": "Cache the token exchange endpoint requests.", + "type": "boolean" + }, + "cache_tokens": { + "default": true, + "description": "Cache the token endpoint requests.", + "type": "boolean" + }, + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that us used for caching the token\nendpoint requests.\n> If you use multiple plugin instances of the OpenID Connect\n> plugin and want to share token endpoint caches between the plugin\n> instances, set the salt to the same value on each plugin instance.", + "type": "string" + }, + "cache_ttl": { + "default": 3600, + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "type": "number" + }, + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number" + }, + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number" + }, + "cache_user_info": { + "default": true, + "description": "Cache the user info requests.", + "type": "boolean" + }, + "client_alg": { + "description": "The algorithm to use for `client_secret_jwt` (only `HS***`) or `private_key_jwt` authentication:\n- `HS256`: HMAC using SHA-256\n- `HS384`: HMAC using SHA-384\n- `HS512`: HMAC using SHA-512\n- `RS256`: RSASSA-PKCS1-v1_5 using SHA-256\n- `RS512`: RSASSA-PKCS1-v1_5 using SHA-512\n- `ES256`: ECDSA using P-256 and SHA-256\n- `ES384`: ECDSA using P-384 and SHA-384\n- `ES512`: ECDSA using P-521 and SHA-512\n- `PS256`: RSASSA-PSS using SHA-256 and MGF1 with SHA-256\n- `PS384`: RSASSA-PSS using SHA-384 and MGF1 with SHA-384\n- `PS512`: RSASSA-PSS using SHA-512 and MGF1 with SHA-512\n- `EdDSA`: EdDSA with Ed25519", + "items": { + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS384", + "RS512" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_arg": { + "default": "client_id", + "description": "The client to use for this request (the selection is made with a request parameter with the same name).\nFor example, setting this value to `Client`, and sending the request header `Client: 1` will cause the plugin\nto use the first client (see: `config.client_id`) from the client array.", + "type": "string" + }, + "client_auth": { + "description": "The authentication method used by the client (plugin) when calling the endpoints:\n- `client_secret_basic`: send `client_id` and `client_secret` in `Authorization: Basic` header\n- `client_secret_post`: send `client_id` and `client_secret` as part of the body\n- `client_secret_jwt`: send client assertion signed with the `client_secret` as part of the body\n- `private_key_jwt`: send client assertion signed with the `private key` as part of the body\n- `none`: do not authenticate\n> Private keys can be stored in a database, and they are by the default automatically generated\n> in the database. It is also possible to specify private keys with `config.client_jwk` directly\n> in the plugin configuration.", + "items": { + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_credentials_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the client credentials:\n- `header`: search the HTTP headers\n- `query`: search the URL's query string\n- `body`: search from the HTTP request body", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.\nOther settings that are associated with the client are:\n- `config.client_secret`\n- `config.client_auth`\n- `config.client_jwk`\n- `config.client_alg`\n- `config.redirect_uri`\n- `config.login_redirect_uri`\n- `config.logout_redirect_uri`\n- `config.unauthorized_redirect_uri`\n- `config.forbidden_redirect_uri`\n- `config.unexpected_redirect_uri`\n\nUse the same array index when configuring related settings for the client.", + "examples": [ + [ + "" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_jwk": { + "description": "The JWK used for the `private_key_jwt` authentication.", + "items": { + "properties": { + "alg": { + "type": "string" + }, + "crv": { + "type": "string" + }, + "d": { + "type": "string" + }, + "dp": { + "type": "string" + }, + "dq": { + "type": "string" + }, + "e": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "k": { + "type": "string" + }, + "key_ops": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "kid": { + "type": "string" + }, + "kty": { + "type": "string" + }, + "n": { + "type": "string" + }, + "oth": { + "type": "string" + }, + "p": { + "type": "string" + }, + "q": { + "type": "string" + }, + "qi": { + "type": "string" + }, + "r": { + "type": "string" + }, + "t": { + "type": "string" + }, + "use": { + "type": "string" + }, + "x": { + "type": "string" + }, + "x5c": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "x5t": { + "type": "string" + }, + "x5t#S256": { + "type": "string" + }, + "x5u": { + "type": "string" + }, + "y": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret.\n> Specify one if using `client_secret_*` authentication with the client on\n> the identity provider endpoints.", + "examples": [ + [ + "" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Consumer fields used for mapping:\n- `id`: try to find the matching Consumer by `id`\n- `username`: try to find the matching Consumer by `username`\n- `custom_id`: try to find the matching Consumer by `custom_id`", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_claim": { + "description": "The claim used for consumer mapping.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Do not terminate the request if consumer mapping fails.", + "type": "boolean" + }, + "credential_claim": { + "default": [ + "sub" + ], + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants:\n- `password`: do not start a session with the password grant\n- `client_credentials`: do not start a session with the client credentials grant\n- `authorization_code`: do not start a session after authorization code flow\n- `bearer`: do not start session with JWT access token authentication\n- `introspection`: do not start session with introspection authentication\n- `userinfo`: do not start session with user info authentication\n- `kong_oauth2`: do not start session with Kong OAuth authentication\n- `refresh_token` do not start session with refresh token grant\n- `session`: do not renew the session with session cookie authentication", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "display_errors": { + "default": false, + "description": "Display errors on failure responses.", + "type": "boolean" + }, + "domains": { + "description": "The allowed values for the `hd` claim.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string" + }, + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string" + }, + "downstream_headers_claims": { + "description": "The downstream header claims.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string" + }, + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string" + }, + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string" + }, + "downstream_introspection_jwt_header": { + "type": "string" + }, + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string" + }, + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string" + }, + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string" + }, + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "enable_hs_signatures": { + "default": false, + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "type": "boolean" + }, + "end_session_endpoint": { + "description": "The end session endpoint.", + "type": "string" + }, + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "forbidden_destroy_session": { + "default": true, + "description": "Destroy any active session for the forbidden requests.", + "type": "boolean" + }, + "forbidden_error_message": { + "default": "Forbidden", + "description": "The error message for the forbidden requests (when not using the redirection).", + "type": "string" + }, + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_claim": { + "default": [ + "groups" + ], + "description": "The claim that contains the groups.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.\n- When `[\"group1 group2\"]` are in the same array indices, both `group1` AND `group2` need to be present in access token (or introspection results).\n- When `[\"group1\", \"group2\"]` are in different array indices, either `group1` OR `group2` need to be present in access token (or introspection results).", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "Remove the credentials used for authentication from the request.\n> If multiple credentials are sent with the same request, the plugin will\n> remove those that were used for successful authentication.", + "type": "boolean" + }, + "http_proxy": { + "description": "The HTTP proxy", + "type": "string" + }, + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.", + "type": "string" + }, + "http_version": { + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin:\n- `1.1`: HTTP 1.1 (the default)\n- `1.0`: HTTP 1.0", + "type": "number" + }, + "https_proxy": { + "description": "The HTTPS proxy", + "type": "string" + }, + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.", + "type": "string" + }, + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string" + }, + "id_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the id token:\n- `header`: search the HTTP headers\n- `query`: search the URL's query string\n- `body`: search the HTTP request body", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_signature": { + "default": [ + + ], + "description": "Skip the token signature verification on certain grants:\n- `password`: OAuth password grant\n- `client_credentials`: OAuth client credentials grant\n- `authorization_code`: authorization code flow\n- `refresh_token`: OAuth refresh token grant\n- `session`: session cookie authentication\n- `introspection`: OAuth introspection\n- `userinfo`: OpenID Connect user info endpoint authentication", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "introspection", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspect_jwt_tokens": { + "default": false, + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "type": "boolean" + }, + "introspection_accept": { + "default": "application/json", + "description": "The value of `Accept` header for introspection requests:\n- `application/json`: introspection response as JSON\n- `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document)\n- `application/jwt`: introspection response as JWT (from the obsolete IETF draft document)", + "enum": [ + "application/json", + "application/jwt", + "application/token-introspection+jwt" + ], + "type": "string" + }, + "introspection_check_active": { + "default": true, + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "type": "boolean" + }, + "introspection_endpoint": { + "description": "The introspection endpoint.", + "type": "string" + }, + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method:\n- `client_secret_basic`: send `client_id` and `client_secret` in `Authorization: Basic` header\n- `client_secret_post`: send `client_id` and `client_secret` as part of the body\n- `client_secret_jwt`: send client assertion signed with the `client_secret` as part of the body\n- `private_key_jwt`: send client assertion signed with the `private key` as part of the body\n- `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt" + ], + "type": "string" + }, + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_values": { + "description": "Extra header values passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_hint": { + "default": "access_token", + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "type": "string" + }, + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "issuer": { + "description": "The discovery endpoint (or the issuer identifier).\n> When using Kong with the database, the discovery information and the JWKS\n> are cached to the Kong configuration database.", + "examples": [ + "http://example.org" + ], + "type": "string" + }, + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "jwt_session_claim": { + "default": "sid", + "description": "The claim to match against the JWT session cookie.", + "type": "string" + }, + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string" + }, + "keepalive": { + "default": true, + "description": "Use keepalive with the HTTP client.", + "type": "boolean" + }, + "leeway": { + "default": 0, + "description": "Allow some leeway on the ttl / expiry verification.", + "type": "number" + }, + "login_action": { + "default": "upstream", + "description": "What to do after successful login:\n- `upstream`: proxy request to upstream service\n- `response`: terminate request with a response\n- `redirect`: redirect to a different location", + "enum": [ + "redirect", + "response", + "upstream" + ], + "type": "string" + }, + "login_methods": { + "default": [ + "authorization_code" + ], + "description": "Enable login functionality with specified grants:\n- `password`: enable for OAuth password grant\n- `client_credentials`: enable OAuth client credentials grant\n- `authorization_code`: enable for authorization code flow\n- `bearer`: enable for JWT access token authentication\n- `introspection`: enable for OAuth introspection authentication\n- `userinfo`: enable for OpenID Connect user info endpoint authentication\n- `kong_oauth2`: enable for Kong OAuth Plugin authentication\n- `refresh_token`: enable for OAuth refresh token grant\n- `session`: enable for session cookie authentication", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_redirect_mode": { + "default": "fragment", + "description": "Where to place `login_tokens` when using `redirect` `login_action`:\n- `query`: place tokens in query string\n- `fragment`: place tokens in url fragment (not readable by servers)", + "enum": [ + "fragment", + "query" + ], + "type": "string" + }, + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.\n> Tip: Leave this empty and the plugin will redirect the client to the URL that originally initiated the\n> flow with possible query args preserved from the original request when `config.preserve_query_args`\n> is enabled.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_tokens": { + "default": [ + "id_token" + ], + "description": "What tokens to include in `response` body or `redirect` query string or fragment:\n- `id_token`: include id token\n- `access_token`: include access token\n- `refresh_token`: include refresh token\n- `tokens`: include the full token endpoint response\n- `introspection`: include introspection response", + "items": { + "enum": [ + "access_token", + "id_token", + "introspection", + "refresh_token", + "tokens" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "The request methods that can activate the logout:\n- `POST`: HTTP POST method\n- `GET`: HTTP GET method\n- `DELETE`: HTTP DELETE method", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string" + }, + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string" + }, + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_revoke": { + "default": false, + "description": "Revoke tokens as part of the logout.", + "type": "boolean" + }, + "logout_revoke_access_token": { + "default": true, + "description": "Revoke the access token as part of the logout.", + "type": "boolean" + }, + "logout_revoke_refresh_token": { + "default": true, + "description": "Revoke the refresh token as part of the logout.", + "type": "boolean" + }, + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string" + }, + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number" + }, + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string" + }, + "password_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the username and password:\n- `header`: search the HTTP headers\n- `query`: search the URL's query string\n- `body`: search the HTTP request body", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "preserve_query_args": { + "default": false, + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.\n> When this parameter is used with the `config.login_action=redirect` parameter, the browser location\n> will change and display the original query arguments. Otherwise, the upstream request\n> is modified to include the original query arguments, and the browser will not display\n> them in the location field.", + "type": "boolean" + }, + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rediscovery_lifetime": { + "default": 30, + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.\n> The re-discovery usually happens when the plugin cannot find a key for verifying\n> the signature. For example, if a token is presented for which Kong does not have a\n> JWK cached, it will poll the discovery endpoint for new JWK data. If that discovery\n> attempt does not yield a JWK that can validate the token, Kong will wait the specified\n> number of seconds before retrying the discovery.", + "type": "number" + }, + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string" + }, + "refresh_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the refresh token:\n- `header`: search the HTTP headers\n- `query`: search the URL's query string\n- `body`: search the HTTP request body", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "refresh_tokens": { + "default": true, + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the\nplugin has a `refresh_token` available.", + "type": "boolean" + }, + "resolve_distributed_claims": { + "default": false, + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members\nof the JSON object containing the claims.\nIf this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "type": "boolean" + }, + "response_mode": { + "default": "query", + "description": "The response mode passed to the authorization endpoint:\n- `query`: Instructs the identity provider to pass parameters in query string\n- `form_post`: Instructs the identity provider to pass parameters in request body\n- `fragment`: Instructs the identity provider to pass parameters in uri fragment (rarely useful as the plugin itself cannot read it)", + "enum": [ + "form_post", + "fragment", + "query" + ], + "examples": [ + "form_post" + ], + "type": "string" + }, + "response_type": { + "default": [ + "code" + ], + "description": "The response type passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "reverify": { + "default": false, + "description": "Specifies whether to always verify tokens stored in the session.", + "type": "boolean" + }, + "revocation_endpoint": { + "description": "The revocation endpoint.", + "type": "string" + }, + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method:\n- `client_secret_basic`: send `client_id` and `client_secret` in `Authorization: Basic` header\n- `client_secret_post`: send `client_id` and `client_secret` as part of the body\n- `client_secret_jwt`: send client assertion signed with the `client_secret` as part of the body\n- `private_key_jwt`: send client assertion signed with the `private key` as part of the body\n- `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt" + ], + "type": "string" + }, + "roles_claim": { + "default": [ + "roles" + ], + "description": "The claim that contains the roles.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.\n- When `[\"role1 role2\"]` are in the same array indices, both `role1` AND `role2` need to be present in access token (or introspection results).\n- When `[\"role1\", \"role2\"]` are in different array indices, either `role1` OR `role2` need to be present in access token (or introspection results).", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "run_on_preflight": { + "default": true, + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "type": "boolean" + }, + "scopes": { + "default": [ + "openid" + ], + "description": "The scopes passed to the authorization and token endpoints.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_claim": { + "default": [ + "scope" + ], + "description": "The claim that contains the scopes.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.\n- When `[\"scope1 scope2\"]` are in the same array indices, both `scope1` AND `scope2` need to be present in access token (or introspection results).\n- When `[\"scope1\", \"scope2\"]` are in different array indices, either `scope1` OR `scope2` need to be present in access token (or introspection results).", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "search_user_info": { + "default": false, + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping,\ncredential mapping, authenticated groups, and upstream and downstream headers.\n> This requires an extra round-trip and can add latency, but the plugin can also cache\n> user info requests (see: `config.cache_user_info`).", + "type": "boolean" + }, + "session_compressor": { + "default": "none", + "description": "The session strategy:\n- `none`: no compression\n- `zlib`: use zlib to compress cookie data", + "enum": [ + "none", + "zlib" + ], + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string" + }, + "session_cookie_httponly": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_idletime": { + "description": "The session cookie idle time in seconds.", + "type": "number" + }, + "session_cookie_lifetime": { + "default": 3600, + "description": "The session cookie lifetime in seconds.", + "type": "number" + }, + "session_cookie_maxsize": { + "default": 4000, + "description": "The maximum size of each cookie chunk in bytes.", + "type": "integer" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "The session cookie Path flag.", + "type": "string" + }, + "session_cookie_renew": { + "default": 600, + "description": "The number of seconds prior to the `session_cookie_lifetime` that the session cookie will be renewed.", + "type": "number" + }, + "session_cookie_samesite": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks:\n- `Strict`: Cookies will only be sent in a first-party context and not be sent along with requests initiated by third party websites.\n- `Lax`: Cookies are not sent on normal cross-site subrequests (for example to load images or frames into a third party site), but are sent when a user is navigating to the origin site (for example, when following a link).\n- `None`: Cookies will be sent in all contexts, for example in responses to both first-party and cross-origin requests. If SameSite=None is set, the cookie Secure attribute must also be set (or the cookie will be blocked)\n- `off`: Do not set the SameSite flag.", + "enum": [ + "Lax", + "None", + "Strict", + "off" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost),\nand therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_memcache_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcache_port": { + "default": 11211, + "description": "The memcached port.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcache_prefix": { + "default": "sessions", + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcache_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_redis_cluster_maxredirections": { + "description": "The Redis cluster maximum redirects.", + "type": "integer" + }, + "session_redis_cluster_nodes": { + "description": "The Redis cluster node host. Takes an array of host records, with\neither `ip` or `host`, and `port` values.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "type": "string" + }, + "port": { + "default": 6379, + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "type": "array" + }, + "session_redis_connect_timeout": { + "description": "The Redis connection timeout in milliseconds.", + "type": "integer" + }, + "session_redis_host": { + "default": "127.0.0.1", + "description": "The Redis host", + "type": "string" + }, + "session_redis_password": { + "description": "Password to use for Redis connection when the `redis` session storage is defined.\nIf undefined, no AUTH commands are sent to Redis.", + "type": "string" + }, + "session_redis_port": { + "default": 6379, + "description": "The Redis port.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_redis_prefix": { + "default": "sessions", + "description": "The Redis session key prefix.", + "type": "string" + }, + "session_redis_read_timeout": { + "description": "The Redis read timeout in milliseconds.", + "type": "integer" + }, + "session_redis_send_timeout": { + "description": "The Redis send timeout in milliseconds.", + "type": "integer" + }, + "session_redis_server_name": { + "description": "The SNI used for connecting the Redis server.", + "type": "string" + }, + "session_redis_socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "session_redis_ssl": { + "default": false, + "description": "Use SSL/TLS for Redis connection.", + "type": "boolean" + }, + "session_redis_ssl_verify": { + "default": false, + "description": "Verify Redis server certificate.", + "type": "boolean" + }, + "session_redis_username": { + "description": "Username to use for Redis connection when the `redis` session storage is defined and ACL authentication is desired.\nIf undefined, ACL authentication will not be performed.\nThis requires Redis v6.0.0+. The username **cannot** be set to `default`.", + "type": "string" + }, + "session_secret": { + "description": "The session secret.", + "examples": [ + "" + ], + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data:\n- `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database)\n- `memcache`: stores session data in memcached\n- `redis`: stores session data in Redis", + "enum": [ + "cookie", + "memcache", + "redis" + ], + "type": "string" + }, + "session_strategy": { + "default": "default", + "description": "The session strategy:\n- `default`: reuses session identifiers over modifications (but can be problematic with single-page applications with a lot of concurrent asynchronous requests)\n- `regenerate`: generates a new session identifier on each modification and does not use expiry for signature verification (useful in single-page applications or SPAs)", + "enum": [ + "default", + "regenerate" + ], + "type": "string" + }, + "ssl_verify": { + "default": false, + "description": "Verify identity provider server certificate.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "token_endpoint": { + "description": "The token endpoint.", + "type": "string" + }, + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method:\n- `client_secret_basic`: send `client_id` and `client_secret` in `Authorization: Basic` header\n- `client_secret_post`: send `client_id` and `client_secret` as part of the body\n- `client_secret_jwt`: send client assertion signed with the `client_secret` as part of the body\n- `private_key_jwt`: send client assertion signed with the `private key` as part of the body\n- `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt" + ], + "type": "string" + }, + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "type": "string" + }, + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants:\n- `password`: with OAuth password grant\n- `client_credentials`: with OAuth client credentials grant\n- `authorization_code`: with authorization code flow\n- `refresh_token` with refresh token grant", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "password", + "refresh_token" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string" + }, + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using:\n- Request Body\n- Query parameters\n\nThis parameter can be used with `scope` values, like this:\n\n`config.token_post_args_client=scope`\n\nIn this case, the token would take the `scope` value from the query parameter or from the request body and send it to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unauthorized_destroy_session": { + "default": true, + "description": "Destroy any active session for the unauthorized requests.", + "type": "boolean" + }, + "unauthorized_error_message": { + "default": "Unauthorized", + "description": "The error message for the unauthorized requests (when not using the redirection).", + "type": "string" + }, + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_access_token_header": { + "default": "authorization:bearer", + "description": "The upstream access token header.", + "type": "string" + }, + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string" + }, + "upstream_headers_claims": { + "description": "The upstream header claims.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string" + }, + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string" + }, + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string" + }, + "upstream_introspection_jwt_header": { + "type": "string" + }, + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string" + }, + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string" + }, + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string" + }, + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "userinfo_accept": { + "default": "application/json", + "description": "The value of `Accept` header for user info requests:\n- `application/json`: user info response as JSON\n- `application/jwt`: user info response as JWT (from the obsolete IETF draft document)", + "enum": [ + "application/json", + "application/jwt" + ], + "type": "string" + }, + "userinfo_endpoint": { + "description": "The user info endpoint.", + "type": "string" + }, + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "verify_claims": { + "default": true, + "description": "Verify tokens for standard claims.", + "type": "boolean" + }, + "verify_nonce": { + "default": true, + "description": "Verify nonce on authorization code flow.", + "type": "boolean" + }, + "verify_parameters": { + "default": false, + "description": "Verify plugin configuration against discovery.", + "type": "boolean" + }, + "verify_signature": { + "default": true, + "description": "Verify signature of tokens.", + "type": "boolean" + } + }, + "required": [ + + ], + "shorthands": { + }, + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/openid-connect/3.10.json b/json_schemas/openid-connect/3.10.json new file mode 100644 index 00000000..09e76fbd --- /dev/null +++ b/json_schemas/openid-connect/3.10.json @@ -0,0 +1,2348 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "audience": { + "description": "The audience passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_claim": { + "default": [ + "aud" + ], + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "auth_methods": { + "default": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "description": "Types of credentials/grants to enable.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string" + }, + "authorization_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "authorization_cookie_name": { + "default": "authorization", + "description": "The authorization cookie name.", + "type": "string" + }, + "authorization_cookie_path": { + "default": "/", + "description": "The authorization cookie Path flag.", + "type": "string" + }, + "authorization_cookie_same_site": { + "default": "Default", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_rolling_timeout": { + "default": 600, + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string" + }, + "bearer_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the bearer token: - `header`: search the `Authorization`, `access-token`, and `x-access-token` HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "items": { + "enum": [ + "body", + "cookie", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "by_username_ignore_case": { + "default": false, + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "type": "boolean" + }, + "cache_introspection": { + "default": true, + "description": "Cache the introspection endpoint requests.", + "type": "boolean" + }, + "cache_token_exchange": { + "default": true, + "description": "Cache the token exchange endpoint requests.", + "type": "boolean" + }, + "cache_tokens": { + "default": true, + "description": "Cache the token endpoint requests.", + "type": "boolean" + }, + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "type": "string" + }, + "cache_ttl": { + "default": 3600, + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "type": "number" + }, + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number" + }, + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number" + }, + "cache_user_info": { + "default": true, + "description": "Cache the user info requests.", + "type": "boolean" + }, + "claims_forbidden": { + "description": "If given, these claims are forbidden in the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_alg": { + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "items": { + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS384", + "RS512" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_arg": { + "default": "client_id", + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "type": "string" + }, + "client_auth": { + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "items": { + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_credentials_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_jwk": { + "description": "The JWK used for the private_key_jwt authentication.", + "items": { + "properties": { + "alg": { + "type": "string" + }, + "crv": { + "type": "string" + }, + "d": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "dp": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "dq": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "e": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "k": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "key_ops": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "kid": { + "type": "string" + }, + "kty": { + "type": "string" + }, + "n": { + "type": "string" + }, + "oth": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "p": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "q": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "qi": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "r": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "t": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "use": { + "type": "string" + }, + "x": { + "type": "string" + }, + "x5c": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "x5t": { + "type": "string" + }, + "x5t#S256": { + "type": "string" + }, + "x5u": { + "type": "string" + }, + "y": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "cluster_cache_redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "cluster_cache_strategy": { + "default": "off", + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "enum": [ + "off", + "redis" + ], + "type": "string" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_claim": { + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Do not terminate the request if consumer mapping fails.", + "type": "boolean" + }, + "credential_claim": { + "default": [ + "sub" + ], + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "display_errors": { + "default": false, + "description": "Display errors on failure responses.", + "type": "boolean" + }, + "domains": { + "description": "The allowed values for the `hd` claim.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string" + }, + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string" + }, + "downstream_headers_claims": { + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string" + }, + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string" + }, + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string" + }, + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "type": "string" + }, + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string" + }, + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string" + }, + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string" + }, + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "dpop_proof_lifetime": { + "default": 300, + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "type": "number" + }, + "dpop_use_nonce": { + "default": false, + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "type": "boolean" + }, + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "expose_error_code": { + "default": true, + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "type": "boolean" + }, + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "forbidden_destroy_session": { + "default": true, + "description": "Destroy any active session for the forbidden requests.", + "type": "boolean" + }, + "forbidden_error_message": { + "default": "Forbidden", + "description": "The error message for the forbidden requests (when not using the redirection).", + "type": "string" + }, + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_claim": { + "default": [ + "groups" + ], + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "type": "boolean" + }, + "http_proxy": { + "description": "The HTTP proxy.", + "type": "string" + }, + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "http_version": { + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "type": "number" + }, + "https_proxy": { + "description": "The HTTPS proxy.", + "type": "string" + }, + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string" + }, + "id_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_signature": { + "default": [ + + ], + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "introspection", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspect_jwt_tokens": { + "default": false, + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "type": "boolean" + }, + "introspection_accept": { + "default": "application/json", + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt", + "application/token-introspection+jwt" + ], + "type": "string" + }, + "introspection_check_active": { + "default": true, + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "type": "boolean" + }, + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_values": { + "description": "Extra header values passed to the introspection endpoint.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_hint": { + "default": "access_token", + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "type": "string" + }, + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_client_headers": { + "description": "Extra post arguments passed from the client headers to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for introspection.", + "type": "string" + }, + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "type": "string" + }, + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "jwt_session_claim": { + "default": "sid", + "description": "The claim to match against the JWT session cookie.", + "type": "string" + }, + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string" + }, + "keepalive": { + "default": true, + "description": "Use keepalive with the HTTP client.", + "type": "boolean" + }, + "leeway": { + "default": 0, + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "type": "number" + }, + "login_action": { + "default": "upstream", + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "enum": [ + "redirect", + "response", + "upstream" + ], + "type": "string" + }, + "login_methods": { + "default": [ + "authorization_code" + ], + "description": "Enable login functionality with specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_redirect_mode": { + "default": "fragment", + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "enum": [ + "fragment", + "query" + ], + "type": "string" + }, + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_tokens": { + "default": [ + "id_token" + ], + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "items": { + "enum": [ + "access_token", + "id_token", + "introspection", + "refresh_token", + "tokens" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string" + }, + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string" + }, + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_revoke": { + "default": false, + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "type": "boolean" + }, + "logout_revoke_access_token": { + "default": true, + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_revoke_refresh_token": { + "default": true, + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string" + }, + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number" + }, + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string" + }, + "password_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "preserve_query_args": { + "default": false, + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "type": "boolean" + }, + "proof_of_possession_auth_methods_validation": { + "default": true, + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "type": "boolean" + }, + "proof_of_possession_dpop": { + "default": "off", + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "proof_of_possession_mtls": { + "default": "off", + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "pushed_authorization_request_endpoint_auth_method": { + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "rediscovery_lifetime": { + "default": 30, + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "type": "number" + }, + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string" + }, + "refresh_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "refresh_tokens": { + "default": true, + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "type": "boolean" + }, + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean" + }, + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean" + }, + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean" + }, + "resolve_distributed_claims": { + "default": false, + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "type": "boolean" + }, + "response_mode": { + "default": "query", + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "enum": [ + "form_post", + "form_post.jwt", + "fragment", + "fragment.jwt", + "jwt", + "query", + "query.jwt" + ], + "type": "string" + }, + "response_type": { + "default": [ + "code" + ], + "description": "The response type passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "reverify": { + "default": false, + "description": "Specifies whether to always verify tokens stored in the session.", + "type": "boolean" + }, + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "revocation_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for revocation.", + "type": "string" + }, + "roles_claim": { + "default": [ + "roles" + ], + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "run_on_preflight": { + "default": true, + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "type": "boolean" + }, + "scopes": { + "default": [ + "openid" + ], + "description": "The scopes passed to the authorization and token endpoints.", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_claim": { + "default": [ + "scope" + ], + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "search_user_info": { + "default": false, + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "type": "boolean" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "The session cookie Path flag.", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "The memcached port.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "type": "number" + }, + "session_request_headers": { + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "session_secret": { + "description": "The session secret.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "tls_client_auth_cert_id": { + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "type": "string", + "uuid": true + }, + "tls_client_auth_ssl_verify": { + "default": true, + "description": "Verify identity provider server certificate during mTLS client authentication.", + "type": "boolean" + }, + "token_cache_key_include_scope": { + "default": false, + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean" + }, + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "type": "string" + }, + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "password", + "refresh_token" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string" + }, + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unauthorized_destroy_session": { + "default": true, + "description": "Destroy any active session for the unauthorized requests.", + "type": "boolean" + }, + "unauthorized_error_message": { + "default": "Unauthorized", + "description": "The error message for the unauthorized requests (when not using the redirection).", + "type": "string" + }, + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_access_token_header": { + "default": "authorization:bearer", + "description": "The upstream access token header.", + "type": "string" + }, + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string" + }, + "upstream_headers_claims": { + "description": "The upstream header claims. Only top level claims are supported.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string" + }, + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string" + }, + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string" + }, + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "type": "string" + }, + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string" + }, + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string" + }, + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string" + }, + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "userinfo_accept": { + "default": "application/json", + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt" + ], + "type": "string" + }, + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "using_pseudo_issuer": { + "default": false, + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "type": "boolean" + }, + "verify_claims": { + "default": true, + "description": "Verify tokens for standard claims.", + "type": "boolean" + }, + "verify_nonce": { + "default": true, + "description": "Verify nonce on authorization code flow.", + "type": "boolean" + }, + "verify_parameters": { + "default": false, + "description": "Verify plugin configuration against discovery.", + "type": "boolean" + }, + "verify_signature": { + "default": true, + "description": "Verify signature of tokens.", + "type": "boolean" + } + }, + "required": [ + "issuer" + ], + "shorthand_fields": { + "authorization_cookie_httponly": { + "type": "boolean" + }, + "authorization_cookie_lifetime": { + "type": "number" + }, + "authorization_cookie_samesite": { + "type": "string" + }, + "session_compressor": { + "type": "string" + }, + "session_cookie_httponly": { + "type": "boolean" + }, + "session_cookie_idletime": { + "type": "number" + }, + "session_cookie_lifetime": { + "type": "number" + }, + "session_cookie_maxsize": { + "type": "integer" + }, + "session_cookie_renew": { + "type": "number" + }, + "session_cookie_samesite": { + "type": "string" + }, + "session_memcache_host": { + "type": "string" + }, + "session_memcache_port": { + "type": "integer" + }, + "session_memcache_prefix": { + "type": "string" + }, + "session_memcache_socket": { + "type": "string" + }, + "session_redis_cluster_max_redirections": { + "type": "integer" + }, + "session_redis_cluster_nodes": { + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "type": "object" + }, + "type": "array" + }, + "session_redis_connect_timeout": { + "type": "integer" + }, + "session_redis_host": { + "type": "string" + }, + "session_redis_password": { + "type": "string" + }, + "session_redis_port": { + "type": "integer" + }, + "session_redis_prefix": { + "type": "string" + }, + "session_redis_read_timeout": { + "type": "integer" + }, + "session_redis_send_timeout": { + "type": "integer" + }, + "session_redis_server_name": { + "type": "string" + }, + "session_redis_socket": { + "type": "string" + }, + "session_redis_ssl": { + "type": "boolean" + }, + "session_redis_ssl_verify": { + "type": "boolean" + }, + "session_redis_username": { + "type": "string" + }, + "session_strategy": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/openid-connect/3.11.json b/json_schemas/openid-connect/3.11.json new file mode 100644 index 00000000..ca505535 --- /dev/null +++ b/json_schemas/openid-connect/3.11.json @@ -0,0 +1,2178 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "audience": { + "description": "The audience passed to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "audience_claim": { + "default": [ + "aud" + ], + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "auth_methods": { + "default": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "description": "Types of credentials/grants to enable.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string" + }, + "authorization_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "authorization_cookie_name": { + "default": "authorization", + "description": "The authorization cookie name.", + "type": "string" + }, + "authorization_cookie_path": { + "default": "/", + "description": "The authorization cookie Path flag.", + "type": "string" + }, + "authorization_cookie_same_site": { + "default": "Default", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "authorization_rolling_timeout": { + "default": 600, + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string" + }, + "bearer_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the bearer token: - `header`: search the `Authorization`, `access-token`, and `x-access-token` HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "items": { + "enum": [ + "body", + "cookie", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "by_username_ignore_case": { + "default": false, + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "type": "boolean" + }, + "cache_introspection": { + "default": true, + "description": "Cache the introspection endpoint requests.", + "type": "boolean" + }, + "cache_token_exchange": { + "default": true, + "description": "Cache the token exchange endpoint requests.", + "type": "boolean" + }, + "cache_tokens": { + "default": true, + "description": "Cache the token endpoint requests.", + "type": "boolean" + }, + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "type": "string" + }, + "cache_ttl": { + "default": 3600, + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "type": "number" + }, + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number" + }, + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number" + }, + "cache_user_info": { + "default": true, + "description": "Cache the user info requests.", + "type": "boolean" + }, + "claims_forbidden": { + "description": "If given, these claims are forbidden in the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_alg": { + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "items": { + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS384", + "RS512" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_arg": { + "default": "client_id", + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "type": "string" + }, + "client_auth": { + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "items": { + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_credentials_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_jwk": { + "description": "The JWK used for the private_key_jwt authentication.", + "items": { + "properties": { + "alg": { + "type": "string" + }, + "crv": { + "type": "string" + }, + "d": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dp": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dq": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "e": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "k": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "key_ops": { + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "kid": { + "type": "string" + }, + "kty": { + "type": "string" + }, + "n": { + "type": "string" + }, + "oth": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "p": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "q": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "qi": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "r": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "t": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "use": { + "type": "string" + }, + "x": { + "type": "string" + }, + "x5c": { + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "x5t": { + "type": "string" + }, + "x5t#S256": { + "type": "string" + }, + "x5u": { + "type": "string" + }, + "y": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "cluster_cache_redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "cluster_cache_strategy": { + "default": "off", + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "enum": [ + "off", + "redis" + ], + "type": "string" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "consumer_claim": { + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Do not terminate the request if consumer mapping fails.", + "type": "boolean" + }, + "credential_claim": { + "default": [ + "sub" + ], + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "display_errors": { + "default": false, + "description": "Display errors on failure responses.", + "type": "boolean" + }, + "domains": { + "description": "The allowed values for the `hd` claim.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string" + }, + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string" + }, + "downstream_headers_claims": { + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string" + }, + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string" + }, + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string" + }, + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "type": "string" + }, + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string" + }, + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string" + }, + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string" + }, + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "dpop_proof_lifetime": { + "default": 300, + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "type": "number" + }, + "dpop_use_nonce": { + "default": false, + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "type": "boolean" + }, + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "expose_error_code": { + "default": true, + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "type": "boolean" + }, + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "forbidden_destroy_session": { + "default": true, + "description": "Destroy any active session for the forbidden requests.", + "type": "boolean" + }, + "forbidden_error_message": { + "default": "Forbidden", + "description": "The error message for the forbidden requests (when not using the redirection).", + "type": "string" + }, + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "groups_claim": { + "default": [ + "groups" + ], + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "type": "boolean" + }, + "http_proxy": { + "description": "The HTTP proxy.", + "type": "string" + }, + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "http_version": { + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "type": "number" + }, + "https_proxy": { + "description": "The HTTPS proxy.", + "type": "string" + }, + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string" + }, + "id_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "ignore_signature": { + "default": [], + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "introspection", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspect_jwt_tokens": { + "default": false, + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "type": "boolean" + }, + "introspection_accept": { + "default": "application/json", + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt", + "application/token-introspection+jwt" + ], + "type": "string" + }, + "introspection_check_active": { + "default": true, + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "type": "boolean" + }, + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_values": { + "description": "Extra header values passed to the introspection endpoint.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_hint": { + "default": "access_token", + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "type": "string" + }, + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_client_headers": { + "description": "Extra post arguments passed from the client headers to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for introspection.", + "type": "string" + }, + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "type": "string" + }, + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "jwt_session_claim": { + "default": "sid", + "description": "The claim to match against the JWT session cookie.", + "type": "string" + }, + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string" + }, + "keepalive": { + "default": true, + "description": "Use keepalive with the HTTP client.", + "type": "boolean" + }, + "leeway": { + "default": 0, + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "type": "number" + }, + "login_action": { + "default": "upstream", + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "enum": [ + "redirect", + "response", + "upstream" + ], + "type": "string" + }, + "login_methods": { + "default": [ + "authorization_code" + ], + "description": "Enable login functionality with specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "login_redirect_mode": { + "default": "fragment", + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "enum": [ + "fragment", + "query" + ], + "type": "string" + }, + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "login_tokens": { + "default": [ + "id_token" + ], + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "items": { + "enum": [ + "access_token", + "id_token", + "introspection", + "refresh_token", + "tokens" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string" + }, + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string" + }, + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "logout_revoke": { + "default": false, + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "type": "boolean" + }, + "logout_revoke_access_token": { + "default": true, + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_revoke_refresh_token": { + "default": true, + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string" + }, + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number" + }, + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string" + }, + "password_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "preserve_query_args": { + "default": false, + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "type": "boolean" + }, + "proof_of_possession_auth_methods_validation": { + "default": true, + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "type": "boolean" + }, + "proof_of_possession_dpop": { + "default": "off", + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "proof_of_possession_mtls": { + "default": "off", + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "pushed_authorization_request_endpoint_auth_method": { + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "rediscovery_lifetime": { + "default": 30, + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "type": "number" + }, + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string" + }, + "refresh_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "refresh_tokens": { + "default": true, + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "type": "boolean" + }, + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean" + }, + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean" + }, + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean" + }, + "resolve_distributed_claims": { + "default": false, + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "type": "boolean" + }, + "response_mode": { + "default": "query", + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "enum": [ + "form_post", + "form_post.jwt", + "fragment", + "fragment.jwt", + "jwt", + "query", + "query.jwt" + ], + "type": "string" + }, + "response_type": { + "default": [ + "code" + ], + "description": "The response type passed to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "reverify": { + "default": false, + "description": "Specifies whether to always verify tokens stored in the session.", + "type": "boolean" + }, + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "revocation_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for revocation.", + "type": "string" + }, + "roles_claim": { + "default": [ + "roles" + ], + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "run_on_preflight": { + "default": true, + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "type": "boolean" + }, + "scopes": { + "default": [ + "openid" + ], + "description": "The scopes passed to the authorization and token endpoints.", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "scopes_claim": { + "default": [ + "scope" + ], + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "search_user_info": { + "default": false, + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "type": "boolean" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "The session cookie Path flag.", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "The memcached port.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "type": "number" + }, + "session_request_headers": { + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "session_secret": { + "description": "The session secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "tls_client_auth_cert_id": { + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "type": "string", + "uuid": true + }, + "tls_client_auth_ssl_verify": { + "default": true, + "description": "Verify identity provider server certificate during mTLS client authentication.", + "type": "boolean" + }, + "token_cache_key_include_scope": { + "default": false, + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean" + }, + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "type": "string" + }, + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "password", + "refresh_token" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string" + }, + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "unauthorized_destroy_session": { + "default": true, + "description": "Destroy any active session for the unauthorized requests.", + "type": "boolean" + }, + "unauthorized_error_message": { + "default": "Unauthorized", + "description": "The error message for the unauthorized requests (when not using the redirection).", + "type": "string" + }, + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "upstream_access_token_header": { + "default": "authorization:bearer", + "description": "The upstream access token header.", + "type": "string" + }, + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string" + }, + "upstream_headers_claims": { + "description": "The upstream header claims. Only top level claims are supported.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string" + }, + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string" + }, + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string" + }, + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "type": "string" + }, + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string" + }, + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string" + }, + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string" + }, + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "userinfo_accept": { + "default": "application/json", + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt" + ], + "type": "string" + }, + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "using_pseudo_issuer": { + "default": false, + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "type": "boolean" + }, + "verify_claims": { + "default": true, + "description": "Verify tokens for standard claims.", + "type": "boolean" + }, + "verify_nonce": { + "default": true, + "description": "Verify nonce on authorization code flow.", + "type": "boolean" + }, + "verify_parameters": { + "default": false, + "description": "Verify plugin configuration against discovery.", + "type": "boolean" + }, + "verify_signature": { + "default": true, + "description": "Verify signature of tokens.", + "type": "boolean" + } + }, + "required": [ + "issuer" + ], + "shorthand_fields": { + "authorization_cookie_httponly": { + "type": "boolean" + }, + "authorization_cookie_lifetime": { + "type": "number" + }, + "authorization_cookie_samesite": { + "type": "string" + }, + "session_compressor": { + "type": "string" + }, + "session_cookie_httponly": { + "type": "boolean" + }, + "session_cookie_idletime": { + "type": "number" + }, + "session_cookie_lifetime": { + "type": "number" + }, + "session_cookie_maxsize": { + "type": "integer" + }, + "session_cookie_renew": { + "type": "number" + }, + "session_cookie_samesite": { + "type": "string" + }, + "session_memcache_host": { + "type": "string" + }, + "session_memcache_port": { + "type": "integer" + }, + "session_memcache_prefix": { + "type": "string" + }, + "session_memcache_socket": { + "type": "string" + }, + "session_redis_cluster_max_redirections": { + "type": "integer" + }, + "session_redis_cluster_nodes": { + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "type": "object" + }, + "type": "array" + }, + "session_redis_connect_timeout": { + "type": "integer" + }, + "session_redis_host": { + "type": "string" + }, + "session_redis_password": { + "type": "string" + }, + "session_redis_port": { + "type": "integer" + }, + "session_redis_prefix": { + "type": "string" + }, + "session_redis_read_timeout": { + "type": "integer" + }, + "session_redis_send_timeout": { + "type": "integer" + }, + "session_redis_server_name": { + "type": "string" + }, + "session_redis_socket": { + "type": "string" + }, + "session_redis_ssl": { + "type": "boolean" + }, + "session_redis_ssl_verify": { + "type": "boolean" + }, + "session_redis_username": { + "type": "string" + }, + "session_strategy": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/openid-connect/3.12.json b/json_schemas/openid-connect/3.12.json new file mode 100644 index 00000000..0bda9092 --- /dev/null +++ b/json_schemas/openid-connect/3.12.json @@ -0,0 +1,2178 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "audience": { + "description": "The audience passed to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "audience_claim": { + "default": [ + "aud" + ], + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "auth_methods": { + "default": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "description": "Types of credentials/grants to enable.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string" + }, + "authorization_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "authorization_cookie_name": { + "default": "authorization", + "description": "The authorization cookie name.", + "type": "string" + }, + "authorization_cookie_path": { + "default": "/", + "description": "The authorization cookie Path flag.", + "type": "string" + }, + "authorization_cookie_same_site": { + "default": "Default", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "authorization_rolling_timeout": { + "default": 600, + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string" + }, + "bearer_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the bearer token: - `header`: search the `Authorization`, `access-token`, and `x-access-token` HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "items": { + "enum": [ + "body", + "cookie", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "by_username_ignore_case": { + "default": false, + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "type": "boolean" + }, + "cache_introspection": { + "default": true, + "description": "Cache the introspection endpoint requests.", + "type": "boolean" + }, + "cache_token_exchange": { + "default": true, + "description": "Cache the token exchange endpoint requests.", + "type": "boolean" + }, + "cache_tokens": { + "default": true, + "description": "Cache the token endpoint requests.", + "type": "boolean" + }, + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "type": "string" + }, + "cache_ttl": { + "default": 3600, + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "type": "number" + }, + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number" + }, + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number" + }, + "cache_user_info": { + "default": true, + "description": "Cache the user info requests.", + "type": "boolean" + }, + "claims_forbidden": { + "description": "If given, these claims are forbidden in the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_alg": { + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "items": { + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS384", + "RS512" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_arg": { + "default": "client_id", + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "type": "string" + }, + "client_auth": { + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "items": { + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_credentials_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_jwk": { + "description": "The JWK used for the private_key_jwt authentication.", + "items": { + "properties": { + "alg": { + "type": "string" + }, + "crv": { + "type": "string" + }, + "d": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dp": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dq": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "e": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "k": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "key_ops": { + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "kid": { + "type": "string" + }, + "kty": { + "type": "string" + }, + "n": { + "type": "string" + }, + "oth": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "p": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "q": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "qi": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "r": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "t": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "use": { + "type": "string" + }, + "x": { + "type": "string" + }, + "x5c": { + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "x5t": { + "type": "string" + }, + "x5t#S256": { + "type": "string" + }, + "x5u": { + "type": "string" + }, + "y": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "cluster_cache_redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "cluster_cache_strategy": { + "default": "off", + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "enum": [ + "off", + "redis" + ], + "type": "string" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "consumer_claim": { + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Do not terminate the request if consumer mapping fails.", + "type": "boolean" + }, + "credential_claim": { + "default": [ + "sub" + ], + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "display_errors": { + "default": false, + "description": "Display errors on failure responses.", + "type": "boolean" + }, + "domains": { + "description": "The allowed values for the `hd` claim.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string" + }, + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string" + }, + "downstream_headers_claims": { + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string" + }, + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string" + }, + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string" + }, + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "type": "string" + }, + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string" + }, + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string" + }, + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string" + }, + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "dpop_proof_lifetime": { + "default": 300, + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "type": "number" + }, + "dpop_use_nonce": { + "default": false, + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "type": "boolean" + }, + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "expose_error_code": { + "default": true, + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "type": "boolean" + }, + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "forbidden_destroy_session": { + "default": true, + "description": "Destroy any active session for the forbidden requests.", + "type": "boolean" + }, + "forbidden_error_message": { + "default": "Forbidden", + "description": "The error message for the forbidden requests (when not using the redirection).", + "type": "string" + }, + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "groups_claim": { + "default": [ + "groups" + ], + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "type": "boolean" + }, + "http_proxy": { + "description": "The HTTP proxy.", + "type": "string" + }, + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "http_version": { + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "type": "number" + }, + "https_proxy": { + "description": "The HTTPS proxy.", + "type": "string" + }, + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string" + }, + "id_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "ignore_signature": { + "default": [], + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "introspection", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspect_jwt_tokens": { + "default": false, + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "type": "boolean" + }, + "introspection_accept": { + "default": "application/json", + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt", + "application/token-introspection+jwt" + ], + "type": "string" + }, + "introspection_check_active": { + "default": true, + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "type": "boolean" + }, + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_values": { + "description": "Extra header values passed to the introspection endpoint.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_hint": { + "default": "access_token", + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "type": "string" + }, + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_client_headers": { + "description": "Extra post arguments passed from the client headers to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "introspection_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for introspection.", + "type": "string" + }, + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "type": "string" + }, + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "jwt_session_claim": { + "default": "sid", + "description": "The claim to match against the JWT session cookie.", + "type": "string" + }, + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string" + }, + "keepalive": { + "default": true, + "description": "Use keepalive with the HTTP client.", + "type": "boolean" + }, + "leeway": { + "default": 0, + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "type": "number" + }, + "login_action": { + "default": "upstream", + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "enum": [ + "redirect", + "response", + "upstream" + ], + "type": "string" + }, + "login_methods": { + "default": [ + "authorization_code" + ], + "description": "Enable login functionality with specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "login_redirect_mode": { + "default": "fragment", + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "enum": [ + "fragment", + "query" + ], + "type": "string" + }, + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "login_tokens": { + "default": [ + "id_token" + ], + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "items": { + "enum": [ + "access_token", + "id_token", + "introspection", + "refresh_token", + "tokens" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string" + }, + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string" + }, + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "logout_revoke": { + "default": false, + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "type": "boolean" + }, + "logout_revoke_access_token": { + "default": true, + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_revoke_refresh_token": { + "default": true, + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string" + }, + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number" + }, + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string" + }, + "password_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "preserve_query_args": { + "default": false, + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "type": "boolean" + }, + "proof_of_possession_auth_methods_validation": { + "default": true, + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "type": "boolean" + }, + "proof_of_possession_dpop": { + "default": "off", + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "proof_of_possession_mtls": { + "default": "off", + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "pushed_authorization_request_endpoint_auth_method": { + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "rediscovery_lifetime": { + "default": 30, + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "type": "number" + }, + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string" + }, + "refresh_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "refresh_tokens": { + "default": true, + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "type": "boolean" + }, + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean" + }, + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean" + }, + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean" + }, + "resolve_distributed_claims": { + "default": false, + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "type": "boolean" + }, + "response_mode": { + "default": "query", + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "enum": [ + "form_post", + "form_post.jwt", + "fragment", + "fragment.jwt", + "jwt", + "query", + "query.jwt" + ], + "type": "string" + }, + "response_type": { + "default": [ + "code" + ], + "description": "The response type passed to the authorization endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "reverify": { + "default": false, + "description": "Specifies whether to always verify tokens stored in the session.", + "type": "boolean" + }, + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "revocation_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for revocation.", + "type": "string" + }, + "roles_claim": { + "default": [ + "roles" + ], + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "run_on_preflight": { + "default": true, + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "type": "boolean" + }, + "scopes": { + "default": [ + "openid" + ], + "description": "The scopes passed to the authorization and token endpoints.", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "scopes_claim": { + "default": [ + "scope" + ], + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "search_user_info": { + "default": false, + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "type": "boolean" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "The session cookie Path flag.", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "The memcached port.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "type": "number" + }, + "session_request_headers": { + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "session_secret": { + "description": "The session secret.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "tls_client_auth_cert_id": { + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "type": "string", + "uuid": true + }, + "tls_client_auth_ssl_verify": { + "default": true, + "description": "Verify identity provider server certificate during mTLS client authentication.", + "type": "boolean" + }, + "token_cache_key_include_scope": { + "default": false, + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean" + }, + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "type": "string" + }, + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "password", + "refresh_token" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string" + }, + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "unauthorized_destroy_session": { + "default": true, + "description": "Destroy any active session for the unauthorized requests.", + "type": "boolean" + }, + "unauthorized_error_message": { + "default": "Unauthorized", + "description": "The error message for the unauthorized requests (when not using the redirection).", + "type": "string" + }, + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [], + "type": "string" + }, + "type": "array" + }, + "upstream_access_token_header": { + "default": "authorization:bearer", + "description": "The upstream access token header.", + "type": "string" + }, + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string" + }, + "upstream_headers_claims": { + "description": "The upstream header claims. Only top level claims are supported.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string" + }, + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string" + }, + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string" + }, + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "type": "string" + }, + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string" + }, + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string" + }, + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string" + }, + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "userinfo_accept": { + "default": "application/json", + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt" + ], + "type": "string" + }, + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "using_pseudo_issuer": { + "default": false, + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "type": "boolean" + }, + "verify_claims": { + "default": true, + "description": "Verify tokens for standard claims.", + "type": "boolean" + }, + "verify_nonce": { + "default": true, + "description": "Verify nonce on authorization code flow.", + "type": "boolean" + }, + "verify_parameters": { + "default": false, + "description": "Verify plugin configuration against discovery.", + "type": "boolean" + }, + "verify_signature": { + "default": true, + "description": "Verify signature of tokens.", + "type": "boolean" + } + }, + "required": [ + "issuer" + ], + "shorthand_fields": { + "authorization_cookie_httponly": { + "type": "boolean" + }, + "authorization_cookie_lifetime": { + "type": "number" + }, + "authorization_cookie_samesite": { + "type": "string" + }, + "session_compressor": { + "type": "string" + }, + "session_cookie_httponly": { + "type": "boolean" + }, + "session_cookie_idletime": { + "type": "number" + }, + "session_cookie_lifetime": { + "type": "number" + }, + "session_cookie_maxsize": { + "type": "integer" + }, + "session_cookie_renew": { + "type": "number" + }, + "session_cookie_samesite": { + "type": "string" + }, + "session_memcache_host": { + "type": "string" + }, + "session_memcache_port": { + "type": "integer" + }, + "session_memcache_prefix": { + "type": "string" + }, + "session_memcache_socket": { + "type": "string" + }, + "session_redis_cluster_max_redirections": { + "type": "integer" + }, + "session_redis_cluster_nodes": { + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "type": "object" + }, + "type": "array" + }, + "session_redis_connect_timeout": { + "type": "integer" + }, + "session_redis_host": { + "type": "string" + }, + "session_redis_password": { + "type": "string" + }, + "session_redis_port": { + "type": "integer" + }, + "session_redis_prefix": { + "type": "string" + }, + "session_redis_read_timeout": { + "type": "integer" + }, + "session_redis_send_timeout": { + "type": "integer" + }, + "session_redis_server_name": { + "type": "string" + }, + "session_redis_socket": { + "type": "string" + }, + "session_redis_ssl": { + "type": "boolean" + }, + "session_redis_ssl_verify": { + "type": "boolean" + }, + "session_redis_username": { + "type": "string" + }, + "session_strategy": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/openid-connect/3.4.json b/json_schemas/openid-connect/3.4.json new file mode 100644 index 00000000..6ff680ca --- /dev/null +++ b/json_schemas/openid-connect/3.4.json @@ -0,0 +1,1860 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "audience": { + "description": "The audience passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_claim": { + "default": [ + "aud" + ], + "description": "The claim that contains the audience.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "auth_methods": { + "default": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "description": "Types of credentials/grants to enable.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string" + }, + "authorization_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "authorization_cookie_name": { + "default": "authorization", + "description": "The authorization cookie name.", + "type": "string" + }, + "authorization_cookie_path": { + "default": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "authorization_cookie_same_site": { + "default": "Default", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "authorization_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_rolling_timeout": { + "default": 600, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string" + }, + "bearer_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the bearer token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`", + "items": { + "enum": [ + "body", + "cookie", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "by_username_ignore_case": { + "default": false, + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "type": "boolean" + }, + "cache_introspection": { + "default": true, + "description": "Cache the introspection endpoint requests.", + "type": "boolean" + }, + "cache_token_exchange": { + "default": true, + "description": "Cache the token exchange endpoint requests.", + "type": "boolean" + }, + "cache_tokens": { + "default": true, + "description": "Cache the token endpoint requests.", + "type": "boolean" + }, + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "type": "string" + }, + "cache_ttl": { + "default": 3600, + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "type": "number" + }, + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number" + }, + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number" + }, + "cache_user_info": { + "default": true, + "description": "Cache the user info requests.", + "type": "boolean" + }, + "client_alg": { + "items": { + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS384", + "RS512" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_arg": { + "default": "client_id", + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "type": "string" + }, + "client_auth": { + "description": "The authentication method used by the client (plugin) when calling the endpoint.", + "items": { + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_credentials_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_jwk": { + "items": { + "properties": { + "alg": { + "type": "string" + }, + "crv": { + "type": "string" + }, + "d": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "dp": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "dq": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "e": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "k": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "key_ops": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "kid": { + "type": "string" + }, + "kty": { + "type": "string" + }, + "n": { + "type": "string" + }, + "oth": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "p": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "q": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "qi": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "r": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "t": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "use": { + "type": "string" + }, + "x": { + "type": "string" + }, + "x5c": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "x5t": { + "type": "string" + }, + "x5t#S256": { + "type": "string" + }, + "x5u": { + "type": "string" + }, + "y": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_claim": { + "description": "The claim used for consumer mapping.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Do not terminate the request if consumer mapping fails.", + "type": "boolean" + }, + "credential_claim": { + "default": [ + "sub" + ], + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "display_errors": { + "default": false, + "description": "Display errors on failure responses.", + "type": "boolean" + }, + "domains": { + "description": "The allowed values for the `hd` claim.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string" + }, + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string" + }, + "downstream_headers_claims": { + "description": "The downstream header claims.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string" + }, + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string" + }, + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string" + }, + "downstream_introspection_jwt_header": { + "type": "string" + }, + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string" + }, + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string" + }, + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string" + }, + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "enable_hs_signatures": { + "default": false, + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "type": "boolean" + }, + "end_session_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "expose_error_code": { + "default": true, + "type": "boolean" + }, + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "forbidden_destroy_session": { + "default": true, + "description": "Destroy any active session for the forbidden requests.", + "type": "boolean" + }, + "forbidden_error_message": { + "default": "Forbidden", + "description": "The error message for the forbidden requests (when not using the redirection).", + "type": "string" + }, + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_claim": { + "default": [ + "groups" + ], + "description": "The claim that contains the groups.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "type": "boolean" + }, + "http_proxy": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.", + "type": "string" + }, + "http_version": { + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0", + "type": "number" + }, + "https_proxy": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.", + "type": "string" + }, + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string" + }, + "id_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_signature": { + "default": [ + + ], + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "introspection", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspect_jwt_tokens": { + "default": false, + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "type": "boolean" + }, + "introspection_accept": { + "default": "application/json", + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document)", + "enum": [ + "application/json", + "application/jwt", + "application/token-introspection+jwt" + ], + "type": "string" + }, + "introspection_check_active": { + "default": true, + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "type": "boolean" + }, + "introspection_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method: - `client_secret_basic`: send `client_id` and `client_secret` in `Authorization: Basic` header - `client_secret_post`: send `client_id` and `client_secret` as part of the body - `client_secret_jwt`: send client assertion signed with the `client_secret` as part of the body - `private_key_jwt`: send client assertion signed with the `private key` as part of the body - `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt" + ], + "type": "string" + }, + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_values": { + "description": "Extra header values passed to the introspection endpoint.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_hint": { + "default": "access_token", + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "type": "string" + }, + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "issuer": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "jwt_session_claim": { + "default": "sid", + "description": "The claim to match against the JWT session cookie.", + "type": "string" + }, + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string" + }, + "keepalive": { + "default": true, + "description": "Use keepalive with the HTTP client.", + "type": "boolean" + }, + "leeway": { + "default": 0, + "description": "Allow some leeway (in seconds) on the ttl / expiry verification.", + "type": "number" + }, + "login_action": { + "default": "upstream", + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location", + "enum": [ + "redirect", + "response", + "upstream" + ], + "type": "string" + }, + "login_methods": { + "default": [ + "authorization_code" + ], + "description": "Enable login functionality with specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_redirect_mode": { + "default": "fragment", + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers)", + "enum": [ + "fragment", + "query" + ], + "type": "string" + }, + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_tokens": { + "default": [ + "id_token" + ], + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response", + "items": { + "enum": [ + "access_token", + "id_token", + "introspection", + "refresh_token", + "tokens" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string" + }, + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string" + }, + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_revoke": { + "default": false, + "description": "Revoke tokens as part of the logout.", + "type": "boolean" + }, + "logout_revoke_access_token": { + "default": true, + "description": "Revoke the access token as part of the logout.", + "type": "boolean" + }, + "logout_revoke_refresh_token": { + "default": true, + "description": "Revoke the refresh token as part of the logout.", + "type": "boolean" + }, + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string" + }, + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number" + }, + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string" + }, + "password_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "preserve_query_args": { + "default": false, + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "type": "boolean" + }, + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rediscovery_lifetime": { + "default": 30, + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "type": "number" + }, + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string" + }, + "refresh_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "refresh_tokens": { + "default": true, + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "type": "boolean" + }, + "resolve_distributed_claims": { + "default": false, + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "type": "boolean" + }, + "response_mode": { + "default": "query", + "description": "The response mode passed to the authorization endpoint: - `query`: Instructs the identity provider to pass parameters in query string - `form_post`: Instructs the identity provider to pass parameters in request body - `fragment`: Instructs the identity provider to pass parameters in uri fragment (rarely useful as the plugin itself cannot read it)", + "enum": [ + "form_post", + "fragment", + "query" + ], + "type": "string" + }, + "response_type": { + "default": [ + "code" + ], + "description": "The response type passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "reverify": { + "default": false, + "description": "Specifies whether to always verify tokens stored in the session.", + "type": "boolean" + }, + "revocation_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method: - `client_secret_basic`: send `client_id` and `client_secret` in `Authorization: Basic` header - `client_secret_post`: send `client_id` and `client_secret` as part of the body - `client_secret_jwt`: send client assertion signed with the `client_secret` as part of the body - `private_key_jwt`: send client assertion signed with the `private key` as part of the body - `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt" + ], + "type": "string" + }, + "roles_claim": { + "default": [ + "roles" + ], + "description": "The claim that contains the roles.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "run_on_preflight": { + "default": true, + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "type": "boolean" + }, + "scopes": { + "default": [ + "openid" + ], + "description": "The scopes passed to the authorization and token endpoints.", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_claim": { + "default": [ + "scope" + ], + "description": "The claim that contains the scopes.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "search_user_info": { + "default": false, + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "type": "boolean" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_redis_cluster_max_redirections": { + "description": "The Redis cluster maximum redirects.", + "type": "integer" + }, + "session_redis_cluster_nodes": { + "description": "The Redis cluster node host. Takes an array of host records, with either `ip` or `host`, and `port` values.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "type": "array" + }, + "session_redis_connect_timeout": { + "description": "Network IO timeout in milliseconds.", + "type": "integer" + }, + "session_redis_host": { + "default": "127.0.0.1", + "description": "The Redis host", + "type": "string" + }, + "session_redis_password": { + "description": "Password to use for Redis connection when the `redis` session storage is defined. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "session_redis_port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_redis_prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "session_redis_read_timeout": { + "description": "Network IO timeout in milliseconds.", + "type": "integer" + }, + "session_redis_send_timeout": { + "description": "Network IO timeout in milliseconds.", + "type": "integer" + }, + "session_redis_server_name": { + "description": "The SNI used for connecting the Redis server.", + "type": "string" + }, + "session_redis_socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "session_redis_ssl": { + "default": false, + "description": "Use SSL/TLS for Redis connection.", + "type": "boolean" + }, + "session_redis_ssl_verify": { + "default": false, + "description": "Verify identity provider server certificate.", + "type": "boolean" + }, + "session_redis_username": { + "description": "Username to use for Redis connection when the `redis` session storage is defined and ACL authentication is desired. If undefined, ACL authentication will not be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "session_request_headers": { + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "session_secret": { + "description": "The session secret.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "Verify identity provider server certificate.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "token_cache_key_include_scope": { + "default": false, + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean" + }, + "token_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method: - `client_secret_basic`: send `client_id` and `client_secret` in `Authorization: Basic` header - `client_secret_post`: send `client_id` and `client_secret` as part of the body - `client_secret_jwt`: send client assertion signed with the `client_secret` as part of the body - `private_key_jwt`: send client assertion signed with the `private key` as part of the body - `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt" + ], + "type": "string" + }, + "token_exchange_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "password", + "refresh_token" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string" + }, + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unauthorized_destroy_session": { + "default": true, + "description": "Destroy any active session for the unauthorized requests.", + "type": "boolean" + }, + "unauthorized_error_message": { + "default": "Unauthorized", + "description": "The error message for the unauthorized requests (when not using the redirection).", + "type": "string" + }, + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_access_token_header": { + "default": "authorization:bearer", + "description": "The upstream access token header.", + "type": "string" + }, + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string" + }, + "upstream_headers_claims": { + "description": "The upstream header claims.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string" + }, + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string" + }, + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string" + }, + "upstream_introspection_jwt_header": { + "type": "string" + }, + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string" + }, + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string" + }, + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string" + }, + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "userinfo_accept": { + "default": "application/json", + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document)", + "enum": [ + "application/json", + "application/jwt" + ], + "type": "string" + }, + "userinfo_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "using_pseudo_issuer": { + "default": false, + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL.", + "type": "boolean" + }, + "verify_claims": { + "default": true, + "description": "Verify tokens for standard claims.", + "type": "boolean" + }, + "verify_nonce": { + "default": true, + "description": "Verify nonce on authorization code flow.", + "type": "boolean" + }, + "verify_parameters": { + "default": false, + "description": "Verify plugin configuration against discovery.", + "type": "boolean" + }, + "verify_signature": { + "default": true, + "description": "Verify signature of tokens.", + "type": "boolean" + } + }, + "required": [ + "issuer" + ], + "shorthand_fields": { + "authorization_cookie_httponly": { + "type": "boolean" + }, + "authorization_cookie_lifetime": { + "type": "number" + }, + "authorization_cookie_samesite": { + "type": "string" + }, + "session_compressor": { + "type": "string" + }, + "session_cookie_httponly": { + "type": "boolean" + }, + "session_cookie_idletime": { + "type": "number" + }, + "session_cookie_lifetime": { + "type": "number" + }, + "session_cookie_maxsize": { + "type": "integer" + }, + "session_cookie_renew": { + "type": "number" + }, + "session_cookie_samesite": { + "type": "string" + }, + "session_memcache_host": { + "type": "string" + }, + "session_memcache_port": { + "type": "integer" + }, + "session_memcache_prefix": { + "type": "string" + }, + "session_memcache_socket": { + "type": "string" + }, + "session_redis_cluster_maxredirections": { + "type": "integer" + }, + "session_strategy": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/openid-connect/3.7.json b/json_schemas/openid-connect/3.7.json new file mode 100644 index 00000000..51239125 --- /dev/null +++ b/json_schemas/openid-connect/3.7.json @@ -0,0 +1,1975 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "audience": { + "description": "The audience passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_claim": { + "default": [ + "aud" + ], + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "auth_methods": { + "default": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "description": "Types of credentials/grants to enable.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string" + }, + "authorization_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "authorization_cookie_name": { + "default": "authorization", + "description": "The authorization cookie name.", + "type": "string" + }, + "authorization_cookie_path": { + "default": "/", + "description": "The authorization cookie Path flag.", + "type": "string" + }, + "authorization_cookie_same_site": { + "default": "Default", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_rolling_timeout": { + "default": 600, + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string" + }, + "bearer_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the bearer token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "items": { + "enum": [ + "body", + "cookie", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "by_username_ignore_case": { + "default": false, + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "type": "boolean" + }, + "cache_introspection": { + "default": true, + "description": "Cache the introspection endpoint requests.", + "type": "boolean" + }, + "cache_token_exchange": { + "default": true, + "description": "Cache the token exchange endpoint requests.", + "type": "boolean" + }, + "cache_tokens": { + "default": true, + "description": "Cache the token endpoint requests.", + "type": "boolean" + }, + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "type": "string" + }, + "cache_ttl": { + "default": 3600, + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "type": "number" + }, + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number" + }, + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number" + }, + "cache_user_info": { + "default": true, + "description": "Cache the user info requests.", + "type": "boolean" + }, + "client_alg": { + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "items": { + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS384", + "RS512" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_arg": { + "default": "client_id", + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "type": "string" + }, + "client_auth": { + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "items": { + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_credentials_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_jwk": { + "description": "The JWK used for the private_key_jwt authentication.", + "items": { + "properties": { + "alg": { + "type": "string" + }, + "crv": { + "type": "string" + }, + "d": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dp": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dq": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "e": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "k": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "key_ops": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "kid": { + "type": "string" + }, + "kty": { + "type": "string" + }, + "n": { + "type": "string" + }, + "oth": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "p": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "q": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "qi": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "r": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "t": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "use": { + "type": "string" + }, + "x": { + "type": "string" + }, + "x5c": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "x5t": { + "type": "string" + }, + "x5t#S256": { + "type": "string" + }, + "x5u": { + "type": "string" + }, + "y": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_claim": { + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Do not terminate the request if consumer mapping fails.", + "type": "boolean" + }, + "credential_claim": { + "default": [ + "sub" + ], + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "display_errors": { + "default": false, + "description": "Display errors on failure responses.", + "type": "boolean" + }, + "domains": { + "description": "The allowed values for the `hd` claim.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string" + }, + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string" + }, + "downstream_headers_claims": { + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string" + }, + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string" + }, + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string" + }, + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "type": "string" + }, + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string" + }, + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string" + }, + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string" + }, + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "dpop_proof_lifetime": { + "default": 300, + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "type": "number" + }, + "dpop_use_nonce": { + "default": false, + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "type": "boolean" + }, + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "expose_error_code": { + "default": true, + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "type": "boolean" + }, + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "forbidden_destroy_session": { + "default": true, + "description": "Destroy any active session for the forbidden requests.", + "type": "boolean" + }, + "forbidden_error_message": { + "default": "Forbidden", + "description": "The error message for the forbidden requests (when not using the redirection).", + "type": "string" + }, + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_claim": { + "default": [ + "groups" + ], + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "type": "boolean" + }, + "http_proxy": { + "description": "The HTTP proxy.", + "type": "string" + }, + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.", + "type": "string" + }, + "http_version": { + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "type": "number" + }, + "https_proxy": { + "description": "The HTTPS proxy.", + "type": "string" + }, + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.", + "type": "string" + }, + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string" + }, + "id_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_signature": { + "default": [ + + ], + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "introspection", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspect_jwt_tokens": { + "default": false, + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "type": "boolean" + }, + "introspection_accept": { + "default": "application/json", + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt", + "application/token-introspection+jwt" + ], + "type": "string" + }, + "introspection_check_active": { + "default": true, + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "type": "boolean" + }, + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_values": { + "description": "Extra header values passed to the introspection endpoint.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_hint": { + "default": "access_token", + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "type": "string" + }, + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for introspection.", + "type": "string" + }, + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "type": "string" + }, + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "jwt_session_claim": { + "default": "sid", + "description": "The claim to match against the JWT session cookie.", + "type": "string" + }, + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string" + }, + "keepalive": { + "default": true, + "description": "Use keepalive with the HTTP client.", + "type": "boolean" + }, + "leeway": { + "default": 0, + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "type": "number" + }, + "login_action": { + "default": "upstream", + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "enum": [ + "redirect", + "response", + "upstream" + ], + "type": "string" + }, + "login_methods": { + "default": [ + "authorization_code" + ], + "description": "Enable login functionality with specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_redirect_mode": { + "default": "fragment", + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "enum": [ + "fragment", + "query" + ], + "type": "string" + }, + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_tokens": { + "default": [ + "id_token" + ], + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "items": { + "enum": [ + "access_token", + "id_token", + "introspection", + "refresh_token", + "tokens" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string" + }, + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string" + }, + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_revoke": { + "default": false, + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "type": "boolean" + }, + "logout_revoke_access_token": { + "default": true, + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_revoke_refresh_token": { + "default": true, + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string" + }, + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number" + }, + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string" + }, + "password_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "preserve_query_args": { + "default": false, + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "type": "boolean" + }, + "proof_of_possession_auth_methods_validation": { + "default": true, + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "type": "boolean" + }, + "proof_of_possession_dpop": { + "default": "off", + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "proof_of_possession_mtls": { + "default": "off", + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "pushed_authorization_request_endpoint_auth_method": { + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rediscovery_lifetime": { + "default": 30, + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "type": "number" + }, + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string" + }, + "refresh_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "refresh_tokens": { + "default": true, + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "type": "boolean" + }, + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean" + }, + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean" + }, + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean" + }, + "resolve_distributed_claims": { + "default": false, + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "type": "boolean" + }, + "response_mode": { + "default": "query", + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "enum": [ + "form_post", + "form_post.jwt", + "fragment", + "fragment.jwt", + "jwt", + "query", + "query.jwt" + ], + "type": "string" + }, + "response_type": { + "default": [ + "code" + ], + "description": "The response type passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "reverify": { + "default": false, + "description": "Specifies whether to always verify tokens stored in the session.", + "type": "boolean" + }, + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "revocation_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for revocation.", + "type": "string" + }, + "roles_claim": { + "default": [ + "roles" + ], + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "run_on_preflight": { + "default": true, + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "type": "boolean" + }, + "scopes": { + "default": [ + "openid" + ], + "description": "The scopes passed to the authorization and token endpoints.", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_claim": { + "default": [ + "scope" + ], + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "search_user_info": { + "default": false, + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "type": "boolean" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "The session cookie Path flag.", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "The memcached port.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_redis_cluster_max_redirections": { + "description": "The Redis cluster maximum redirects.", + "type": "integer" + }, + "session_redis_cluster_nodes": { + "description": "The Redis cluster node host. Takes an array of host records, with either `ip` or `host`, and `port` values.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "type": "array" + }, + "session_redis_connect_timeout": { + "description": "Session redis connection timeout in milliseconds.", + "type": "integer" + }, + "session_redis_host": { + "default": "127.0.0.1", + "description": "The Redis host.", + "type": "string" + }, + "session_redis_password": { + "description": "Password to use for Redis connection when the `redis` session storage is defined. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "session_redis_port": { + "default": 6379, + "description": "The Redis port.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_redis_prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "session_redis_read_timeout": { + "description": "Session redis read timeout in milliseconds.", + "type": "integer" + }, + "session_redis_send_timeout": { + "description": "Session redis send timeout in milliseconds.", + "type": "integer" + }, + "session_redis_server_name": { + "description": "The SNI used for connecting the Redis server.", + "type": "string" + }, + "session_redis_socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "session_redis_ssl": { + "default": false, + "description": "Use SSL/TLS for Redis connection.", + "type": "boolean" + }, + "session_redis_ssl_verify": { + "default": false, + "description": "Verify identity provider server certificate.", + "type": "boolean" + }, + "session_redis_username": { + "description": "Username to use for Redis connection when the `redis` session storage is defined and ACL authentication is desired. If undefined, ACL authentication will not be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "type": "number" + }, + "session_request_headers": { + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "session_secret": { + "description": "The session secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "tls_client_auth_cert_id": { + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "type": "string", + "uuid": true + }, + "tls_client_auth_ssl_verify": { + "default": true, + "description": "Verify identity provider server certificate during mTLS client authentication.", + "type": "boolean" + }, + "token_cache_key_include_scope": { + "default": false, + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean" + }, + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "type": "string" + }, + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "password", + "refresh_token" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string" + }, + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unauthorized_destroy_session": { + "default": true, + "description": "Destroy any active session for the unauthorized requests.", + "type": "boolean" + }, + "unauthorized_error_message": { + "default": "Unauthorized", + "description": "The error message for the unauthorized requests (when not using the redirection).", + "type": "string" + }, + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_access_token_header": { + "default": "authorization:bearer", + "description": "The upstream access token header.", + "type": "string" + }, + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string" + }, + "upstream_headers_claims": { + "description": "The upstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string" + }, + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string" + }, + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string" + }, + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "type": "string" + }, + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string" + }, + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string" + }, + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string" + }, + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "userinfo_accept": { + "default": "application/json", + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt" + ], + "type": "string" + }, + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "using_pseudo_issuer": { + "default": false, + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "type": "boolean" + }, + "verify_claims": { + "default": true, + "description": "Verify tokens for standard claims.", + "type": "boolean" + }, + "verify_nonce": { + "default": true, + "description": "Verify nonce on authorization code flow.", + "type": "boolean" + }, + "verify_parameters": { + "default": false, + "description": "Verify plugin configuration against discovery.", + "type": "boolean" + }, + "verify_signature": { + "default": true, + "description": "Verify signature of tokens.", + "type": "boolean" + } + }, + "required": [ + "issuer" + ], + "shorthand_fields": { + "authorization_cookie_httponly": { + "type": "boolean" + }, + "authorization_cookie_lifetime": { + "type": "number" + }, + "authorization_cookie_samesite": { + "type": "string" + }, + "session_compressor": { + "type": "string" + }, + "session_cookie_httponly": { + "type": "boolean" + }, + "session_cookie_idletime": { + "type": "number" + }, + "session_cookie_lifetime": { + "type": "number" + }, + "session_cookie_maxsize": { + "type": "integer" + }, + "session_cookie_renew": { + "type": "number" + }, + "session_cookie_samesite": { + "type": "string" + }, + "session_memcache_host": { + "type": "string" + }, + "session_memcache_port": { + "type": "integer" + }, + "session_memcache_prefix": { + "type": "string" + }, + "session_memcache_socket": { + "type": "string" + }, + "session_redis_cluster_maxredirections": { + "type": "integer" + }, + "session_strategy": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/openid-connect/3.8.json b/json_schemas/openid-connect/3.8.json new file mode 100644 index 00000000..dcb169b1 --- /dev/null +++ b/json_schemas/openid-connect/3.8.json @@ -0,0 +1,2396 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "audience": { + "description": "The audience passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_claim": { + "default": [ + "aud" + ], + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "auth_methods": { + "default": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "description": "Types of credentials/grants to enable.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string" + }, + "authorization_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "authorization_cookie_name": { + "default": "authorization", + "description": "The authorization cookie name.", + "type": "string" + }, + "authorization_cookie_path": { + "default": "/", + "description": "The authorization cookie Path flag.", + "type": "string" + }, + "authorization_cookie_same_site": { + "default": "Default", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_rolling_timeout": { + "default": 600, + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string" + }, + "bearer_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the bearer token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "items": { + "enum": [ + "body", + "cookie", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "by_username_ignore_case": { + "default": false, + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "type": "boolean" + }, + "cache_introspection": { + "default": true, + "description": "Cache the introspection endpoint requests.", + "type": "boolean" + }, + "cache_token_exchange": { + "default": true, + "description": "Cache the token exchange endpoint requests.", + "type": "boolean" + }, + "cache_tokens": { + "default": true, + "description": "Cache the token endpoint requests.", + "type": "boolean" + }, + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "type": "string" + }, + "cache_ttl": { + "default": 3600, + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "type": "number" + }, + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number" + }, + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number" + }, + "cache_user_info": { + "default": true, + "description": "Cache the user info requests.", + "type": "boolean" + }, + "claims_forbidden": { + "description": "If given, these claims are forbidden in the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_alg": { + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "items": { + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS384", + "RS512" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_arg": { + "default": "client_id", + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "type": "string" + }, + "client_auth": { + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "items": { + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_credentials_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_jwk": { + "description": "The JWK used for the private_key_jwt authentication.", + "items": { + "properties": { + "alg": { + "type": "string" + }, + "crv": { + "type": "string" + }, + "d": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dp": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dq": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "e": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "k": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "key_ops": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "kid": { + "type": "string" + }, + "kty": { + "type": "string" + }, + "n": { + "type": "string" + }, + "oth": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "p": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "q": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "qi": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "r": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "t": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "use": { + "type": "string" + }, + "x": { + "type": "string" + }, + "x5c": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "x5t": { + "type": "string" + }, + "x5t#S256": { + "type": "string" + }, + "x5u": { + "type": "string" + }, + "y": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "cluster_cache_redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "translate_backwards": [ + "connect_timeout" + ], + "type": "integer" + } + }, + "type": "object" + }, + "cluster_cache_strategy": { + "default": "off", + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "enum": [ + "off", + "redis" + ], + "type": "string" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_claim": { + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Do not terminate the request if consumer mapping fails.", + "type": "boolean" + }, + "credential_claim": { + "default": [ + "sub" + ], + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "display_errors": { + "default": false, + "description": "Display errors on failure responses.", + "type": "boolean" + }, + "domains": { + "description": "The allowed values for the `hd` claim.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string" + }, + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string" + }, + "downstream_headers_claims": { + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string" + }, + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string" + }, + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string" + }, + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "type": "string" + }, + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string" + }, + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string" + }, + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string" + }, + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "dpop_proof_lifetime": { + "default": 300, + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "type": "number" + }, + "dpop_use_nonce": { + "default": false, + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "type": "boolean" + }, + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "expose_error_code": { + "default": true, + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "type": "boolean" + }, + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "forbidden_destroy_session": { + "default": true, + "description": "Destroy any active session for the forbidden requests.", + "type": "boolean" + }, + "forbidden_error_message": { + "default": "Forbidden", + "description": "The error message for the forbidden requests (when not using the redirection).", + "type": "string" + }, + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_claim": { + "default": [ + "groups" + ], + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "type": "boolean" + }, + "http_proxy": { + "description": "The HTTP proxy.", + "type": "string" + }, + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.", + "type": "string" + }, + "http_version": { + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "type": "number" + }, + "https_proxy": { + "description": "The HTTPS proxy.", + "type": "string" + }, + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.", + "type": "string" + }, + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string" + }, + "id_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_signature": { + "default": [ + + ], + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "introspection", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspect_jwt_tokens": { + "default": false, + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "type": "boolean" + }, + "introspection_accept": { + "default": "application/json", + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt", + "application/token-introspection+jwt" + ], + "type": "string" + }, + "introspection_check_active": { + "default": true, + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "type": "boolean" + }, + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_values": { + "description": "Extra header values passed to the introspection endpoint.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_hint": { + "default": "access_token", + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "type": "string" + }, + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for introspection.", + "type": "string" + }, + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "type": "string" + }, + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "jwt_session_claim": { + "default": "sid", + "description": "The claim to match against the JWT session cookie.", + "type": "string" + }, + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string" + }, + "keepalive": { + "default": true, + "description": "Use keepalive with the HTTP client.", + "type": "boolean" + }, + "leeway": { + "default": 0, + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "type": "number" + }, + "login_action": { + "default": "upstream", + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "enum": [ + "redirect", + "response", + "upstream" + ], + "type": "string" + }, + "login_methods": { + "default": [ + "authorization_code" + ], + "description": "Enable login functionality with specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_redirect_mode": { + "default": "fragment", + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "enum": [ + "fragment", + "query" + ], + "type": "string" + }, + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_tokens": { + "default": [ + "id_token" + ], + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "items": { + "enum": [ + "access_token", + "id_token", + "introspection", + "refresh_token", + "tokens" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string" + }, + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string" + }, + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_revoke": { + "default": false, + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "type": "boolean" + }, + "logout_revoke_access_token": { + "default": true, + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_revoke_refresh_token": { + "default": true, + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string" + }, + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number" + }, + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string" + }, + "password_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "preserve_query_args": { + "default": false, + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "type": "boolean" + }, + "proof_of_possession_auth_methods_validation": { + "default": true, + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "type": "boolean" + }, + "proof_of_possession_dpop": { + "default": "off", + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "proof_of_possession_mtls": { + "default": "off", + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "pushed_authorization_request_endpoint_auth_method": { + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "translate_backwards": [ + "connect_timeout" + ], + "type": "integer" + } + }, + "type": "object" + }, + "rediscovery_lifetime": { + "default": 30, + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "type": "number" + }, + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string" + }, + "refresh_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "refresh_tokens": { + "default": true, + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "type": "boolean" + }, + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean" + }, + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean" + }, + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean" + }, + "resolve_distributed_claims": { + "default": false, + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "type": "boolean" + }, + "response_mode": { + "default": "query", + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "enum": [ + "form_post", + "form_post.jwt", + "fragment", + "fragment.jwt", + "jwt", + "query", + "query.jwt" + ], + "type": "string" + }, + "response_type": { + "default": [ + "code" + ], + "description": "The response type passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "reverify": { + "default": false, + "description": "Specifies whether to always verify tokens stored in the session.", + "type": "boolean" + }, + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "revocation_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for revocation.", + "type": "string" + }, + "roles_claim": { + "default": [ + "roles" + ], + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "run_on_preflight": { + "default": true, + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "type": "boolean" + }, + "scopes": { + "default": [ + "openid" + ], + "description": "The scopes passed to the authorization and token endpoints.", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_claim": { + "default": [ + "scope" + ], + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "search_user_info": { + "default": false, + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "type": "boolean" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "The session cookie Path flag.", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "The memcached port.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "type": "number" + }, + "session_request_headers": { + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "session_secret": { + "description": "The session secret.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "tls_client_auth_cert_id": { + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "type": "string", + "uuid": true + }, + "tls_client_auth_ssl_verify": { + "default": true, + "description": "Verify identity provider server certificate during mTLS client authentication.", + "type": "boolean" + }, + "token_cache_key_include_scope": { + "default": false, + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean" + }, + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "type": "string" + }, + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "password", + "refresh_token" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string" + }, + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unauthorized_destroy_session": { + "default": true, + "description": "Destroy any active session for the unauthorized requests.", + "type": "boolean" + }, + "unauthorized_error_message": { + "default": "Unauthorized", + "description": "The error message for the unauthorized requests (when not using the redirection).", + "type": "string" + }, + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_access_token_header": { + "default": "authorization:bearer", + "description": "The upstream access token header.", + "type": "string" + }, + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string" + }, + "upstream_headers_claims": { + "description": "The upstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string" + }, + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string" + }, + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string" + }, + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "type": "string" + }, + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string" + }, + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string" + }, + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string" + }, + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "userinfo_accept": { + "default": "application/json", + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt" + ], + "type": "string" + }, + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "using_pseudo_issuer": { + "default": false, + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "type": "boolean" + }, + "verify_claims": { + "default": true, + "description": "Verify tokens for standard claims.", + "type": "boolean" + }, + "verify_nonce": { + "default": true, + "description": "Verify nonce on authorization code flow.", + "type": "boolean" + }, + "verify_parameters": { + "default": false, + "description": "Verify plugin configuration against discovery.", + "type": "boolean" + }, + "verify_signature": { + "default": true, + "description": "Verify signature of tokens.", + "type": "boolean" + } + }, + "required": [ + "issuer" + ], + "shorthand_fields": { + "authorization_cookie_httponly": { + "type": "boolean" + }, + "authorization_cookie_lifetime": { + "type": "number" + }, + "authorization_cookie_samesite": { + "type": "string" + }, + "session_compressor": { + "type": "string" + }, + "session_cookie_httponly": { + "type": "boolean" + }, + "session_cookie_idletime": { + "type": "number" + }, + "session_cookie_lifetime": { + "type": "number" + }, + "session_cookie_maxsize": { + "type": "integer" + }, + "session_cookie_renew": { + "type": "number" + }, + "session_cookie_samesite": { + "type": "string" + }, + "session_memcache_host": { + "type": "string" + }, + "session_memcache_port": { + "type": "integer" + }, + "session_memcache_prefix": { + "type": "string" + }, + "session_memcache_socket": { + "type": "string" + }, + "session_redis_cluster_max_redirections": { + "translate_backwards": [ + "cluster_max_redirections", + "redis" + ], + "type": "integer" + }, + "session_redis_cluster_nodes": { + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "type": "object" + }, + "translate_backwards": [ + "cluster_nodes", + "redis" + ], + "type": "array" + }, + "session_redis_connect_timeout": { + "translate_backwards": [ + "connect_timeout", + "redis" + ], + "type": "integer" + }, + "session_redis_host": { + "translate_backwards": [ + "host", + "redis" + ], + "type": "string" + }, + "session_redis_password": { + "translate_backwards": [ + "password", + "redis" + ], + "type": "string" + }, + "session_redis_port": { + "translate_backwards": [ + "port", + "redis" + ], + "type": "integer" + }, + "session_redis_prefix": { + "translate_backwards": [ + "prefix", + "redis" + ], + "type": "string" + }, + "session_redis_read_timeout": { + "translate_backwards": [ + "read_timeout", + "redis" + ], + "type": "integer" + }, + "session_redis_send_timeout": { + "translate_backwards": [ + "redis", + "send_timeout" + ], + "type": "integer" + }, + "session_redis_server_name": { + "translate_backwards": [ + "redis", + "server_name" + ], + "type": "string" + }, + "session_redis_socket": { + "translate_backwards": [ + "redis", + "socket" + ], + "type": "string" + }, + "session_redis_ssl": { + "translate_backwards": [ + "redis", + "ssl" + ], + "type": "boolean" + }, + "session_redis_ssl_verify": { + "translate_backwards": [ + "redis", + "ssl_verify" + ], + "type": "boolean" + }, + "session_redis_username": { + "translate_backwards": [ + "redis", + "username" + ], + "type": "string" + }, + "session_strategy": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/openid-connect/3.9.json b/json_schemas/openid-connect/3.9.json new file mode 100644 index 00000000..9db02f24 --- /dev/null +++ b/json_schemas/openid-connect/3.9.json @@ -0,0 +1,2348 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "audience": { + "description": "The audience passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_claim": { + "default": [ + "aud" + ], + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "auth_methods": { + "default": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "description": "Types of credentials/grants to enable.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string" + }, + "authorization_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "authorization_cookie_name": { + "default": "authorization", + "description": "The authorization cookie name.", + "type": "string" + }, + "authorization_cookie_path": { + "default": "/", + "description": "The authorization cookie Path flag.", + "type": "string" + }, + "authorization_cookie_same_site": { + "default": "Default", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "authorization_rolling_timeout": { + "default": 600, + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string" + }, + "bearer_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the bearer token: - `header`: search the `Authorization`, `access-token`, and `x-access-token` HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "items": { + "enum": [ + "body", + "cookie", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "by_username_ignore_case": { + "default": false, + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "type": "boolean" + }, + "cache_introspection": { + "default": true, + "description": "Cache the introspection endpoint requests.", + "type": "boolean" + }, + "cache_token_exchange": { + "default": true, + "description": "Cache the token exchange endpoint requests.", + "type": "boolean" + }, + "cache_tokens": { + "default": true, + "description": "Cache the token endpoint requests.", + "type": "boolean" + }, + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "type": "string" + }, + "cache_ttl": { + "default": 3600, + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "type": "number" + }, + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number" + }, + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number" + }, + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number" + }, + "cache_user_info": { + "default": true, + "description": "Cache the user info requests.", + "type": "boolean" + }, + "claims_forbidden": { + "description": "If given, these claims are forbidden in the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_alg": { + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "items": { + "enum": [ + "ES256", + "ES384", + "ES512", + "EdDSA", + "HS256", + "HS384", + "HS512", + "PS256", + "PS384", + "PS512", + "RS256", + "RS384", + "RS512" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_arg": { + "default": "client_id", + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "type": "string" + }, + "client_auth": { + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "items": { + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_credentials_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_jwk": { + "description": "The JWK used for the private_key_jwt authentication.", + "items": { + "properties": { + "alg": { + "type": "string" + }, + "crv": { + "type": "string" + }, + "d": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dp": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "dq": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "e": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "k": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "key_ops": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "kid": { + "type": "string" + }, + "kty": { + "type": "string" + }, + "n": { + "type": "string" + }, + "oth": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "p": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "q": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "qi": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "r": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "t": { + "description": "This field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "use": { + "type": "string" + }, + "x": { + "type": "string" + }, + "x5c": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "x5t": { + "type": "string" + }, + "x5t#S256": { + "type": "string" + }, + "x5u": { + "type": "string" + }, + "y": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "type": "array" + }, + "client_secret": { + "description": "The client secret.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "cluster_cache_redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "cluster_cache_strategy": { + "default": "off", + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "enum": [ + "off", + "redis" + ], + "type": "string" + }, + "consumer_by": { + "default": [ + "custom_id", + "username" + ], + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "items": { + "enum": [ + "custom_id", + "id", + "username" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_claim": { + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_optional": { + "default": false, + "description": "Do not terminate the request if consumer mapping fails.", + "type": "boolean" + }, + "credential_claim": { + "default": [ + "sub" + ], + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "display_errors": { + "default": false, + "description": "Display errors on failure responses.", + "type": "boolean" + }, + "domains": { + "description": "The allowed values for the `hd` claim.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string" + }, + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string" + }, + "downstream_headers_claims": { + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string" + }, + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string" + }, + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string" + }, + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "type": "string" + }, + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string" + }, + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string" + }, + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string" + }, + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "dpop_proof_lifetime": { + "default": 300, + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "type": "number" + }, + "dpop_use_nonce": { + "default": false, + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "type": "boolean" + }, + "enable_hs_signatures": { + "default": false, + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "type": "boolean" + }, + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "expose_error_code": { + "default": true, + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "type": "boolean" + }, + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "forbidden_destroy_session": { + "default": true, + "description": "Destroy any active session for the forbidden requests.", + "type": "boolean" + }, + "forbidden_error_message": { + "default": "Forbidden", + "description": "The error message for the forbidden requests (when not using the redirection).", + "type": "string" + }, + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_claim": { + "default": [ + "groups" + ], + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "hide_credentials": { + "default": false, + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "type": "boolean" + }, + "http_proxy": { + "description": "The HTTP proxy.", + "type": "string" + }, + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "http_version": { + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "type": "number" + }, + "https_proxy": { + "description": "The HTTPS proxy.", + "type": "string" + }, + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string" + }, + "id_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_signature": { + "default": [ + + ], + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "introspection", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspect_jwt_tokens": { + "default": false, + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "type": "boolean" + }, + "introspection_accept": { + "default": "application/json", + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt", + "application/token-introspection+jwt" + ], + "type": "string" + }, + "introspection_check_active": { + "default": true, + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "type": "boolean" + }, + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_headers_values": { + "description": "Extra header values passed to the introspection endpoint.\nThis field is [encrypted](/gateway/keyring/).", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_hint": { + "default": "access_token", + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "type": "string" + }, + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_client_headers": { + "description": "Extra post arguments passed from the client headers to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "introspection_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for introspection.", + "type": "string" + }, + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "type": "string" + }, + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "jwt_session_claim": { + "default": "sid", + "description": "The claim to match against the JWT session cookie.", + "type": "string" + }, + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string" + }, + "keepalive": { + "default": true, + "description": "Use keepalive with the HTTP client.", + "type": "boolean" + }, + "leeway": { + "default": 0, + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "type": "number" + }, + "login_action": { + "default": "upstream", + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "enum": [ + "redirect", + "response", + "upstream" + ], + "type": "string" + }, + "login_methods": { + "default": [ + "authorization_code" + ], + "description": "Enable login functionality with specified grants.", + "items": { + "enum": [ + "authorization_code", + "bearer", + "client_credentials", + "introspection", + "kong_oauth2", + "password", + "refresh_token", + "session", + "userinfo" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_redirect_mode": { + "default": "fragment", + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "enum": [ + "fragment", + "query" + ], + "type": "string" + }, + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "login_tokens": { + "default": [ + "id_token" + ], + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "items": { + "enum": [ + "access_token", + "id_token", + "introspection", + "refresh_token", + "tokens" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string" + }, + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string" + }, + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_revoke": { + "default": false, + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "type": "boolean" + }, + "logout_revoke_access_token": { + "default": true, + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_revoke_refresh_token": { + "default": true, + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean" + }, + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string" + }, + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number" + }, + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + }, + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string" + }, + "password_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "preserve_query_args": { + "default": false, + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "type": "boolean" + }, + "proof_of_possession_auth_methods_validation": { + "default": true, + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "type": "boolean" + }, + "proof_of_possession_dpop": { + "default": "off", + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "proof_of_possession_mtls": { + "default": "off", + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "enum": [ + "off", + "optional", + "strict" + ], + "type": "string" + }, + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "pushed_authorization_request_endpoint_auth_method": { + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "rediscovery_lifetime": { + "default": 30, + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "type": "number" + }, + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string" + }, + "refresh_token_param_type": { + "default": [ + "body", + "header", + "query" + ], + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "items": { + "enum": [ + "body", + "header", + "query" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "refresh_tokens": { + "default": true, + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "type": "boolean" + }, + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean" + }, + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean" + }, + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean" + }, + "resolve_distributed_claims": { + "default": false, + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "type": "boolean" + }, + "response_mode": { + "default": "query", + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "enum": [ + "form_post", + "form_post.jwt", + "fragment", + "fragment.jwt", + "jwt", + "query", + "query.jwt" + ], + "type": "string" + }, + "response_type": { + "default": [ + "code" + ], + "description": "The response type passed to the authorization endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "reverify": { + "default": false, + "description": "Specifies whether to always verify tokens stored in the session.", + "type": "boolean" + }, + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "revocation_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for revocation.", + "type": "string" + }, + "roles_claim": { + "default": [ + "roles" + ], + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "run_on_preflight": { + "default": true, + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "type": "boolean" + }, + "scopes": { + "default": [ + "openid" + ], + "description": "The scopes passed to the authorization and token endpoints.", + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_claim": { + "default": [ + "scope" + ], + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "search_user_info": { + "default": false, + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "type": "boolean" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "The session cookie Path flag.", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "The memcached port.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "type": "number" + }, + "session_request_headers": { + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number" + }, + "session_secret": { + "description": "The session secret.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Network IO timeout in milliseconds.", + "type": "number" + }, + "tls_client_auth_cert_id": { + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "type": "string", + "uuid": true + }, + "tls_client_auth_ssl_verify": { + "default": true, + "description": "Verify identity provider server certificate during mTLS client authentication.", + "type": "boolean" + }, + "token_cache_key_include_scope": { + "default": false, + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean" + }, + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none", + "private_key_jwt", + "self_signed_tls_client_auth", + "tls_client_auth" + ], + "type": "string" + }, + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "type": "string" + }, + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "items": { + "enum": [ + "authorization_code", + "client_credentials", + "password", + "refresh_token" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string" + }, + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unauthorized_destroy_session": { + "default": true, + "description": "Destroy any active session for the unauthorized requests.", + "type": "boolean" + }, + "unauthorized_error_message": { + "default": "Unauthorized", + "description": "The error message for the unauthorized requests (when not using the redirection).", + "type": "string" + }, + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "items": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_access_token_header": { + "default": "authorization:bearer", + "description": "The upstream access token header.", + "type": "string" + }, + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string" + }, + "upstream_headers_claims": { + "description": "The upstream header claims. Only top level claims are supported.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string" + }, + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string" + }, + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string" + }, + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "type": "string" + }, + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string" + }, + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string" + }, + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string" + }, + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + }, + "userinfo_accept": { + "default": "application/json", + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "enum": [ + "application/json", + "application/jwt" + ], + "type": "string" + }, + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "type": "string" + }, + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "using_pseudo_issuer": { + "default": false, + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "type": "boolean" + }, + "verify_claims": { + "default": true, + "description": "Verify tokens for standard claims.", + "type": "boolean" + }, + "verify_nonce": { + "default": true, + "description": "Verify nonce on authorization code flow.", + "type": "boolean" + }, + "verify_parameters": { + "default": false, + "description": "Verify plugin configuration against discovery.", + "type": "boolean" + }, + "verify_signature": { + "default": true, + "description": "Verify signature of tokens.", + "type": "boolean" + } + }, + "required": [ + "issuer" + ], + "shorthand_fields": { + "authorization_cookie_httponly": { + "type": "boolean" + }, + "authorization_cookie_lifetime": { + "type": "number" + }, + "authorization_cookie_samesite": { + "type": "string" + }, + "session_compressor": { + "type": "string" + }, + "session_cookie_httponly": { + "type": "boolean" + }, + "session_cookie_idletime": { + "type": "number" + }, + "session_cookie_lifetime": { + "type": "number" + }, + "session_cookie_maxsize": { + "type": "integer" + }, + "session_cookie_renew": { + "type": "number" + }, + "session_cookie_samesite": { + "type": "string" + }, + "session_memcache_host": { + "type": "string" + }, + "session_memcache_port": { + "type": "integer" + }, + "session_memcache_prefix": { + "type": "string" + }, + "session_memcache_socket": { + "type": "string" + }, + "session_redis_cluster_max_redirections": { + "type": "integer" + }, + "session_redis_cluster_nodes": { + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "type": "object" + }, + "type": "array" + }, + "session_redis_connect_timeout": { + "type": "integer" + }, + "session_redis_host": { + "type": "string" + }, + "session_redis_password": { + "type": "string" + }, + "session_redis_port": { + "type": "integer" + }, + "session_redis_prefix": { + "type": "string" + }, + "session_redis_read_timeout": { + "type": "integer" + }, + "session_redis_send_timeout": { + "type": "integer" + }, + "session_redis_server_name": { + "type": "string" + }, + "session_redis_socket": { + "type": "string" + }, + "session_redis_ssl": { + "type": "boolean" + }, + "session_redis_ssl_verify": { + "type": "boolean" + }, + "session_redis_username": { + "type": "string" + }, + "session_strategy": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/opentelemetry/3.10.json b/json_schemas/opentelemetry/3.10.json new file mode 100644 index 00000000..01e5d3d2 --- /dev/null +++ b/json_schemas/opentelemetry/3.10.json @@ -0,0 +1,296 @@ +{ + "properties": { + "config": { + "properties": { + "batch_flush_delay": { + "description": "The delay, in seconds, between two consecutive batches.", + "type": "integer" + }, + "batch_span_count": { + "description": "The number of spans to be sent in a single batch.", + "type": "integer" + }, + "connect_timeout": { + "default": 1000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "header_type": { + "default": "preserve", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "ignore", + "instana", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "type": "string" + }, + "headers": { + "additionalProperties": true, + "description": "The custom headers to be added in the HTTP request sent to the OTLP server. This setting is useful for adding the authentication headers (token) for the APM backend.", + "type": "object" + }, + "http_response_header_for_traceid": { + "type": "string" + }, + "logs_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "propagation": { + "default": { + "default_format": "w3c" + }, + "properties": { + "clear": { + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "default_format": { + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "extract": { + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "items": { + "enum": [ + "aws", + "b3", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "w3c" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "inject": { + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "items": { + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "default_format" + ], + "type": "object" + }, + "queue": { + "default": { + "max_batch_size": 200 + }, + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "resource_attributes": { + "additionalProperties": true, + "type": "object" + }, + "sampling_rate": { + "description": "Tracing sampling rate for configuring the probability-based sampler. When set, this value supersedes the global `tracing_sampling_rate` setting from kong.conf.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "traces_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/opentelemetry/3.11.json b/json_schemas/opentelemetry/3.11.json new file mode 100644 index 00000000..9bcd1403 --- /dev/null +++ b/json_schemas/opentelemetry/3.11.json @@ -0,0 +1,284 @@ +{ + "properties": { + "config": { + "properties": { + "batch_flush_delay": { + "description": "The delay, in seconds, between two consecutive batches.", + "type": "integer" + }, + "batch_span_count": { + "description": "The number of spans to be sent in a single batch.", + "type": "integer" + }, + "connect_timeout": { + "default": 1000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "header_type": { + "default": "preserve", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "ignore", + "instana", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "type": "string" + }, + "headers": { + "additionalProperties": true, + "description": "The custom headers to be added in the HTTP request sent to the OTLP server. This setting is useful for adding the authentication headers (token) for the APM backend.", + "type": "object" + }, + "http_response_header_for_traceid": { + "type": "string" + }, + "logs_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "propagation": { + "default": { + "default_format": "w3c" + }, + "properties": { + "clear": { + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "default_format": { + "default": "w3c", + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "extract": { + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "items": { + "enum": [ + "aws", + "b3", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "w3c" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "inject": { + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "items": { + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "queue": { + "default": { + "max_batch_size": 200 + }, + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 200, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "resource_attributes": { + "additionalProperties": true, + "type": "object" + }, + "sampling_rate": { + "description": "Tracing sampling rate for configuring the probability-based sampler. When set, this value supersedes the global `tracing_sampling_rate` setting from kong.conf.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "sampling_strategy": { + "default": "parent_drop_probability_fallback", + "description": "The sampling strategy to use for OTLP `traces`. Set `parent_drop_probability_fallback` if you want parent-based sampling when the parent span contains a `false` sampled flag, and fallback to probability-based sampling otherwise. Set `parent_probability_fallback` if you want parent-based sampling when the parent span contains a valid sampled flag (`true` or `false`), and fallback to probability-based sampling otherwise.", + "enum": [ + "parent_drop_probability_fallback", + "parent_probability_fallback" + ], + "type": "string" + }, + "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "traces_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/opentelemetry/3.12.json b/json_schemas/opentelemetry/3.12.json new file mode 100644 index 00000000..9bcd1403 --- /dev/null +++ b/json_schemas/opentelemetry/3.12.json @@ -0,0 +1,284 @@ +{ + "properties": { + "config": { + "properties": { + "batch_flush_delay": { + "description": "The delay, in seconds, between two consecutive batches.", + "type": "integer" + }, + "batch_span_count": { + "description": "The number of spans to be sent in a single batch.", + "type": "integer" + }, + "connect_timeout": { + "default": 1000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "header_type": { + "default": "preserve", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "ignore", + "instana", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "type": "string" + }, + "headers": { + "additionalProperties": true, + "description": "The custom headers to be added in the HTTP request sent to the OTLP server. This setting is useful for adding the authentication headers (token) for the APM backend.", + "type": "object" + }, + "http_response_header_for_traceid": { + "type": "string" + }, + "logs_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "propagation": { + "default": { + "default_format": "w3c" + }, + "properties": { + "clear": { + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "default_format": { + "default": "w3c", + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "extract": { + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "items": { + "enum": [ + "aws", + "b3", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "w3c" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "inject": { + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "items": { + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "queue": { + "default": { + "max_batch_size": 200 + }, + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 200, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "resource_attributes": { + "additionalProperties": true, + "type": "object" + }, + "sampling_rate": { + "description": "Tracing sampling rate for configuring the probability-based sampler. When set, this value supersedes the global `tracing_sampling_rate` setting from kong.conf.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "sampling_strategy": { + "default": "parent_drop_probability_fallback", + "description": "The sampling strategy to use for OTLP `traces`. Set `parent_drop_probability_fallback` if you want parent-based sampling when the parent span contains a `false` sampled flag, and fallback to probability-based sampling otherwise. Set `parent_probability_fallback` if you want parent-based sampling when the parent span contains a valid sampled flag (`true` or `false`), and fallback to probability-based sampling otherwise.", + "enum": [ + "parent_drop_probability_fallback", + "parent_probability_fallback" + ], + "type": "string" + }, + "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "traces_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/opentelemetry/3.4.json b/json_schemas/opentelemetry/3.4.json new file mode 100644 index 00000000..daa22a9d --- /dev/null +++ b/json_schemas/opentelemetry/3.4.json @@ -0,0 +1,191 @@ +{ + "properties": { + "config": { + "properties": { + "batch_flush_delay": { + "description": "The delay, in seconds, between two consecutive batches.", + "type": "integer" + }, + "batch_span_count": { + "description": "The number of spans to be sent in a single batch.", + "type": "integer" + }, + "connect_timeout": { + "default": 1000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_type": { + "default": "preserve", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "ignore", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "type": "string" + }, + "headers": { + "additionalProperties": true, + "description": "The custom headers to be added in the HTTP request sent to the OTLP server. This setting is useful for adding the authentication headers (token) for the APM backend.", + "type": "object" + }, + "http_response_header_for_traceid": { + "type": "string" + }, + "queue": { + "default": { + "max_batch_size": 200 + }, + "properties": { + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "resource_attributes": { + "additionalProperties": true, + "type": "object" + }, + "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "endpoint" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/opentelemetry/3.7.json b/json_schemas/opentelemetry/3.7.json new file mode 100644 index 00000000..12c5038e --- /dev/null +++ b/json_schemas/opentelemetry/3.7.json @@ -0,0 +1,273 @@ +{ + "properties": { + "config": { + "properties": { + "batch_flush_delay": { + "description": "The delay, in seconds, between two consecutive batches.", + "type": "integer" + }, + "batch_span_count": { + "description": "The number of spans to be sent in a single batch.", + "type": "integer" + }, + "connect_timeout": { + "default": 1000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "header_type": { + "default": "preserve", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "ignore", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "type": "string" + }, + "headers": { + "additionalProperties": true, + "description": "The custom headers to be added in the HTTP request sent to the OTLP server. This setting is useful for adding the authentication headers (token) for the APM backend.", + "type": "object" + }, + "http_response_header_for_traceid": { + "type": "string" + }, + "propagation": { + "default": { + "default_format": "w3c" + }, + "properties": { + "clear": { + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "default_format": { + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "extract": { + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "items": { + "enum": [ + "aws", + "b3", + "datadog", + "gcp", + "jaeger", + "ot", + "w3c" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "inject": { + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "items": { + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "default_format" + ], + "type": "object" + }, + "queue": { + "default": { + "max_batch_size": 200 + }, + "properties": { + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "resource_attributes": { + "additionalProperties": true, + "type": "object" + }, + "sampling_rate": { + "description": "Tracing sampling rate for configuring the probability-based sampler. When set, this value supersedes the global `tracing_sampling_rate` setting from kong.conf.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "endpoint" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/opentelemetry/3.8.json b/json_schemas/opentelemetry/3.8.json new file mode 100644 index 00000000..fae04180 --- /dev/null +++ b/json_schemas/opentelemetry/3.8.json @@ -0,0 +1,292 @@ +{ + "properties": { + "config": { + "properties": { + "batch_flush_delay": { + "description": "The delay, in seconds, between two consecutive batches.", + "type": "integer" + }, + "batch_span_count": { + "description": "The number of spans to be sent in a single batch.", + "type": "integer" + }, + "connect_timeout": { + "default": 1000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "header_type": { + "default": "preserve", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "ignore", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "type": "string" + }, + "headers": { + "additionalProperties": true, + "description": "The custom headers to be added in the HTTP request sent to the OTLP server. This setting is useful for adding the authentication headers (token) for the APM backend.", + "type": "object" + }, + "http_response_header_for_traceid": { + "type": "string" + }, + "logs_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "propagation": { + "default": { + "default_format": "w3c" + }, + "properties": { + "clear": { + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "default_format": { + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "extract": { + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "items": { + "enum": [ + "aws", + "b3", + "datadog", + "gcp", + "jaeger", + "ot", + "w3c" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "inject": { + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "items": { + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "default_format" + ], + "type": "object" + }, + "queue": { + "default": { + "max_batch_size": 200 + }, + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "resource_attributes": { + "additionalProperties": true, + "type": "object" + }, + "sampling_rate": { + "description": "Tracing sampling rate for configuring the probability-based sampler. When set, this value supersedes the global `tracing_sampling_rate` setting from kong.conf.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "traces_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/opentelemetry/3.9.json b/json_schemas/opentelemetry/3.9.json new file mode 100644 index 00000000..fae04180 --- /dev/null +++ b/json_schemas/opentelemetry/3.9.json @@ -0,0 +1,292 @@ +{ + "properties": { + "config": { + "properties": { + "batch_flush_delay": { + "description": "The delay, in seconds, between two consecutive batches.", + "type": "integer" + }, + "batch_span_count": { + "description": "The number of spans to be sent in a single batch.", + "type": "integer" + }, + "connect_timeout": { + "default": 1000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "header_type": { + "default": "preserve", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "ignore", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "type": "string" + }, + "headers": { + "additionalProperties": true, + "description": "The custom headers to be added in the HTTP request sent to the OTLP server. This setting is useful for adding the authentication headers (token) for the APM backend.", + "type": "object" + }, + "http_response_header_for_traceid": { + "type": "string" + }, + "logs_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "propagation": { + "default": { + "default_format": "w3c" + }, + "properties": { + "clear": { + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "default_format": { + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "extract": { + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "items": { + "enum": [ + "aws", + "b3", + "datadog", + "gcp", + "jaeger", + "ot", + "w3c" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "inject": { + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "items": { + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "default_format" + ], + "type": "object" + }, + "queue": { + "default": { + "max_batch_size": 200 + }, + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "resource_attributes": { + "additionalProperties": true, + "type": "object" + }, + "sampling_rate": { + "description": "Tracing sampling rate for configuring the probability-based sampler. When set, this value supersedes the global `tracing_sampling_rate` setting from kong.conf.", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "traces_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/post-function/2.8.json b/json_schemas/post-function/2.8.json new file mode 100644 index 00000000..32d562e7 --- /dev/null +++ b/json_schemas/post-function/2.8.json @@ -0,0 +1,138 @@ +{ + "properties": { + "config": { + "properties": { + "access": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "body_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "certificate": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "functions": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "log": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rewrite": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/post-function/3.10.json b/json_schemas/post-function/3.10.json new file mode 100644 index 00000000..fda803ac --- /dev/null +++ b/json_schemas/post-function/3.10.json @@ -0,0 +1,190 @@ +{ + "properties": { + "config": { + "properties": { + "access": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "body_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "certificate": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "log": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rewrite": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_client_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_close": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_handshake": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_upstream_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/post-function/3.11.json b/json_schemas/post-function/3.11.json new file mode 100644 index 00000000..33806f8a --- /dev/null +++ b/json_schemas/post-function/3.11.json @@ -0,0 +1,140 @@ +{ + "properties": { + "config": { + "properties": { + "access": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "body_filter": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "certificate": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "header_filter": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "log": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "rewrite": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ws_client_frame": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ws_close": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ws_handshake": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ws_upstream_frame": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/post-function/3.12.json b/json_schemas/post-function/3.12.json new file mode 100644 index 00000000..33806f8a --- /dev/null +++ b/json_schemas/post-function/3.12.json @@ -0,0 +1,140 @@ +{ + "properties": { + "config": { + "properties": { + "access": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "body_filter": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "certificate": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "header_filter": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "log": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "rewrite": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ws_client_frame": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ws_close": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ws_handshake": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ws_upstream_frame": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/post-function/3.4.json b/json_schemas/post-function/3.4.json new file mode 100644 index 00000000..fda803ac --- /dev/null +++ b/json_schemas/post-function/3.4.json @@ -0,0 +1,190 @@ +{ + "properties": { + "config": { + "properties": { + "access": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "body_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "certificate": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "log": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rewrite": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_client_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_close": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_handshake": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_upstream_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/post-function/3.7.json b/json_schemas/post-function/3.7.json new file mode 100644 index 00000000..fda803ac --- /dev/null +++ b/json_schemas/post-function/3.7.json @@ -0,0 +1,190 @@ +{ + "properties": { + "config": { + "properties": { + "access": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "body_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "certificate": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "log": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rewrite": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_client_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_close": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_handshake": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_upstream_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/post-function/3.8.json b/json_schemas/post-function/3.8.json new file mode 100644 index 00000000..fda803ac --- /dev/null +++ b/json_schemas/post-function/3.8.json @@ -0,0 +1,190 @@ +{ + "properties": { + "config": { + "properties": { + "access": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "body_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "certificate": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "log": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rewrite": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_client_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_close": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_handshake": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_upstream_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/post-function/3.9.json b/json_schemas/post-function/3.9.json new file mode 100644 index 00000000..fda803ac --- /dev/null +++ b/json_schemas/post-function/3.9.json @@ -0,0 +1,190 @@ +{ + "properties": { + "config": { + "properties": { + "access": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "body_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "certificate": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "log": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rewrite": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_client_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_close": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_handshake": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_upstream_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/pre-function/2.8.json b/json_schemas/pre-function/2.8.json new file mode 100644 index 00000000..0f10f85b --- /dev/null +++ b/json_schemas/pre-function/2.8.json @@ -0,0 +1,145 @@ +{ + "properties": { + "config": { + "properties": { + "access": { + "default": [ + + ], + "description": "Array of stringified Lua code to be cached and run in sequence during the access phase.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "body_filter": { + "default": [ + + ], + "description": "Array of stringified Lua code to be cached and run in sequence during the body_filter phase.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "certificate": { + "default": [ + + ], + "description": "Array of stringified Lua code to be cached and run in sequence during the certificate phase.\n\n*Note*: This only runs on global plugins.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "functions": { + "default": [ + + ], + "description": "*Deprecated*. Use `config.access` instead.\n\nArray of stringified Lua code to be cached and run in sequence during access phase.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_filter": { + "default": [ + + ], + "description": "Array of stringified Lua code to be cached and run in sequence during the header_filter phase.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "log": { + "default": [ + + ], + "description": "Array of stringified Lua code to be cached and run in sequence during the log phase.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rewrite": { + "default": [ + + ], + "description": "Array of stringified Lua code to be cached and run in sequence during the rewrite phase.\n\n *Note*: This only runs on global plugins.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/pre-function/3.10.json b/json_schemas/pre-function/3.10.json new file mode 100644 index 00000000..fda803ac --- /dev/null +++ b/json_schemas/pre-function/3.10.json @@ -0,0 +1,190 @@ +{ + "properties": { + "config": { + "properties": { + "access": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "body_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "certificate": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "log": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rewrite": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_client_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_close": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_handshake": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_upstream_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/pre-function/3.11.json b/json_schemas/pre-function/3.11.json new file mode 100644 index 00000000..33806f8a --- /dev/null +++ b/json_schemas/pre-function/3.11.json @@ -0,0 +1,140 @@ +{ + "properties": { + "config": { + "properties": { + "access": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "body_filter": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "certificate": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "header_filter": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "log": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "rewrite": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ws_client_frame": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ws_close": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ws_handshake": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ws_upstream_frame": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/pre-function/3.12.json b/json_schemas/pre-function/3.12.json new file mode 100644 index 00000000..33806f8a --- /dev/null +++ b/json_schemas/pre-function/3.12.json @@ -0,0 +1,140 @@ +{ + "properties": { + "config": { + "properties": { + "access": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "body_filter": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "certificate": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "header_filter": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "log": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "rewrite": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ws_client_frame": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ws_close": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ws_handshake": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ws_upstream_frame": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/pre-function/3.4.json b/json_schemas/pre-function/3.4.json new file mode 100644 index 00000000..fda803ac --- /dev/null +++ b/json_schemas/pre-function/3.4.json @@ -0,0 +1,190 @@ +{ + "properties": { + "config": { + "properties": { + "access": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "body_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "certificate": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "log": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rewrite": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_client_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_close": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_handshake": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_upstream_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/pre-function/3.7.json b/json_schemas/pre-function/3.7.json new file mode 100644 index 00000000..fda803ac --- /dev/null +++ b/json_schemas/pre-function/3.7.json @@ -0,0 +1,190 @@ +{ + "properties": { + "config": { + "properties": { + "access": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "body_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "certificate": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "log": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rewrite": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_client_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_close": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_handshake": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_upstream_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/pre-function/3.8.json b/json_schemas/pre-function/3.8.json new file mode 100644 index 00000000..fda803ac --- /dev/null +++ b/json_schemas/pre-function/3.8.json @@ -0,0 +1,190 @@ +{ + "properties": { + "config": { + "properties": { + "access": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "body_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "certificate": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "log": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rewrite": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_client_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_close": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_handshake": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_upstream_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/pre-function/3.9.json b/json_schemas/pre-function/3.9.json new file mode 100644 index 00000000..fda803ac --- /dev/null +++ b/json_schemas/pre-function/3.9.json @@ -0,0 +1,190 @@ +{ + "properties": { + "config": { + "properties": { + "access": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "body_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "certificate": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "header_filter": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "log": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rewrite": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_client_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_close": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_handshake": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ws_upstream_frame": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/prometheus/2.8.json b/json_schemas/prometheus/2.8.json new file mode 100644 index 00000000..a8d5e6e7 --- /dev/null +++ b/json_schemas/prometheus/2.8.json @@ -0,0 +1,75 @@ +{ + "properties": { + "config": { + "properties": { + "per_consumer": { + "default": false, + "description": "A boolean value that determines if per-consumer metrics should be\ncollected.\nIf enabled, the `kong_http_requests_total` and `kong_bandwidth_bytes`\nmetrics fill in the consumer label when available.", + "examples": [ + false + ], + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/prometheus/3.10.json b/json_schemas/prometheus/3.10.json new file mode 100644 index 00000000..f9e0b0b9 --- /dev/null +++ b/json_schemas/prometheus/3.10.json @@ -0,0 +1,118 @@ +{ + "properties": { + "config": { + "properties": { + "ai_metrics": { + "default": false, + "description": "A boolean value that determines if ai metrics should be collected. If enabled, the `ai_llm_requests_total`, `ai_llm_cost_total` and `ai_llm_tokens_total` metrics will be exported.", + "type": "boolean" + }, + "bandwidth_metrics": { + "default": false, + "description": "A boolean value that determines if bandwidth metrics should be collected. If enabled, `bandwidth_bytes` and `stream_sessions_total` metrics will be exported.", + "type": "boolean" + }, + "latency_metrics": { + "default": false, + "description": "A boolean value that determines if latency metrics should be collected. If enabled, `kong_latency_ms`, `upstream_latency_ms` and `request_latency_ms` metrics will be exported.", + "type": "boolean" + }, + "per_consumer": { + "default": false, + "description": "A boolean value that determines if per-consumer metrics should be collected. If enabled, the `kong_http_requests_total` and `kong_bandwidth_bytes` metrics fill in the consumer label when available.", + "type": "boolean" + }, + "status_code_metrics": { + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `http_requests_total`, `stream_sessions_total` metrics will be exported.", + "type": "boolean" + }, + "upstream_health_metrics": { + "default": false, + "description": "A boolean value that determines if upstream metrics should be collected. If enabled, `upstream_target_health` metric will be exported.", + "type": "boolean" + }, + "wasm_metrics": { + "default": false, + "description": "A boolean value that determines if Wasm metrics should be collected.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/prometheus/3.11.json b/json_schemas/prometheus/3.11.json new file mode 100644 index 00000000..f7c5b17b --- /dev/null +++ b/json_schemas/prometheus/3.11.json @@ -0,0 +1,106 @@ +{ + "properties": { + "config": { + "properties": { + "ai_metrics": { + "default": false, + "description": "A boolean value that determines if ai metrics should be collected. If enabled, the `ai_llm_requests_total`, `ai_llm_cost_total` and `ai_llm_tokens_total` metrics will be exported.", + "type": "boolean" + }, + "bandwidth_metrics": { + "default": false, + "description": "A boolean value that determines if bandwidth metrics should be collected. If enabled, `bandwidth_bytes` and `stream_sessions_total` metrics will be exported.", + "type": "boolean" + }, + "latency_metrics": { + "default": false, + "description": "A boolean value that determines if latency metrics should be collected. If enabled, `kong_latency_ms`, `upstream_latency_ms` and `request_latency_ms` metrics will be exported.", + "type": "boolean" + }, + "per_consumer": { + "default": false, + "description": "A boolean value that determines if per-consumer metrics should be collected. If enabled, the `kong_http_requests_total` and `kong_bandwidth_bytes` metrics fill in the consumer label when available.", + "type": "boolean" + }, + "status_code_metrics": { + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `http_requests_total`, `stream_sessions_total` metrics will be exported.", + "type": "boolean" + }, + "upstream_health_metrics": { + "default": false, + "description": "A boolean value that determines if upstream metrics should be collected. If enabled, `upstream_target_health` metric will be exported.", + "type": "boolean" + }, + "wasm_metrics": { + "default": false, + "description": "A boolean value that determines if Wasm metrics should be collected.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/prometheus/3.12.json b/json_schemas/prometheus/3.12.json new file mode 100644 index 00000000..abe4a286 --- /dev/null +++ b/json_schemas/prometheus/3.12.json @@ -0,0 +1,104 @@ +{ + "properties": { + "config": { + "properties": { + "ai_metrics": { + "default": false, + "description": "A boolean value that determines if ai metrics should be collected. If enabled, the `ai_llm_requests_total`, `ai_llm_cost_total` and `ai_llm_tokens_total` metrics will be exported.", + "type": "boolean" + }, + "bandwidth_metrics": { + "default": false, + "description": "A boolean value that determines if bandwidth metrics should be collected. If enabled, `bandwidth_bytes` and `stream_sessions_total` metrics will be exported.", + "type": "boolean" + }, + "latency_metrics": { + "default": false, + "description": "A boolean value that determines if latency metrics should be collected. If enabled, `kong_latency_ms`, `upstream_latency_ms` and `request_latency_ms` metrics will be exported.", + "type": "boolean" + }, + "per_consumer": { + "default": false, + "description": "A boolean value that determines if per-consumer metrics should be collected. If enabled, the `kong_http_requests_total` and `kong_bandwidth_bytes` metrics fill in the consumer label when available.", + "type": "boolean" + }, + "status_code_metrics": { + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `http_requests_total`, `stream_sessions_total` metrics will be exported.", + "type": "boolean" + }, + "upstream_health_metrics": { + "default": false, + "description": "A boolean value that determines if upstream metrics should be collected. If enabled, `upstream_target_health` metric will be exported.", + "type": "boolean" + }, + "wasm_metrics": { + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/prometheus/3.4.json b/json_schemas/prometheus/3.4.json new file mode 100644 index 00000000..81dcebfe --- /dev/null +++ b/json_schemas/prometheus/3.4.json @@ -0,0 +1,108 @@ +{ + "properties": { + "config": { + "properties": { + "bandwidth_metrics": { + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `bandwidth_bytes` and `stream_sessions_total` metrics will be exported.", + "type": "boolean" + }, + "latency_metrics": { + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `kong_latency_ms`, `upstream_latency_ms` and `request_latency_ms` metrics will be exported.", + "type": "boolean" + }, + "per_consumer": { + "default": false, + "description": "A boolean value that determines if per-consumer metrics should be collected. If enabled, the `kong_http_requests_total` and `kong_bandwidth_bytes` metrics fill in the consumer label when available.", + "type": "boolean" + }, + "status_code_metrics": { + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `http_requests_total`, `stream_sessions_total` metrics will be exported.", + "type": "boolean" + }, + "upstream_health_metrics": { + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `upstream_target_health` metric will be exported.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/prometheus/3.7.json b/json_schemas/prometheus/3.7.json new file mode 100644 index 00000000..543bef23 --- /dev/null +++ b/json_schemas/prometheus/3.7.json @@ -0,0 +1,108 @@ +{ + "properties": { + "config": { + "properties": { + "bandwidth_metrics": { + "default": false, + "description": "A boolean value that determines if bandwidth metrics should be collected. If enabled, `bandwidth_bytes` and `stream_sessions_total` metrics will be exported.", + "type": "boolean" + }, + "latency_metrics": { + "default": false, + "description": "A boolean value that determines if latency metrics should be collected. If enabled, `kong_latency_ms`, `upstream_latency_ms` and `request_latency_ms` metrics will be exported.", + "type": "boolean" + }, + "per_consumer": { + "default": false, + "description": "A boolean value that determines if per-consumer metrics should be collected. If enabled, the `kong_http_requests_total` and `kong_bandwidth_bytes` metrics fill in the consumer label when available.", + "type": "boolean" + }, + "status_code_metrics": { + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `http_requests_total`, `stream_sessions_total` metrics will be exported.", + "type": "boolean" + }, + "upstream_health_metrics": { + "default": false, + "description": "A boolean value that determines if upstream metrics should be collected. If enabled, `upstream_target_health` metric will be exported.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/prometheus/3.8.json b/json_schemas/prometheus/3.8.json new file mode 100644 index 00000000..c2bc326c --- /dev/null +++ b/json_schemas/prometheus/3.8.json @@ -0,0 +1,113 @@ +{ + "properties": { + "config": { + "properties": { + "ai_metrics": { + "default": false, + "description": "A boolean value that determines if ai metrics should be collected. If enabled, the `ai_llm_requests_total`, `ai_llm_cost_total` and `ai_llm_tokens_total` metrics will be exported.", + "type": "boolean" + }, + "bandwidth_metrics": { + "default": false, + "description": "A boolean value that determines if bandwidth metrics should be collected. If enabled, `bandwidth_bytes` and `stream_sessions_total` metrics will be exported.", + "type": "boolean" + }, + "latency_metrics": { + "default": false, + "description": "A boolean value that determines if latency metrics should be collected. If enabled, `kong_latency_ms`, `upstream_latency_ms` and `request_latency_ms` metrics will be exported.", + "type": "boolean" + }, + "per_consumer": { + "default": false, + "description": "A boolean value that determines if per-consumer metrics should be collected. If enabled, the `kong_http_requests_total` and `kong_bandwidth_bytes` metrics fill in the consumer label when available.", + "type": "boolean" + }, + "status_code_metrics": { + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `http_requests_total`, `stream_sessions_total` metrics will be exported.", + "type": "boolean" + }, + "upstream_health_metrics": { + "default": false, + "description": "A boolean value that determines if upstream metrics should be collected. If enabled, `upstream_target_health` metric will be exported.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/prometheus/3.9.json b/json_schemas/prometheus/3.9.json new file mode 100644 index 00000000..c2bc326c --- /dev/null +++ b/json_schemas/prometheus/3.9.json @@ -0,0 +1,113 @@ +{ + "properties": { + "config": { + "properties": { + "ai_metrics": { + "default": false, + "description": "A boolean value that determines if ai metrics should be collected. If enabled, the `ai_llm_requests_total`, `ai_llm_cost_total` and `ai_llm_tokens_total` metrics will be exported.", + "type": "boolean" + }, + "bandwidth_metrics": { + "default": false, + "description": "A boolean value that determines if bandwidth metrics should be collected. If enabled, `bandwidth_bytes` and `stream_sessions_total` metrics will be exported.", + "type": "boolean" + }, + "latency_metrics": { + "default": false, + "description": "A boolean value that determines if latency metrics should be collected. If enabled, `kong_latency_ms`, `upstream_latency_ms` and `request_latency_ms` metrics will be exported.", + "type": "boolean" + }, + "per_consumer": { + "default": false, + "description": "A boolean value that determines if per-consumer metrics should be collected. If enabled, the `kong_http_requests_total` and `kong_bandwidth_bytes` metrics fill in the consumer label when available.", + "type": "boolean" + }, + "status_code_metrics": { + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `http_requests_total`, `stream_sessions_total` metrics will be exported.", + "type": "boolean" + }, + "upstream_health_metrics": { + "default": false, + "description": "A boolean value that determines if upstream metrics should be collected. If enabled, `upstream_target_health` metric will be exported.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/proxy-cache-advanced/2.8.json b/json_schemas/proxy-cache-advanced/2.8.json new file mode 100644 index 00000000..b84df8f1 --- /dev/null +++ b/json_schemas/proxy-cache-advanced/2.8.json @@ -0,0 +1,323 @@ +{ + "properties": { + "config": { + "properties": { + "bypass_on_err": { + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean" + }, + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in [RFC7234](https://tools.ietf.org/html/rfc7234#section-5.2).", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities.", + "minimum": 0, + "type": "integer" + }, + "content_type": { + "default": [ + "application/json", + "text/plain" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value; for example, if the upstream is expected to respond with a `application/json; charset=utf-8` content-type, the plugin configuration must contain said value or a `Bypass` cache status is returned.", + "examples": [ + [ + "application/json", + "text/plain" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "cluster_addresses": { + "description": "Cluster addresses to use for Redis connection when the `redis` strategy is defined.\nDefining this value implies using Redis cluster. Each string element must\nbe a hostname. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "database": { + "default": 0, + "description": "Database to use for Redis connection when the `redis` strategy is defined.", + "type": "integer" + }, + "host": { + "description": "Host to use for Redis connection when the redis strategy is defined.", + "type": "string" + }, + "keepalive_backlog": { + "description": "If specified, limits the total number of opened connections for a pool. If the\nconnection pool is full, all connection queues beyond the maximum limit go into\nthe backlog queue. Once the backlog queue is full, subsequent connect operations\nwill fail and return `nil`. Queued connect operations resume once the number of\nconnections in the pool is less than `keepalive_pool_size`. Note that queued\nconnect operations are subject to set timeouts.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 30, + "description": "The size limit for every cosocket connection pool associated with every remote\nserver, per worker process. If no `keepalive_pool_size` is specified and no `keepalive_backlog`\nis specified, no pool is created. If no `keepalive_pool_size` is specified and `keepalive_backlog`\nis specified, then the pool uses the default value `30`.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connection when the `redis` strategy is defined.\nIf undefined, no AUTH commands are sent to Redis.", + "type": "string" + }, + "port": { + "description": "Port to use for Redis connections when the `redis` strategy is defined. Must be a\nvalue between 0 and 65535. Default: 6379.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_addresses": { + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined.\nDefining this value implies using Redis Sentinel. Each string element must\nbe a hostname. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connection when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance.\nIf undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value\nimplies using Redis Sentinel. Available options: `master`, `slave`, `any`.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance.\nIf undefined, ACL authentication will not be performed. This requires Redis v6.2.0+.", + "type": "string" + }, + "server_name": { + "description": "Specifies the server name for the new TLS extension Server Name Indication (SNI) when connecting over SSL.\n**Note:** This parameter is only available for Kong Gateway versions\n2.2.x and later.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to `true`, then uses SSL to connect to Redis.\n**Note:** This parameter is only available for Kong Gateway versions\n2.2.x and later.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to `true`, then verifies the validity of the server SSL certificate. Note that you need to configure the\n[lua_ssl_trusted_certificate](/gateway/latest/reference/configuration/#lua_ssl_trusted_certificate)\nto specify the CA (or server) certificate used by your Redis server. You may also need to configure\n[lua_ssl_verify_depth](/gateway/latest/reference/configuration/#lua_ssl_verify_depth) accordingly.\n**Note:** This parameter is only available for Kong Gateway versions\n2.2.x and later.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "Connection timeout to use for Redis connection when the `redis` strategy is defined.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "request_method": { + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable. Available options: `HEAD`, `GET`, `POST`, `PATCH`, `PUT`.", + "examples": [ + [ + "GET", + "HEAD" + ] + ], + "items": { + "enum": [ + "GET", + "HEAD", + "PATCH", + "POST", + "PUT" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_code": { + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable. The integers must be a value\nbetween 100 and 900.", + "examples": [ + [ + 200 + ] + ], + "items": { + "maximum": 900, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "minLength": 1, + "type": "array" + }, + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent\nof `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + }, + "strategy": { + "description": "The backing data store in which to hold cache entities. Accepted values are: `memory` and `redis`.", + "enum": [ + "memory", + "redis" + ], + "examples": [ + "memory" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/proxy-cache-advanced/3.10.json b/json_schemas/proxy-cache-advanced/3.10.json new file mode 100644 index 00000000..ebd27651 --- /dev/null +++ b/json_schemas/proxy-cache-advanced/3.10.json @@ -0,0 +1,410 @@ +{ + "properties": { + "config": { + "properties": { + "bypass_on_err": { + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean" + }, + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities.", + "minimum": 0, + "type": "integer" + }, + "content_type": { + "default": [ + "application/json", + "text/plain" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value; for example, if the upstream is expected to respond with a `application/json; charset=utf-8` content-type, the plugin configuration must contain said value or a `Bypass` cache status is returned.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_uri_case": { + "default": false, + "description": "Determines whether to treat URIs as case sensitive. By default, case sensitivity is enabled. If set to true, requests are cached while ignoring case sensitivity in the URI.", + "type": "boolean" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "request_method": { + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable. Available options: `HEAD`, `GET`, `POST`, `PATCH`, `PUT`.", + "items": { + "enum": [ + "GET", + "HEAD", + "PATCH", + "POST", + "PUT" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_code": { + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable. The integers must be a value between 100 and 900.", + "items": { + "maximum": 900, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "minLength": 1, + "type": "array" + }, + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "properties": { + "X-Cache-Key": { + "default": true, + "type": "boolean" + }, + "X-Cache-Status": { + "default": true, + "type": "boolean" + }, + "age": { + "default": true, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + }, + "strategy": { + "description": "The backing data store in which to hold cache entities. Accepted values are: `memory` and `redis`.", + "enum": [ + "memory", + "redis" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration. By default, the max number of params accepted is 100. You can change this value via the `lua_max_post_args` in `kong.conf`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "strategy" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/proxy-cache-advanced/3.11.json b/json_schemas/proxy-cache-advanced/3.11.json new file mode 100644 index 00000000..8bd5e5de --- /dev/null +++ b/json_schemas/proxy-cache-advanced/3.11.json @@ -0,0 +1,380 @@ +{ + "properties": { + "config": { + "properties": { + "bypass_on_err": { + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean" + }, + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities.", + "minimum": 0, + "type": "integer" + }, + "content_type": { + "default": [ + "application/json", + "text/plain" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value; for example, if the upstream is expected to respond with a `application/json; charset=utf-8` content-type, the plugin configuration must contain said value or a `Bypass` cache status is returned.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ignore_uri_case": { + "default": false, + "description": "Determines whether to treat URIs as case sensitive. By default, case sensitivity is enabled. If set to true, requests are cached while ignoring case sensitivity in the URI.", + "type": "boolean" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "request_method": { + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable. Available options: `HEAD`, `GET`, `POST`, `PATCH`, `PUT`.", + "items": { + "enum": [ + "GET", + "HEAD", + "PATCH", + "POST", + "PUT" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "response_code": { + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable. The integers must be a value between 100 and 900.", + "items": { + "maximum": 900, + "minimum": 100, + "required": [], + "type": "integer" + }, + "minLength": 1, + "type": "array" + }, + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "properties": { + "X-Cache-Key": { + "default": true, + "type": "boolean" + }, + "X-Cache-Status": { + "default": true, + "type": "boolean" + }, + "age": { + "default": true, + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + }, + "strategy": { + "description": "The backing data store in which to hold cache entities. Accepted values are: `memory` and `redis`.", + "enum": [ + "memory", + "redis" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration. By default, the max number of params accepted is 100. You can change this value via the `lua_max_post_args` in `kong.conf`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "strategy" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/proxy-cache-advanced/3.12.json b/json_schemas/proxy-cache-advanced/3.12.json new file mode 100644 index 00000000..8bd5e5de --- /dev/null +++ b/json_schemas/proxy-cache-advanced/3.12.json @@ -0,0 +1,380 @@ +{ + "properties": { + "config": { + "properties": { + "bypass_on_err": { + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean" + }, + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities.", + "minimum": 0, + "type": "integer" + }, + "content_type": { + "default": [ + "application/json", + "text/plain" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value; for example, if the upstream is expected to respond with a `application/json; charset=utf-8` content-type, the plugin configuration must contain said value or a `Bypass` cache status is returned.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ignore_uri_case": { + "default": false, + "description": "Determines whether to treat URIs as case sensitive. By default, case sensitivity is enabled. If set to true, requests are cached while ignoring case sensitivity in the URI.", + "type": "boolean" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "request_method": { + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable. Available options: `HEAD`, `GET`, `POST`, `PATCH`, `PUT`.", + "items": { + "enum": [ + "GET", + "HEAD", + "PATCH", + "POST", + "PUT" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "response_code": { + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable. The integers must be a value between 100 and 900.", + "items": { + "maximum": 900, + "minimum": 100, + "required": [], + "type": "integer" + }, + "minLength": 1, + "type": "array" + }, + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "properties": { + "X-Cache-Key": { + "default": true, + "type": "boolean" + }, + "X-Cache-Status": { + "default": true, + "type": "boolean" + }, + "age": { + "default": true, + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + }, + "strategy": { + "description": "The backing data store in which to hold cache entities. Accepted values are: `memory` and `redis`.", + "enum": [ + "memory", + "redis" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration. By default, the max number of params accepted is 100. You can change this value via the `lua_max_post_args` in `kong.conf`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "strategy" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/proxy-cache-advanced/3.4.json b/json_schemas/proxy-cache-advanced/3.4.json new file mode 100644 index 00000000..1411156c --- /dev/null +++ b/json_schemas/proxy-cache-advanced/3.4.json @@ -0,0 +1,321 @@ +{ + "properties": { + "config": { + "properties": { + "bypass_on_err": { + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean" + }, + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities.", + "minimum": 0, + "type": "integer" + }, + "content_type": { + "default": [ + "application/json", + "text/plain" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value; for example, if the upstream is expected to respond with a `application/json; charset=utf-8` content-type, the plugin configuration must contain said value or a `Bypass` cache status is returned.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_uri_case": { + "default": false, + "description": "Determines whether to treat URIs as case sensitive. By default, case sensitivity is enabled. If set to true, requests are cached while ignoring case sensitivity in the URI.", + "type": "boolean" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "cluster_addresses": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 30, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_addresses": { + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "request_method": { + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable. Available options: `HEAD`, `GET`, `POST`, `PATCH`, `PUT`.", + "items": { + "enum": [ + "GET", + "HEAD", + "PATCH", + "POST", + "PUT" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_code": { + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable. The integers must be a value between 100 and 900.", + "items": { + "maximum": 900, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "minLength": 1, + "type": "array" + }, + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + }, + "strategy": { + "description": "The backing data store in which to hold cache entities. Accepted values are: `memory` and `redis`.", + "enum": [ + "memory", + "redis" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "strategy" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/proxy-cache-advanced/3.7.json b/json_schemas/proxy-cache-advanced/3.7.json new file mode 100644 index 00000000..7375c7c0 --- /dev/null +++ b/json_schemas/proxy-cache-advanced/3.7.json @@ -0,0 +1,355 @@ +{ + "properties": { + "config": { + "properties": { + "bypass_on_err": { + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean" + }, + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities.", + "minimum": 0, + "type": "integer" + }, + "content_type": { + "default": [ + "application/json", + "text/plain" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value; for example, if the upstream is expected to respond with a `application/json; charset=utf-8` content-type, the plugin configuration must contain said value or a `Bypass` cache status is returned.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_uri_case": { + "default": false, + "description": "Determines whether to treat URIs as case sensitive. By default, case sensitivity is enabled. If set to true, requests are cached while ignoring case sensitivity in the URI.", + "type": "boolean" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "cluster_addresses": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_addresses": { + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "request_method": { + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable. Available options: `HEAD`, `GET`, `POST`, `PATCH`, `PUT`.", + "items": { + "enum": [ + "GET", + "HEAD", + "PATCH", + "POST", + "PUT" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_code": { + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable. The integers must be a value between 100 and 900.", + "items": { + "maximum": 900, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "minLength": 1, + "type": "array" + }, + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "properties": { + "X-Cache-Key": { + "default": true, + "type": "boolean" + }, + "X-Cache-Status": { + "default": true, + "type": "boolean" + }, + "age": { + "default": true, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + }, + "strategy": { + "description": "The backing data store in which to hold cache entities. Accepted values are: `memory` and `redis`.", + "enum": [ + "memory", + "redis" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "strategy" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/proxy-cache-advanced/3.8.json b/json_schemas/proxy-cache-advanced/3.8.json new file mode 100644 index 00000000..8667f19e --- /dev/null +++ b/json_schemas/proxy-cache-advanced/3.8.json @@ -0,0 +1,411 @@ +{ + "properties": { + "config": { + "properties": { + "bypass_on_err": { + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean" + }, + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities.", + "minimum": 0, + "type": "integer" + }, + "content_type": { + "default": [ + "application/json", + "text/plain" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value; for example, if the upstream is expected to respond with a `application/json; charset=utf-8` content-type, the plugin configuration must contain said value or a `Bypass` cache status is returned.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_uri_case": { + "default": false, + "description": "Determines whether to treat URIs as case sensitive. By default, case sensitivity is enabled. If set to true, requests are cached while ignoring case sensitivity in the URI.", + "type": "boolean" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "translate_backwards": [ + "connect_timeout" + ], + "type": "integer" + } + }, + "type": "object" + }, + "request_method": { + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable. Available options: `HEAD`, `GET`, `POST`, `PATCH`, `PUT`.", + "items": { + "enum": [ + "GET", + "HEAD", + "PATCH", + "POST", + "PUT" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_code": { + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable. The integers must be a value between 100 and 900.", + "items": { + "maximum": 900, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "minLength": 1, + "type": "array" + }, + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "properties": { + "X-Cache-Key": { + "default": true, + "type": "boolean" + }, + "X-Cache-Status": { + "default": true, + "type": "boolean" + }, + "age": { + "default": true, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + }, + "strategy": { + "description": "The backing data store in which to hold cache entities. Accepted values are: `memory` and `redis`.", + "enum": [ + "memory", + "redis" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "strategy" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/proxy-cache-advanced/3.9.json b/json_schemas/proxy-cache-advanced/3.9.json new file mode 100644 index 00000000..c03ceb11 --- /dev/null +++ b/json_schemas/proxy-cache-advanced/3.9.json @@ -0,0 +1,410 @@ +{ + "properties": { + "config": { + "properties": { + "bypass_on_err": { + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean" + }, + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities.", + "minimum": 0, + "type": "integer" + }, + "content_type": { + "default": [ + "application/json", + "text/plain" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value; for example, if the upstream is expected to respond with a `application/json; charset=utf-8` content-type, the plugin configuration must contain said value or a `Bypass` cache status is returned.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_uri_case": { + "default": false, + "description": "Determines whether to treat URIs as case sensitive. By default, case sensitivity is enabled. If set to true, requests are cached while ignoring case sensitivity in the URI.", + "type": "boolean" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "request_method": { + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable. Available options: `HEAD`, `GET`, `POST`, `PATCH`, `PUT`.", + "items": { + "enum": [ + "GET", + "HEAD", + "PATCH", + "POST", + "PUT" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_code": { + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable. The integers must be a value between 100 and 900.", + "items": { + "maximum": 900, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "minLength": 1, + "type": "array" + }, + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "properties": { + "X-Cache-Key": { + "default": true, + "type": "boolean" + }, + "X-Cache-Status": { + "default": true, + "type": "boolean" + }, + "age": { + "default": true, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + }, + "strategy": { + "description": "The backing data store in which to hold cache entities. Accepted values are: `memory` and `redis`.", + "enum": [ + "memory", + "redis" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "strategy" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/proxy-cache/2.8.json b/json_schemas/proxy-cache/2.8.json new file mode 100644 index 00000000..08ffe21e --- /dev/null +++ b/json_schemas/proxy-cache/2.8.json @@ -0,0 +1,198 @@ +{ + "properties": { + "config": { + "properties": { + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in [RFC7234](https://tools.ietf.org/html/rfc7234#section-5.2).", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL, in seconds, of cache entities.", + "examples": [ + 300 + ], + "minimum": 0, + "type": "integer" + }, + "content_type": { + "default": [ + "application/json", + "text/plain" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value; for example, if the upstream is expected to respond with a `application/json; charset=utf-8` content-type, the plugin configuration must contain said value or a `Bypass` cache status is returned.", + "examples": [ + [ + "application/json", + "text/plain" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "request_method": { + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable.", + "examples": [ + [ + "GET", + "HEAD" + ] + ], + "items": { + "enum": [ + "GET", + "HEAD", + "PATCH", + "POST", + "PUT" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_code": { + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable.", + "examples": [ + [ + 200 + ] + ], + "items": { + "maximum": 900, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "minLength": 1, + "type": "array" + }, + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + }, + "strategy": { + "description": "The backing data store in which to hold cache entities. The only accepted value is `memory`.", + "enum": [ + "memory" + ], + "examples": [ + "memory" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/proxy-cache/3.10.json b/json_schemas/proxy-cache/3.10.json new file mode 100644 index 00000000..f8853330 --- /dev/null +++ b/json_schemas/proxy-cache/3.10.json @@ -0,0 +1,229 @@ +{ + "properties": { + "config": { + "properties": { + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL, in seconds, of cache entities.", + "minimum": 0, + "type": "integer" + }, + "content_type": { + "default": [ + "application/json", + "text/plain" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_uri_case": { + "default": false, + "type": "boolean" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "request_method": { + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable.", + "items": { + "enum": [ + "GET", + "HEAD", + "PATCH", + "POST", + "PUT" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_code": { + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable.", + "items": { + "maximum": 900, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "minLength": 1, + "type": "array" + }, + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "properties": { + "X-Cache-Key": { + "default": true, + "type": "boolean" + }, + "X-Cache-Status": { + "default": true, + "type": "boolean" + }, + "age": { + "default": true, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + }, + "strategy": { + "description": "The backing data store in which to hold cache entities.", + "enum": [ + "memory" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "strategy" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/proxy-cache/3.11.json b/json_schemas/proxy-cache/3.11.json new file mode 100644 index 00000000..67ed6902 --- /dev/null +++ b/json_schemas/proxy-cache/3.11.json @@ -0,0 +1,205 @@ +{ + "properties": { + "config": { + "properties": { + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL, in seconds, of cache entities.", + "minimum": 0, + "type": "integer" + }, + "content_type": { + "default": [ + "application/json", + "text/plain" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ignore_uri_case": { + "default": false, + "type": "boolean" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "request_method": { + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable.", + "items": { + "enum": [ + "GET", + "HEAD", + "PATCH", + "POST", + "PUT" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "response_code": { + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable.", + "items": { + "maximum": 900, + "minimum": 100, + "required": [], + "type": "integer" + }, + "minLength": 1, + "type": "array" + }, + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "properties": { + "X-Cache-Key": { + "default": true, + "type": "boolean" + }, + "X-Cache-Status": { + "default": true, + "type": "boolean" + }, + "age": { + "default": true, + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + }, + "strategy": { + "description": "The backing data store in which to hold cache entities.", + "enum": [ + "memory" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "strategy" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/proxy-cache/3.12.json b/json_schemas/proxy-cache/3.12.json new file mode 100644 index 00000000..67ed6902 --- /dev/null +++ b/json_schemas/proxy-cache/3.12.json @@ -0,0 +1,205 @@ +{ + "properties": { + "config": { + "properties": { + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL, in seconds, of cache entities.", + "minimum": 0, + "type": "integer" + }, + "content_type": { + "default": [ + "application/json", + "text/plain" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "ignore_uri_case": { + "default": false, + "type": "boolean" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "request_method": { + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable.", + "items": { + "enum": [ + "GET", + "HEAD", + "PATCH", + "POST", + "PUT" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "response_code": { + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable.", + "items": { + "maximum": 900, + "minimum": 100, + "required": [], + "type": "integer" + }, + "minLength": 1, + "type": "array" + }, + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "properties": { + "X-Cache-Key": { + "default": true, + "type": "boolean" + }, + "X-Cache-Status": { + "default": true, + "type": "boolean" + }, + "age": { + "default": true, + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + }, + "strategy": { + "description": "The backing data store in which to hold cache entities.", + "enum": [ + "memory" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "strategy" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/proxy-cache/3.4.json b/json_schemas/proxy-cache/3.4.json new file mode 100644 index 00000000..dc2e2d44 --- /dev/null +++ b/json_schemas/proxy-cache/3.4.json @@ -0,0 +1,195 @@ +{ + "properties": { + "config": { + "properties": { + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL, in seconds, of cache entities.", + "minimum": 0, + "type": "integer" + }, + "content_type": { + "default": [ + "application/json", + "text/plain" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_uri_case": { + "default": false, + "type": "boolean" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "request_method": { + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable.", + "items": { + "enum": [ + "GET", + "HEAD", + "PATCH", + "POST", + "PUT" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_code": { + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable.", + "items": { + "maximum": 900, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "minLength": 1, + "type": "array" + }, + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + }, + "strategy": { + "description": "The backing data store in which to hold cache entities.", + "enum": [ + "memory" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "strategy" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/proxy-cache/3.7.json b/json_schemas/proxy-cache/3.7.json new file mode 100644 index 00000000..f8853330 --- /dev/null +++ b/json_schemas/proxy-cache/3.7.json @@ -0,0 +1,229 @@ +{ + "properties": { + "config": { + "properties": { + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL, in seconds, of cache entities.", + "minimum": 0, + "type": "integer" + }, + "content_type": { + "default": [ + "application/json", + "text/plain" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_uri_case": { + "default": false, + "type": "boolean" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "request_method": { + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable.", + "items": { + "enum": [ + "GET", + "HEAD", + "PATCH", + "POST", + "PUT" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_code": { + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable.", + "items": { + "maximum": 900, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "minLength": 1, + "type": "array" + }, + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "properties": { + "X-Cache-Key": { + "default": true, + "type": "boolean" + }, + "X-Cache-Status": { + "default": true, + "type": "boolean" + }, + "age": { + "default": true, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + }, + "strategy": { + "description": "The backing data store in which to hold cache entities.", + "enum": [ + "memory" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "strategy" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/proxy-cache/3.8.json b/json_schemas/proxy-cache/3.8.json new file mode 100644 index 00000000..f8853330 --- /dev/null +++ b/json_schemas/proxy-cache/3.8.json @@ -0,0 +1,229 @@ +{ + "properties": { + "config": { + "properties": { + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL, in seconds, of cache entities.", + "minimum": 0, + "type": "integer" + }, + "content_type": { + "default": [ + "application/json", + "text/plain" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_uri_case": { + "default": false, + "type": "boolean" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "request_method": { + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable.", + "items": { + "enum": [ + "GET", + "HEAD", + "PATCH", + "POST", + "PUT" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_code": { + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable.", + "items": { + "maximum": 900, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "minLength": 1, + "type": "array" + }, + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "properties": { + "X-Cache-Key": { + "default": true, + "type": "boolean" + }, + "X-Cache-Status": { + "default": true, + "type": "boolean" + }, + "age": { + "default": true, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + }, + "strategy": { + "description": "The backing data store in which to hold cache entities.", + "enum": [ + "memory" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "strategy" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/proxy-cache/3.9.json b/json_schemas/proxy-cache/3.9.json new file mode 100644 index 00000000..f8853330 --- /dev/null +++ b/json_schemas/proxy-cache/3.9.json @@ -0,0 +1,229 @@ +{ + "properties": { + "config": { + "properties": { + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + }, + "cache_ttl": { + "default": 300, + "description": "TTL, in seconds, of cache entities.", + "minimum": 0, + "type": "integer" + }, + "content_type": { + "default": [ + "application/json", + "text/plain" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "ignore_uri_case": { + "default": false, + "type": "boolean" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "request_method": { + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable.", + "items": { + "enum": [ + "GET", + "HEAD", + "PATCH", + "POST", + "PUT" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_code": { + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable.", + "items": { + "maximum": 900, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "minLength": 1, + "type": "array" + }, + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "properties": { + "X-Cache-Key": { + "default": true, + "type": "boolean" + }, + "X-Cache-Status": { + "default": true, + "type": "boolean" + }, + "age": { + "default": true, + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + }, + "strategy": { + "description": "The backing data store in which to hold cache entities.", + "enum": [ + "memory" + ], + "type": "string" + }, + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "strategy" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/rate-limiting-advanced/2.8.json b/json_schemas/rate-limiting-advanced/2.8.json new file mode 100644 index 00000000..3fd6bff9 --- /dev/null +++ b/json_schemas/rate-limiting-advanced/2.8.json @@ -0,0 +1,324 @@ +{ + "properties": { + "config": { + "properties": { + "consumer_groups": { + "description": "List of consumer groups allowed to override the rate limiting\nsettings for the given Route or Service. Required if\n`enforce_consumer_groups` is set to `true`.\nFlipping `enforce_consumer_groups` from `true` to `false` disables the\ngroup override, but does not clear the list of consumer groups.\nYou can then flip `enforce_consumer_groups` to `true` to re-enforce the\ngroups.", + "examples": [ + [ + "group1", + "group2" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is\nconfigured to synchronize counter data externally (that is \n`config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't\n`-1`), this dictionary serves as a buffer to populate counters in the\ndata store on each synchronization cycle.", + "type": "string" + }, + "enforce_consumer_groups": { + "default": false, + "description": "Set to `true` to enable `consumer_groups`, which allows the settings\nfrom one of the allowed consumer groups to override the given plugin\nconfiguration.", + "examples": [ + true + ], + "type": "boolean" + }, + "header_name": { + "description": "Header name to use as the rate limit key when `config.identifier` is\nconfigured with the value `header`. Ignored when `config.identifier` is not `header`.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise\nprovide information about the current status of limits and counters as\ndescribed in the paragraph [Headers sent to the client](#headers-sent-to-the-client).\nAvailable options: `true` or `false`.", + "examples": [ + false + ], + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "The type of identifier used to generate the rate limit key.\nDefines the scope used to increment the rate limiting counters.\nCan be `ip`, `credential`, `consumer`, `service`, `header`, or `path`.", + "enum": [ + "consumer", + "credential", + "header", + "ip", + "path", + "service" + ], + "examples": [ + "consumer" + ], + "type": "string" + }, + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching\nnumber of window limits and sizes specified.", + "examples": [ + [ + 5 + ] + ], + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter\ndata and sync configuration is isolated in each namespace.\n{:.important}\n> **Important**: If managing Kong Gateway with **declarative configuration** or running\nKong Gateway in **DB-less mode**, set the `namespace` explicitly in your declarative configuration.\n>

\n> If not set, you will run into the following issues:\n* In DB-less mode, this field will be regenerated automatically on every configuration change.\n* If applying declarative configuration with decK, decK will automatically fail the update and require a \n`namespace` value.", + "examples": [ + "example_namespace" + ], + "type": "string" + }, + "path": { + "type": "string" + }, + "redis": { + "properties": { + "cluster_addresses": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined.\nDefining this value implies using Redis cluster. Each string element must\nconsist of a hostname (or IP address) and port. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "description": "Connection timeout to use for Redis connection when the `redis` strategy is defined.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "database": { + "default": 0, + "description": "Database to use for Redis connection when the `redis` strategy is defined.", + "type": "integer" + }, + "host": { + "description": "Host to use for Redis connection when the `redis` strategy is defined.\nThis parameter accepts a hostname or an IP address as a value.", + "type": "string" + }, + "keepalive_backlog": { + "description": "If specified, limits the total number of opened connections for a pool. If the\nconnection pool is full, all connection queues beyond the maximum limit go into\nthe backlog queue. Once the backlog queue is full, subsequent connect operations\nwill fail and return `nil`. Queued connect operations resume once the number of\nconnections in the pool is less than `keepalive_pool_size`. Note that queued\nconnect operations are subject to set timeouts.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 30, + "description": "The size limit for every cosocket connection pool associated with every remote\nserver, per worker process. If no `keepalive_pool_size` is specified and no `keepalive_backlog`\nis specified, no pool is created. If no `keepalive_pool_size` is specified and `keepalive_backlog`\nis specified, then the pool uses the default value `30`.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connection when the `redis` strategy is defined.\nIf undefined, no AUTH commands are sent to Redis.", + "type": "string" + }, + "port": { + "description": "Specifies the Redis server port when using the `redis` strategy. Must be a\nvalue between 0 and 65535. Default: 6379.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "description": "Read timeout to use for Redis connection when the `redis` strategy is defined.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "description": "Send timeout to use for Redis connection when the `redis` strategy is defined.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_addresses": { + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined.\nDefining this value implies using Redis Sentinel. Each string element must\nconsist of a hostname (or IP address) and port. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections when the `redis` strategy is defined.\nDefining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance.\nIf undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined.\nDefining this value implies using Redis Sentinel. Available options: `master`, `slave`, `any`.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance.\nIf undefined, ACL authentication will not be performed. This requires Redis v6.2.0+.", + "type": "string" + }, + "server_name": { + "description": "Specifies the server name for the new TLS extension Server Name Indication (SNI) when connecting over SSL.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, then uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, then verifies the validity of the server SSL certificate. Note that you need to configure the\n[lua_ssl_trusted_certificate](/gateway/latest/reference/configuration/#lua_ssl_trusted_certificate)\nto specify the CA (or server) certificate used by your redis server. You may also need to configure\n[lua_ssl_verify_depth](/gateway/latest/reference/configuration/#lua_ssl_verify_depth) accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "Connection timeout (in milliseconds) to use for Redis connection when the `redis` strategy is defined.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connection when the `redis` strategy is defined and ACL authentication is desired.\nIf undefined, ACL authentication will not be performed.\nThis requires Redis v6.0.0+. The username **cannot** be set to `default`.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After`\nheader of denied requests (status = `429`) in order to prevent all the clients\nfrom coming back at the same time. The lower bound of the jitter is `0`; in this case,\nthe `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + }, + "strategy": { + "default": "cluster", + "description": "The rate-limiting strategy to use for retrieving and incrementing the\nlimits. Available values are:\n- `cluster`: Counters are stored in the Kong datastore and shared across\n the nodes.\n- `redis`: Counters are stored on a Redis server and shared\n across the nodes.\n- `local`: Counters are stored locally in-memory on the node (same effect\n as setting `sync_rate` to `-1`).\n\nIn DB-less, hybrid mode, and Konnect, the `cluster` config strategy\nis not supported.\n\nFor details on which strategy should be used, refer to the\n[implementation considerations](/hub/kong-inc/rate-limiting/#implementation-considerations).", + "enum": [ + "cluster", + "local", + "redis" + ], + "examples": [ + "local" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0\nresults in synchronous behavior; a value of -1 ignores sync behavior\nentirely and only stores counters in node memory. A value greater than\n0 will sync the counters in the specified number of seconds. The minimum\nallowed interval is 0.02 seconds (20ms).", + "examples": [ + -1 + ], + "type": "number" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There\nmust be a matching number of window limits and sizes specified.", + "examples": [ + [ + 30 + ] + ], + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`.\nSliding windows apply the rate limiting logic while taking into account\nprevious hit rates (from the window that immediately precedes the current)\nusing a dynamic weight.\nFixed windows consist of buckets that are statically assigned to a\ndefinitive time range, each request is mapped to only one fixed window\nbased on its timestamp and will affect only that window's counters.\nFor more information refer to the\n[Enterprise Rate Limiting Library Overview](/gateway/latest/reference/rate-limiting/#overview).", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/rate-limiting-advanced/3.10.json b/json_schemas/rate-limiting-advanced/3.10.json new file mode 100644 index 00000000..5129786f --- /dev/null +++ b/json_schemas/rate-limiting-advanced/3.10.json @@ -0,0 +1,418 @@ +{ + "properties": { + "config": { + "properties": { + "compound_identifier": { + "description": "Similar to `identifer`, but supports combining multiple items. The priority of `compound_identifier` is higher than `identifier`, which means if `compound_identifer` is set, it will be used, otherwise `identifier` will be used.", + "items": { + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_groups": { + "description": "List of consumer groups allowed to override the rate limiting settings for the given Route or Service. Required if `enforce_consumer_groups` is set to `true`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string" + }, + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "type": "boolean" + }, + "enforce_consumer_groups": { + "default": false, + "description": "Determines if consumer groups are allowed to override the rate limiting settings for the given Route or Service. Flipping `enforce_consumer_groups` from `true` to `false` disables the group override, but does not clear the list of consumer groups. You can then flip `enforce_consumer_groups` to `true` to re-enforce the groups.", + "type": "boolean" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`. Note if `identifier` is `consumer-group`, the plugin must be applied on a consumer group entity. Because a consumer may belong to multiple consumer groups, the plugin needs to know explicitly which consumer group to limit the rate.", + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "lock_dictionary_name": { + "default": "kong_locks", + "description": "The shared dictionary where concurrency control locks are stored. The default shared dictionary is `kong_locks`. The shared dictionary should be declare in nginx-kong.conf.", + "type": "string" + }, + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same.", + "type": "string" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "redis_proxy_type": { + "description": "If the `connection_is_proxied` is enabled, this field indicates the proxy type and version you are using. For example, you can enable this optioin when you want authentication between Kong and Envoy proxy.", + "enum": [ + "envoy_v1.31" + ], + "type": "string" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + }, + "strategy": { + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "limit", + "namespace", + "window_size" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/rate-limiting-advanced/3.11.json b/json_schemas/rate-limiting-advanced/3.11.json new file mode 100644 index 00000000..f45cd54a --- /dev/null +++ b/json_schemas/rate-limiting-advanced/3.11.json @@ -0,0 +1,393 @@ +{ + "properties": { + "config": { + "properties": { + "compound_identifier": { + "description": "Similar to `identifer`, but supports combining multiple items. The priority of `compound_identifier` is higher than `identifier`, which means if `compound_identifer` is set, it will be used, otherwise `identifier` will be used.", + "items": { + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "consumer_groups": { + "description": "List of consumer groups allowed to override the rate limiting settings for the given Route or Service. Required if `enforce_consumer_groups` is set to `true`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string" + }, + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "type": "boolean" + }, + "enforce_consumer_groups": { + "default": false, + "description": "Determines if consumer groups are allowed to override the rate limiting settings for the given Route or Service. Flipping `enforce_consumer_groups` from `true` to `false` disables the group override, but does not clear the list of consumer groups. You can then flip `enforce_consumer_groups` to `true` to re-enforce the groups.", + "type": "boolean" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`. Note if `identifier` is `consumer-group`, the plugin must be applied on a consumer group entity. Because a consumer may belong to multiple consumer groups, the plugin needs to know explicitly which consumer group to limit the rate.", + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "items": { + "required": [], + "type": "number" + }, + "type": "array" + }, + "lock_dictionary_name": { + "default": "kong_locks", + "description": "The shared dictionary where concurrency control locks are stored. The default shared dictionary is `kong_locks`. The shared dictionary should be declare in nginx-kong.conf.", + "type": "string" + }, + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same.", + "type": "string" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "redis_proxy_type": { + "description": "If the `connection_is_proxied` is enabled, this field indicates the proxy type and version you are using. For example, you can enable this optioin when you want authentication between Kong and Envoy proxy.", + "enum": [ + "envoy_v1.31" + ], + "type": "string" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + }, + "strategy": { + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "items": { + "required": [], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "limit", + "window_size" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/rate-limiting-advanced/3.12.json b/json_schemas/rate-limiting-advanced/3.12.json new file mode 100644 index 00000000..27ab636e --- /dev/null +++ b/json_schemas/rate-limiting-advanced/3.12.json @@ -0,0 +1,426 @@ +{ + "properties": { + "config": { + "properties": { + "compound_identifier": { + "description": "Similar to `identifer`, but supports combining multiple items. The priority of `compound_identifier` is higher than `identifier`, which means if `compound_identifer` is set, it will be used, otherwise `identifier` will be used.", + "items": { + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "consumer_groups": { + "description": "List of consumer groups allowed to override the rate limiting settings for the given Route or Service. Required if `enforce_consumer_groups` is set to `true`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string" + }, + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "type": "boolean" + }, + "enforce_consumer_groups": { + "default": false, + "description": "Determines if consumer groups are allowed to override the rate limiting settings for the given Route or Service. Flipping `enforce_consumer_groups` from `true` to `false` disables the group override, but does not clear the list of consumer groups. You can then flip `enforce_consumer_groups` to `true` to re-enforce the groups.", + "type": "boolean" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`. Note if `identifier` is `consumer-group`, the plugin must be applied on a consumer group entity. Because a consumer may belong to multiple consumer groups, the plugin needs to know explicitly which consumer group to limit the rate.", + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "items": { + "required": [], + "type": "number" + }, + "type": "array" + }, + "lock_dictionary_name": { + "default": "kong_locks", + "description": "The shared dictionary where concurrency control locks are stored. The default shared dictionary is `kong_locks`. The shared dictionary should be declare in nginx-kong.conf.", + "type": "string" + }, + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same.", + "type": "string" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "redis_proxy_type": { + "description": "If the `connection_is_proxied` is enabled, this field indicates the proxy type and version you are using. For example, you can enable this optioin when you want authentication between Kong and Envoy proxy.", + "enum": [ + "envoy_v1.31" + ], + "type": "string" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + }, + "strategy": { + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + }, + "throttling": { + "properties": { + "enabled": { + "default": false, + "description": "Determines if the throttling feature is enabled or not", + "type": "boolean" + }, + "interval": { + "default": 5, + "description": "The period between two successive retries for an individual request (in seconds)", + "maximum": 1000000, + "minimum": 1, + "type": "number" + }, + "queue_limit": { + "default": 5, + "description": "The maximum number of requests allowed for throttling", + "maximum": 1000000, + "minimum": 1, + "type": "number" + }, + "retry_times": { + "default": 3, + "description": "The maximum number of retries for an individual request", + "maximum": 1000000, + "minimum": 1, + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "items": { + "required": [], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "limit", + "namespace", + "window_size" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/rate-limiting-advanced/3.4.json b/json_schemas/rate-limiting-advanced/3.4.json new file mode 100644 index 00000000..c10f0aa3 --- /dev/null +++ b/json_schemas/rate-limiting-advanced/3.4.json @@ -0,0 +1,331 @@ +{ + "properties": { + "config": { + "properties": { + "consumer_groups": { + "description": "List of consumer groups allowed to override the rate limiting settings for the given Route or Service. Required if `enforce_consumer_groups` is set to `true`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string" + }, + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "type": "boolean" + }, + "enforce_consumer_groups": { + "default": false, + "description": "Determines if consumer groups are allowed to override the rate limiting settings for the given Route or Service. Flipping `enforce_consumer_groups` from `true` to `false` disables the group override, but does not clear the list of consumer groups. You can then flip `enforce_consumer_groups` to `true` to re-enforce the groups.", + "type": "boolean" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, or `path`.", + "enum": [ + "consumer", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace.", + "type": "string" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "redis": { + "properties": { + "cluster_addresses": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, all connection queues beyond the maximum limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued connect operations resume once the number of connections in the pool is less than `keepalive_pool_size`. Note that queued connect operations are subject to set timeouts.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 30, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_addresses": { + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + }, + "strategy": { + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "limit", + "namespace", + "window_size" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/rate-limiting-advanced/3.7.json b/json_schemas/rate-limiting-advanced/3.7.json new file mode 100644 index 00000000..0716ada3 --- /dev/null +++ b/json_schemas/rate-limiting-advanced/3.7.json @@ -0,0 +1,332 @@ +{ + "properties": { + "config": { + "properties": { + "consumer_groups": { + "description": "List of consumer groups allowed to override the rate limiting settings for the given Route or Service. Required if `enforce_consumer_groups` is set to `true`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string" + }, + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "type": "boolean" + }, + "enforce_consumer_groups": { + "default": false, + "description": "Determines if consumer groups are allowed to override the rate limiting settings for the given Route or Service. Flipping `enforce_consumer_groups` from `true` to `false` disables the group override, but does not clear the list of consumer groups. You can then flip `enforce_consumer_groups` to `true` to re-enforce the groups.", + "type": "boolean" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`.", + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same.", + "type": "string" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "redis": { + "properties": { + "cluster_addresses": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_addresses": { + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", + "items": { + "required": [ + + ], + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + }, + "strategy": { + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "limit", + "namespace", + "window_size" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/rate-limiting-advanced/3.8.json b/json_schemas/rate-limiting-advanced/3.8.json new file mode 100644 index 00000000..0fb42d5a --- /dev/null +++ b/json_schemas/rate-limiting-advanced/3.8.json @@ -0,0 +1,388 @@ +{ + "properties": { + "config": { + "properties": { + "consumer_groups": { + "description": "List of consumer groups allowed to override the rate limiting settings for the given Route or Service. Required if `enforce_consumer_groups` is set to `true`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string" + }, + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "type": "boolean" + }, + "enforce_consumer_groups": { + "default": false, + "description": "Determines if consumer groups are allowed to override the rate limiting settings for the given Route or Service. Flipping `enforce_consumer_groups` from `true` to `false` disables the group override, but does not clear the list of consumer groups. You can then flip `enforce_consumer_groups` to `true` to re-enforce the groups.", + "type": "boolean" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`.", + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same.", + "type": "string" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "translate_backwards": [ + "connect_timeout" + ], + "type": "integer" + } + }, + "type": "object" + }, + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + }, + "strategy": { + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "limit", + "namespace", + "window_size" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/rate-limiting-advanced/3.9.json b/json_schemas/rate-limiting-advanced/3.9.json new file mode 100644 index 00000000..e29aafac --- /dev/null +++ b/json_schemas/rate-limiting-advanced/3.9.json @@ -0,0 +1,418 @@ +{ + "properties": { + "config": { + "properties": { + "compound_identifier": { + "description": "Similar to `identifer`, but supports combining multiple items. The priority of `compound_identifier` is higher than `identifier`, which means if `compound_identifer` is set, it will be used, otherwise `identifier` will be used.", + "items": { + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_groups": { + "description": "List of consumer groups allowed to override the rate limiting settings for the given Route or Service. Required if `enforce_consumer_groups` is set to `true`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string" + }, + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "type": "boolean" + }, + "enforce_consumer_groups": { + "default": false, + "description": "Determines if consumer groups are allowed to override the rate limiting settings for the given Route or Service. Flipping `enforce_consumer_groups` from `true` to `false` disables the group override, but does not clear the list of consumer groups. You can then flip `enforce_consumer_groups` to `true` to re-enforce the groups.", + "type": "boolean" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + }, + "identifier": { + "default": "consumer", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`.", + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "lock_dictionary_name": { + "default": "kong_locks", + "description": "The shared dictionary where concurrency control locks are stored. The default shared dictionary is `kong_locks`. The shared dictionary should be declare in nginx-kong.conf.", + "type": "string" + }, + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same.", + "type": "string" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "redis_proxy_type": { + "description": "If the `connection_is_proxied` is enabled, this field indicates the proxy type and version you are using. For example, you can enable this optioin when you want authentication between Kong and Envoy proxy.", + "enum": [ + "envoy_v1.31" + ], + "type": "string" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + }, + "strategy": { + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "limit", + "namespace", + "window_size" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/rate-limiting/2.8.json b/json_schemas/rate-limiting/2.8.json new file mode 100644 index 00000000..c8e30304 --- /dev/null +++ b/json_schemas/rate-limiting/2.8.json @@ -0,0 +1,214 @@ +{ + "properties": { + "config": { + "properties": { + "day": { + "description": "The number of HTTP requests that can be made per day.", + "minimum": 0, + "type": "number" + }, + "fault_tolerant": { + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party data store. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the data store is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean" + }, + "header_name": { + "description": "Header name to be used if `limit_by` is set to `header`.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers.", + "type": "boolean" + }, + "hour": { + "description": "The number of HTTP requests that can be made per hour.", + "examples": [ + 10000 + ], + "minimum": 0, + "type": "number" + }, + "limit_by": { + "default": "consumer", + "description": "The entity that is used when aggregating the limits. Available values are:\n- `consumer`\n- `credential`\n- `ip`\n- `service`\n- `header` (The `header_name` configuration must be provided.)\n- `path` (The `path` configuration must be provided.)\n\nIf the entity value for aggregating the limits cannot be determined, the system falls back to `ip`.", + "enum": [ + "consumer", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "minute": { + "description": "The number of HTTP requests that can be made per minute.", + "minimum": 0, + "type": "number" + }, + "month": { + "description": "The number of HTTP requests that can be made per month.", + "minimum": 0, + "type": "number" + }, + "path": { + "description": "Path to be used if `limit_by` is set to `path`.", + "type": "string" + }, + "policy": { + "default": "cluster", + "description": "The rate-limiting policies to use for retrieving and incrementing the\nlimits. Available values are:\n- `local`: Counters are stored locally in-memory on the node.\n- `cluster`: Counters are stored in the Kong data store and shared across\nthe nodes.\n- `redis`: Counters are stored on a Redis server and shared\nacross the nodes.\n\nIn DB-less, hybrid mode, and Konnect, the `cluster` config policy is not supported.\nFor DB-less mode or Konnect, use one of `redis` or `local`; for hybrid mode, use\n`redis`, or `local` for data planes only.\n\nFor details on which policy should be used, refer to the\n[implementation considerations](#implementation-considerations).", + "enum": [ + "cluster", + "local", + "redis" + ], + "examples": [ + "local" + ], + "minLength": 0, + "type": "string" + }, + "redis_database": { + "default": 0, + "description": "When using the `redis` policy, this property specifies the Redis database to use.", + "type": "integer" + }, + "redis_host": { + "description": "When using the `redis` policy, this property specifies the address to the Redis server.", + "type": "string" + }, + "redis_password": { + "description": "When using the `redis` policy, this property specifies the password to connect to the Redis server.", + "minLength": 0, + "type": "string" + }, + "redis_port": { + "default": 6379, + "description": "When using the `redis` policy, this property specifies the port of the Redis server. By default is `6379`.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "redis_server_name": { + "description": "When using the `redis` policy with `redis_ssl` set to `true`, this property specifies the server name for the TLS extension Server Name Indication (SNI)", + "type": "string" + }, + "redis_ssl": { + "default": false, + "description": "When using the `redis` policy, this property specifies if SSL is used to connect to the Redis server.", + "type": "boolean" + }, + "redis_ssl_verify": { + "default": false, + "description": "When using the `redis` policy with `redis_ssl` set to `true`, this property specifies it server SSL certificate is validated. Note that you need to configure the lua_ssl_trusted_certificate to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ssl_verify_depth accordingly.", + "type": "boolean" + }, + "redis_timeout": { + "default": 2000, + "description": "When using the `redis` policy, this property specifies the timeout in milliseconds of any command submitted to the Redis server.", + "type": "number" + }, + "redis_username": { + "description": "When using the `redis` policy, this property specifies the username to connect to the Redis server when ACL authentication is desired. \n\nThis requires Redis v6.0.0+. The username **cannot** be set to `default`.", + "type": "string" + }, + "second": { + "description": "The number of HTTP requests that can be made per second.", + "examples": [ + 5 + ], + "minimum": 0, + "type": "number" + }, + "year": { + "description": "The number of HTTP requests that can be made per year.", + "minimum": 0, + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/rate-limiting/3.10.json b/json_schemas/rate-limiting/3.10.json new file mode 100644 index 00000000..ae56c397 --- /dev/null +++ b/json_schemas/rate-limiting/3.10.json @@ -0,0 +1,263 @@ +{ + "properties": { + "config": { + "properties": { + "day": { + "description": "The number of HTTP requests that can be made per day.", + "minimum": 0, + "type": "number" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "fault_tolerant": { + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party data store. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the data store is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers.", + "type": "boolean" + }, + "hour": { + "description": "The number of HTTP requests that can be made per hour.", + "minimum": 0, + "type": "number" + }, + "limit_by": { + "default": "consumer", + "description": "The entity that is used when aggregating the limits.", + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "minute": { + "description": "The number of HTTP requests that can be made per minute.", + "minimum": 0, + "type": "number" + }, + "month": { + "description": "The number of HTTP requests that can be made per month.", + "minimum": 0, + "type": "number" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "policy": { + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "local", + "redis" + ], + "minLength": 0, + "type": "string" + }, + "redis": { + "description": "Redis configuration", + "properties": { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "minLength": 0, + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "second": { + "description": "The number of HTTP requests that can be made per second.", + "minimum": 0, + "type": "number" + }, + "sync_rate": { + "default": -1, + "description": "How often to sync counter data to the central data store. A value of -1 results in synchronous behavior.", + "type": "number" + }, + "year": { + "description": "The number of HTTP requests that can be made per year.", + "minimum": 0, + "type": "number" + } + }, + "required": [ + + ], + "shorthand_fields": { + "redis_database": { + "type": "integer" + }, + "redis_host": { + "type": "string" + }, + "redis_password": { + "minLength": 0, + "type": "string" + }, + "redis_port": { + "type": "integer" + }, + "redis_server_name": { + "type": "string" + }, + "redis_ssl": { + "type": "boolean" + }, + "redis_ssl_verify": { + "type": "boolean" + }, + "redis_timeout": { + "type": "integer" + }, + "redis_username": { + "type": "string" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/rate-limiting/3.11.json b/json_schemas/rate-limiting/3.11.json new file mode 100644 index 00000000..7f349cef --- /dev/null +++ b/json_schemas/rate-limiting/3.11.json @@ -0,0 +1,247 @@ +{ + "properties": { + "config": { + "properties": { + "day": { + "description": "The number of HTTP requests that can be made per day.", + "minimum": 0, + "type": "number" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "fault_tolerant": { + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party data store. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the data store is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers.", + "type": "boolean" + }, + "hour": { + "description": "The number of HTTP requests that can be made per hour.", + "minimum": 0, + "type": "number" + }, + "limit_by": { + "default": "consumer", + "description": "The entity that is used when aggregating the limits.", + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "minute": { + "description": "The number of HTTP requests that can be made per minute.", + "minimum": 0, + "type": "number" + }, + "month": { + "description": "The number of HTTP requests that can be made per month.", + "minimum": 0, + "type": "number" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "policy": { + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "local", + "redis" + ], + "minLength": 0, + "type": "string" + }, + "redis": { + "description": "Redis configuration", + "properties": { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "minLength": 0, + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "second": { + "description": "The number of HTTP requests that can be made per second.", + "minimum": 0, + "type": "number" + }, + "sync_rate": { + "default": -1, + "description": "How often to sync counter data to the central data store. A value of -1 results in synchronous behavior.", + "type": "number" + }, + "year": { + "description": "The number of HTTP requests that can be made per year.", + "minimum": 0, + "type": "number" + } + }, + "required": [], + "shorthand_fields": { + "redis_database": { + "type": "integer" + }, + "redis_host": { + "type": "string" + }, + "redis_password": { + "minLength": 0, + "type": "string" + }, + "redis_port": { + "type": "integer" + }, + "redis_server_name": { + "type": "string" + }, + "redis_ssl": { + "type": "boolean" + }, + "redis_ssl_verify": { + "type": "boolean" + }, + "redis_timeout": { + "type": "integer" + }, + "redis_username": { + "type": "string" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/rate-limiting/3.12.json b/json_schemas/rate-limiting/3.12.json new file mode 100644 index 00000000..d6ae0321 --- /dev/null +++ b/json_schemas/rate-limiting/3.12.json @@ -0,0 +1,247 @@ +{ + "properties": { + "config": { + "properties": { + "day": { + "description": "The number of HTTP requests that can be made per day.", + "minimum": 0, + "type": "number" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "fault_tolerant": { + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party data store. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the data store is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers.", + "type": "boolean" + }, + "hour": { + "description": "The number of HTTP requests that can be made per hour.", + "minimum": 0, + "type": "number" + }, + "limit_by": { + "default": "consumer", + "description": "The entity that is used when aggregating the limits.", + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "minute": { + "description": "The number of HTTP requests that can be made per minute.", + "minimum": 0, + "type": "number" + }, + "month": { + "description": "The number of HTTP requests that can be made per month.", + "minimum": 0, + "type": "number" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "policy": { + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "local", + "redis" + ], + "minLength": 0, + "type": "string" + }, + "redis": { + "description": "Redis configuration", + "properties": { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "minLength": 0, + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "second": { + "description": "The number of HTTP requests that can be made per second.", + "minimum": 0, + "type": "number" + }, + "sync_rate": { + "default": -1, + "description": "How often to sync counter data to the central data store. A value of -1 results in synchronous behavior.", + "type": "number" + }, + "year": { + "description": "The number of HTTP requests that can be made per year.", + "minimum": 0, + "type": "number" + } + }, + "required": [], + "shorthand_fields": { + "redis_database": { + "type": "integer" + }, + "redis_host": { + "type": "string" + }, + "redis_password": { + "minLength": 0, + "type": "string" + }, + "redis_port": { + "type": "integer" + }, + "redis_server_name": { + "type": "string" + }, + "redis_ssl": { + "type": "boolean" + }, + "redis_ssl_verify": { + "type": "boolean" + }, + "redis_timeout": { + "type": "integer" + }, + "redis_username": { + "type": "string" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/rate-limiting/3.4.json b/json_schemas/rate-limiting/3.4.json new file mode 100644 index 00000000..d24e236b --- /dev/null +++ b/json_schemas/rate-limiting/3.4.json @@ -0,0 +1,208 @@ +{ + "properties": { + "config": { + "properties": { + "day": { + "description": "The number of HTTP requests that can be made per day.", + "minimum": 0, + "type": "number" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "fault_tolerant": { + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party data store. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the data store is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers.", + "type": "boolean" + }, + "hour": { + "description": "The number of HTTP requests that can be made per hour.", + "minimum": 0, + "type": "number" + }, + "limit_by": { + "default": "consumer", + "description": "The entity that is used when aggregating the limits.", + "enum": [ + "consumer", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "minute": { + "description": "The number of HTTP requests that can be made per minute.", + "minimum": 0, + "type": "number" + }, + "month": { + "description": "The number of HTTP requests that can be made per month.", + "minimum": 0, + "type": "number" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "policy": { + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "local", + "redis" + ], + "minLength": 0, + "type": "string" + }, + "redis_database": { + "default": 0, + "description": "When using the `redis` policy, this property specifies the Redis database to use.", + "type": "integer" + }, + "redis_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "redis_password": { + "description": "When using the `redis` policy, this property specifies the password to connect to the Redis server.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "minLength": 0, + "type": "string" + }, + "redis_port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "redis_server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "redis_ssl": { + "default": false, + "description": "When using the `redis` policy, this property specifies if SSL is used to connect to the Redis server.", + "type": "boolean" + }, + "redis_ssl_verify": { + "default": false, + "description": "When using the `redis` policy with `redis_ssl` set to `true`, this property specifies it server SSL certificate is validated. Note that you need to configure the lua_ssl_trusted_certificate to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ssl_verify_depth accordingly.", + "type": "boolean" + }, + "redis_timeout": { + "default": 2000, + "description": "When using the `redis` policy, this property specifies the timeout in milliseconds of any command submitted to the Redis server.", + "type": "number" + }, + "redis_username": { + "description": "When using the `redis` policy, this property specifies the username to connect to the Redis server when ACL authentication is desired.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "second": { + "description": "The number of HTTP requests that can be made per second.", + "minimum": 0, + "type": "number" + }, + "sync_rate": { + "default": -1, + "description": "How often to sync counter data to the central data store. A value of -1 results in synchronous behavior.", + "type": "number" + }, + "year": { + "description": "The number of HTTP requests that can be made per year.", + "minimum": 0, + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/rate-limiting/3.7.json b/json_schemas/rate-limiting/3.7.json new file mode 100644 index 00000000..7d4c8e91 --- /dev/null +++ b/json_schemas/rate-limiting/3.7.json @@ -0,0 +1,299 @@ +{ + "properties": { + "config": { + "properties": { + "day": { + "description": "The number of HTTP requests that can be made per day.", + "minimum": 0, + "type": "number" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "fault_tolerant": { + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party data store. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the data store is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers.", + "type": "boolean" + }, + "hour": { + "description": "The number of HTTP requests that can be made per hour.", + "minimum": 0, + "type": "number" + }, + "limit_by": { + "default": "consumer", + "description": "The entity that is used when aggregating the limits.", + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "minute": { + "description": "The number of HTTP requests that can be made per minute.", + "minimum": 0, + "type": "number" + }, + "month": { + "description": "The number of HTTP requests that can be made per month.", + "minimum": 0, + "type": "number" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "policy": { + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "local", + "redis" + ], + "minLength": 0, + "type": "string" + }, + "redis": { + "description": "Redis configuration", + "properties": { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "minLength": 0, + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "second": { + "description": "The number of HTTP requests that can be made per second.", + "minimum": 0, + "type": "number" + }, + "sync_rate": { + "default": -1, + "description": "How often to sync counter data to the central data store. A value of -1 results in synchronous behavior.", + "type": "number" + }, + "year": { + "description": "The number of HTTP requests that can be made per year.", + "minimum": 0, + "type": "number" + } + }, + "required": [ + + ], + "shorthand_fields": { + "redis_database": { + "translate_backwards": [ + "database", + "redis" + ], + "type": "integer" + }, + "redis_host": { + "translate_backwards": [ + "host", + "redis" + ], + "type": "string" + }, + "redis_password": { + "minLength": 0, + "translate_backwards": [ + "password", + "redis" + ], + "type": "string" + }, + "redis_port": { + "translate_backwards": [ + "port", + "redis" + ], + "type": "integer" + }, + "redis_server_name": { + "translate_backwards": [ + "redis", + "server_name" + ], + "type": "string" + }, + "redis_ssl": { + "translate_backwards": [ + "redis", + "ssl" + ], + "type": "boolean" + }, + "redis_ssl_verify": { + "translate_backwards": [ + "redis", + "ssl_verify" + ], + "type": "boolean" + }, + "redis_timeout": { + "translate_backwards": [ + "redis", + "timeout" + ], + "type": "integer" + }, + "redis_username": { + "translate_backwards": [ + "redis", + "username" + ], + "type": "string" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/rate-limiting/3.8.json b/json_schemas/rate-limiting/3.8.json new file mode 100644 index 00000000..dec7898e --- /dev/null +++ b/json_schemas/rate-limiting/3.8.json @@ -0,0 +1,299 @@ +{ + "properties": { + "config": { + "properties": { + "day": { + "description": "The number of HTTP requests that can be made per day.", + "minimum": 0, + "type": "number" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "fault_tolerant": { + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party data store. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the data store is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers.", + "type": "boolean" + }, + "hour": { + "description": "The number of HTTP requests that can be made per hour.", + "minimum": 0, + "type": "number" + }, + "limit_by": { + "default": "consumer", + "description": "The entity that is used when aggregating the limits.", + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "minute": { + "description": "The number of HTTP requests that can be made per minute.", + "minimum": 0, + "type": "number" + }, + "month": { + "description": "The number of HTTP requests that can be made per month.", + "minimum": 0, + "type": "number" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "policy": { + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "local", + "redis" + ], + "minLength": 0, + "type": "string" + }, + "redis": { + "description": "Redis configuration", + "properties": { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "minLength": 0, + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "second": { + "description": "The number of HTTP requests that can be made per second.", + "minimum": 0, + "type": "number" + }, + "sync_rate": { + "default": -1, + "description": "How often to sync counter data to the central data store. A value of -1 results in synchronous behavior.", + "type": "number" + }, + "year": { + "description": "The number of HTTP requests that can be made per year.", + "minimum": 0, + "type": "number" + } + }, + "required": [ + + ], + "shorthand_fields": { + "redis_database": { + "translate_backwards": [ + "database", + "redis" + ], + "type": "integer" + }, + "redis_host": { + "translate_backwards": [ + "host", + "redis" + ], + "type": "string" + }, + "redis_password": { + "minLength": 0, + "translate_backwards": [ + "password", + "redis" + ], + "type": "string" + }, + "redis_port": { + "translate_backwards": [ + "port", + "redis" + ], + "type": "integer" + }, + "redis_server_name": { + "translate_backwards": [ + "redis", + "server_name" + ], + "type": "string" + }, + "redis_ssl": { + "translate_backwards": [ + "redis", + "ssl" + ], + "type": "boolean" + }, + "redis_ssl_verify": { + "translate_backwards": [ + "redis", + "ssl_verify" + ], + "type": "boolean" + }, + "redis_timeout": { + "translate_backwards": [ + "redis", + "timeout" + ], + "type": "integer" + }, + "redis_username": { + "translate_backwards": [ + "redis", + "username" + ], + "type": "string" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/rate-limiting/3.9.json b/json_schemas/rate-limiting/3.9.json new file mode 100644 index 00000000..085d4cc0 --- /dev/null +++ b/json_schemas/rate-limiting/3.9.json @@ -0,0 +1,263 @@ +{ + "properties": { + "config": { + "properties": { + "day": { + "description": "The number of HTTP requests that can be made per day.", + "minimum": 0, + "type": "number" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "fault_tolerant": { + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party data store. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the data store is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean" + }, + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers.", + "type": "boolean" + }, + "hour": { + "description": "The number of HTTP requests that can be made per hour.", + "minimum": 0, + "type": "number" + }, + "limit_by": { + "default": "consumer", + "description": "The entity that is used when aggregating the limits.", + "enum": [ + "consumer", + "consumer-group", + "credential", + "header", + "ip", + "path", + "service" + ], + "type": "string" + }, + "minute": { + "description": "The number of HTTP requests that can be made per minute.", + "minimum": 0, + "type": "number" + }, + "month": { + "description": "The number of HTTP requests that can be made per month.", + "minimum": 0, + "type": "number" + }, + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "policy": { + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "local", + "redis" + ], + "minLength": 0, + "type": "string" + }, + "redis": { + "description": "Redis configuration", + "properties": { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "minLength": 0, + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "second": { + "description": "The number of HTTP requests that can be made per second.", + "minimum": 0, + "type": "number" + }, + "sync_rate": { + "default": -1, + "description": "How often to sync counter data to the central data store. A value of -1 results in synchronous behavior.", + "type": "number" + }, + "year": { + "description": "The number of HTTP requests that can be made per year.", + "minimum": 0, + "type": "number" + } + }, + "required": [ + + ], + "shorthand_fields": { + "redis_database": { + "type": "integer" + }, + "redis_host": { + "type": "string" + }, + "redis_password": { + "minLength": 0, + "type": "string" + }, + "redis_port": { + "type": "integer" + }, + "redis_server_name": { + "type": "string" + }, + "redis_ssl": { + "type": "boolean" + }, + "redis_ssl_verify": { + "type": "boolean" + }, + "redis_timeout": { + "type": "integer" + }, + "redis_username": { + "type": "string" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/redirect/3.10.json b/json_schemas/redirect/3.10.json new file mode 100644 index 00000000..e83c8f27 --- /dev/null +++ b/json_schemas/redirect/3.10.json @@ -0,0 +1,105 @@ +{ + "properties": { + "config": { + "properties": { + "keep_incoming_path": { + "default": false, + "description": "Use the incoming request's path and query string in the redirect URL", + "type": "boolean" + }, + "location": { + "description": "The URL to redirect to", + "type": "string" + }, + "status_code": { + "default": 301, + "description": "The response code to send. Must be an integer between 100 and 599.", + "maximum": 599, + "minimum": 100, + "type": "integer" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/redirect/3.11.json b/json_schemas/redirect/3.11.json new file mode 100644 index 00000000..a8be76da --- /dev/null +++ b/json_schemas/redirect/3.11.json @@ -0,0 +1,95 @@ +{ + "properties": { + "config": { + "properties": { + "keep_incoming_path": { + "default": false, + "description": "Use the incoming request's path and query string in the redirect URL", + "type": "boolean" + }, + "location": { + "description": "The URL to redirect to", + "type": "string" + }, + "status_code": { + "default": 301, + "description": "The response code to send. Must be an integer between 100 and 599.", + "maximum": 599, + "minimum": 100, + "type": "integer" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/redirect/3.12.json b/json_schemas/redirect/3.12.json new file mode 100644 index 00000000..a8be76da --- /dev/null +++ b/json_schemas/redirect/3.12.json @@ -0,0 +1,95 @@ +{ + "properties": { + "config": { + "properties": { + "keep_incoming_path": { + "default": false, + "description": "Use the incoming request's path and query string in the redirect URL", + "type": "boolean" + }, + "location": { + "description": "The URL to redirect to", + "type": "string" + }, + "status_code": { + "default": 301, + "description": "The response code to send. Must be an integer between 100 and 599.", + "maximum": 599, + "minimum": 100, + "type": "integer" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/redirect/3.9.json b/json_schemas/redirect/3.9.json new file mode 100644 index 00000000..e83c8f27 --- /dev/null +++ b/json_schemas/redirect/3.9.json @@ -0,0 +1,105 @@ +{ + "properties": { + "config": { + "properties": { + "keep_incoming_path": { + "default": false, + "description": "Use the incoming request's path and query string in the redirect URL", + "type": "boolean" + }, + "location": { + "description": "The URL to redirect to", + "type": "string" + }, + "status_code": { + "default": 301, + "description": "The response code to send. Must be an integer between 100 and 599.", + "maximum": 599, + "minimum": 100, + "type": "integer" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/request-callout/3.10.json b/json_schemas/request-callout/3.10.json new file mode 100644 index 00000000..c7f7f16a --- /dev/null +++ b/json_schemas/request-callout/3.10.json @@ -0,0 +1,680 @@ +{ + "properties": { + "config": { + "properties": { + "cache": { + "description": "Plugin global caching configuration.", + "properties": { + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities.", + "minimum": 0, + "type": "integer" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "default": "off", + "description": "The backing data store in which to hold cache entities. Accepted values are: `off`, `memory`, and `redis`.", + "enum": [ + "memory", + "off", + "redis" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "callouts": { + "description": "A collection of callout objects, where each object represents an HTTPrequest made in the context of a proxy request.", + "items": { + "properties": { + "cache": { + "description": "Callout caching configuration.", + "properties": { + "bypass": { + "default": false, + "description": "If true, skips caching the callout response.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "depends_on": { + "default": [ + + ], + "description": "An array of callout names the current callout depends on.This dependency determines the callout execution order.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "A string identifier for a callout. A callout object is referenceablevia its name in the kong.ctx.shared.callouts.", + "type": "string" + }, + "request": { + "description": "The customizations for the callout request.", + "properties": { + "body": { + "description": "Callout request body customizations.", + "properties": { + "custom": { + "additionalProperties": true, + "description": "The custom body fields to be added in the callout HTTP request.Values can contain Lua expressions in the form $(some_lua_code).", + "type": "object" + }, + "decode": { + "default": false, + "description": "If true, decodes the request's body to make it available for customizations.", + "type": "boolean" + }, + "forward": { + "default": false, + "description": "If true, forwards the incoming request's body to the callout request.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "by_lua": { + "description": "Lua code that executes before the callout request is made.Standard Lua sandboxing restrictions apply.", + "type": "string" + }, + "error": { + "description": "The error handling policy the plugin will apply to TCP and HTTP errors.", + "properties": { + "error_response_code": { + "default": 400, + "description": "The error code to respond with if `on_error` is `fail` or if `retries` is achieved.", + "type": "integer" + }, + "error_response_msg": { + "default": "service callout error", + "description": "The error mesasge to respond with if `on_error` is `fail` or if `retries` is achieved.Templating with Lua expressions is supported.", + "type": "string" + }, + "http_statuses": { + "description": "The list of HTTP status codes considered errors under the error handling policy.", + "items": { + "maximum": 999, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "type": "array" + }, + "on_error": { + "default": "fail", + "enum": [ + "continue", + "fail", + "retry" + ], + "type": "string" + }, + "retries": { + "default": 2, + "description": "The number of retries the plugin will attempt on TCP and HTTP errors if `on_error` is set to `retry`.", + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "headers": { + "description": "Callout request header customizations.", + "properties": { + "custom": { + "additionalProperties": true, + "description": "The custom headers to be added in the callout HTTP request.Values can contain Lua expressions in the form $(some_lua_code).", + "type": "object" + }, + "forward": { + "default": false, + "description": "If true, forwards the incoming request's headers to the callout request. ", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "http_opts": { + "description": "HTTP connection parameters.", + "properties": { + "proxy": { + "description": "Proxy settings.", + "properties": { + "auth_password": { + "description": "The password to authenticate with, if the forward proxy is protected by basic authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "auth_username": { + "description": "The username to authenticate with, if the forward proxy is protected by basic authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "http_proxy": { + "description": "The HTTP proxy URL. This proxy server will be used for HTTP requests.", + "type": "string" + }, + "https_proxy": { + "description": "The HTTPS proxy URL. This proxy server will be used for HTTPS requests.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "ssl_server_name": { + "description": "The SNI used in the callout request. Defaults to host if omitted.", + "type": "string" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeouts": { + "description": "Socket timeouts in milliseconds. All or none must be set.", + "properties": { + "connect": { + "description": "The socket connect timeout.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "read": { + "description": "The socket read timeout. ", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "write": { + "description": "The socket write timeout.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "method": { + "default": "GET", + "description": "The HTTP method that will be requested.", + "pattern": "^[A-Z]+$", + "type": "string" + }, + "query": { + "description": "Callout request query param customizations.", + "properties": { + "custom": { + "additionalProperties": true, + "description": "The custom query params to be added in the callout HTTP request.Values can contain Lua expressions in the form $(some_lua_code).", + "type": "object" + }, + "forward": { + "default": false, + "description": "If true, forwards the incoming request's query params to the callout request. ", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "url": { + "description": "The URL that will be requested.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + "body", + "error", + "headers", + "http_opts", + "query", + "url" + ], + "type": "object" + }, + "response": { + "description": "Configurations of callout response handling.", + "properties": { + "body": { + "properties": { + "decode": { + "default": false, + "description": "If true, decodes the response body before storing into the context. Only JSON is supported.", + "type": "boolean" + }, + "store": { + "default": true, + "description": "If false, skips storing the callout response body into kong.ctx.shared.callouts..response.body.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "by_lua": { + "description": "Lua code that executes after the callout request is made, before caching takes place. Standard Lua sandboxing restrictions apply.", + "type": "string" + }, + "headers": { + "description": "Callout response header customizations.", + "properties": { + "store": { + "default": true, + "description": "If false, skips storing the callout response headers intokong.ctx.shared.callouts..response.headers.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "body", + "headers" + ], + "type": "object" + } + }, + "required": [ + "cache", + "name", + "request", + "response" + ], + "type": "object" + }, + "type": "array" + }, + "upstream": { + "description": "Customizations to the upstream request.", + "properties": { + "body": { + "description": "Callout request body customizations.", + "properties": { + "custom": { + "additionalProperties": true, + "description": "The custom body fields to be added in the upstream request body. Values can contain Lua expressions in the form $(some_lua_code).", + "type": "object" + }, + "decode": { + "default": true, + "description": "If true, decodes the request's body to make it available for upstream by_lua customizations.", + "type": "boolean" + }, + "forward": { + "default": true, + "description": "If false, skips forwarding the incoming request's body to the upstream request.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "by_lua": { + "description": "Lua code that executes before the upstream request is made. Standard Lua sandboxing restrictions apply.", + "type": "string" + }, + "headers": { + "description": "Callout request header customizations.", + "properties": { + "custom": { + "additionalProperties": true, + "description": "The custom headers to be added in the upstream HTTP request. Values can contain Lua expressions in the form $(some_lua_code).", + "type": "object" + }, + "forward": { + "default": true, + "description": "If false, does not forward request headers to upstream request.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "query": { + "description": "Upstream request query param customizations.", + "properties": { + "custom": { + "additionalProperties": true, + "description": "The custom query params to be added in the upstream HTTP request. Values can contain Lua expressions in the form $(some_lua_code).", + "type": "object" + }, + "forward": { + "default": true, + "description": "If false, does not forward request query params to upstream request.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "callouts" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/request-callout/3.11.json b/json_schemas/request-callout/3.11.json new file mode 100644 index 00000000..f64047cb --- /dev/null +++ b/json_schemas/request-callout/3.11.json @@ -0,0 +1,626 @@ +{ + "properties": { + "config": { + "properties": { + "cache": { + "description": "Plugin global caching configuration.", + "properties": { + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities.", + "minimum": 0, + "type": "integer" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "default": "off", + "description": "The backing data store in which to hold cache entities. Accepted values are: `off`, `memory`, and `redis`.", + "enum": [ + "memory", + "off", + "redis" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "callouts": { + "description": "A collection of callout objects, where each object represents an HTTP request made in the context of a proxy request.", + "items": { + "properties": { + "cache": { + "description": "Callout caching configuration.", + "properties": { + "bypass": { + "default": false, + "description": "If `true`, skips caching the callout response.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "depends_on": { + "default": [], + "description": "An array of callout names the current callout depends on. This dependency list determines the callout execution order via a topological sorting algorithm.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "A string identifier for a callout. A callout object is referenceable via its name in the `kong.ctx.shared.callouts.`", + "type": "string" + }, + "request": { + "description": "The customizations for the callout request.", + "properties": { + "body": { + "description": "Callout request body customizations.", + "properties": { + "custom": { + "additionalProperties": true, + "description": "The custom body fields to be added to the callout HTTP request. Values can contain Lua expressions in the form $(some_lua_expression). The syntax is based on `request-transformer-advanced` templates.", + "type": "object" + }, + "decode": { + "default": false, + "description": "If `true`, decodes the request's body and make it available for customizations. Only JSON content type is supported.", + "type": "boolean" + }, + "forward": { + "default": false, + "description": "If `true`, forwards the incoming request's body to the callout request.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "by_lua": { + "description": "Lua code that executes before the callout request is made. **Warning** can impact system behavior. Standard Lua sandboxing restrictions apply.", + "type": "string" + }, + "error": { + "description": "The error handling policy the plugin will apply to TCP and HTTP errors.", + "properties": { + "error_response_code": { + "default": 400, + "description": "The error code to respond with if `on_error` is `fail` or if `retries` is achieved.", + "type": "integer" + }, + "error_response_msg": { + "default": "service callout error", + "description": "The error mesasge to respond with if `on_error` is set to `fail` or if `retries` is achieved. Templating with Lua expressions is supported.", + "type": "string" + }, + "http_statuses": { + "description": "The list of HTTP status codes considered errors under the error handling policy.", + "items": { + "maximum": 999, + "minimum": 100, + "required": [], + "type": "integer" + }, + "type": "array" + }, + "on_error": { + "default": "fail", + "enum": [ + "continue", + "fail", + "retry" + ], + "type": "string" + }, + "retries": { + "default": 2, + "description": "The number of retries the plugin will attempt on TCP and HTTP errors if `on_error` is set to `retry`.", + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "headers": { + "description": "Callout request header customizations.", + "properties": { + "custom": { + "additionalProperties": true, + "description": "The custom headers to be added in the callout HTTP request. Values can contain Lua expressions in the form `$(some_lua_expression)`. The syntax is based on `request-transformer-advanced` templates.", + "type": "object" + }, + "forward": { + "default": false, + "description": "If `true`, forwards the incoming request's headers to the callout request. ", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "http_opts": { + "description": "HTTP connection parameters.", + "properties": { + "proxy": { + "description": "Proxy settings.", + "properties": { + "auth_password": { + "description": "The password to authenticate with, if the forward proxy is protected by basic authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "auth_username": { + "description": "The username to authenticate with, if the forward proxy is protected by basic authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "http_proxy": { + "description": "The HTTP proxy URL. This proxy server will be used for HTTP requests.", + "type": "string" + }, + "https_proxy": { + "description": "The HTTPS proxy URL. This proxy server will be used for HTTPS requests.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "ssl_server_name": { + "description": "The SNI used in the callout request. Defaults to host if omitted.", + "type": "string" + }, + "ssl_verify": { + "default": false, + "description": "If set to `true`, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeouts": { + "description": "Socket timeouts in milliseconds. All or none must be set.", + "properties": { + "connect": { + "description": "The socket connect timeout.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "read": { + "description": "The socket read timeout. ", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "write": { + "description": "The socket write timeout.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "method": { + "default": "GET", + "description": "The HTTP method that will be requested.", + "pattern": "^[A-Z]+$", + "type": "string" + }, + "query": { + "description": "Callout request query param customizations.", + "properties": { + "custom": { + "additionalProperties": true, + "description": "The custom query params to be added in the callout HTTP request. Values can contain Lua expressions in the form `$(some_lua_expression)`. The syntax is based on `request-transformer-advanced` templates.", + "type": "object" + }, + "forward": { + "default": false, + "description": "If `true`, forwards the incoming request's query params to the callout request. ", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "url": { + "description": "The URL that will be requested.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + "body", + "error", + "headers", + "http_opts", + "query", + "url" + ], + "type": "object" + }, + "response": { + "description": "Configurations of callout response handling.", + "properties": { + "body": { + "properties": { + "decode": { + "default": false, + "description": "If `true`, decodes the response body before storing into the context. Only JSON is supported.", + "type": "boolean" + }, + "store": { + "default": true, + "description": "If `false`, skips storing the callout response body into kong.ctx.shared.callouts..response.body.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "by_lua": { + "description": "Lua code that executes after the callout response is received, before caching takes place. Can produce side effects. Standard Lua sandboxing restrictions apply.", + "type": "string" + }, + "headers": { + "description": "Callout response header customizations.", + "properties": { + "store": { + "default": true, + "description": "If `false`, skips storing the callout response headers into kong.ctx.shared.callouts..response.headers.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "body", + "headers" + ], + "type": "object" + } + }, + "required": [ + "cache", + "name", + "request", + "response" + ], + "type": "object" + }, + "type": "array" + }, + "upstream": { + "description": "Customizations to the upstream request.", + "properties": { + "body": { + "description": "Callout request body customizations.", + "properties": { + "custom": { + "additionalProperties": true, + "description": "The custom body fields to be added in the upstream request body. Values can contain Lua expressions in the form $(some_lua_expression). The syntax is based on `request-transformer-advanced` templates.", + "type": "object" + }, + "decode": { + "default": true, + "description": "If `true`, decodes the request's body to make it available for upstream by_lua customizations. Only JSON content type is supported.", + "type": "boolean" + }, + "forward": { + "default": true, + "description": "If `false`, skips forwarding the incoming request's body to the upstream request.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "by_lua": { + "description": "Lua code that executes before the upstream request is made. Can produce side effects. Standard Lua sandboxing restrictions apply.", + "type": "string" + }, + "headers": { + "description": "Callout request header customizations.", + "properties": { + "custom": { + "additionalProperties": true, + "description": "The custom headers to be added in the upstream HTTP request. Values can contain Lua expressions in the form $(some_lua_expression). The syntax is based on `request-transformer-advanced` templates.", + "type": "object" + }, + "forward": { + "default": true, + "description": "If `false`, does not forward request headers to upstream request.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "query": { + "description": "Upstream request query param customizations.", + "properties": { + "custom": { + "additionalProperties": true, + "description": "The custom query params to be added in the upstream HTTP request. Values can contain Lua expressions in the form `$(some_lua_expression)`. The syntax is based on `request-transformer-advanced` templates.", + "type": "object" + }, + "forward": { + "default": true, + "description": "If `false`, does not forward request query params to upstream request.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "callouts" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/request-callout/3.12.json b/json_schemas/request-callout/3.12.json new file mode 100644 index 00000000..3a7b0d41 --- /dev/null +++ b/json_schemas/request-callout/3.12.json @@ -0,0 +1,626 @@ +{ + "properties": { + "config": { + "properties": { + "cache": { + "description": "Plugin global caching configuration.", + "properties": { + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities.", + "minimum": 0, + "type": "integer" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "default": "off", + "description": "The backing data store in which to hold cache entities. Accepted values are: `off`, `memory`, and `redis`.", + "enum": [ + "memory", + "off", + "redis" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "callouts": { + "description": "A collection of callout objects, where each object represents an HTTP request made in the context of a proxy request.", + "items": { + "properties": { + "cache": { + "description": "Callout caching configuration.", + "properties": { + "bypass": { + "default": false, + "description": "If `true`, skips caching the callout response.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "depends_on": { + "default": [], + "description": "An array of callout names the current callout depends on. This dependency list determines the callout execution order via a topological sorting algorithm.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "A string identifier for a callout. A callout object is referenceable via its name in the `kong.ctx.shared.callouts.`", + "type": "string" + }, + "request": { + "description": "The customizations for the callout request.", + "properties": { + "body": { + "description": "Callout request body customizations.", + "properties": { + "custom": { + "additionalProperties": true, + "description": "The custom body fields to be added to the callout HTTP request. Values can contain Lua expressions in the form $(some_lua_expression). The syntax is based on `request-transformer-advanced` templates.", + "type": "object" + }, + "decode": { + "default": false, + "description": "If `true`, decodes the request's body and make it available for customizations. Only JSON content type is supported.", + "type": "boolean" + }, + "forward": { + "default": false, + "description": "If `true`, forwards the incoming request's body to the callout request.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "by_lua": { + "description": "Lua code that executes before the callout request is made. **Warning** can impact system behavior. Standard Lua sandboxing restrictions apply.", + "type": "string" + }, + "error": { + "description": "The error handling policy the plugin will apply to TCP and HTTP errors.", + "properties": { + "error_response_code": { + "default": 400, + "description": "The error code to respond with if `on_error` is `fail` or if `retries` is achieved.", + "type": "integer" + }, + "error_response_msg": { + "default": "service callout error", + "description": "The error mesasge to respond with if `on_error` is set to `fail` or if `retries` is achieved. Templating with Lua expressions is supported.", + "type": "string" + }, + "http_statuses": { + "description": "The list of HTTP status codes considered errors under the error handling policy.", + "items": { + "maximum": 999, + "minimum": 100, + "required": [], + "type": "integer" + }, + "type": "array" + }, + "on_error": { + "default": "fail", + "enum": [ + "continue", + "fail", + "retry" + ], + "type": "string" + }, + "retries": { + "default": 2, + "description": "The number of retries the plugin will attempt on TCP and HTTP errors if `on_error` is set to `retry`.", + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "headers": { + "description": "Callout request header customizations.", + "properties": { + "custom": { + "additionalProperties": true, + "description": "The custom headers to be added in the callout HTTP request. Values can contain Lua expressions in the form `$(some_lua_expression)`. The syntax is based on `request-transformer-advanced` templates.", + "type": "object" + }, + "forward": { + "default": false, + "description": "If `true`, forwards the incoming request's headers to the callout request. ", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "http_opts": { + "description": "HTTP connection parameters.", + "properties": { + "proxy": { + "description": "Proxy settings.", + "properties": { + "auth_password": { + "description": "The password to authenticate with, if the forward proxy is protected by basic authentication.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "auth_username": { + "description": "The username to authenticate with, if the forward proxy is protected by basic authentication.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "http_proxy": { + "description": "The HTTP proxy URL. This proxy server will be used for HTTP requests.", + "type": "string" + }, + "https_proxy": { + "description": "The HTTPS proxy URL. This proxy server will be used for HTTPS requests.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "ssl_server_name": { + "description": "The SNI used in the callout request. Defaults to host if omitted.", + "type": "string" + }, + "ssl_verify": { + "default": false, + "description": "If set to `true`, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeouts": { + "description": "Socket timeouts in milliseconds. All or none must be set.", + "properties": { + "connect": { + "description": "The socket connect timeout.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "read": { + "description": "The socket read timeout. ", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "write": { + "description": "The socket write timeout.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "method": { + "default": "GET", + "description": "The HTTP method that will be requested.", + "pattern": "^[A-Z]+$", + "type": "string" + }, + "query": { + "description": "Callout request query param customizations.", + "properties": { + "custom": { + "additionalProperties": true, + "description": "The custom query params to be added in the callout HTTP request. Values can contain Lua expressions in the form `$(some_lua_expression)`. The syntax is based on `request-transformer-advanced` templates.", + "type": "object" + }, + "forward": { + "default": false, + "description": "If `true`, forwards the incoming request's query params to the callout request. ", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "url": { + "description": "The URL that will be requested. Values can contain Lua expressions in the form `$(some_lua_expression)`. The syntax is based on `request-transformer-advanced` templates.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + "body", + "error", + "headers", + "http_opts", + "query", + "url" + ], + "type": "object" + }, + "response": { + "description": "Configurations of callout response handling.", + "properties": { + "body": { + "properties": { + "decode": { + "default": false, + "description": "If `true`, decodes the response body before storing into the context. Only JSON is supported.", + "type": "boolean" + }, + "store": { + "default": true, + "description": "If `false`, skips storing the callout response body into kong.ctx.shared.callouts..response.body.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "by_lua": { + "description": "Lua code that executes after the callout response is received, before caching takes place. Can produce side effects. Standard Lua sandboxing restrictions apply.", + "type": "string" + }, + "headers": { + "description": "Callout response header customizations.", + "properties": { + "store": { + "default": true, + "description": "If `false`, skips storing the callout response headers into kong.ctx.shared.callouts..response.headers.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "body", + "headers" + ], + "type": "object" + } + }, + "required": [ + "cache", + "name", + "request", + "response" + ], + "type": "object" + }, + "type": "array" + }, + "upstream": { + "description": "Customizations to the upstream request.", + "properties": { + "body": { + "description": "Callout request body customizations.", + "properties": { + "custom": { + "additionalProperties": true, + "description": "The custom body fields to be added in the upstream request body. Values can contain Lua expressions in the form $(some_lua_expression). The syntax is based on `request-transformer-advanced` templates.", + "type": "object" + }, + "decode": { + "default": true, + "description": "If `true`, decodes the request's body to make it available for upstream by_lua customizations. Only JSON content type is supported.", + "type": "boolean" + }, + "forward": { + "default": true, + "description": "If `false`, skips forwarding the incoming request's body to the upstream request.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "by_lua": { + "description": "Lua code that executes before the upstream request is made. Can produce side effects. Standard Lua sandboxing restrictions apply.", + "type": "string" + }, + "headers": { + "description": "Callout request header customizations.", + "properties": { + "custom": { + "additionalProperties": true, + "description": "The custom headers to be added in the upstream HTTP request. Values can contain Lua expressions in the form $(some_lua_expression). The syntax is based on `request-transformer-advanced` templates.", + "type": "object" + }, + "forward": { + "default": true, + "description": "If `false`, does not forward request headers to upstream request.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "query": { + "description": "Upstream request query param customizations.", + "properties": { + "custom": { + "additionalProperties": true, + "description": "The custom query params to be added in the upstream HTTP request. Values can contain Lua expressions in the form `$(some_lua_expression)`. The syntax is based on `request-transformer-advanced` templates.", + "type": "object" + }, + "forward": { + "default": true, + "description": "If `false`, does not forward request query params to upstream request.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "callouts" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/request-size-limiting/2.8.json b/json_schemas/request-size-limiting/2.8.json new file mode 100644 index 00000000..9e6e804a --- /dev/null +++ b/json_schemas/request-size-limiting/2.8.json @@ -0,0 +1,115 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_payload_size": { + "default": 128, + "description": "Allowed request payload size in megabytes. Default is `128` megabytes (128000000 bytes).", + "examples": [ + 128 + ], + "type": "integer" + }, + "require_content_length": { + "default": false, + "description": "Set to `true` to ensure a valid `Content-Length` header exists before reading the request body.", + "examples": [ + false + ], + "type": "boolean" + }, + "size_unit": { + "default": "megabytes", + "description": "Size unit can be set either in `bytes`, `kilobytes`, or `megabytes` (default). This configuration is not available in versions prior to Kong Gateway 1.3 and Kong Gateway (OSS) 2.0.", + "enum": [ + "bytes", + "kilobytes", + "megabytes" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-size-limiting/3.10.json b/json_schemas/request-size-limiting/3.10.json new file mode 100644 index 00000000..5259ed13 --- /dev/null +++ b/json_schemas/request-size-limiting/3.10.json @@ -0,0 +1,96 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_payload_size": { + "default": 128, + "description": "Allowed request payload size in megabytes. Default is `128` megabytes (128000000 bytes).", + "type": "integer" + }, + "require_content_length": { + "default": false, + "description": "Set to `true` to ensure a valid `Content-Length` header exists before reading the request body.", + "type": "boolean" + }, + "size_unit": { + "default": "megabytes", + "description": "Size unit can be set either in `bytes`, `kilobytes`, or `megabytes` (default). This configuration is not available in versions prior to Kong Gateway 1.3 and Kong Gateway (OSS) 2.0.", + "enum": [ + "bytes", + "kilobytes", + "megabytes" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-size-limiting/3.11.json b/json_schemas/request-size-limiting/3.11.json new file mode 100644 index 00000000..3d4e9633 --- /dev/null +++ b/json_schemas/request-size-limiting/3.11.json @@ -0,0 +1,84 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_payload_size": { + "default": 128, + "description": "Allowed request payload size in megabytes. Default is `128` megabytes (128000000 bytes).", + "type": "integer" + }, + "require_content_length": { + "default": false, + "description": "Set to `true` to ensure a valid `Content-Length` header exists before reading the request body.", + "type": "boolean" + }, + "size_unit": { + "default": "megabytes", + "description": "Size unit can be set either in `bytes`, `kilobytes`, or `megabytes` (default). This configuration is not available in versions prior to Kong Gateway 1.3 and Kong Gateway (OSS) 2.0.", + "enum": [ + "bytes", + "kilobytes", + "megabytes" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/request-size-limiting/3.12.json b/json_schemas/request-size-limiting/3.12.json new file mode 100644 index 00000000..3d4e9633 --- /dev/null +++ b/json_schemas/request-size-limiting/3.12.json @@ -0,0 +1,84 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_payload_size": { + "default": 128, + "description": "Allowed request payload size in megabytes. Default is `128` megabytes (128000000 bytes).", + "type": "integer" + }, + "require_content_length": { + "default": false, + "description": "Set to `true` to ensure a valid `Content-Length` header exists before reading the request body.", + "type": "boolean" + }, + "size_unit": { + "default": "megabytes", + "description": "Size unit can be set either in `bytes`, `kilobytes`, or `megabytes` (default). This configuration is not available in versions prior to Kong Gateway 1.3 and Kong Gateway (OSS) 2.0.", + "enum": [ + "bytes", + "kilobytes", + "megabytes" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/request-size-limiting/3.4.json b/json_schemas/request-size-limiting/3.4.json new file mode 100644 index 00000000..5259ed13 --- /dev/null +++ b/json_schemas/request-size-limiting/3.4.json @@ -0,0 +1,96 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_payload_size": { + "default": 128, + "description": "Allowed request payload size in megabytes. Default is `128` megabytes (128000000 bytes).", + "type": "integer" + }, + "require_content_length": { + "default": false, + "description": "Set to `true` to ensure a valid `Content-Length` header exists before reading the request body.", + "type": "boolean" + }, + "size_unit": { + "default": "megabytes", + "description": "Size unit can be set either in `bytes`, `kilobytes`, or `megabytes` (default). This configuration is not available in versions prior to Kong Gateway 1.3 and Kong Gateway (OSS) 2.0.", + "enum": [ + "bytes", + "kilobytes", + "megabytes" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-size-limiting/3.7.json b/json_schemas/request-size-limiting/3.7.json new file mode 100644 index 00000000..5259ed13 --- /dev/null +++ b/json_schemas/request-size-limiting/3.7.json @@ -0,0 +1,96 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_payload_size": { + "default": 128, + "description": "Allowed request payload size in megabytes. Default is `128` megabytes (128000000 bytes).", + "type": "integer" + }, + "require_content_length": { + "default": false, + "description": "Set to `true` to ensure a valid `Content-Length` header exists before reading the request body.", + "type": "boolean" + }, + "size_unit": { + "default": "megabytes", + "description": "Size unit can be set either in `bytes`, `kilobytes`, or `megabytes` (default). This configuration is not available in versions prior to Kong Gateway 1.3 and Kong Gateway (OSS) 2.0.", + "enum": [ + "bytes", + "kilobytes", + "megabytes" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-size-limiting/3.8.json b/json_schemas/request-size-limiting/3.8.json new file mode 100644 index 00000000..5259ed13 --- /dev/null +++ b/json_schemas/request-size-limiting/3.8.json @@ -0,0 +1,96 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_payload_size": { + "default": 128, + "description": "Allowed request payload size in megabytes. Default is `128` megabytes (128000000 bytes).", + "type": "integer" + }, + "require_content_length": { + "default": false, + "description": "Set to `true` to ensure a valid `Content-Length` header exists before reading the request body.", + "type": "boolean" + }, + "size_unit": { + "default": "megabytes", + "description": "Size unit can be set either in `bytes`, `kilobytes`, or `megabytes` (default). This configuration is not available in versions prior to Kong Gateway 1.3 and Kong Gateway (OSS) 2.0.", + "enum": [ + "bytes", + "kilobytes", + "megabytes" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-size-limiting/3.9.json b/json_schemas/request-size-limiting/3.9.json new file mode 100644 index 00000000..5259ed13 --- /dev/null +++ b/json_schemas/request-size-limiting/3.9.json @@ -0,0 +1,96 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_payload_size": { + "default": 128, + "description": "Allowed request payload size in megabytes. Default is `128` megabytes (128000000 bytes).", + "type": "integer" + }, + "require_content_length": { + "default": false, + "description": "Set to `true` to ensure a valid `Content-Length` header exists before reading the request body.", + "type": "boolean" + }, + "size_unit": { + "default": "megabytes", + "description": "Size unit can be set either in `bytes`, `kilobytes`, or `megabytes` (default). This configuration is not available in versions prior to Kong Gateway 1.3 and Kong Gateway (OSS) 2.0.", + "enum": [ + "bytes", + "kilobytes", + "megabytes" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-termination/2.8.json b/json_schemas/request-termination/2.8.json new file mode 100644 index 00000000..340d9c22 --- /dev/null +++ b/json_schemas/request-termination/2.8.json @@ -0,0 +1,123 @@ +{ + "properties": { + "config": { + "properties": { + "body": { + "description": "The raw response body to send. This is mutually exclusive with the `config.message` field.", + "type": "string" + }, + "content_type": { + "description": "Content type of the raw response configured with `config.body`.", + "type": "string" + }, + "echo": { + "default": false, + "description": "When set, the plugin will echo a copy of the request back to the client. The main usecase for this is debugging. It can be combined with `trigger` in order to debug requests on live systems without disturbing real traffic.", + "type": "boolean" + }, + "message": { + "description": "The message to send, if using the default response generator.", + "examples": [ + "So long and thanks for all the fish!" + ], + "type": "string" + }, + "status_code": { + "default": 503, + "description": "The response code to send. Must be an integer between 100 and 599.", + "examples": [ + 403 + ], + "maximum": 599, + "minimum": 100, + "type": "integer" + }, + "trigger": { + "description": "When not set, the plugin always activates. When set to a string, the plugin will activate exclusively on requests containing either a header or a query parameter that is named the string.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-termination/3.10.json b/json_schemas/request-termination/3.10.json new file mode 100644 index 00000000..b9c25a41 --- /dev/null +++ b/json_schemas/request-termination/3.10.json @@ -0,0 +1,117 @@ +{ + "properties": { + "config": { + "properties": { + "body": { + "description": "The raw response body to send. This is mutually exclusive with the `config.message` field.", + "type": "string" + }, + "content_type": { + "description": "Content type of the raw response configured with `config.body`.", + "type": "string" + }, + "echo": { + "default": false, + "description": "When set, the plugin will echo a copy of the request back to the client. The main usecase for this is debugging. It can be combined with `trigger` in order to debug requests on live systems without disturbing real traffic.", + "type": "boolean" + }, + "message": { + "description": "The message to send, if using the default response generator.", + "type": "string" + }, + "status_code": { + "default": 503, + "description": "The response code to send. Must be an integer between 100 and 599.", + "maximum": 599, + "minimum": 100, + "type": "integer" + }, + "trigger": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-termination/3.11.json b/json_schemas/request-termination/3.11.json new file mode 100644 index 00000000..96110caf --- /dev/null +++ b/json_schemas/request-termination/3.11.json @@ -0,0 +1,103 @@ +{ + "properties": { + "config": { + "properties": { + "body": { + "description": "The raw response body to send. This is mutually exclusive with the `config.message` field.", + "type": "string" + }, + "content_type": { + "description": "Content type of the raw response configured with `config.body`.", + "type": "string" + }, + "echo": { + "default": false, + "description": "When set, the plugin will echo a copy of the request back to the client. The main usecase for this is debugging. It can be combined with `trigger` in order to debug requests on live systems without disturbing real traffic.", + "type": "boolean" + }, + "message": { + "description": "The message to send, if using the default response generator.", + "type": "string" + }, + "status_code": { + "default": 503, + "description": "The response code to send. Must be an integer between 100 and 599.", + "maximum": 599, + "minimum": 100, + "type": "integer" + }, + "trigger": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/request-termination/3.12.json b/json_schemas/request-termination/3.12.json new file mode 100644 index 00000000..96110caf --- /dev/null +++ b/json_schemas/request-termination/3.12.json @@ -0,0 +1,103 @@ +{ + "properties": { + "config": { + "properties": { + "body": { + "description": "The raw response body to send. This is mutually exclusive with the `config.message` field.", + "type": "string" + }, + "content_type": { + "description": "Content type of the raw response configured with `config.body`.", + "type": "string" + }, + "echo": { + "default": false, + "description": "When set, the plugin will echo a copy of the request back to the client. The main usecase for this is debugging. It can be combined with `trigger` in order to debug requests on live systems without disturbing real traffic.", + "type": "boolean" + }, + "message": { + "description": "The message to send, if using the default response generator.", + "type": "string" + }, + "status_code": { + "default": 503, + "description": "The response code to send. Must be an integer between 100 and 599.", + "maximum": 599, + "minimum": 100, + "type": "integer" + }, + "trigger": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/request-termination/3.4.json b/json_schemas/request-termination/3.4.json new file mode 100644 index 00000000..b8472b1d --- /dev/null +++ b/json_schemas/request-termination/3.4.json @@ -0,0 +1,104 @@ +{ + "properties": { + "config": { + "properties": { + "body": { + "description": "The raw response body to send. This is mutually exclusive with the `config.message` field.", + "type": "string" + }, + "content_type": { + "description": "Content type of the raw response configured with `config.body`.", + "type": "string" + }, + "echo": { + "default": false, + "description": "When set, the plugin will echo a copy of the request back to the client. The main usecase for this is debugging. It can be combined with `trigger` in order to debug requests on live systems without disturbing real traffic.", + "type": "boolean" + }, + "message": { + "description": "The message to send, if using the default response generator.", + "type": "string" + }, + "status_code": { + "default": 503, + "description": "The response code to send. Must be an integer between 100 and 599.", + "maximum": 599, + "minimum": 100, + "type": "integer" + }, + "trigger": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-termination/3.7.json b/json_schemas/request-termination/3.7.json new file mode 100644 index 00000000..b9c25a41 --- /dev/null +++ b/json_schemas/request-termination/3.7.json @@ -0,0 +1,117 @@ +{ + "properties": { + "config": { + "properties": { + "body": { + "description": "The raw response body to send. This is mutually exclusive with the `config.message` field.", + "type": "string" + }, + "content_type": { + "description": "Content type of the raw response configured with `config.body`.", + "type": "string" + }, + "echo": { + "default": false, + "description": "When set, the plugin will echo a copy of the request back to the client. The main usecase for this is debugging. It can be combined with `trigger` in order to debug requests on live systems without disturbing real traffic.", + "type": "boolean" + }, + "message": { + "description": "The message to send, if using the default response generator.", + "type": "string" + }, + "status_code": { + "default": 503, + "description": "The response code to send. Must be an integer between 100 and 599.", + "maximum": 599, + "minimum": 100, + "type": "integer" + }, + "trigger": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-termination/3.8.json b/json_schemas/request-termination/3.8.json new file mode 100644 index 00000000..b9c25a41 --- /dev/null +++ b/json_schemas/request-termination/3.8.json @@ -0,0 +1,117 @@ +{ + "properties": { + "config": { + "properties": { + "body": { + "description": "The raw response body to send. This is mutually exclusive with the `config.message` field.", + "type": "string" + }, + "content_type": { + "description": "Content type of the raw response configured with `config.body`.", + "type": "string" + }, + "echo": { + "default": false, + "description": "When set, the plugin will echo a copy of the request back to the client. The main usecase for this is debugging. It can be combined with `trigger` in order to debug requests on live systems without disturbing real traffic.", + "type": "boolean" + }, + "message": { + "description": "The message to send, if using the default response generator.", + "type": "string" + }, + "status_code": { + "default": 503, + "description": "The response code to send. Must be an integer between 100 and 599.", + "maximum": 599, + "minimum": 100, + "type": "integer" + }, + "trigger": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-termination/3.9.json b/json_schemas/request-termination/3.9.json new file mode 100644 index 00000000..b9c25a41 --- /dev/null +++ b/json_schemas/request-termination/3.9.json @@ -0,0 +1,117 @@ +{ + "properties": { + "config": { + "properties": { + "body": { + "description": "The raw response body to send. This is mutually exclusive with the `config.message` field.", + "type": "string" + }, + "content_type": { + "description": "Content type of the raw response configured with `config.body`.", + "type": "string" + }, + "echo": { + "default": false, + "description": "When set, the plugin will echo a copy of the request back to the client. The main usecase for this is debugging. It can be combined with `trigger` in order to debug requests on live systems without disturbing real traffic.", + "type": "boolean" + }, + "message": { + "description": "The message to send, if using the default response generator.", + "type": "string" + }, + "status_code": { + "default": 503, + "description": "The response code to send. Must be an integer between 100 and 599.", + "maximum": 599, + "minimum": 100, + "type": "integer" + }, + "trigger": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-transformer-advanced/2.8.json b/json_schemas/request-transformer-advanced/2.8.json new file mode 100644 index 00000000..30b9464b --- /dev/null +++ b/json_schemas/request-transformer-advanced/2.8.json @@ -0,0 +1,385 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "body": { + "default": [ + + ], + "description": "List of `paramname:value` pairs. If and only if content-type is one the following: [`application/json, multipart/form-data`, `application/x-www-form-urlencoded`]; and the parameter is not present, add a new parameter with the given value to form-encoded body.\nIgnored if the parameter is already present.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "description": "List of `headername:value` pairs. If and only if the header is not already set,\nset a new header with the given value. Ignored if the header is already set.", + "examples": [ + [ + "x-another-header:something", + "x-new-header:value" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "description": "List of `queryname:value` pairs. If and only if the querystring name is not already set,\nset a new querystring with the given value. Ignored if the querystring name is already set.", + "examples": [ + [ + "another-param:some_value", + "new-param:some_value" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "allow": { + "properties": { + "body": { + "description": "Set of parameter names. If and only if content-type is one the following:\n[`application/json`, `multipart/form-data`, `application/x-www-form-urlencoded`]; allow only allowed parameters in the body.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "body": { + "default": [ + + ], + "description": "List of `paramname:value` pairs. If the content-type is one the following: [`application/json`, `application/x-www-form-urlencoded`]; add a new parameter with the given value if the parameter is not present. Otherwise, if it is already present,\nthe two values (old and new) will be aggregated in an array.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "description": "List of `headername:value` pairs. If the header is not set, set it with the given value.\nIf it is already set, a new header with the same name and the new value will be set.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "description": "List of `queryname:value` pairs. If the querystring is not set, set it with the given value.\nIf it is already set, a new querystring with the same name and the new value will be set.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "http_method": { + "description": "Changes the HTTP method for the upstream request.", + "pattern": "^[A-Z]+$", + "type": "string" + }, + "remove": { + "properties": { + "body": { + "default": [ + + ], + "description": "List of parameter names. Remove the parameter if and only if content-type is one of the\nfollowing: [`application/json`, `multipart/form-data`, `application/x-www-form-urlencoded`]; and parameter is present.", + "examples": [ + [ + "formparam-another-one", + "formparam-toremove" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "description": "List of header names. Unset the headers with the given name.", + "examples": [ + [ + "x-another-one", + "x-toremove" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "description": "List of querystring names. Remove the querystring if it is present.", + "examples": [ + [ + "qs-old-name:qs-new-name", + "qs2-old-name:qs2-new-name" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "body": { + "default": [ + + ], + "description": "List of parameter `name:value` pairs. Rename the parameter name if and only if content-type is\none of the following: [`application/json`, `multipart/form-data`, `application/x-www-form-urlencoded`]; and parameter is present.", + "examples": [ + [ + "param-old:param-new", + "param2-old:param2-new" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "description": "List of `headername:value` pairs. If and only if the header is already set,\nrename the header. The value is unchanged. Ignored if the header is not already set.", + "examples": [ + [ + "another-old-name:another-new-name", + "header-old-name:header-new-name" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "description": "List of `queryname:value` pairs. If and only if the field name is already set,\nrename the field name. The value is unchanged. Ignored if the field name is not already set.", + "examples": [ + [ + "qs-old-name:qs-new-name", + "qs2-old-name:qs2-new-name" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "default": [ + + ], + "description": "List of paramname:value pairs. If and only if content-type is one the\nfollowing: [`application/json`, `multipart/form-data`, `application/x-www-form-urlencoded`];\nand the parameter is already present, replace its old value with the new one. Ignored if the parameter is not already present.", + "examples": [ + [ + "body-param1:new-value-1", + "body-param2:new-value-2" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "description": "List of headername:value pairs. If and only if the header is already set,\nreplace its old value with the new one. Ignored if the header is not already set.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "description": "List of queryname:value pairs. If and only if the querystring name is already set,\nreplace its old value with the new one. Ignored if the header is not already set.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "uri": { + "description": "Updates the upstream request URI with given value. This value can only\nbe used to update the path part of the URI; not the scheme, nor the hostname.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "shorthands": { + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-transformer-advanced/3.10.json b/json_schemas/request-transformer-advanced/3.10.json new file mode 100644 index 00000000..f2a4a54a --- /dev/null +++ b/json_schemas/request-transformer-advanced/3.10.json @@ -0,0 +1,402 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "allow": { + "properties": { + "body": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "dots_in_keys": { + "default": true, + "description": "Specify whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects. See [Arrays and nested objects](#arrays-and-nested-objects).", + "type": "boolean" + }, + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "pattern": "^[A-Z]+$", + "type": "string" + }, + "remove": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "uri": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-transformer-advanced/3.11.json b/json_schemas/request-transformer-advanced/3.11.json new file mode 100644 index 00000000..bf67ac45 --- /dev/null +++ b/json_schemas/request-transformer-advanced/3.11.json @@ -0,0 +1,302 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "body": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "allow": { + "properties": { + "body": { + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "append": { + "properties": { + "body": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "dots_in_keys": { + "default": true, + "description": "Specify whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects. See [Arrays and nested objects](#arrays-and-nested-objects).", + "type": "boolean" + }, + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "pattern": "^[A-Z]+$", + "type": "string" + }, + "remove": { + "properties": { + "body": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "rename": { + "properties": { + "body": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "uri": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/request-transformer-advanced/3.12.json b/json_schemas/request-transformer-advanced/3.12.json new file mode 100644 index 00000000..0f2ab6a7 --- /dev/null +++ b/json_schemas/request-transformer-advanced/3.12.json @@ -0,0 +1,302 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "body": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "allow": { + "properties": { + "body": { + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "append": { + "properties": { + "body": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "dots_in_keys": { + "default": true, + "description": "Specify whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects.", + "type": "boolean" + }, + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "pattern": "^[A-Z]+$", + "type": "string" + }, + "remove": { + "properties": { + "body": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "rename": { + "properties": { + "body": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [], + "type": "string" + }, + "type": "array" + }, + "uri": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/request-transformer-advanced/3.4.json b/json_schemas/request-transformer-advanced/3.4.json new file mode 100644 index 00000000..f2a4a54a --- /dev/null +++ b/json_schemas/request-transformer-advanced/3.4.json @@ -0,0 +1,402 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "allow": { + "properties": { + "body": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "dots_in_keys": { + "default": true, + "description": "Specify whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects. See [Arrays and nested objects](#arrays-and-nested-objects).", + "type": "boolean" + }, + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "pattern": "^[A-Z]+$", + "type": "string" + }, + "remove": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "uri": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-transformer-advanced/3.7.json b/json_schemas/request-transformer-advanced/3.7.json new file mode 100644 index 00000000..f2a4a54a --- /dev/null +++ b/json_schemas/request-transformer-advanced/3.7.json @@ -0,0 +1,402 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "allow": { + "properties": { + "body": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "dots_in_keys": { + "default": true, + "description": "Specify whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects. See [Arrays and nested objects](#arrays-and-nested-objects).", + "type": "boolean" + }, + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "pattern": "^[A-Z]+$", + "type": "string" + }, + "remove": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "uri": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-transformer-advanced/3.8.json b/json_schemas/request-transformer-advanced/3.8.json new file mode 100644 index 00000000..f2a4a54a --- /dev/null +++ b/json_schemas/request-transformer-advanced/3.8.json @@ -0,0 +1,402 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "allow": { + "properties": { + "body": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "dots_in_keys": { + "default": true, + "description": "Specify whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects. See [Arrays and nested objects](#arrays-and-nested-objects).", + "type": "boolean" + }, + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "pattern": "^[A-Z]+$", + "type": "string" + }, + "remove": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "uri": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-transformer-advanced/3.9.json b/json_schemas/request-transformer-advanced/3.9.json new file mode 100644 index 00000000..f2a4a54a --- /dev/null +++ b/json_schemas/request-transformer-advanced/3.9.json @@ -0,0 +1,402 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "allow": { + "properties": { + "body": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "dots_in_keys": { + "default": true, + "description": "Specify whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects. See [Arrays and nested objects](#arrays-and-nested-objects).", + "type": "boolean" + }, + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "pattern": "^[A-Z]+$", + "type": "string" + }, + "remove": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "description": "This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "uri": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-transformer/2.8.json b/json_schemas/request-transformer/2.8.json new file mode 100644 index 00000000..a2e5c78a --- /dev/null +++ b/json_schemas/request-transformer/2.8.json @@ -0,0 +1,375 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "body": { + "default": [ + + ], + "description": "List of `paramname:value` pairs. If and only if content-type is one the\nfollowing [`application/json`, `multipart/form-data`, `application/x-www-form-urlencoded`]\nand the parameter is not present, add a new parameter with the given value to the form-encoded\nbody. Ignored if the parameter is already present.", + "examples": [ + [ + "another-form-param:some_value", + "new-form-param:some_value" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "description": "List of `headername:value` pairs. If and only if the header is not already set, set a new header\nwith the given value. Ignored if the header is already set.", + "examples": [ + [ + "x-another-header:something", + "x-new-header:value" + ] + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "description": "List of `queryname:value` pairs. If and only if the querystring is not already set, set a new\nquerystring with the given value. Ignored if the querystring is already set.", + "examples": [ + [ + "another-param:some_value", + "new-param:some_value" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "body": { + "default": [ + + ], + "description": "List of `paramname:value` pairs. If the content-type is one the following\n[`application/json`, `application/x-www-form-urlencoded`], add a new parameter\nwith the given value if the parameter is not present. Otherwise, if it is already present,\naggregate the two values (old and new) in an array.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "description": "List of `headername:value` pairs. If the header is not set, set it with the given value.\nIf it is already set, an additional new header with the same name and the new value will be appended.", + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "description": "List of `queryname:value` pairs. If the querystring is not set, set it with the given value. If it is already set, a new querystring with the same name and the new value will be set.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "http_method": { + "description": "Sets the HTTP method for the upstream request.", + "pattern": "^[A-Z]+$", + "type": "string" + }, + "remove": { + "properties": { + "body": { + "default": [ + + ], + "description": "List of parameter names. Remove the parameter if and only if content-type is one the following:\n[`application/json`, `multipart/form-data`, `application/x-www-form-urlencoded`] and the parameter is present.", + "examples": [ + [ + "formparam-another-one", + "formparam-toremove" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "description": "List of header names. Unset the headers with the given name.", + "examples": [ + [ + "x-another-one", + "x-toremove" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "description": "List of querystring names. Remove the querystring if it is present.", + "examples": [ + [ + "qs-old-name:qs-new-name", + "qs2-old-name:qs2-new-name" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "body": { + "default": [ + + ], + "description": "List of `paramname:value` pairs. Rename the parameter name if and only if\ncontent-type is one the following [`application/json`, `multipart/form-data`, `application/x-www-form-urlencoded`]\nand the parameter is present.", + "examples": [ + [ + "param-old:param-new", + "param2-old:param2-new" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "description": "List of `headername:value` pairs. If and only if the header is already set, rename\nthe header. The value is unchanged. Ignored if the header is not already set.", + "examples": [ + [ + "another-old-name:another-new-name", + "header-old-name:header-new-name" + ] + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "description": "List of queryname:value pairs. If and only if the field name is already set, rename the field name.\nThe value is unchanged. Ignored if the field name is not already set.", + "examples": [ + [ + "qs-old-name:qs-new-name", + "qs2-old-name:qs2-new-name" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "default": [ + + ], + "description": "List of `paramname:value` pairs. If and only if content-type is one the following\n[`application/json`, `multipart/form-data`, `application/x-www-form-urlencoded`] and the\nparameter is already present, replace its old value with the new one. Ignored if\nthe parameter is not already present.", + "examples": [ + [ + "body-param1:new-value-1", + "body-param2:new-value-2" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "description": "List of `headername:value` pairs. If and only if the header is already set, replace\nits old value with the new one. Ignored if the header is not already set.", + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "description": "List of `queryname:value pairs`. If and only if the field name is already set,\nreplace its old value with the new one. Ignored if the field name is not already set.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "uri": { + "description": "Updates the upstream request URI with a given value. This value can be used to update\nonly the path part of the URI, not the scheme or the hostname.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-transformer/3.10.json b/json_schemas/request-transformer/3.10.json new file mode 100644 index 00000000..ce375bb6 --- /dev/null +++ b/json_schemas/request-transformer/3.10.json @@ -0,0 +1,328 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "pattern": "^[A-Z]+$", + "type": "string" + }, + "remove": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "uri": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-transformer/3.11.json b/json_schemas/request-transformer/3.11.json new file mode 100644 index 00000000..8a4551c8 --- /dev/null +++ b/json_schemas/request-transformer/3.11.json @@ -0,0 +1,244 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "body": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "append": { + "properties": { + "body": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "pattern": "^[A-Z]+$", + "type": "string" + }, + "remove": { + "properties": { + "body": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "rename": { + "properties": { + "body": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "uri": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/request-transformer/3.12.json b/json_schemas/request-transformer/3.12.json new file mode 100644 index 00000000..8a4551c8 --- /dev/null +++ b/json_schemas/request-transformer/3.12.json @@ -0,0 +1,244 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "body": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "append": { + "properties": { + "body": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "pattern": "^[A-Z]+$", + "type": "string" + }, + "remove": { + "properties": { + "body": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "rename": { + "properties": { + "body": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "uri": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/request-transformer/3.4.json b/json_schemas/request-transformer/3.4.json new file mode 100644 index 00000000..ce375bb6 --- /dev/null +++ b/json_schemas/request-transformer/3.4.json @@ -0,0 +1,328 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "pattern": "^[A-Z]+$", + "type": "string" + }, + "remove": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "uri": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-transformer/3.7.json b/json_schemas/request-transformer/3.7.json new file mode 100644 index 00000000..ce375bb6 --- /dev/null +++ b/json_schemas/request-transformer/3.7.json @@ -0,0 +1,328 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "pattern": "^[A-Z]+$", + "type": "string" + }, + "remove": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "uri": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-transformer/3.8.json b/json_schemas/request-transformer/3.8.json new file mode 100644 index 00000000..ce375bb6 --- /dev/null +++ b/json_schemas/request-transformer/3.8.json @@ -0,0 +1,328 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "pattern": "^[A-Z]+$", + "type": "string" + }, + "remove": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "uri": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-transformer/3.9.json b/json_schemas/request-transformer/3.9.json new file mode 100644 index 00000000..ce375bb6 --- /dev/null +++ b/json_schemas/request-transformer/3.9.json @@ -0,0 +1,328 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "pattern": "^[A-Z]+$", + "type": "string" + }, + "remove": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "querystring": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "uri": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-validator/2.8.json b/json_schemas/request-validator/2.8.json new file mode 100644 index 00000000..92f02747 --- /dev/null +++ b/json_schemas/request-validator/2.8.json @@ -0,0 +1,147 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_content_types": { + "default": [ + "application/json" + ], + "description": "List of allowed content types. The value can be configured with the `charset` parameter. For example, `application/json; charset=UTF-8`.\n\n{:.note}\n> **Notes:** \n* Body validation is only done for `application/json` and skipped for any other allowed content types.\n* Only one parameter is supported. If a request sends more than one parameter with the Content-Type header, only the first parameter is evaluated and the rest are truncated.\nThe type, subtype, parameter names, and the value of the charset parameter are not case sensitive based on the RFC explanation.\n* Parameter does not need to be explicitly configured to allow a request passed with a parameter content-type. The parameter is checked only if the request carries the parameter and it's explicitly configured. For example, a request with `application/json; charset=UTF-8` is to be considered valid for `application/json`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "body_schema": { + "description": "The request body schema specification. One of `body_schema` or `parameter_schema`\nmust be specified.", + "examples": [ + "[{\"name\":{\"type\": \"string\", \"required\": true}}]" + ], + "type": "string" + }, + "parameter_schema": { + "description": "Array of parameter validator specifications. For details and examples, see\n[Parameter Schema Definition](#parameter-schema-definition). One of `body_schema` or `parameter_schema`\nmust be specified.", + "items": { + "properties": { + "explode": { + "type": "boolean" + }, + "in": { + "enum": [ + "header", + "path", + "query" + ], + "type": "string" + }, + "name": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "schema": { + "type": "string" + }, + "style": { + "enum": [ + "deepObject", + "form", + "label", + "matrix", + "pipeDelimited", + "simple", + "spaceDelimited" + ], + "type": "string" + } + }, + "required": [ + "in", + "name", + "required" + ], + "type": "object" + }, + "type": "array" + }, + "verbose_response": { + "default": false, + "description": "If enabled, the plugin returns more verbose and detailed validation errors\n(for example, the name of the required field that is missing).", + "type": "boolean" + }, + "version": { + "default": "kong", + "description": "Which validator to use. Supported values are `kong` (default) for using Kong's own schema\nvalidator, or `draft4` for using a JSON Schema Draft 4-compliant validator.", + "enum": [ + "draft4", + "kong" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-validator/3.10.json b/json_schemas/request-validator/3.10.json new file mode 100644 index 00000000..71fb676d --- /dev/null +++ b/json_schemas/request-validator/3.10.json @@ -0,0 +1,164 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_content_types": { + "default": [ + "application/json" + ], + "description": "List of allowed content types. The value can be configured with the `charset` parameter. For example, `application/json; charset=UTF-8`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "body_schema": { + "description": "The request body schema specification. One of `body_schema` or `parameter_schema` must be specified.", + "type": "string" + }, + "content_type_parameter_validation": { + "default": true, + "description": "Determines whether to enable parameters validation of request content-type.", + "type": "boolean" + }, + "parameter_schema": { + "description": "Array of parameter validator specification. One of `body_schema` or `parameter_schema` must be specified.", + "items": { + "properties": { + "explode": { + "description": "Required when `schema` and `style` are set. When `explode` is `true`, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters, this property has no effect.", + "type": "boolean" + }, + "in": { + "description": "The location of the parameter.", + "enum": [ + "header", + "path", + "query" + ], + "type": "string" + }, + "name": { + "description": "The name of the parameter. Parameter names are case-sensitive, and correspond to the parameter name used by the `in` property. If `in` is `path`, the `name` field MUST correspond to the named capture group from the configured `route`.", + "type": "string" + }, + "required": { + "description": "Determines whether this parameter is mandatory.", + "type": "boolean" + }, + "schema": { + "description": "Requred when `style` and `explode` are set. This is the schema defining the type used for the parameter. It is validated using `draft4` for JSON Schema draft 4 compliant validator. In addition to being a valid JSON Schema, the parameter schema MUST have a top-level `type` property to enable proper deserialization before validating.", + "type": "string" + }, + "style": { + "description": "Required when `schema` and `explode` are set. Describes how the parameter value will be deserialized depending on the type of the parameter value.", + "enum": [ + "deepObject", + "form", + "label", + "matrix", + "pipeDelimited", + "simple", + "spaceDelimited" + ], + "type": "string" + } + }, + "required": [ + "in", + "name", + "required" + ], + "type": "object" + }, + "type": "array" + }, + "verbose_response": { + "default": false, + "description": "If enabled, the plugin returns more verbose and detailed validation errors.", + "type": "boolean" + }, + "version": { + "default": "kong", + "description": "Which validator to use. Supported values are `kong` (default) for using Kong's own schema validator, or `draft4` for using a JSON Schema Draft 4-compliant validator.", + "enum": [ + "draft4", + "kong" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-validator/3.11.json b/json_schemas/request-validator/3.11.json new file mode 100644 index 00000000..13f55542 --- /dev/null +++ b/json_schemas/request-validator/3.11.json @@ -0,0 +1,154 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_content_types": { + "default": [ + "application/json" + ], + "description": "List of allowed content types. The value can be configured with the `charset` parameter. For example, `application/json; charset=UTF-8`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "body_schema": { + "description": "The request body schema specification. One of `body_schema` or `parameter_schema` must be specified.", + "type": "string" + }, + "content_type_parameter_validation": { + "default": true, + "description": "Determines whether to enable parameters validation of request content-type.", + "type": "boolean" + }, + "parameter_schema": { + "description": "Array of parameter validator specification. One of `body_schema` or `parameter_schema` must be specified.", + "items": { + "properties": { + "explode": { + "description": "Required when `schema` and `style` are set. When `explode` is `true`, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters, this property has no effect.", + "type": "boolean" + }, + "in": { + "description": "The location of the parameter.", + "enum": [ + "header", + "path", + "query" + ], + "type": "string" + }, + "name": { + "description": "The name of the parameter. Parameter names are case-sensitive, and correspond to the parameter name used by the `in` property. If `in` is `path`, the `name` field MUST correspond to the named capture group from the configured `route`.", + "type": "string" + }, + "required": { + "description": "Determines whether this parameter is mandatory.", + "type": "boolean" + }, + "schema": { + "description": "Required when `style` and `explode` are set. This is the schema defining the type used for the parameter. It is validated using `draft4` for JSON Schema draft 4 compliant validator. In addition to being a valid JSON Schema, the parameter schema MUST have a top-level `type` property to enable proper deserialization before validating.", + "type": "string" + }, + "style": { + "description": "Required when `schema` and `explode` are set. Describes how the parameter value will be deserialized depending on the type of the parameter value.", + "enum": [ + "deepObject", + "form", + "label", + "matrix", + "pipeDelimited", + "simple", + "spaceDelimited" + ], + "type": "string" + } + }, + "required": [ + "in", + "name", + "required" + ], + "type": "object" + }, + "type": "array" + }, + "verbose_response": { + "default": false, + "description": "If enabled, the plugin returns more verbose and detailed validation errors.", + "type": "boolean" + }, + "version": { + "default": "kong", + "description": "Which validator to use. Supported values are `kong` (default) for using Kong's own schema validator, or `draft4`, `draft7`, `draft201909`, and `draft202012` for using their respective JSON Schema Draft compliant validators.", + "enum": [ + "draft201909", + "draft202012", + "draft4", + "draft6", + "draft7", + "kong" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/request-validator/3.12.json b/json_schemas/request-validator/3.12.json new file mode 100644 index 00000000..13f55542 --- /dev/null +++ b/json_schemas/request-validator/3.12.json @@ -0,0 +1,154 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_content_types": { + "default": [ + "application/json" + ], + "description": "List of allowed content types. The value can be configured with the `charset` parameter. For example, `application/json; charset=UTF-8`.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "body_schema": { + "description": "The request body schema specification. One of `body_schema` or `parameter_schema` must be specified.", + "type": "string" + }, + "content_type_parameter_validation": { + "default": true, + "description": "Determines whether to enable parameters validation of request content-type.", + "type": "boolean" + }, + "parameter_schema": { + "description": "Array of parameter validator specification. One of `body_schema` or `parameter_schema` must be specified.", + "items": { + "properties": { + "explode": { + "description": "Required when `schema` and `style` are set. When `explode` is `true`, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters, this property has no effect.", + "type": "boolean" + }, + "in": { + "description": "The location of the parameter.", + "enum": [ + "header", + "path", + "query" + ], + "type": "string" + }, + "name": { + "description": "The name of the parameter. Parameter names are case-sensitive, and correspond to the parameter name used by the `in` property. If `in` is `path`, the `name` field MUST correspond to the named capture group from the configured `route`.", + "type": "string" + }, + "required": { + "description": "Determines whether this parameter is mandatory.", + "type": "boolean" + }, + "schema": { + "description": "Required when `style` and `explode` are set. This is the schema defining the type used for the parameter. It is validated using `draft4` for JSON Schema draft 4 compliant validator. In addition to being a valid JSON Schema, the parameter schema MUST have a top-level `type` property to enable proper deserialization before validating.", + "type": "string" + }, + "style": { + "description": "Required when `schema` and `explode` are set. Describes how the parameter value will be deserialized depending on the type of the parameter value.", + "enum": [ + "deepObject", + "form", + "label", + "matrix", + "pipeDelimited", + "simple", + "spaceDelimited" + ], + "type": "string" + } + }, + "required": [ + "in", + "name", + "required" + ], + "type": "object" + }, + "type": "array" + }, + "verbose_response": { + "default": false, + "description": "If enabled, the plugin returns more verbose and detailed validation errors.", + "type": "boolean" + }, + "version": { + "default": "kong", + "description": "Which validator to use. Supported values are `kong` (default) for using Kong's own schema validator, or `draft4`, `draft7`, `draft201909`, and `draft202012` for using their respective JSON Schema Draft compliant validators.", + "enum": [ + "draft201909", + "draft202012", + "draft4", + "draft6", + "draft7", + "kong" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/request-validator/3.4.json b/json_schemas/request-validator/3.4.json new file mode 100644 index 00000000..5aeff6f7 --- /dev/null +++ b/json_schemas/request-validator/3.4.json @@ -0,0 +1,159 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_content_types": { + "default": [ + "application/json" + ], + "description": "List of allowed content types. The value can be configured with the `charset` parameter. For example, `application/json; charset=UTF-8`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "body_schema": { + "description": "The request body schema specification. One of `body_schema` or `parameter_schema` must be specified.", + "type": "string" + }, + "parameter_schema": { + "description": "Array of parameter validator specification. One of `body_schema` or `parameter_schema` must be specified.", + "items": { + "properties": { + "explode": { + "description": "Required when `schema` and `style` are set. When `explode` is `true`, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters, this property has no effect.", + "type": "boolean" + }, + "in": { + "description": "The location of the parameter.", + "enum": [ + "header", + "path", + "query" + ], + "type": "string" + }, + "name": { + "description": "The name of the parameter. Parameter names are case-sensitive, and correspond to the parameter name used by the `in` property. If `in` is `path`, the `name` field MUST correspond to the named capture group from the configured `route`.", + "type": "string" + }, + "required": { + "description": "Determines whether this parameter is mandatory.", + "type": "boolean" + }, + "schema": { + "description": "Requred when `style` and `explode` are set. This is the schema defining the type used for the parameter. It is validated using `draft4` for JSON Schema draft 4 compliant validator. In addition to being a valid JSON Schema, the parameter schema MUST have a top-level `type` property to enable proper deserialization before validating.", + "type": "string" + }, + "style": { + "description": "Required when `schema` and `explode` are set. Describes how the parameter value will be deserialized depending on the type of the parameter value.", + "enum": [ + "deepObject", + "form", + "label", + "matrix", + "pipeDelimited", + "simple", + "spaceDelimited" + ], + "type": "string" + } + }, + "required": [ + "in", + "name", + "required" + ], + "type": "object" + }, + "type": "array" + }, + "verbose_response": { + "default": false, + "description": "If enabled, the plugin returns more verbose and detailed validation errors.", + "type": "boolean" + }, + "version": { + "default": "kong", + "description": "Which validator to use. Supported values are `kong` (default) for using Kong's own schema validator, or `draft4` for using a JSON Schema Draft 4-compliant validator.", + "enum": [ + "draft4", + "kong" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-validator/3.7.json b/json_schemas/request-validator/3.7.json new file mode 100644 index 00000000..71fb676d --- /dev/null +++ b/json_schemas/request-validator/3.7.json @@ -0,0 +1,164 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_content_types": { + "default": [ + "application/json" + ], + "description": "List of allowed content types. The value can be configured with the `charset` parameter. For example, `application/json; charset=UTF-8`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "body_schema": { + "description": "The request body schema specification. One of `body_schema` or `parameter_schema` must be specified.", + "type": "string" + }, + "content_type_parameter_validation": { + "default": true, + "description": "Determines whether to enable parameters validation of request content-type.", + "type": "boolean" + }, + "parameter_schema": { + "description": "Array of parameter validator specification. One of `body_schema` or `parameter_schema` must be specified.", + "items": { + "properties": { + "explode": { + "description": "Required when `schema` and `style` are set. When `explode` is `true`, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters, this property has no effect.", + "type": "boolean" + }, + "in": { + "description": "The location of the parameter.", + "enum": [ + "header", + "path", + "query" + ], + "type": "string" + }, + "name": { + "description": "The name of the parameter. Parameter names are case-sensitive, and correspond to the parameter name used by the `in` property. If `in` is `path`, the `name` field MUST correspond to the named capture group from the configured `route`.", + "type": "string" + }, + "required": { + "description": "Determines whether this parameter is mandatory.", + "type": "boolean" + }, + "schema": { + "description": "Requred when `style` and `explode` are set. This is the schema defining the type used for the parameter. It is validated using `draft4` for JSON Schema draft 4 compliant validator. In addition to being a valid JSON Schema, the parameter schema MUST have a top-level `type` property to enable proper deserialization before validating.", + "type": "string" + }, + "style": { + "description": "Required when `schema` and `explode` are set. Describes how the parameter value will be deserialized depending on the type of the parameter value.", + "enum": [ + "deepObject", + "form", + "label", + "matrix", + "pipeDelimited", + "simple", + "spaceDelimited" + ], + "type": "string" + } + }, + "required": [ + "in", + "name", + "required" + ], + "type": "object" + }, + "type": "array" + }, + "verbose_response": { + "default": false, + "description": "If enabled, the plugin returns more verbose and detailed validation errors.", + "type": "boolean" + }, + "version": { + "default": "kong", + "description": "Which validator to use. Supported values are `kong` (default) for using Kong's own schema validator, or `draft4` for using a JSON Schema Draft 4-compliant validator.", + "enum": [ + "draft4", + "kong" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-validator/3.8.json b/json_schemas/request-validator/3.8.json new file mode 100644 index 00000000..71fb676d --- /dev/null +++ b/json_schemas/request-validator/3.8.json @@ -0,0 +1,164 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_content_types": { + "default": [ + "application/json" + ], + "description": "List of allowed content types. The value can be configured with the `charset` parameter. For example, `application/json; charset=UTF-8`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "body_schema": { + "description": "The request body schema specification. One of `body_schema` or `parameter_schema` must be specified.", + "type": "string" + }, + "content_type_parameter_validation": { + "default": true, + "description": "Determines whether to enable parameters validation of request content-type.", + "type": "boolean" + }, + "parameter_schema": { + "description": "Array of parameter validator specification. One of `body_schema` or `parameter_schema` must be specified.", + "items": { + "properties": { + "explode": { + "description": "Required when `schema` and `style` are set. When `explode` is `true`, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters, this property has no effect.", + "type": "boolean" + }, + "in": { + "description": "The location of the parameter.", + "enum": [ + "header", + "path", + "query" + ], + "type": "string" + }, + "name": { + "description": "The name of the parameter. Parameter names are case-sensitive, and correspond to the parameter name used by the `in` property. If `in` is `path`, the `name` field MUST correspond to the named capture group from the configured `route`.", + "type": "string" + }, + "required": { + "description": "Determines whether this parameter is mandatory.", + "type": "boolean" + }, + "schema": { + "description": "Requred when `style` and `explode` are set. This is the schema defining the type used for the parameter. It is validated using `draft4` for JSON Schema draft 4 compliant validator. In addition to being a valid JSON Schema, the parameter schema MUST have a top-level `type` property to enable proper deserialization before validating.", + "type": "string" + }, + "style": { + "description": "Required when `schema` and `explode` are set. Describes how the parameter value will be deserialized depending on the type of the parameter value.", + "enum": [ + "deepObject", + "form", + "label", + "matrix", + "pipeDelimited", + "simple", + "spaceDelimited" + ], + "type": "string" + } + }, + "required": [ + "in", + "name", + "required" + ], + "type": "object" + }, + "type": "array" + }, + "verbose_response": { + "default": false, + "description": "If enabled, the plugin returns more verbose and detailed validation errors.", + "type": "boolean" + }, + "version": { + "default": "kong", + "description": "Which validator to use. Supported values are `kong` (default) for using Kong's own schema validator, or `draft4` for using a JSON Schema Draft 4-compliant validator.", + "enum": [ + "draft4", + "kong" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/request-validator/3.9.json b/json_schemas/request-validator/3.9.json new file mode 100644 index 00000000..71fb676d --- /dev/null +++ b/json_schemas/request-validator/3.9.json @@ -0,0 +1,164 @@ +{ + "properties": { + "config": { + "properties": { + "allowed_content_types": { + "default": [ + "application/json" + ], + "description": "List of allowed content types. The value can be configured with the `charset` parameter. For example, `application/json; charset=UTF-8`.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "body_schema": { + "description": "The request body schema specification. One of `body_schema` or `parameter_schema` must be specified.", + "type": "string" + }, + "content_type_parameter_validation": { + "default": true, + "description": "Determines whether to enable parameters validation of request content-type.", + "type": "boolean" + }, + "parameter_schema": { + "description": "Array of parameter validator specification. One of `body_schema` or `parameter_schema` must be specified.", + "items": { + "properties": { + "explode": { + "description": "Required when `schema` and `style` are set. When `explode` is `true`, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters, this property has no effect.", + "type": "boolean" + }, + "in": { + "description": "The location of the parameter.", + "enum": [ + "header", + "path", + "query" + ], + "type": "string" + }, + "name": { + "description": "The name of the parameter. Parameter names are case-sensitive, and correspond to the parameter name used by the `in` property. If `in` is `path`, the `name` field MUST correspond to the named capture group from the configured `route`.", + "type": "string" + }, + "required": { + "description": "Determines whether this parameter is mandatory.", + "type": "boolean" + }, + "schema": { + "description": "Requred when `style` and `explode` are set. This is the schema defining the type used for the parameter. It is validated using `draft4` for JSON Schema draft 4 compliant validator. In addition to being a valid JSON Schema, the parameter schema MUST have a top-level `type` property to enable proper deserialization before validating.", + "type": "string" + }, + "style": { + "description": "Required when `schema` and `explode` are set. Describes how the parameter value will be deserialized depending on the type of the parameter value.", + "enum": [ + "deepObject", + "form", + "label", + "matrix", + "pipeDelimited", + "simple", + "spaceDelimited" + ], + "type": "string" + } + }, + "required": [ + "in", + "name", + "required" + ], + "type": "object" + }, + "type": "array" + }, + "verbose_response": { + "default": false, + "description": "If enabled, the plugin returns more verbose and detailed validation errors.", + "type": "boolean" + }, + "version": { + "default": "kong", + "description": "Which validator to use. Supported values are `kong` (default) for using Kong's own schema validator, or `draft4` for using a JSON Schema Draft 4-compliant validator.", + "enum": [ + "draft4", + "kong" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/response-ratelimiting/2.8.json b/json_schemas/response-ratelimiting/2.8.json new file mode 100644 index 00000000..71feb4e6 --- /dev/null +++ b/json_schemas/response-ratelimiting/2.8.json @@ -0,0 +1,172 @@ +{ + "properties": { + "config": { + "properties": { + "block_on_first_violation": { + "default": false, + "description": "A boolean value that determines if the requests should be blocked as soon as one limit is being exceeded. This will block requests that are supposed to consume other limits too.", + "type": "boolean" + }, + "fault_tolerant": { + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party datastore. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the datastore is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean" + }, + "header_name": { + "default": "x-kong-limit", + "description": "The name of the response header used to increment the counters.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers.", + "type": "boolean" + }, + "limit_by": { + "default": "consumer", + "description": "The entity that will be used when aggregating the limits: `consumer`, `credential`, `ip`. If the `consumer` or the `credential` cannot be determined, the system will always fallback to `ip`.", + "enum": [ + "consumer", + "credential", + "ip" + ], + "type": "string" + }, + "limits": { + "additionalProperties": true, + "examples": { + "limit_name": { + "minute": 10 + } + }, + "minLength": 1, + "type": "object" + }, + "policy": { + "default": "cluster", + "description": "The rate-limiting policies to use for retrieving and incrementing the\nlimits. Available values are:\n- `local`: Counters are stored locally in-memory on the node.\n- `cluster`: Counters are stored in the Kong datastore and shared across\nthe nodes.\n- `redis`: Counters are stored on a Redis server and shared\nacross the nodes.\n\nIn DB-less, hybrid mode, and Konnect, the `cluster` config policy is not supported.\nFor DB-less mode or Konnect, use one of `redis` or `local`; for hybrid mode, use\n`redis`, or `local` for data planes only.\n\nFor details on which policy should be used, refer to the\n[implementation considerations](/hub/kong-inc/rate-limiting/#implementation-considerations).", + "enum": [ + "cluster", + "local", + "redis" + ], + "examples": [ + "local" + ], + "type": "string" + }, + "redis_database": { + "default": 0, + "description": "When using the `redis` policy, this property specifies Redis database to use.", + "type": "number" + }, + "redis_host": { + "description": "When using the `redis` policy, this property specifies the address to the Redis server.", + "type": "string" + }, + "redis_password": { + "description": "When using the `redis` policy, this property specifies the password to connect to the Redis server.", + "minLength": 0, + "type": "string" + }, + "redis_port": { + "default": 6379, + "description": "When using the `redis` policy, this property specifies the port of the Redis server.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "redis_timeout": { + "default": 2000, + "description": "When using the `redis` policy, this property specifies the timeout in milliseconds of any command submitted to the Redis server.", + "type": "number" + }, + "redis_username": { + "description": "When using the `redis` policy, this property specifies the username to connect to the Redis server when ACL authentication is desired.\nThis requires Redis v6.0.0+. The username **cannot** be set to `default`.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/response-ratelimiting/3.10.json b/json_schemas/response-ratelimiting/3.10.json new file mode 100644 index 00000000..7e8440df --- /dev/null +++ b/json_schemas/response-ratelimiting/3.10.json @@ -0,0 +1,207 @@ +{ + "properties": { + "config": { + "properties": { + "block_on_first_violation": { + "default": false, + "description": "A boolean value that determines if the requests should be blocked as soon as one limit is being exceeded. This will block requests that are supposed to consume other limits too.", + "type": "boolean" + }, + "fault_tolerant": { + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party datastore. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the datastore is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean" + }, + "header_name": { + "default": "x-kong-limit", + "description": "The name of the response header used to increment the counters.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers.", + "type": "boolean" + }, + "limit_by": { + "default": "consumer", + "description": "The entity that will be used when aggregating the limits: `consumer`, `credential`, `ip`. If the `consumer` or the `credential` cannot be determined, the system will always fallback to `ip`.", + "enum": [ + "consumer", + "credential", + "ip" + ], + "type": "string" + }, + "limits": { + "additionalProperties": true, + "description": "A map that defines rate limits for the plugin.", + "minLength": 1, + "type": "object" + }, + "policy": { + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "redis": { + "description": "Redis configuration", + "properties": { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "minLength": 0, + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "shorthand_fields": { + "redis_database": { + "type": "integer" + }, + "redis_host": { + "type": "string" + }, + "redis_password": { + "minLength": 0, + "type": "string" + }, + "redis_port": { + "type": "integer" + }, + "redis_server_name": { + "type": "string" + }, + "redis_ssl": { + "type": "boolean" + }, + "redis_ssl_verify": { + "type": "boolean" + }, + "redis_timeout": { + "type": "integer" + }, + "redis_username": { + "type": "string" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/response-ratelimiting/3.11.json b/json_schemas/response-ratelimiting/3.11.json new file mode 100644 index 00000000..8469c086 --- /dev/null +++ b/json_schemas/response-ratelimiting/3.11.json @@ -0,0 +1,193 @@ +{ + "properties": { + "config": { + "properties": { + "block_on_first_violation": { + "default": false, + "description": "A boolean value that determines if the requests should be blocked as soon as one limit is being exceeded. This will block requests that are supposed to consume other limits too.", + "type": "boolean" + }, + "fault_tolerant": { + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party datastore. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the datastore is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean" + }, + "header_name": { + "default": "x-kong-limit", + "description": "The name of the response header used to increment the counters.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers.", + "type": "boolean" + }, + "limit_by": { + "default": "consumer", + "description": "The entity that will be used when aggregating the limits: `consumer`, `credential`, `ip`. If the `consumer` or the `credential` cannot be determined, the system will always fallback to `ip`.", + "enum": [ + "consumer", + "credential", + "ip" + ], + "type": "string" + }, + "limits": { + "additionalProperties": true, + "description": "A map that defines rate limits for the plugin.", + "minLength": 1, + "type": "object" + }, + "policy": { + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "redis": { + "description": "Redis configuration", + "properties": { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "minLength": 0, + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "shorthand_fields": { + "redis_database": { + "type": "integer" + }, + "redis_host": { + "type": "string" + }, + "redis_password": { + "minLength": 0, + "type": "string" + }, + "redis_port": { + "type": "integer" + }, + "redis_server_name": { + "type": "string" + }, + "redis_ssl": { + "type": "boolean" + }, + "redis_ssl_verify": { + "type": "boolean" + }, + "redis_timeout": { + "type": "integer" + }, + "redis_username": { + "type": "string" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/response-ratelimiting/3.12.json b/json_schemas/response-ratelimiting/3.12.json new file mode 100644 index 00000000..cc9f59be --- /dev/null +++ b/json_schemas/response-ratelimiting/3.12.json @@ -0,0 +1,193 @@ +{ + "properties": { + "config": { + "properties": { + "block_on_first_violation": { + "default": false, + "description": "A boolean value that determines if the requests should be blocked as soon as one limit is being exceeded. This will block requests that are supposed to consume other limits too.", + "type": "boolean" + }, + "fault_tolerant": { + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party datastore. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the datastore is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean" + }, + "header_name": { + "default": "x-kong-limit", + "description": "The name of the response header used to increment the counters.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers.", + "type": "boolean" + }, + "limit_by": { + "default": "consumer", + "description": "The entity that will be used when aggregating the limits: `consumer`, `credential`, `ip`. If the `consumer` or the `credential` cannot be determined, the system will always fallback to `ip`.", + "enum": [ + "consumer", + "credential", + "ip" + ], + "type": "string" + }, + "limits": { + "additionalProperties": true, + "description": "A map that defines rate limits for the plugin.", + "minLength": 1, + "type": "object" + }, + "policy": { + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "redis": { + "description": "Redis configuration", + "properties": { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "minLength": 0, + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "shorthand_fields": { + "redis_database": { + "type": "integer" + }, + "redis_host": { + "type": "string" + }, + "redis_password": { + "minLength": 0, + "type": "string" + }, + "redis_port": { + "type": "integer" + }, + "redis_server_name": { + "type": "string" + }, + "redis_ssl": { + "type": "boolean" + }, + "redis_ssl_verify": { + "type": "boolean" + }, + "redis_timeout": { + "type": "integer" + }, + "redis_username": { + "type": "string" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/response-ratelimiting/3.4.json b/json_schemas/response-ratelimiting/3.4.json new file mode 100644 index 00000000..51c77052 --- /dev/null +++ b/json_schemas/response-ratelimiting/3.4.json @@ -0,0 +1,166 @@ +{ + "properties": { + "config": { + "properties": { + "block_on_first_violation": { + "default": false, + "description": "A boolean value that determines if the requests should be blocked as soon as one limit is being exceeded. This will block requests that are supposed to consume other limits too.", + "type": "boolean" + }, + "fault_tolerant": { + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party datastore. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the datastore is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean" + }, + "header_name": { + "default": "x-kong-limit", + "description": "The name of the response header used to increment the counters.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers.", + "type": "boolean" + }, + "limit_by": { + "default": "consumer", + "description": "The entity that will be used when aggregating the limits: `consumer`, `credential`, `ip`. If the `consumer` or the `credential` cannot be determined, the system will always fallback to `ip`.", + "enum": [ + "consumer", + "credential", + "ip" + ], + "type": "string" + }, + "limits": { + "additionalProperties": true, + "description": "A map that defines rate limits for the plugin.", + "minLength": 1, + "type": "object" + }, + "policy": { + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "redis_database": { + "default": 0, + "description": "When using the `redis` policy, this property specifies Redis database to use.", + "type": "number" + }, + "redis_host": { + "description": "When using the `redis` policy, this property specifies the address to the Redis server.", + "type": "string" + }, + "redis_password": { + "description": "When using the `redis` policy, this property specifies the password to connect to the Redis server.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "minLength": 0, + "type": "string" + }, + "redis_port": { + "default": 6379, + "description": "When using the `redis` policy, this property specifies the port of the Redis server.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "redis_server_name": { + "description": "When using the `redis` policy with `redis_ssl` set to `true`, this property specifies the server name for the TLS extension Server Name Indication (SNI).", + "type": "string" + }, + "redis_ssl": { + "default": false, + "description": "When using the `redis` policy, this property specifies if SSL is used to connect to the Redis server.", + "type": "boolean" + }, + "redis_ssl_verify": { + "default": false, + "description": "When using the `redis` policy with `redis_ssl` set to `true`, this property specifies if the server SSL certificate is validated. Note that you need to configure the `lua_ssl_trusted_certificate` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "redis_timeout": { + "default": 2000, + "description": "When using the `redis` policy, this property specifies the timeout in milliseconds of any command submitted to the Redis server.", + "type": "number" + }, + "redis_username": { + "description": "When using the `redis` policy, this property specifies the username to connect to the Redis server when ACL authentication is desired.\nThis requires Redis v6.0.0+. The username **cannot** be set to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/response-ratelimiting/3.7.json b/json_schemas/response-ratelimiting/3.7.json new file mode 100644 index 00000000..226d6ec6 --- /dev/null +++ b/json_schemas/response-ratelimiting/3.7.json @@ -0,0 +1,243 @@ +{ + "properties": { + "config": { + "properties": { + "block_on_first_violation": { + "default": false, + "description": "A boolean value that determines if the requests should be blocked as soon as one limit is being exceeded. This will block requests that are supposed to consume other limits too.", + "type": "boolean" + }, + "fault_tolerant": { + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party datastore. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the datastore is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean" + }, + "header_name": { + "default": "x-kong-limit", + "description": "The name of the response header used to increment the counters.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers.", + "type": "boolean" + }, + "limit_by": { + "default": "consumer", + "description": "The entity that will be used when aggregating the limits: `consumer`, `credential`, `ip`. If the `consumer` or the `credential` cannot be determined, the system will always fallback to `ip`.", + "enum": [ + "consumer", + "credential", + "ip" + ], + "type": "string" + }, + "limits": { + "additionalProperties": true, + "description": "A map that defines rate limits for the plugin.", + "minLength": 1, + "type": "object" + }, + "policy": { + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "redis": { + "description": "Redis configuration", + "properties": { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "minLength": 0, + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "shorthand_fields": { + "redis_database": { + "translate_backwards": [ + "database", + "redis" + ], + "type": "integer" + }, + "redis_host": { + "translate_backwards": [ + "host", + "redis" + ], + "type": "string" + }, + "redis_password": { + "minLength": 0, + "translate_backwards": [ + "password", + "redis" + ], + "type": "string" + }, + "redis_port": { + "translate_backwards": [ + "port", + "redis" + ], + "type": "integer" + }, + "redis_server_name": { + "translate_backwards": [ + "redis", + "server_name" + ], + "type": "string" + }, + "redis_ssl": { + "translate_backwards": [ + "redis", + "ssl" + ], + "type": "boolean" + }, + "redis_ssl_verify": { + "translate_backwards": [ + "redis", + "ssl_verify" + ], + "type": "boolean" + }, + "redis_timeout": { + "translate_backwards": [ + "redis", + "timeout" + ], + "type": "integer" + }, + "redis_username": { + "translate_backwards": [ + "redis", + "username" + ], + "type": "string" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/response-ratelimiting/3.8.json b/json_schemas/response-ratelimiting/3.8.json new file mode 100644 index 00000000..ecbba7f8 --- /dev/null +++ b/json_schemas/response-ratelimiting/3.8.json @@ -0,0 +1,243 @@ +{ + "properties": { + "config": { + "properties": { + "block_on_first_violation": { + "default": false, + "description": "A boolean value that determines if the requests should be blocked as soon as one limit is being exceeded. This will block requests that are supposed to consume other limits too.", + "type": "boolean" + }, + "fault_tolerant": { + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party datastore. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the datastore is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean" + }, + "header_name": { + "default": "x-kong-limit", + "description": "The name of the response header used to increment the counters.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers.", + "type": "boolean" + }, + "limit_by": { + "default": "consumer", + "description": "The entity that will be used when aggregating the limits: `consumer`, `credential`, `ip`. If the `consumer` or the `credential` cannot be determined, the system will always fallback to `ip`.", + "enum": [ + "consumer", + "credential", + "ip" + ], + "type": "string" + }, + "limits": { + "additionalProperties": true, + "description": "A map that defines rate limits for the plugin.", + "minLength": 1, + "type": "object" + }, + "policy": { + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "redis": { + "description": "Redis configuration", + "properties": { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "minLength": 0, + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "shorthand_fields": { + "redis_database": { + "translate_backwards": [ + "database", + "redis" + ], + "type": "integer" + }, + "redis_host": { + "translate_backwards": [ + "host", + "redis" + ], + "type": "string" + }, + "redis_password": { + "minLength": 0, + "translate_backwards": [ + "password", + "redis" + ], + "type": "string" + }, + "redis_port": { + "translate_backwards": [ + "port", + "redis" + ], + "type": "integer" + }, + "redis_server_name": { + "translate_backwards": [ + "redis", + "server_name" + ], + "type": "string" + }, + "redis_ssl": { + "translate_backwards": [ + "redis", + "ssl" + ], + "type": "boolean" + }, + "redis_ssl_verify": { + "translate_backwards": [ + "redis", + "ssl_verify" + ], + "type": "boolean" + }, + "redis_timeout": { + "translate_backwards": [ + "redis", + "timeout" + ], + "type": "integer" + }, + "redis_username": { + "translate_backwards": [ + "redis", + "username" + ], + "type": "string" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/response-ratelimiting/3.9.json b/json_schemas/response-ratelimiting/3.9.json new file mode 100644 index 00000000..e6ad1ba3 --- /dev/null +++ b/json_schemas/response-ratelimiting/3.9.json @@ -0,0 +1,207 @@ +{ + "properties": { + "config": { + "properties": { + "block_on_first_violation": { + "default": false, + "description": "A boolean value that determines if the requests should be blocked as soon as one limit is being exceeded. This will block requests that are supposed to consume other limits too.", + "type": "boolean" + }, + "fault_tolerant": { + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party datastore. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the datastore is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean" + }, + "header_name": { + "default": "x-kong-limit", + "description": "The name of the response header used to increment the counters.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers.", + "type": "boolean" + }, + "limit_by": { + "default": "consumer", + "description": "The entity that will be used when aggregating the limits: `consumer`, `credential`, `ip`. If the `consumer` or the `credential` cannot be determined, the system will always fallback to `ip`.", + "enum": [ + "consumer", + "credential", + "ip" + ], + "type": "string" + }, + "limits": { + "additionalProperties": true, + "description": "A map that defines rate limits for the plugin.", + "minLength": 1, + "type": "object" + }, + "policy": { + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "redis": { + "description": "Redis configuration", + "properties": { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "minLength": 0, + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "shorthand_fields": { + "redis_database": { + "type": "integer" + }, + "redis_host": { + "type": "string" + }, + "redis_password": { + "minLength": 0, + "type": "string" + }, + "redis_port": { + "type": "integer" + }, + "redis_server_name": { + "type": "string" + }, + "redis_ssl": { + "type": "boolean" + }, + "redis_ssl_verify": { + "type": "boolean" + }, + "redis_timeout": { + "type": "integer" + }, + "redis_username": { + "type": "string" + } + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/response-transformer-advanced/2.8.json b/json_schemas/response-transformer-advanced/2.8.json new file mode 100644 index 00000000..daa27893 --- /dev/null +++ b/json_schemas/response-transformer-advanced/2.8.json @@ -0,0 +1,461 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "headers": { + "default": [ + + ], + "description": "List of `headername:value` pairs. If and only if the header is not already set, set a new header with the given value. Ignored if the header is already set.", + "examples": [ + [ + "x-another-header:something", + "x-new-header:value" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "description": "List of response status codes or status code ranges to which the transformation will apply. Empty means all response codes.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "description": "List of `name:value` pairs. If and only if the property is not present, add a new property with the given value to the JSON body. Ignored if the property is already present.", + "examples": [ + [ + "another-json-key:some_value", + "new-json-key:some_value" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when adding a new JSON property.", + "examples": [ + [ + "boolean", + "number", + "string" + ] + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "allow": { + "properties": { + "json": { + "description": "Set of parameter names. Only allowed parameters are present in the JSON response body.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "headers": { + "default": [ + + ], + "description": "List of `headername:value` pairs. If the header is not set, set it with the given value. If it is already set, a new header with the same name and the new value will be set.", + "examples": [ + [ + "x-another-header:some_value", + "x-existing-header:some_value" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "description": "List of response status codes or status code ranges to which the transformation will apply. Empty means all response codes.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "description": "List of `name:value` pairs. If the property is not present in the JSON body, add it with the given value. If it is already present, the two values (old and new) will be aggregated in an array.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending JSON properties.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "dots_in_keys": { + "default": true, + "description": "Whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects. See [Arrays and nested objects](#arrays-and-nested-objects).", + "type": "boolean" + }, + "remove": { + "properties": { + "headers": { + "default": [ + + ], + "description": "List of `headername[:value]`. If only `headername` is given, unset the header field with the given `headername`. If `headername:value` is given, unset the header field `headername` when it has a specific `value`. If `value` starts and ends with a `/` (slash character), then it is considered to be a regular expression. Note that in accordance with [RFC 7230](https://httpwg.org/specs/rfc7230.html#field.order) multiple header values with the same header name are allowed if the entire field value for that header field is defined as a comma-separated list or the header field is a `Set-Cookie` header field.", + "examples": [ + [ + "Set-Cookie:/JSESSIONID=.*/", + "x-another-one:application/json", + "x-another-regex://status/$/", + "x-list-of-values:v1,v2,v3", + "x-one-more-regex:/^/begin//", + "x-toremove" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "description": "List of response status codes or status code ranges to which the transformation will apply. Empty means all response codes.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "description": "List of property names. Remove the property from the JSON body if it is present.", + "examples": [ + [ + "another-json-key", + "json-key-toremove" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "headers": { + "default": [ + + ], + "description": "List of `headername1:headername2` pairs. If a header with `headername1` exists and `headername2` is valid, rename header to `headername2`.", + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "description": "List of response status codes or status code ranges to which the transformation will apply. Empty means all response codes.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "description": "String with which to replace the entire response body.", + "type": "string" + }, + "headers": { + "default": [ + + ], + "description": "List of `headername:value` pairs. If and only if the header is already set, replace its old value with the new one. Ignored if the header is not already set.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "description": "List of response status codes or status code ranges to which the transformation will apply. Empty means all response codes.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "description": "List of property `name:value` pairs. If and only if the parameter is already present, replace its old value with the new one. Ignored if the parameter is not already present.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when replacing JSON properties.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "transform": { + "properties": { + "functions": { + "default": [ + + ], + "description": "Set of Lua functions to perform arbitrary transforms in a response JSON body.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "description": "List of response status codes or ranges to which the arbitrary transformation applies. Leaving empty implies that the transformations apply to all response codes.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "description": "Apply Lua functions to a particular list of JSON property `name` or `name:value` pairs.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "shorthands": { + }, + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/response-transformer-advanced/3.10.json b/json_schemas/response-transformer-advanced/3.10.json new file mode 100644 index 00000000..251e8dc2 --- /dev/null +++ b/json_schemas/response-transformer-advanced/3.10.json @@ -0,0 +1,419 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "allow": { + "properties": { + "json": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "dots_in_keys": { + "default": true, + "description": "Whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects..", + "type": "boolean" + }, + "remove": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "description": "String with which to replace the entire response body.", + "type": "string" + }, + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "transform": { + "properties": { + "functions": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/response-transformer-advanced/3.11.json b/json_schemas/response-transformer-advanced/3.11.json new file mode 100644 index 00000000..e5c923b4 --- /dev/null +++ b/json_schemas/response-transformer-advanced/3.11.json @@ -0,0 +1,309 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "headers": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "allow": { + "properties": { + "json": { + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "append": { + "properties": { + "headers": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "dots_in_keys": { + "default": true, + "description": "Whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects..", + "type": "boolean" + }, + "remove": { + "properties": { + "headers": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "rename": { + "properties": { + "headers": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "description": "String with which to replace the entire response body.", + "type": "string" + }, + "headers": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "transform": { + "properties": { + "functions": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/response-transformer-advanced/3.12.json b/json_schemas/response-transformer-advanced/3.12.json new file mode 100644 index 00000000..e5c923b4 --- /dev/null +++ b/json_schemas/response-transformer-advanced/3.12.json @@ -0,0 +1,309 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "headers": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "allow": { + "properties": { + "json": { + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "append": { + "properties": { + "headers": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "dots_in_keys": { + "default": true, + "description": "Whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects..", + "type": "boolean" + }, + "remove": { + "properties": { + "headers": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "rename": { + "properties": { + "headers": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "description": "String with which to replace the entire response body.", + "type": "string" + }, + "headers": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "transform": { + "properties": { + "functions": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/response-transformer-advanced/3.4.json b/json_schemas/response-transformer-advanced/3.4.json new file mode 100644 index 00000000..251e8dc2 --- /dev/null +++ b/json_schemas/response-transformer-advanced/3.4.json @@ -0,0 +1,419 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "allow": { + "properties": { + "json": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "dots_in_keys": { + "default": true, + "description": "Whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects..", + "type": "boolean" + }, + "remove": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "description": "String with which to replace the entire response body.", + "type": "string" + }, + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "transform": { + "properties": { + "functions": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/response-transformer-advanced/3.7.json b/json_schemas/response-transformer-advanced/3.7.json new file mode 100644 index 00000000..251e8dc2 --- /dev/null +++ b/json_schemas/response-transformer-advanced/3.7.json @@ -0,0 +1,419 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "allow": { + "properties": { + "json": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "dots_in_keys": { + "default": true, + "description": "Whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects..", + "type": "boolean" + }, + "remove": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "description": "String with which to replace the entire response body.", + "type": "string" + }, + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "transform": { + "properties": { + "functions": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/response-transformer-advanced/3.8.json b/json_schemas/response-transformer-advanced/3.8.json new file mode 100644 index 00000000..251e8dc2 --- /dev/null +++ b/json_schemas/response-transformer-advanced/3.8.json @@ -0,0 +1,419 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "allow": { + "properties": { + "json": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "dots_in_keys": { + "default": true, + "description": "Whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects..", + "type": "boolean" + }, + "remove": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "description": "String with which to replace the entire response body.", + "type": "string" + }, + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "transform": { + "properties": { + "functions": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/response-transformer-advanced/3.9.json b/json_schemas/response-transformer-advanced/3.9.json new file mode 100644 index 00000000..251e8dc2 --- /dev/null +++ b/json_schemas/response-transformer-advanced/3.9.json @@ -0,0 +1,419 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "allow": { + "properties": { + "json": { + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "dots_in_keys": { + "default": true, + "description": "Whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects..", + "type": "boolean" + }, + "remove": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "body": { + "description": "String with which to replace the entire response body.", + "type": "string" + }, + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "transform": { + "properties": { + "functions": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "if_status": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/response-transformer/2.8.json b/json_schemas/response-transformer/2.8.json new file mode 100644 index 00000000..c8e313fb --- /dev/null +++ b/json_schemas/response-transformer/2.8.json @@ -0,0 +1,344 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "headers": { + "default": [ + + ], + "description": "List of `headername:value` pairs. If and only if the header is not already set, set a new header with the given value. Ignored if the header is already set.", + "examples": [ + [ + "x-another-header:something", + "x-new-header:value" + ] + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "description": "List of `property:value` pairs. If and only if the property is not present, add a new property with the given value to the JSON body. Ignored if the property is already present.", + "examples": [ + [ + "another-json-key:some_value", + "new-json-key:some_value" + ] + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when adding\na new JSON property. Each string element can be one of: boolean, number, or string.", + "examples": [ + [ + "boolean", + "number", + "string" + ] + ], + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "headers": { + "default": [ + + ], + "description": "List of `headername:value` pairs. If the header is not set, set it with the given value. If it is\nalready set, a new header with the same name and the new value will be set. Each string\nelement can be one of: boolean, number, or string.", + "examples": [ + [ + "x-another-header:some_value", + "x-existing-header:some_value" + ] + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "description": "List of `property:value` pairs. If the property is not present in the JSON body, add it with the given value. If it is already present, the two values (old and new) will be aggregated in an array.", + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "remove": { + "properties": { + "headers": { + "default": [ + + ], + "description": "List of header names. Unset the header(s) with the given name.", + "examples": [ + [ + "x-another-one", + "x-toremove" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "description": "List of property names. Remove the property from the JSON body if it is present.", + "examples": [ + [ + "another-json-key", + "json-key-toremove" + ] + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "headers": { + "default": [ + + ], + "description": "List of `original_header_name:new_header_name` pairs. If the header `original_headername` is already set, rename it to `new_headername`. Ignored if the header is not already set.", + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "headers": { + "default": [ + + ], + "description": "List of `headername:value` pairs. If and only if the header is already set, replace its old value with the new one. Ignored if the header is not already set.", + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "description": "List of `property:value` pairs. If and only if the parameter is already present, replace its old value with the new one. Ignored if the parameter is not already present.", + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when\nreplacing JSON properties. Each string\nelement can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/response-transformer/3.10.json b/json_schemas/response-transformer/3.10.json new file mode 100644 index 00000000..c4180b30 --- /dev/null +++ b/json_schemas/response-transformer/3.10.json @@ -0,0 +1,311 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "remove": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/response-transformer/3.11.json b/json_schemas/response-transformer/3.11.json new file mode 100644 index 00000000..340a58e4 --- /dev/null +++ b/json_schemas/response-transformer/3.11.json @@ -0,0 +1,235 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "headers": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "append": { + "properties": { + "headers": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "remove": { + "properties": { + "headers": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "rename": { + "properties": { + "headers": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "replace": { + "properties": { + "headers": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/response-transformer/3.12.json b/json_schemas/response-transformer/3.12.json new file mode 100644 index 00000000..340a58e4 --- /dev/null +++ b/json_schemas/response-transformer/3.12.json @@ -0,0 +1,235 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "headers": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "append": { + "properties": { + "headers": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "remove": { + "properties": { + "headers": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "rename": { + "properties": { + "headers": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "replace": { + "properties": { + "headers": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [], + "items": { + "pattern": "^[^:]+:.*$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/response-transformer/3.4.json b/json_schemas/response-transformer/3.4.json new file mode 100644 index 00000000..5ef1b874 --- /dev/null +++ b/json_schemas/response-transformer/3.4.json @@ -0,0 +1,298 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "remove": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/response-transformer/3.7.json b/json_schemas/response-transformer/3.7.json new file mode 100644 index 00000000..5ef1b874 --- /dev/null +++ b/json_schemas/response-transformer/3.7.json @@ -0,0 +1,298 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "remove": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/response-transformer/3.8.json b/json_schemas/response-transformer/3.8.json new file mode 100644 index 00000000..c4180b30 --- /dev/null +++ b/json_schemas/response-transformer/3.8.json @@ -0,0 +1,311 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "remove": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/response-transformer/3.9.json b/json_schemas/response-transformer/3.9.json new file mode 100644 index 00000000..c4180b30 --- /dev/null +++ b/json_schemas/response-transformer/3.9.json @@ -0,0 +1,311 @@ +{ + "properties": { + "config": { + "properties": { + "add": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "append": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "remove": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "rename": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "replace": { + "properties": { + "headers": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json": { + "default": [ + + ], + "items": { + "pattern": "^[^:]+:.*$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "json_types": { + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "items": { + "enum": [ + "boolean", + "number", + "string" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/route-by-header/2.8.json b/json_schemas/route-by-header/2.8.json new file mode 100644 index 00000000..47b888ba --- /dev/null +++ b/json_schemas/route-by-header/2.8.json @@ -0,0 +1,101 @@ +{ + "properties": { + "config": { + "properties": { + "rules": { + "default": [ + + ], + "description": "List of [rules](#rules)", + "examples": [ + [ + { + "condition": { + "location": "us-east" + }, + "upstream_name": "bar.domain.com" + } + ] + ], + "items": { + "properties": { + "condition": { + "additionalProperties": true, + "minLength": 1, + "type": "object" + }, + "upstream_name": { + "type": "string" + } + }, + "required": [ + "condition", + "upstream_name" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/route-by-header/3.10.json b/json_schemas/route-by-header/3.10.json new file mode 100644 index 00000000..308bac74 --- /dev/null +++ b/json_schemas/route-by-header/3.10.json @@ -0,0 +1,100 @@ +{ + "properties": { + "config": { + "properties": { + "rules": { + "default": [ + + ], + "description": "Route by header rules.", + "items": { + "properties": { + "condition": { + "additionalProperties": true, + "minLength": 1, + "type": "object" + }, + "upstream_name": { + "type": "string" + } + }, + "required": [ + "condition", + "upstream_name" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/route-by-header/3.11.json b/json_schemas/route-by-header/3.11.json new file mode 100644 index 00000000..2e8bace4 --- /dev/null +++ b/json_schemas/route-by-header/3.11.json @@ -0,0 +1,86 @@ +{ + "properties": { + "config": { + "properties": { + "rules": { + "default": [], + "description": "Route by header rules.", + "items": { + "properties": { + "condition": { + "additionalProperties": true, + "minLength": 1, + "type": "object" + }, + "upstream_name": { + "type": "string" + } + }, + "required": [ + "condition", + "upstream_name" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/route-by-header/3.12.json b/json_schemas/route-by-header/3.12.json new file mode 100644 index 00000000..2e8bace4 --- /dev/null +++ b/json_schemas/route-by-header/3.12.json @@ -0,0 +1,86 @@ +{ + "properties": { + "config": { + "properties": { + "rules": { + "default": [], + "description": "Route by header rules.", + "items": { + "properties": { + "condition": { + "additionalProperties": true, + "minLength": 1, + "type": "object" + }, + "upstream_name": { + "type": "string" + } + }, + "required": [ + "condition", + "upstream_name" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/route-by-header/3.4.json b/json_schemas/route-by-header/3.4.json new file mode 100644 index 00000000..308bac74 --- /dev/null +++ b/json_schemas/route-by-header/3.4.json @@ -0,0 +1,100 @@ +{ + "properties": { + "config": { + "properties": { + "rules": { + "default": [ + + ], + "description": "Route by header rules.", + "items": { + "properties": { + "condition": { + "additionalProperties": true, + "minLength": 1, + "type": "object" + }, + "upstream_name": { + "type": "string" + } + }, + "required": [ + "condition", + "upstream_name" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/route-by-header/3.7.json b/json_schemas/route-by-header/3.7.json new file mode 100644 index 00000000..308bac74 --- /dev/null +++ b/json_schemas/route-by-header/3.7.json @@ -0,0 +1,100 @@ +{ + "properties": { + "config": { + "properties": { + "rules": { + "default": [ + + ], + "description": "Route by header rules.", + "items": { + "properties": { + "condition": { + "additionalProperties": true, + "minLength": 1, + "type": "object" + }, + "upstream_name": { + "type": "string" + } + }, + "required": [ + "condition", + "upstream_name" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/route-by-header/3.8.json b/json_schemas/route-by-header/3.8.json new file mode 100644 index 00000000..308bac74 --- /dev/null +++ b/json_schemas/route-by-header/3.8.json @@ -0,0 +1,100 @@ +{ + "properties": { + "config": { + "properties": { + "rules": { + "default": [ + + ], + "description": "Route by header rules.", + "items": { + "properties": { + "condition": { + "additionalProperties": true, + "minLength": 1, + "type": "object" + }, + "upstream_name": { + "type": "string" + } + }, + "required": [ + "condition", + "upstream_name" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/route-by-header/3.9.json b/json_schemas/route-by-header/3.9.json new file mode 100644 index 00000000..308bac74 --- /dev/null +++ b/json_schemas/route-by-header/3.9.json @@ -0,0 +1,100 @@ +{ + "properties": { + "config": { + "properties": { + "rules": { + "default": [ + + ], + "description": "Route by header rules.", + "items": { + "properties": { + "condition": { + "additionalProperties": true, + "minLength": 1, + "type": "object" + }, + "upstream_name": { + "type": "string" + } + }, + "required": [ + "condition", + "upstream_name" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/route-transformer-advanced/2.8.json b/json_schemas/route-transformer-advanced/2.8.json new file mode 100644 index 00000000..a0c9a9ce --- /dev/null +++ b/json_schemas/route-transformer-advanced/2.8.json @@ -0,0 +1,87 @@ +{ + "properties": { + "config": { + "properties": { + "escape_path": { + "default": false, + "description": "If set to true, the path is escaped after being transformed.", + "type": "boolean" + }, + "host": { + "description": "Updates the upstream request Host with given value/template. This value can only be used to update the routing, it will not update the Host-header value. One of `config.path` or `config.host` or `config.port` must be specified.", + "type": "string" + }, + "path": { + "description": "Updates the upstream request path with given value/template. This value can only be used to update the path part of the URI, not the scheme, nor the hostname. One of `config.path` or `config.host` or `config.port` must be specified.", + "examples": [ + "/path" + ], + "type": "string" + }, + "port": { + "description": "Updates the upstream request Port with given value/template. Note that the port as set may be overridden again by DNS resolution (in case of SRV records,or an Upstream) One of `config.path` or `config.host` or `config.port` must be specified.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/route-transformer-advanced/3.10.json b/json_schemas/route-transformer-advanced/3.10.json new file mode 100644 index 00000000..55afb37a --- /dev/null +++ b/json_schemas/route-transformer-advanced/3.10.json @@ -0,0 +1,89 @@ +{ + "properties": { + "config": { + "properties": { + "escape_path": { + "default": false, + "type": "boolean" + }, + "host": { + "type": "string" + }, + "path": { + "type": "string" + }, + "port": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/route-transformer-advanced/3.11.json b/json_schemas/route-transformer-advanced/3.11.json new file mode 100644 index 00000000..759d3aa2 --- /dev/null +++ b/json_schemas/route-transformer-advanced/3.11.json @@ -0,0 +1,77 @@ +{ + "properties": { + "config": { + "properties": { + "escape_path": { + "default": false, + "type": "boolean" + }, + "host": { + "type": "string" + }, + "path": { + "type": "string" + }, + "port": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/route-transformer-advanced/3.12.json b/json_schemas/route-transformer-advanced/3.12.json new file mode 100644 index 00000000..759d3aa2 --- /dev/null +++ b/json_schemas/route-transformer-advanced/3.12.json @@ -0,0 +1,77 @@ +{ + "properties": { + "config": { + "properties": { + "escape_path": { + "default": false, + "type": "boolean" + }, + "host": { + "type": "string" + }, + "path": { + "type": "string" + }, + "port": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/route-transformer-advanced/3.4.json b/json_schemas/route-transformer-advanced/3.4.json new file mode 100644 index 00000000..55afb37a --- /dev/null +++ b/json_schemas/route-transformer-advanced/3.4.json @@ -0,0 +1,89 @@ +{ + "properties": { + "config": { + "properties": { + "escape_path": { + "default": false, + "type": "boolean" + }, + "host": { + "type": "string" + }, + "path": { + "type": "string" + }, + "port": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/route-transformer-advanced/3.7.json b/json_schemas/route-transformer-advanced/3.7.json new file mode 100644 index 00000000..55afb37a --- /dev/null +++ b/json_schemas/route-transformer-advanced/3.7.json @@ -0,0 +1,89 @@ +{ + "properties": { + "config": { + "properties": { + "escape_path": { + "default": false, + "type": "boolean" + }, + "host": { + "type": "string" + }, + "path": { + "type": "string" + }, + "port": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/route-transformer-advanced/3.8.json b/json_schemas/route-transformer-advanced/3.8.json new file mode 100644 index 00000000..55afb37a --- /dev/null +++ b/json_schemas/route-transformer-advanced/3.8.json @@ -0,0 +1,89 @@ +{ + "properties": { + "config": { + "properties": { + "escape_path": { + "default": false, + "type": "boolean" + }, + "host": { + "type": "string" + }, + "path": { + "type": "string" + }, + "port": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/route-transformer-advanced/3.9.json b/json_schemas/route-transformer-advanced/3.9.json new file mode 100644 index 00000000..55afb37a --- /dev/null +++ b/json_schemas/route-transformer-advanced/3.9.json @@ -0,0 +1,89 @@ +{ + "properties": { + "config": { + "properties": { + "escape_path": { + "default": false, + "type": "boolean" + }, + "host": { + "type": "string" + }, + "path": { + "type": "string" + }, + "port": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/saml/3.10.json b/json_schemas/saml/3.10.json new file mode 100644 index 00000000..5defc374 --- /dev/null +++ b/json_schemas/saml/3.10.json @@ -0,0 +1,612 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer. If not set, a Kong Consumer must exist for the SAML IdP user credentials, mapping the username format to the Kong Consumer username.", + "type": "string" + }, + "assertion_consumer_path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "idp_certificate": { + "description": "The public certificate provided by the IdP. This is used to validate responses from the IdP. Only include the contents of the certificate. Do not include the header (`BEGIN CERTIFICATE`) and footer (`END CERTIFICATE`) lines.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "idp_sso_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "issuer": { + "description": "The unique identifier of the IdP application. Formatted as a URL containing information about the IdP so the SP can validate that the SAML assertions it receives are issued from the correct IdP.", + "type": "string" + }, + "nameid_format": { + "default": "EmailAddress", + "description": "The requested `NameId` format. Options available are: - `Unspecified` - `EmailAddress` - `Persistent` - `Transient`", + "enum": [ + "EmailAddress", + "Persistent", + "Transient", + "Unspecified" + ], + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "request_digest_algorithm": { + "default": "SHA256", + "description": "The digest algorithm for Authn requests: - `SHA256` - `SHA1`", + "enum": [ + "SHA1", + "SHA256" + ], + "type": "string" + }, + "request_signature_algorithm": { + "default": "SHA256", + "description": "The signature algorithm for signing Authn requests. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "enum": [ + "SHA256", + "SHA384", + "SHA512" + ], + "type": "string" + }, + "request_signing_certificate": { + "description": "The certificate for signing requests.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "request_signing_key": { + "description": "The private key for signing requests. If this parameter is set, requests sent to the IdP are signed. The `request_signing_certificate` parameter must be set as well.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "response_digest_algorithm": { + "default": "SHA256", + "description": "The algorithm for verifying digest in SAML responses: - `SHA256` - `SHA1`", + "enum": [ + "SHA1", + "SHA256" + ], + "type": "string" + }, + "response_encryption_key": { + "description": "The private encryption key required to decrypt encrypted assertions.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "response_signature_algorithm": { + "default": "SHA256", + "description": "The algorithm for validating signatures in SAML responses. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "enum": [ + "SHA256", + "SHA384", + "SHA512" + ], + "type": "string" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, for example \"my-application\"", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "The cookie is only sent to the server when a request is made with the https:scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "The session cookie idle time in seconds.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Persistent session absolute timeout in seconds.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Persistent session rolling timeout in seconds.", + "type": "number" + }, + "session_request_headers": { + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "session_secret": { + "description": "The session secret. This must be a random string of 32 characters from the base64 alphabet (letters, numbers, `/`, `_` and `+`). It is used as the secret key for encrypting session data as well as state information that is sent to the IdP in the authentication exchange.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "maxLength": 32, + "minLength": 32, + "pattern": "^[0-9a-zA-Z/_+]+$", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie. The session cannot be invalidated or revoked without changing the session secret, but is stateless, and doesn't require a database. - `memcached`: stores session data in memcached - `redis`: stores session data in Redis", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This includes information about the active sessions for the `specific_audience` belonging to a specific subject.", + "type": "boolean" + }, + "validate_assertion_signature": { + "default": true, + "description": "Enable signature validation for SAML responses.", + "type": "boolean" + } + }, + "required": [ + "assertion_consumer_path", + "idp_sso_url", + "issuer", + "session_secret" + ], + "shorthand_fields": { + "session_auth_ttl": { + "type": "number" + }, + "session_compressor": { + "type": "string" + }, + "session_cookie_httponly": { + "type": "boolean" + }, + "session_cookie_idletime": { + "type": "number" + }, + "session_cookie_lifetime": { + "type": "number" + }, + "session_cookie_maxsize": { + "type": "integer" + }, + "session_cookie_renew": { + "type": "number" + }, + "session_cookie_samesite": { + "type": "string" + }, + "session_memcache_host": { + "type": "string" + }, + "session_memcache_port": { + "type": "integer" + }, + "session_memcache_prefix": { + "type": "string" + }, + "session_memcache_socket": { + "type": "string" + }, + "session_redis_cluster_max_redirections": { + "type": "integer" + }, + "session_redis_cluster_maxredirections": { + "type": "integer" + }, + "session_redis_cluster_nodes": { + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "type": "object" + }, + "type": "array" + }, + "session_redis_connect_timeout": { + "type": "integer" + }, + "session_redis_host": { + "type": "string" + }, + "session_redis_password": { + "type": "string" + }, + "session_redis_port": { + "type": "integer" + }, + "session_redis_prefix": { + "type": "string" + }, + "session_redis_read_timeout": { + "type": "integer" + }, + "session_redis_send_timeout": { + "type": "integer" + }, + "session_redis_server_name": { + "type": "string" + }, + "session_redis_socket": { + "type": "string" + }, + "session_redis_ssl": { + "type": "boolean" + }, + "session_redis_ssl_verify": { + "type": "boolean" + }, + "session_redis_username": { + "type": "string" + }, + "session_strategy": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/saml/3.11.json b/json_schemas/saml/3.11.json new file mode 100644 index 00000000..0b9a6f51 --- /dev/null +++ b/json_schemas/saml/3.11.json @@ -0,0 +1,596 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer. If not set, a Kong Consumer must exist for the SAML IdP user credentials, mapping the username format to the Kong Consumer username.", + "type": "string" + }, + "assertion_consumer_path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "idp_certificate": { + "description": "The public certificate provided by the IdP. This is used to validate responses from the IdP. Only include the contents of the certificate. Do not include the header (`BEGIN CERTIFICATE`) and footer (`END CERTIFICATE`) lines.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "idp_sso_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "issuer": { + "description": "The unique identifier of the IdP application. Formatted as a URL containing information about the IdP so the SP can validate that the SAML assertions it receives are issued from the correct IdP.", + "type": "string" + }, + "nameid_format": { + "default": "EmailAddress", + "description": "The requested `NameId` format. Options available are: - `Unspecified` - `EmailAddress` - `Persistent` - `Transient`", + "enum": [ + "EmailAddress", + "Persistent", + "Transient", + "Unspecified" + ], + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "request_digest_algorithm": { + "default": "SHA256", + "description": "The digest algorithm for Authn requests: - `SHA256` - `SHA1`", + "enum": [ + "SHA1", + "SHA256" + ], + "type": "string" + }, + "request_signature_algorithm": { + "default": "SHA256", + "description": "The signature algorithm for signing Authn requests. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "enum": [ + "SHA256", + "SHA384", + "SHA512" + ], + "type": "string" + }, + "request_signing_certificate": { + "description": "The certificate for signing requests.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "request_signing_key": { + "description": "The private key for signing requests. If this parameter is set, requests sent to the IdP are signed. The `request_signing_certificate` parameter must be set as well.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "response_digest_algorithm": { + "default": "SHA256", + "description": "The algorithm for verifying digest in SAML responses: - `SHA256` - `SHA1`", + "enum": [ + "SHA1", + "SHA256" + ], + "type": "string" + }, + "response_encryption_key": { + "description": "The private encryption key required to decrypt encrypted assertions.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "response_signature_algorithm": { + "default": "SHA256", + "description": "The algorithm for validating signatures in SAML responses. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "enum": [ + "SHA256", + "SHA384", + "SHA512" + ], + "type": "string" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, for example \"my-application\"", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "The cookie is only sent to the server when a request is made with the https:scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "The session cookie idle time in seconds.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Persistent session absolute timeout in seconds.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Persistent session rolling timeout in seconds.", + "type": "number" + }, + "session_request_headers": { + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "session_secret": { + "description": "The session secret. This must be a random string of 32 characters from the base64 alphabet (letters, numbers, `/`, `_` and `+`). It is used as the secret key for encrypting session data as well as state information that is sent to the IdP in the authentication exchange.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "maxLength": 32, + "minLength": 32, + "pattern": "^[0-9a-zA-Z/_+]+$", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie. The session cannot be invalidated or revoked without changing the session secret, but is stateless, and doesn't require a database. - `memcached`: stores session data in memcached - `redis`: stores session data in Redis", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This includes information about the active sessions for the `specific_audience` belonging to a specific subject.", + "type": "boolean" + }, + "validate_assertion_signature": { + "default": true, + "description": "Enable signature validation for SAML responses.", + "type": "boolean" + } + }, + "required": [ + "assertion_consumer_path", + "idp_sso_url", + "issuer", + "session_secret" + ], + "shorthand_fields": { + "session_auth_ttl": { + "type": "number" + }, + "session_compressor": { + "type": "string" + }, + "session_cookie_httponly": { + "type": "boolean" + }, + "session_cookie_idletime": { + "type": "number" + }, + "session_cookie_lifetime": { + "type": "number" + }, + "session_cookie_maxsize": { + "type": "integer" + }, + "session_cookie_renew": { + "type": "number" + }, + "session_cookie_samesite": { + "type": "string" + }, + "session_memcache_host": { + "type": "string" + }, + "session_memcache_port": { + "type": "integer" + }, + "session_memcache_prefix": { + "type": "string" + }, + "session_memcache_socket": { + "type": "string" + }, + "session_redis_cluster_max_redirections": { + "type": "integer" + }, + "session_redis_cluster_maxredirections": { + "type": "integer" + }, + "session_redis_cluster_nodes": { + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "type": "object" + }, + "type": "array" + }, + "session_redis_connect_timeout": { + "type": "integer" + }, + "session_redis_host": { + "type": "string" + }, + "session_redis_password": { + "type": "string" + }, + "session_redis_port": { + "type": "integer" + }, + "session_redis_prefix": { + "type": "string" + }, + "session_redis_read_timeout": { + "type": "integer" + }, + "session_redis_send_timeout": { + "type": "integer" + }, + "session_redis_server_name": { + "type": "string" + }, + "session_redis_socket": { + "type": "string" + }, + "session_redis_ssl": { + "type": "boolean" + }, + "session_redis_ssl_verify": { + "type": "boolean" + }, + "session_redis_username": { + "type": "string" + }, + "session_strategy": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/saml/3.12.json b/json_schemas/saml/3.12.json new file mode 100644 index 00000000..0b9a6f51 --- /dev/null +++ b/json_schemas/saml/3.12.json @@ -0,0 +1,596 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer. If not set, a Kong Consumer must exist for the SAML IdP user credentials, mapping the username format to the Kong Consumer username.", + "type": "string" + }, + "assertion_consumer_path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "idp_certificate": { + "description": "The public certificate provided by the IdP. This is used to validate responses from the IdP. Only include the contents of the certificate. Do not include the header (`BEGIN CERTIFICATE`) and footer (`END CERTIFICATE`) lines.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "idp_sso_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "issuer": { + "description": "The unique identifier of the IdP application. Formatted as a URL containing information about the IdP so the SP can validate that the SAML assertions it receives are issued from the correct IdP.", + "type": "string" + }, + "nameid_format": { + "default": "EmailAddress", + "description": "The requested `NameId` format. Options available are: - `Unspecified` - `EmailAddress` - `Persistent` - `Transient`", + "enum": [ + "EmailAddress", + "Persistent", + "Transient", + "Unspecified" + ], + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "request_digest_algorithm": { + "default": "SHA256", + "description": "The digest algorithm for Authn requests: - `SHA256` - `SHA1`", + "enum": [ + "SHA1", + "SHA256" + ], + "type": "string" + }, + "request_signature_algorithm": { + "default": "SHA256", + "description": "The signature algorithm for signing Authn requests. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "enum": [ + "SHA256", + "SHA384", + "SHA512" + ], + "type": "string" + }, + "request_signing_certificate": { + "description": "The certificate for signing requests.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "request_signing_key": { + "description": "The private key for signing requests. If this parameter is set, requests sent to the IdP are signed. The `request_signing_certificate` parameter must be set as well.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "response_digest_algorithm": { + "default": "SHA256", + "description": "The algorithm for verifying digest in SAML responses: - `SHA256` - `SHA1`", + "enum": [ + "SHA1", + "SHA256" + ], + "type": "string" + }, + "response_encryption_key": { + "description": "The private encryption key required to decrypt encrypted assertions.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "response_signature_algorithm": { + "default": "SHA256", + "description": "The algorithm for validating signatures in SAML responses. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "enum": [ + "SHA256", + "SHA384", + "SHA512" + ], + "type": "string" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, for example \"my-application\"", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "The cookie is only sent to the server when a request is made with the https:scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "The session cookie idle time in seconds.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Persistent session absolute timeout in seconds.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Persistent session rolling timeout in seconds.", + "type": "number" + }, + "session_request_headers": { + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "session_secret": { + "description": "The session secret. This must be a random string of 32 characters from the base64 alphabet (letters, numbers, `/`, `_` and `+`). It is used as the secret key for encrypting session data as well as state information that is sent to the IdP in the authentication exchange.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "maxLength": 32, + "minLength": 32, + "pattern": "^[0-9a-zA-Z/_+]+$", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie. The session cannot be invalidated or revoked without changing the session secret, but is stateless, and doesn't require a database. - `memcached`: stores session data in memcached - `redis`: stores session data in Redis", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This includes information about the active sessions for the `specific_audience` belonging to a specific subject.", + "type": "boolean" + }, + "validate_assertion_signature": { + "default": true, + "description": "Enable signature validation for SAML responses.", + "type": "boolean" + } + }, + "required": [ + "assertion_consumer_path", + "idp_sso_url", + "issuer", + "session_secret" + ], + "shorthand_fields": { + "session_auth_ttl": { + "type": "number" + }, + "session_compressor": { + "type": "string" + }, + "session_cookie_httponly": { + "type": "boolean" + }, + "session_cookie_idletime": { + "type": "number" + }, + "session_cookie_lifetime": { + "type": "number" + }, + "session_cookie_maxsize": { + "type": "integer" + }, + "session_cookie_renew": { + "type": "number" + }, + "session_cookie_samesite": { + "type": "string" + }, + "session_memcache_host": { + "type": "string" + }, + "session_memcache_port": { + "type": "integer" + }, + "session_memcache_prefix": { + "type": "string" + }, + "session_memcache_socket": { + "type": "string" + }, + "session_redis_cluster_max_redirections": { + "type": "integer" + }, + "session_redis_cluster_maxredirections": { + "type": "integer" + }, + "session_redis_cluster_nodes": { + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "type": "object" + }, + "type": "array" + }, + "session_redis_connect_timeout": { + "type": "integer" + }, + "session_redis_host": { + "type": "string" + }, + "session_redis_password": { + "type": "string" + }, + "session_redis_port": { + "type": "integer" + }, + "session_redis_prefix": { + "type": "string" + }, + "session_redis_read_timeout": { + "type": "integer" + }, + "session_redis_send_timeout": { + "type": "integer" + }, + "session_redis_server_name": { + "type": "string" + }, + "session_redis_socket": { + "type": "string" + }, + "session_redis_ssl": { + "type": "boolean" + }, + "session_redis_ssl_verify": { + "type": "boolean" + }, + "session_redis_username": { + "type": "string" + }, + "session_strategy": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/saml/3.4.json b/json_schemas/saml/3.4.json new file mode 100644 index 00000000..8afa0166 --- /dev/null +++ b/json_schemas/saml/3.4.json @@ -0,0 +1,446 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer. If not set, a Kong Consumer must exist for the SAML IdP user credentials, mapping the username format to the Kong Consumer username.", + "type": "string" + }, + "assertion_consumer_path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "idp_certificate": { + "description": "The public certificate provided by the IdP. This is used to validate responses from the IdP. Only include the contents of the certificate. Do not include the header (`BEGIN CERTIFICATE`) and footer (`END CERTIFICATE`) lines.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "idp_sso_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "issuer": { + "description": "The unique identifier of the IdP application. Formatted as a URL containing information about the IdP so the SP can validate that the SAML assertions it receives are issued from the correct IdP.", + "type": "string" + }, + "nameid_format": { + "default": "EmailAddress", + "description": "The requested `NameId` format. Options available are: - `Unspecified` - `EmailAddress` - `Persistent` - `Transient`", + "enum": [ + "EmailAddress", + "Persistent", + "Transient", + "Unspecified" + ], + "type": "string" + }, + "request_digest_algorithm": { + "default": "SHA256", + "description": "The digest algorithm for Authn requests: - `SHA256` - `SHA1`", + "enum": [ + "SHA1", + "SHA256" + ], + "type": "string" + }, + "request_signature_algorithm": { + "default": "SHA256", + "description": "The signature algorithm for signing Authn requests. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "enum": [ + "SHA256", + "SHA384", + "SHA512" + ], + "type": "string" + }, + "request_signing_certificate": { + "description": "The certificate for signing requests.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "request_signing_key": { + "description": "The private key for signing requests. If this parameter is set, requests sent to the IdP are signed. The `request_signing_certificate` parameter must be set as well.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "response_digest_algorithm": { + "default": "SHA256", + "description": "The algorithm for verifying digest in SAML responses: - `SHA256` - `SHA1`", + "enum": [ + "SHA1", + "SHA256" + ], + "type": "string" + }, + "response_encryption_key": { + "description": "The private encryption key required to decrypt encrypted assertions.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "response_signature_algorithm": { + "default": "SHA256", + "description": "The algorithm for validating signatures in SAML responses. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "enum": [ + "SHA256", + "SHA384", + "SHA512" + ], + "type": "string" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, for example \"my-application\"", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "The cookie is only sent to the server when a request is made with the https:scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "The session cookie idle time in seconds.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_redis_cluster_max_redirections": { + "description": "The Redis cluster maximum redirects.", + "type": "integer" + }, + "session_redis_cluster_nodes": { + "description": "The Redis cluster node host. Takes an array of host records, with either `ip` or `host`, and `port` values.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "type": "array" + }, + "session_redis_connect_timeout": { + "description": "The Redis connection timeout in milliseconds.", + "type": "integer" + }, + "session_redis_host": { + "default": "127.0.0.1", + "description": "The Redis host IP.", + "type": "string" + }, + "session_redis_password": { + "description": "Password to use for Redis connection when the `redis` session storage is defined. If undefined, no auth commands are sent to Redis. This value is pulled from\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "session_redis_port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_redis_prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "session_redis_read_timeout": { + "description": "The Redis read timeout in milliseconds.", + "type": "integer" + }, + "session_redis_send_timeout": { + "description": "The Redis send timeout in milliseconds.", + "type": "integer" + }, + "session_redis_server_name": { + "description": "The SNI used for connecting to the Redis server.", + "type": "string" + }, + "session_redis_socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "session_redis_ssl": { + "default": false, + "description": "Use SSL/TLS for the Redis connection.", + "type": "boolean" + }, + "session_redis_ssl_verify": { + "default": false, + "description": "Verify the Redis server certificate.", + "type": "boolean" + }, + "session_redis_username": { + "description": "Redis username if the `redis` session storage is defined and ACL authentication is desired.If undefined, ACL authentication will not be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Persistent session absolute timeout in seconds.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Persistent session rolling timeout in seconds.", + "type": "number" + }, + "session_request_headers": { + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "session_secret": { + "description": "The session secret. This must be a random string of 32 characters from the base64 alphabet (letters, numbers, `/`, `_` and `+`). It is used as the secret key for encrypting session data as well as state information that is sent to the IdP in the authentication exchange.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "maxLength": 32, + "minLength": 32, + "pattern": "^[0-9a-zA-Z/_+]+$", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie. The session cannot be invalidated or revoked without changing the session secret, but is stateless, and doesn't require a database. - `memcached`: stores session data in memcached - `redis`: stores session data in Redis", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This includes information about the active sessions for the `specific_audience` belonging to a specific subject.", + "type": "boolean" + }, + "validate_assertion_signature": { + "default": true, + "description": "Enable signature validation for SAML responses.", + "type": "boolean" + } + }, + "required": [ + "assertion_consumer_path", + "idp_sso_url", + "issuer", + "session_secret" + ], + "shorthand_fields": { + "session_auth_ttl": { + "type": "number" + }, + "session_compressor": { + "type": "string" + }, + "session_cookie_httponly": { + "type": "boolean" + }, + "session_cookie_idletime": { + "type": "number" + }, + "session_cookie_lifetime": { + "type": "number" + }, + "session_cookie_maxsize": { + "type": "integer" + }, + "session_cookie_renew": { + "type": "number" + }, + "session_cookie_samesite": { + "type": "string" + }, + "session_memcache_host": { + "type": "string" + }, + "session_memcache_port": { + "type": "integer" + }, + "session_memcache_prefix": { + "type": "string" + }, + "session_memcache_socket": { + "type": "string" + }, + "session_redis_cluster_maxredirections": { + "type": "integer" + }, + "session_strategy": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/saml/3.7.json b/json_schemas/saml/3.7.json new file mode 100644 index 00000000..fd1c8192 --- /dev/null +++ b/json_schemas/saml/3.7.json @@ -0,0 +1,446 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer. If not set, a Kong Consumer must exist for the SAML IdP user credentials, mapping the username format to the Kong Consumer username.", + "type": "string" + }, + "assertion_consumer_path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "idp_certificate": { + "description": "The public certificate provided by the IdP. This is used to validate responses from the IdP. Only include the contents of the certificate. Do not include the header (`BEGIN CERTIFICATE`) and footer (`END CERTIFICATE`) lines.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "idp_sso_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "issuer": { + "description": "The unique identifier of the IdP application. Formatted as a URL containing information about the IdP so the SP can validate that the SAML assertions it receives are issued from the correct IdP.", + "type": "string" + }, + "nameid_format": { + "default": "EmailAddress", + "description": "The requested `NameId` format. Options available are: - `Unspecified` - `EmailAddress` - `Persistent` - `Transient`", + "enum": [ + "EmailAddress", + "Persistent", + "Transient", + "Unspecified" + ], + "type": "string" + }, + "request_digest_algorithm": { + "default": "SHA256", + "description": "The digest algorithm for Authn requests: - `SHA256` - `SHA1`", + "enum": [ + "SHA1", + "SHA256" + ], + "type": "string" + }, + "request_signature_algorithm": { + "default": "SHA256", + "description": "The signature algorithm for signing Authn requests. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "enum": [ + "SHA256", + "SHA384", + "SHA512" + ], + "type": "string" + }, + "request_signing_certificate": { + "description": "The certificate for signing requests.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "request_signing_key": { + "description": "The private key for signing requests. If this parameter is set, requests sent to the IdP are signed. The `request_signing_certificate` parameter must be set as well.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "response_digest_algorithm": { + "default": "SHA256", + "description": "The algorithm for verifying digest in SAML responses: - `SHA256` - `SHA1`", + "enum": [ + "SHA1", + "SHA256" + ], + "type": "string" + }, + "response_encryption_key": { + "description": "The private encryption key required to decrypt encrypted assertions.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "response_signature_algorithm": { + "default": "SHA256", + "description": "The algorithm for validating signatures in SAML responses. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "enum": [ + "SHA256", + "SHA384", + "SHA512" + ], + "type": "string" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, for example \"my-application\"", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "The cookie is only sent to the server when a request is made with the https:scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "The session cookie idle time in seconds.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_redis_cluster_max_redirections": { + "description": "The Redis cluster maximum redirects.", + "type": "integer" + }, + "session_redis_cluster_nodes": { + "description": "The Redis cluster node host. Takes an array of host records, with either `ip` or `host`, and `port` values.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "type": "array" + }, + "session_redis_connect_timeout": { + "description": "The Redis connection timeout in milliseconds.", + "type": "integer" + }, + "session_redis_host": { + "default": "127.0.0.1", + "description": "The Redis host IP.", + "type": "string" + }, + "session_redis_password": { + "description": "Password to use for Redis connection when the `redis` session storage is defined. If undefined, no auth commands are sent to Redis. This value is pulled from\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "session_redis_port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_redis_prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "session_redis_read_timeout": { + "description": "The Redis read timeout in milliseconds.", + "type": "integer" + }, + "session_redis_send_timeout": { + "description": "The Redis send timeout in milliseconds.", + "type": "integer" + }, + "session_redis_server_name": { + "description": "The SNI used for connecting to the Redis server.", + "type": "string" + }, + "session_redis_socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "session_redis_ssl": { + "default": false, + "description": "Use SSL/TLS for the Redis connection.", + "type": "boolean" + }, + "session_redis_ssl_verify": { + "default": false, + "description": "Verify the Redis server certificate.", + "type": "boolean" + }, + "session_redis_username": { + "description": "Redis username if the `redis` session storage is defined and ACL authentication is desired.If undefined, ACL authentication will not be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Persistent session absolute timeout in seconds.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Persistent session rolling timeout in seconds.", + "type": "number" + }, + "session_request_headers": { + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "session_secret": { + "description": "The session secret. This must be a random string of 32 characters from the base64 alphabet (letters, numbers, `/`, `_` and `+`). It is used as the secret key for encrypting session data as well as state information that is sent to the IdP in the authentication exchange.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "maxLength": 32, + "minLength": 32, + "pattern": "^[0-9a-zA-Z/_+]+$", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie. The session cannot be invalidated or revoked without changing the session secret, but is stateless, and doesn't require a database. - `memcached`: stores session data in memcached - `redis`: stores session data in Redis", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This includes information about the active sessions for the `specific_audience` belonging to a specific subject.", + "type": "boolean" + }, + "validate_assertion_signature": { + "default": true, + "description": "Enable signature validation for SAML responses.", + "type": "boolean" + } + }, + "required": [ + "assertion_consumer_path", + "idp_sso_url", + "issuer", + "session_secret" + ], + "shorthand_fields": { + "session_auth_ttl": { + "type": "number" + }, + "session_compressor": { + "type": "string" + }, + "session_cookie_httponly": { + "type": "boolean" + }, + "session_cookie_idletime": { + "type": "number" + }, + "session_cookie_lifetime": { + "type": "number" + }, + "session_cookie_maxsize": { + "type": "integer" + }, + "session_cookie_renew": { + "type": "number" + }, + "session_cookie_samesite": { + "type": "string" + }, + "session_memcache_host": { + "type": "string" + }, + "session_memcache_port": { + "type": "integer" + }, + "session_memcache_prefix": { + "type": "string" + }, + "session_memcache_socket": { + "type": "string" + }, + "session_redis_cluster_maxredirections": { + "type": "integer" + }, + "session_strategy": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/saml/3.8.json b/json_schemas/saml/3.8.json new file mode 100644 index 00000000..f28382c7 --- /dev/null +++ b/json_schemas/saml/3.8.json @@ -0,0 +1,673 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer. If not set, a Kong Consumer must exist for the SAML IdP user credentials, mapping the username format to the Kong Consumer username.", + "type": "string" + }, + "assertion_consumer_path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "idp_certificate": { + "description": "The public certificate provided by the IdP. This is used to validate responses from the IdP. Only include the contents of the certificate. Do not include the header (`BEGIN CERTIFICATE`) and footer (`END CERTIFICATE`) lines.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "idp_sso_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "issuer": { + "description": "The unique identifier of the IdP application. Formatted as a URL containing information about the IdP so the SP can validate that the SAML assertions it receives are issued from the correct IdP.", + "type": "string" + }, + "nameid_format": { + "default": "EmailAddress", + "description": "The requested `NameId` format. Options available are: - `Unspecified` - `EmailAddress` - `Persistent` - `Transient`", + "enum": [ + "EmailAddress", + "Persistent", + "Transient", + "Unspecified" + ], + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "translate_backwards": [ + "connect_timeout" + ], + "type": "integer" + } + }, + "type": "object" + }, + "request_digest_algorithm": { + "default": "SHA256", + "description": "The digest algorithm for Authn requests: - `SHA256` - `SHA1`", + "enum": [ + "SHA1", + "SHA256" + ], + "type": "string" + }, + "request_signature_algorithm": { + "default": "SHA256", + "description": "The signature algorithm for signing Authn requests. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "enum": [ + "SHA256", + "SHA384", + "SHA512" + ], + "type": "string" + }, + "request_signing_certificate": { + "description": "The certificate for signing requests.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "request_signing_key": { + "description": "The private key for signing requests. If this parameter is set, requests sent to the IdP are signed. The `request_signing_certificate` parameter must be set as well.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "response_digest_algorithm": { + "default": "SHA256", + "description": "The algorithm for verifying digest in SAML responses: - `SHA256` - `SHA1`", + "enum": [ + "SHA1", + "SHA256" + ], + "type": "string" + }, + "response_encryption_key": { + "description": "The private encryption key required to decrypt encrypted assertions.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "response_signature_algorithm": { + "default": "SHA256", + "description": "The algorithm for validating signatures in SAML responses. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "enum": [ + "SHA256", + "SHA384", + "SHA512" + ], + "type": "string" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, for example \"my-application\"", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "The cookie is only sent to the server when a request is made with the https:scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "The session cookie idle time in seconds.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Persistent session absolute timeout in seconds.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Persistent session rolling timeout in seconds.", + "type": "number" + }, + "session_request_headers": { + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "session_secret": { + "description": "The session secret. This must be a random string of 32 characters from the base64 alphabet (letters, numbers, `/`, `_` and `+`). It is used as the secret key for encrypting session data as well as state information that is sent to the IdP in the authentication exchange.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "maxLength": 32, + "minLength": 32, + "pattern": "^[0-9a-zA-Z/_+]+$", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie. The session cannot be invalidated or revoked without changing the session secret, but is stateless, and doesn't require a database. - `memcached`: stores session data in memcached - `redis`: stores session data in Redis", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This includes information about the active sessions for the `specific_audience` belonging to a specific subject.", + "type": "boolean" + }, + "validate_assertion_signature": { + "default": true, + "description": "Enable signature validation for SAML responses.", + "type": "boolean" + } + }, + "required": [ + "assertion_consumer_path", + "idp_sso_url", + "issuer", + "session_secret" + ], + "shorthand_fields": { + "session_auth_ttl": { + "type": "number" + }, + "session_compressor": { + "type": "string" + }, + "session_cookie_httponly": { + "type": "boolean" + }, + "session_cookie_idletime": { + "type": "number" + }, + "session_cookie_lifetime": { + "type": "number" + }, + "session_cookie_maxsize": { + "type": "integer" + }, + "session_cookie_renew": { + "type": "number" + }, + "session_cookie_samesite": { + "type": "string" + }, + "session_memcache_host": { + "type": "string" + }, + "session_memcache_port": { + "type": "integer" + }, + "session_memcache_prefix": { + "type": "string" + }, + "session_memcache_socket": { + "type": "string" + }, + "session_redis_cluster_max_redirections": { + "translate_backwards": [ + "cluster_max_redirections", + "redis" + ], + "type": "integer" + }, + "session_redis_cluster_maxredirections": { + "translate_backwards": [ + "cluster_max_redirections", + "redis" + ], + "type": "integer" + }, + "session_redis_cluster_nodes": { + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "type": "object" + }, + "translate_backwards": [ + "cluster_nodes", + "redis" + ], + "type": "array" + }, + "session_redis_connect_timeout": { + "translate_backwards": [ + "connect_timeout", + "redis" + ], + "type": "integer" + }, + "session_redis_host": { + "translate_backwards": [ + "host", + "redis" + ], + "type": "string" + }, + "session_redis_password": { + "translate_backwards": [ + "password", + "redis" + ], + "type": "string" + }, + "session_redis_port": { + "translate_backwards": [ + "port", + "redis" + ], + "type": "integer" + }, + "session_redis_prefix": { + "translate_backwards": [ + "prefix", + "redis" + ], + "type": "string" + }, + "session_redis_read_timeout": { + "translate_backwards": [ + "read_timeout", + "redis" + ], + "type": "integer" + }, + "session_redis_send_timeout": { + "translate_backwards": [ + "redis", + "send_timeout" + ], + "type": "integer" + }, + "session_redis_server_name": { + "translate_backwards": [ + "redis", + "server_name" + ], + "type": "string" + }, + "session_redis_socket": { + "translate_backwards": [ + "redis", + "socket" + ], + "type": "string" + }, + "session_redis_ssl": { + "translate_backwards": [ + "redis", + "ssl" + ], + "type": "boolean" + }, + "session_redis_ssl_verify": { + "translate_backwards": [ + "redis", + "ssl_verify" + ], + "type": "boolean" + }, + "session_redis_username": { + "translate_backwards": [ + "redis", + "username" + ], + "type": "string" + }, + "session_strategy": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/saml/3.9.json b/json_schemas/saml/3.9.json new file mode 100644 index 00000000..93a75f73 --- /dev/null +++ b/json_schemas/saml/3.9.json @@ -0,0 +1,612 @@ +{ + "properties": { + "config": { + "properties": { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer. If not set, a Kong Consumer must exist for the SAML IdP user credentials, mapping the username format to the Kong Consumer username.", + "type": "string" + }, + "assertion_consumer_path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "idp_certificate": { + "description": "The public certificate provided by the IdP. This is used to validate responses from the IdP. Only include the contents of the certificate. Do not include the header (`BEGIN CERTIFICATE`) and footer (`END CERTIFICATE`) lines.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "idp_sso_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "issuer": { + "description": "The unique identifier of the IdP application. Formatted as a URL containing information about the IdP so the SP can validate that the SAML assertions it receives are issued from the correct IdP.", + "type": "string" + }, + "nameid_format": { + "default": "EmailAddress", + "description": "The requested `NameId` format. Options available are: - `Unspecified` - `EmailAddress` - `Persistent` - `Transient`", + "enum": [ + "EmailAddress", + "Persistent", + "Transient", + "Unspecified" + ], + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "description": "The Redis session key prefix.", + "type": "string" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "socket": { + "description": "The Redis unix socket path.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "request_digest_algorithm": { + "default": "SHA256", + "description": "The digest algorithm for Authn requests: - `SHA256` - `SHA1`", + "enum": [ + "SHA1", + "SHA256" + ], + "type": "string" + }, + "request_signature_algorithm": { + "default": "SHA256", + "description": "The signature algorithm for signing Authn requests. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "enum": [ + "SHA256", + "SHA384", + "SHA512" + ], + "type": "string" + }, + "request_signing_certificate": { + "description": "The certificate for signing requests.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "request_signing_key": { + "description": "The private key for signing requests. If this parameter is set, requests sent to the IdP are signed. The `request_signing_certificate` parameter must be set as well.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "response_digest_algorithm": { + "default": "SHA256", + "description": "The algorithm for verifying digest in SAML responses: - `SHA256` - `SHA1`", + "enum": [ + "SHA1", + "SHA256" + ], + "type": "string" + }, + "response_encryption_key": { + "description": "The private encryption key required to decrypt encrypted assertions.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "response_signature_algorithm": { + "default": "SHA256", + "description": "The algorithm for validating signatures in SAML responses. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "enum": [ + "SHA256", + "SHA384", + "SHA512" + ], + "type": "string" + }, + "session_absolute_timeout": { + "default": 86400, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "session_audience": { + "default": "default", + "description": "The session audience, for example \"my-application\"", + "type": "string" + }, + "session_cookie_domain": { + "description": "The session cookie domain flag.", + "type": "string" + }, + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean" + }, + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "type": "string" + }, + "session_cookie_path": { + "default": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + }, + "session_cookie_same_site": { + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "session_cookie_secure": { + "description": "The cookie is only sent to the server when a request is made with the https:scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + }, + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean" + }, + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean" + }, + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean" + }, + "session_idling_timeout": { + "default": 900, + "description": "The session cookie idle time in seconds.", + "type": "number" + }, + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "type": "string" + }, + "session_memcached_port": { + "default": 11211, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string" + }, + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string" + }, + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions", + "type": "boolean" + }, + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Persistent session absolute timeout in seconds.", + "type": "number" + }, + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name", + "type": "string" + }, + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Persistent session rolling timeout in seconds.", + "type": "number" + }, + "session_request_headers": { + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_response_headers": { + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "session_rolling_timeout": { + "default": 3600, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "session_secret": { + "description": "The session secret. This must be a random string of 32 characters from the base64 alphabet (letters, numbers, `/`, `_` and `+`). It is used as the secret key for encrypting session data as well as state information that is sent to the IdP in the authentication exchange.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "maxLength": 32, + "minLength": 32, + "pattern": "^[0-9a-zA-Z/_+]+$", + "type": "string" + }, + "session_storage": { + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie. The session cannot be invalidated or revoked without changing the session secret, but is stateless, and doesn't require a database. - `memcached`: stores session data in memcached - `redis`: stores session data in Redis", + "enum": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string" + }, + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This includes information about the active sessions for the `specific_audience` belonging to a specific subject.", + "type": "boolean" + }, + "validate_assertion_signature": { + "default": true, + "description": "Enable signature validation for SAML responses.", + "type": "boolean" + } + }, + "required": [ + "assertion_consumer_path", + "idp_sso_url", + "issuer", + "session_secret" + ], + "shorthand_fields": { + "session_auth_ttl": { + "type": "number" + }, + "session_compressor": { + "type": "string" + }, + "session_cookie_httponly": { + "type": "boolean" + }, + "session_cookie_idletime": { + "type": "number" + }, + "session_cookie_lifetime": { + "type": "number" + }, + "session_cookie_maxsize": { + "type": "integer" + }, + "session_cookie_renew": { + "type": "number" + }, + "session_cookie_samesite": { + "type": "string" + }, + "session_memcache_host": { + "type": "string" + }, + "session_memcache_port": { + "type": "integer" + }, + "session_memcache_prefix": { + "type": "string" + }, + "session_memcache_socket": { + "type": "string" + }, + "session_redis_cluster_max_redirections": { + "type": "integer" + }, + "session_redis_cluster_maxredirections": { + "type": "integer" + }, + "session_redis_cluster_nodes": { + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "type": "object" + }, + "type": "array" + }, + "session_redis_connect_timeout": { + "type": "integer" + }, + "session_redis_host": { + "type": "string" + }, + "session_redis_password": { + "type": "string" + }, + "session_redis_port": { + "type": "integer" + }, + "session_redis_prefix": { + "type": "string" + }, + "session_redis_read_timeout": { + "type": "integer" + }, + "session_redis_send_timeout": { + "type": "integer" + }, + "session_redis_server_name": { + "type": "string" + }, + "session_redis_socket": { + "type": "string" + }, + "session_redis_ssl": { + "type": "boolean" + }, + "session_redis_ssl_verify": { + "type": "boolean" + }, + "session_redis_username": { + "type": "string" + }, + "session_strategy": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/service-protection/3.10.json b/json_schemas/service-protection/3.10.json new file mode 100644 index 00000000..3138ec93 --- /dev/null +++ b/json_schemas/service-protection/3.10.json @@ -0,0 +1,316 @@ +{ + "properties": { + "config": { + "properties": { + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string" + }, + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "type": "boolean" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + }, + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "lock_dictionary_name": { + "default": "kong_locks", + "description": "The shared dictionary where concurrency control locks are stored. The default shared dictionary is `kong_locks`. The shared dictionary should be declared in nginx-kong.conf.", + "type": "string" + }, + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same.", + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + }, + "strategy": { + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "limit", + "namespace", + "window_size" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/service-protection/3.11.json b/json_schemas/service-protection/3.11.json new file mode 100644 index 00000000..5a03703a --- /dev/null +++ b/json_schemas/service-protection/3.11.json @@ -0,0 +1,301 @@ +{ + "properties": { + "config": { + "properties": { + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string" + }, + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "type": "boolean" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + }, + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "items": { + "required": [], + "type": "number" + }, + "type": "array" + }, + "lock_dictionary_name": { + "default": "kong_locks", + "description": "The shared dictionary where concurrency control locks are stored. The default shared dictionary is `kong_locks`. The shared dictionary should be declared in nginx-kong.conf.", + "type": "string" + }, + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same.", + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + }, + "strategy": { + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "items": { + "required": [], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "limit", + "window_size" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/service-protection/3.12.json b/json_schemas/service-protection/3.12.json new file mode 100644 index 00000000..e7d65997 --- /dev/null +++ b/json_schemas/service-protection/3.12.json @@ -0,0 +1,302 @@ +{ + "properties": { + "config": { + "properties": { + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string" + }, + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "type": "boolean" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + }, + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "items": { + "required": [], + "type": "number" + }, + "type": "array" + }, + "lock_dictionary_name": { + "default": "kong_locks", + "description": "The shared dictionary where concurrency control locks are stored. The default shared dictionary is `kong_locks`. The shared dictionary should be declared in nginx-kong.conf.", + "type": "string" + }, + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same.", + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + }, + "strategy": { + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "items": { + "required": [], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "limit", + "namespace", + "window_size" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/service-protection/3.9.json b/json_schemas/service-protection/3.9.json new file mode 100644 index 00000000..3138ec93 --- /dev/null +++ b/json_schemas/service-protection/3.9.json @@ -0,0 +1,316 @@ +{ + "properties": { + "config": { + "properties": { + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string" + }, + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "type": "boolean" + }, + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "minimum": 0, + "type": "number" + }, + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + }, + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + }, + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "lock_dictionary_name": { + "default": "kong_locks", + "description": "The shared dictionary where concurrency control locks are stored. The default shared dictionary is `kong_locks`. The shared dictionary should be declared in nginx-kong.conf.", + "type": "string" + }, + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same.", + "type": "string" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + }, + "strategy": { + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "enum": [ + "cluster", + "local", + "redis" + ], + "type": "string" + }, + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + }, + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "items": { + "required": [ + + ], + "type": "number" + }, + "type": "array" + }, + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "required": [ + "limit", + "namespace", + "window_size" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/session/2.8.json b/json_schemas/session/2.8.json new file mode 100644 index 00000000..d98bc182 --- /dev/null +++ b/json_schemas/session/2.8.json @@ -0,0 +1,154 @@ +{ + "properties": { + "config": { + "properties": { + "cookie_discard": { + "default": 10, + "description": "The duration in seconds after which an old session’s TTL is updated that an old cookie is discarded.", + "type": "number" + }, + "cookie_domain": { + "description": "The domain with which the cookie is intended to be exchanged.", + "type": "string" + }, + "cookie_httponly": { + "default": true, + "description": "Applies the `HttpOnly` tag so that the cookie is sent only to a server. See the\n[Restrict access to cookies docs on MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#Restrict_access_to_cookies).", + "type": "boolean" + }, + "cookie_idletime": { + "description": "The cookie idle time (in seconds); if a cookie is not used for this time\nperiod, the session becomes invalid. This value is not set by default,\nmeaning idle time checks are disabled.", + "type": "number" + }, + "cookie_lifetime": { + "default": 3600, + "description": "The duration in seconds that the session will remain open.", + "type": "number" + }, + "cookie_name": { + "default": "session", + "description": "The name of the cookie.", + "type": "string" + }, + "cookie_path": { + "default": "/", + "description": "The resource in the host where the cookie is available.", + "type": "string" + }, + "cookie_renew": { + "default": 600, + "description": "The remaining duration in seconds of a session at which point the Plugin renews the session.", + "type": "number" + }, + "cookie_samesite": { + "default": "Strict", + "description": "Determines whether and how a cookie may be sent with cross-site requests. \n\n\n* `Strict`: The browser sends cookies only if the request originated from the website that set the cookie.\n* `Lax`: Same-site cookies are withheld on cross-domain subrequests, but are sent when a user navigates\nto the URL from an external site, for example, by following a link. \n* `None` or `off`: Disables the same-site attribute so that a cookie may be sent with cross-site requests. \n`None` requires the Secure attribute (`cookie_secure`) in latest browser versions. For more information, \nsee the [SameSite cookies docs on MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite).", + "enum": [ + "Lax", + "None", + "Strict", + "off" + ], + "type": "string" + }, + "cookie_secure": { + "default": true, + "description": "Applies the Secure directive so that the cookie may be sent to the server only with an encrypted\nrequest over the HTTPS protocol. See the\n[Restrict access to cookies docs on MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#Restrict_access_to_cookies).", + "type": "boolean" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "The methods that may be used to end sessions: POST, DELETE, GET.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "default": "session_logout", + "description": "The POST argument passed to logout requests. Do not change this property.", + "type": "string" + }, + "logout_query_arg": { + "default": "session_logout", + "description": "The query argument passed to logout requests.", + "type": "string" + }, + "secret": { + "default": "UnXKQHe8y4hyiLqpH0BX9pSz4blZuZvIFhg11Zv87dEe", + "description": "The secret that is used in keyed HMAC generation.", + "examples": [ + "opensesame" + ], + "type": "string" + }, + "storage": { + "default": "cookie", + "description": "Determines where the session data is stored. `kong`: Stores encrypted session data into Kong's current database\nstrategy; the cookie will not contain any session data. `cookie`: Stores encrypted\nsession data within the cookie itself.", + "enum": [ + "cookie", + "kong" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/session/3.10.json b/json_schemas/session/3.10.json new file mode 100644 index 00000000..9af064d3 --- /dev/null +++ b/json_schemas/session/3.10.json @@ -0,0 +1,268 @@ +{ + "properties": { + "config": { + "properties": { + "absolute_timeout": { + "default": 86400, + "description": "The session cookie absolute timeout, in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "cookie_domain": { + "description": "The domain with which the cookie is intended to be exchanged.", + "type": "string" + }, + "cookie_http_only": { + "default": true, + "description": "Applies the `HttpOnly` tag so that the cookie is sent only to a server.", + "type": "boolean" + }, + "cookie_name": { + "default": "session", + "description": "The name of the cookie.", + "type": "string" + }, + "cookie_path": { + "default": "/", + "description": "The resource in the host where the cookie is available.", + "type": "string" + }, + "cookie_same_site": { + "default": "Strict", + "description": "Determines whether and how a cookie may be sent with cross-site requests.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "cookie_secure": { + "default": true, + "description": "Applies the Secure directive so that the cookie may be sent to the server only with an encrypted request over the HTTPS protocol.", + "type": "boolean" + }, + "hash_subject": { + "default": false, + "description": "Whether to hash or not the subject when store_metadata is enabled.", + "type": "boolean" + }, + "idling_timeout": { + "default": 900, + "description": "The session cookie idle time, in seconds.", + "type": "number" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "A set of HTTP methods that the plugin will respond to.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "default": "session_logout", + "description": "The POST argument passed to logout requests. Do not change this property.", + "type": "string" + }, + "logout_query_arg": { + "default": "session_logout", + "description": "The query argument passed to logout requests.", + "type": "string" + }, + "read_body_for_logout": { + "default": false, + "type": "boolean" + }, + "remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "remember_absolute_timeout": { + "default": 2592000, + "description": "The persistent session absolute timeout limit, in seconds.", + "type": "number" + }, + "remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "remember_rolling_timeout": { + "default": 604800, + "description": "The persistent session rolling timeout window, in seconds.", + "type": "number" + }, + "request_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rolling_timeout": { + "default": 3600, + "description": "The session cookie rolling timeout, in seconds. Specifies how long the session can be used until it needs to be renewed.", + "type": "number" + }, + "secret": { + "default": "WKzHLADIGTA9J6nV29ppiqFxmLWstNnPGEtEJ2gQA70z", + "description": "The secret that is used in keyed HMAC generation.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "stale_ttl": { + "default": 10, + "description": "The duration, in seconds, after which an old cookie is discarded, starting from the moment when the session becomes outdated and is replaced by a new one.", + "type": "number" + }, + "storage": { + "default": "cookie", + "description": "Determines where the session data is stored. `kong`: Stores encrypted session data into Kong's current database strategy; the cookie will not contain any session data. `cookie`: Stores encrypted session data within the cookie itself.", + "enum": [ + "cookie", + "kong" + ], + "type": "string" + }, + "store_metadata": { + "default": false, + "description": "Whether to also store metadata of sessions, such as collecting data of sessions for a specific audience belonging to a specific subject.", + "type": "boolean" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cookie_discard": { + "type": "number" + }, + "cookie_httponly": { + "type": "boolean" + }, + "cookie_idletime": { + "type": "number" + }, + "cookie_lifetime": { + "type": "number" + }, + "cookie_persistent": { + "type": "boolean" + }, + "cookie_renew": { + "type": "number" + }, + "cookie_samesite": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/session/3.11.json b/json_schemas/session/3.11.json new file mode 100644 index 00000000..e485c4cd --- /dev/null +++ b/json_schemas/session/3.11.json @@ -0,0 +1,252 @@ +{ + "properties": { + "config": { + "properties": { + "absolute_timeout": { + "default": 86400, + "description": "The session cookie absolute timeout, in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "cookie_domain": { + "description": "The domain with which the cookie is intended to be exchanged.", + "type": "string" + }, + "cookie_http_only": { + "default": true, + "description": "Applies the `HttpOnly` tag so that the cookie is sent only to a server.", + "type": "boolean" + }, + "cookie_name": { + "default": "session", + "description": "The name of the cookie.", + "type": "string" + }, + "cookie_path": { + "default": "/", + "description": "The resource in the host where the cookie is available.", + "type": "string" + }, + "cookie_same_site": { + "default": "Strict", + "description": "Determines whether and how a cookie may be sent with cross-site requests.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "cookie_secure": { + "default": true, + "description": "Applies the Secure directive so that the cookie may be sent to the server only with an encrypted request over the HTTPS protocol.", + "type": "boolean" + }, + "hash_subject": { + "default": false, + "description": "Whether to hash or not the subject when store_metadata is enabled.", + "type": "boolean" + }, + "idling_timeout": { + "default": 900, + "description": "The session cookie idle time, in seconds.", + "type": "number" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "A set of HTTP methods that the plugin will respond to.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "default": "session_logout", + "description": "The POST argument passed to logout requests. Do not change this property.", + "type": "string" + }, + "logout_query_arg": { + "default": "session_logout", + "description": "The query argument passed to logout requests.", + "type": "string" + }, + "read_body_for_logout": { + "default": false, + "type": "boolean" + }, + "remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "remember_absolute_timeout": { + "default": 2592000, + "description": "The persistent session absolute timeout limit, in seconds.", + "type": "number" + }, + "remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "remember_rolling_timeout": { + "default": 604800, + "description": "The persistent session rolling timeout window, in seconds.", + "type": "number" + }, + "request_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "response_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "rolling_timeout": { + "default": 3600, + "description": "The session cookie rolling timeout, in seconds. Specifies how long the session can be used until it needs to be renewed.", + "type": "number" + }, + "secret": { + "default": "M5N0CyFrAZwpB7F72PpY3J4S5n3KL77fs6xMuY8b7SMc", + "description": "The secret that is used in keyed HMAC generation.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "stale_ttl": { + "default": 10, + "description": "The duration, in seconds, after which an old cookie is discarded, starting from the moment when the session becomes outdated and is replaced by a new one.", + "type": "number" + }, + "storage": { + "default": "cookie", + "description": "Determines where the session data is stored. `kong`: Stores encrypted session data into Kong's current database strategy; the cookie will not contain any session data. `cookie`: Stores encrypted session data within the cookie itself.", + "enum": [ + "cookie", + "kong" + ], + "type": "string" + }, + "store_metadata": { + "default": false, + "description": "Whether to also store metadata of sessions, such as collecting data of sessions for a specific audience belonging to a specific subject.", + "type": "boolean" + } + }, + "required": [], + "shorthand_fields": { + "cookie_discard": { + "type": "number" + }, + "cookie_httponly": { + "type": "boolean" + }, + "cookie_idletime": { + "type": "number" + }, + "cookie_lifetime": { + "type": "number" + }, + "cookie_persistent": { + "type": "boolean" + }, + "cookie_renew": { + "type": "number" + }, + "cookie_samesite": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/session/3.12.json b/json_schemas/session/3.12.json new file mode 100644 index 00000000..64337fc3 --- /dev/null +++ b/json_schemas/session/3.12.json @@ -0,0 +1,252 @@ +{ + "properties": { + "config": { + "properties": { + "absolute_timeout": { + "default": 86400, + "description": "The session cookie absolute timeout, in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "cookie_domain": { + "description": "The domain with which the cookie is intended to be exchanged.", + "type": "string" + }, + "cookie_http_only": { + "default": true, + "description": "Applies the `HttpOnly` tag so that the cookie is sent only to a server.", + "type": "boolean" + }, + "cookie_name": { + "default": "session", + "description": "The name of the cookie.", + "type": "string" + }, + "cookie_path": { + "default": "/", + "description": "The resource in the host where the cookie is available.", + "type": "string" + }, + "cookie_same_site": { + "default": "Strict", + "description": "Determines whether and how a cookie may be sent with cross-site requests.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "cookie_secure": { + "default": true, + "description": "Applies the Secure directive so that the cookie may be sent to the server only with an encrypted request over the HTTPS protocol.", + "type": "boolean" + }, + "hash_subject": { + "default": false, + "description": "Whether to hash or not the subject when store_metadata is enabled.", + "type": "boolean" + }, + "idling_timeout": { + "default": 900, + "description": "The session cookie idle time, in seconds.", + "type": "number" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "A set of HTTP methods that the plugin will respond to.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "default": "session_logout", + "description": "The POST argument passed to logout requests. Do not change this property.", + "type": "string" + }, + "logout_query_arg": { + "default": "session_logout", + "description": "The query argument passed to logout requests.", + "type": "string" + }, + "read_body_for_logout": { + "default": false, + "type": "boolean" + }, + "remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "remember_absolute_timeout": { + "default": 2592000, + "description": "The persistent session absolute timeout limit, in seconds.", + "type": "number" + }, + "remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "remember_rolling_timeout": { + "default": 604800, + "description": "The persistent session rolling timeout window, in seconds.", + "type": "number" + }, + "request_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "response_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "rolling_timeout": { + "default": 3600, + "description": "The session cookie rolling timeout, in seconds. Specifies how long the session can be used until it needs to be renewed.", + "type": "number" + }, + "secret": { + "default": "qIy2DUgDyM6HDlP9lMhdI8h1gmCQCLgBdb0RS0vxLGsp", + "description": "The secret that is used in keyed HMAC generation.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "stale_ttl": { + "default": 10, + "description": "The duration, in seconds, after which an old cookie is discarded, starting from the moment when the session becomes outdated and is replaced by a new one.", + "type": "number" + }, + "storage": { + "default": "cookie", + "description": "Determines where the session data is stored. `kong`: Stores encrypted session data into Kong's current database strategy; the cookie will not contain any session data. `cookie`: Stores encrypted session data within the cookie itself.", + "enum": [ + "cookie", + "kong" + ], + "type": "string" + }, + "store_metadata": { + "default": false, + "description": "Whether to also store metadata of sessions, such as collecting data of sessions for a specific audience belonging to a specific subject.", + "type": "boolean" + } + }, + "required": [], + "shorthand_fields": { + "cookie_discard": { + "type": "number" + }, + "cookie_httponly": { + "type": "boolean" + }, + "cookie_idletime": { + "type": "number" + }, + "cookie_lifetime": { + "type": "number" + }, + "cookie_persistent": { + "type": "boolean" + }, + "cookie_renew": { + "type": "number" + }, + "cookie_samesite": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/session/3.4.json b/json_schemas/session/3.4.json new file mode 100644 index 00000000..1e7b3ccd --- /dev/null +++ b/json_schemas/session/3.4.json @@ -0,0 +1,254 @@ +{ + "properties": { + "config": { + "properties": { + "absolute_timeout": { + "default": 86400, + "description": "The session cookie absolute timeout, in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "cookie_domain": { + "description": "The domain with which the cookie is intended to be exchanged.", + "type": "string" + }, + "cookie_http_only": { + "default": true, + "description": "Applies the `HttpOnly` tag so that the cookie is sent only to a server.", + "type": "boolean" + }, + "cookie_name": { + "default": "session", + "description": "The name of the cookie.", + "type": "string" + }, + "cookie_path": { + "default": "/", + "description": "The resource in the host where the cookie is available.", + "type": "string" + }, + "cookie_same_site": { + "default": "Strict", + "description": "Determines whether and how a cookie may be sent with cross-site requests.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "cookie_secure": { + "default": true, + "description": "Applies the Secure directive so that the cookie may be sent to the server only with an encrypted request over the HTTPS protocol.", + "type": "boolean" + }, + "idling_timeout": { + "default": 900, + "description": "The session cookie idle time, in seconds.", + "type": "number" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "A set of HTTP methods that the plugin will respond to.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "default": "session_logout", + "description": "The POST argument passed to logout requests. Do not change this property.", + "type": "string" + }, + "logout_query_arg": { + "default": "session_logout", + "description": "The query argument passed to logout requests.", + "type": "string" + }, + "remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "remember_absolute_timeout": { + "default": 2592000, + "description": "The persistent session absolute timeout limit, in seconds.", + "type": "number" + }, + "remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "remember_rolling_timeout": { + "default": 604800, + "description": "The persistent session rolling timeout window, in seconds.", + "type": "number" + }, + "request_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rolling_timeout": { + "default": 3600, + "description": "The session cookie rolling timeout, in seconds. Specifies how long the session can be used until it needs to be renewed.", + "type": "number" + }, + "secret": { + "default": "jUVc08J7Ji4ZDXVsLUZRvfCyF1cfFrVZ4rnoj9KTVyAi", + "description": "The secret that is used in keyed HMAC generation.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "stale_ttl": { + "default": 10, + "description": "The duration, in seconds, after which an old cookie is discarded, starting from the moment when the session becomes outdated and is replaced by a new one.", + "type": "number" + }, + "storage": { + "default": "cookie", + "description": "Determines where the session data is stored. `kong`: Stores encrypted session data into Kong's current database strategy; the cookie will not contain any session data. `cookie`: Stores encrypted session data within the cookie itself.", + "enum": [ + "cookie", + "kong" + ], + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cookie_discard": { + "type": "number" + }, + "cookie_httponly": { + "type": "boolean" + }, + "cookie_idletime": { + "type": "number" + }, + "cookie_lifetime": { + "type": "number" + }, + "cookie_persistent": { + "type": "boolean" + }, + "cookie_renew": { + "type": "number" + }, + "cookie_samesite": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/session/3.7.json b/json_schemas/session/3.7.json new file mode 100644 index 00000000..4c57adf0 --- /dev/null +++ b/json_schemas/session/3.7.json @@ -0,0 +1,258 @@ +{ + "properties": { + "config": { + "properties": { + "absolute_timeout": { + "default": 86400, + "description": "The session cookie absolute timeout, in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "cookie_domain": { + "description": "The domain with which the cookie is intended to be exchanged.", + "type": "string" + }, + "cookie_http_only": { + "default": true, + "description": "Applies the `HttpOnly` tag so that the cookie is sent only to a server.", + "type": "boolean" + }, + "cookie_name": { + "default": "session", + "description": "The name of the cookie.", + "type": "string" + }, + "cookie_path": { + "default": "/", + "description": "The resource in the host where the cookie is available.", + "type": "string" + }, + "cookie_same_site": { + "default": "Strict", + "description": "Determines whether and how a cookie may be sent with cross-site requests.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "cookie_secure": { + "default": true, + "description": "Applies the Secure directive so that the cookie may be sent to the server only with an encrypted request over the HTTPS protocol.", + "type": "boolean" + }, + "idling_timeout": { + "default": 900, + "description": "The session cookie idle time, in seconds.", + "type": "number" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "A set of HTTP methods that the plugin will respond to.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "default": "session_logout", + "description": "The POST argument passed to logout requests. Do not change this property.", + "type": "string" + }, + "logout_query_arg": { + "default": "session_logout", + "description": "The query argument passed to logout requests.", + "type": "string" + }, + "read_body_for_logout": { + "default": false, + "type": "boolean" + }, + "remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "remember_absolute_timeout": { + "default": 2592000, + "description": "The persistent session absolute timeout limit, in seconds.", + "type": "number" + }, + "remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "remember_rolling_timeout": { + "default": 604800, + "description": "The persistent session rolling timeout window, in seconds.", + "type": "number" + }, + "request_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rolling_timeout": { + "default": 3600, + "description": "The session cookie rolling timeout, in seconds. Specifies how long the session can be used until it needs to be renewed.", + "type": "number" + }, + "secret": { + "default": "4Xkz87KN9Mdq3BsyMOndCz3cjxVWxf4ndnK6tPTGKhYd", + "description": "The secret that is used in keyed HMAC generation.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "stale_ttl": { + "default": 10, + "description": "The duration, in seconds, after which an old cookie is discarded, starting from the moment when the session becomes outdated and is replaced by a new one.", + "type": "number" + }, + "storage": { + "default": "cookie", + "description": "Determines where the session data is stored. `kong`: Stores encrypted session data into Kong's current database strategy; the cookie will not contain any session data. `cookie`: Stores encrypted session data within the cookie itself.", + "enum": [ + "cookie", + "kong" + ], + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cookie_discard": { + "type": "number" + }, + "cookie_httponly": { + "type": "boolean" + }, + "cookie_idletime": { + "type": "number" + }, + "cookie_lifetime": { + "type": "number" + }, + "cookie_persistent": { + "type": "boolean" + }, + "cookie_renew": { + "type": "number" + }, + "cookie_samesite": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/session/3.8.json b/json_schemas/session/3.8.json new file mode 100644 index 00000000..bd0661fe --- /dev/null +++ b/json_schemas/session/3.8.json @@ -0,0 +1,258 @@ +{ + "properties": { + "config": { + "properties": { + "absolute_timeout": { + "default": 86400, + "description": "The session cookie absolute timeout, in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "cookie_domain": { + "description": "The domain with which the cookie is intended to be exchanged.", + "type": "string" + }, + "cookie_http_only": { + "default": true, + "description": "Applies the `HttpOnly` tag so that the cookie is sent only to a server.", + "type": "boolean" + }, + "cookie_name": { + "default": "session", + "description": "The name of the cookie.", + "type": "string" + }, + "cookie_path": { + "default": "/", + "description": "The resource in the host where the cookie is available.", + "type": "string" + }, + "cookie_same_site": { + "default": "Strict", + "description": "Determines whether and how a cookie may be sent with cross-site requests.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "cookie_secure": { + "default": true, + "description": "Applies the Secure directive so that the cookie may be sent to the server only with an encrypted request over the HTTPS protocol.", + "type": "boolean" + }, + "idling_timeout": { + "default": 900, + "description": "The session cookie idle time, in seconds.", + "type": "number" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "A set of HTTP methods that the plugin will respond to.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "default": "session_logout", + "description": "The POST argument passed to logout requests. Do not change this property.", + "type": "string" + }, + "logout_query_arg": { + "default": "session_logout", + "description": "The query argument passed to logout requests.", + "type": "string" + }, + "read_body_for_logout": { + "default": false, + "type": "boolean" + }, + "remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "remember_absolute_timeout": { + "default": 2592000, + "description": "The persistent session absolute timeout limit, in seconds.", + "type": "number" + }, + "remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "remember_rolling_timeout": { + "default": 604800, + "description": "The persistent session rolling timeout window, in seconds.", + "type": "number" + }, + "request_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rolling_timeout": { + "default": 3600, + "description": "The session cookie rolling timeout, in seconds. Specifies how long the session can be used until it needs to be renewed.", + "type": "number" + }, + "secret": { + "default": "7iK18YEanf6i9XHvNwzx4RpdmHdRN6nSpPxC1uQxfsse", + "description": "The secret that is used in keyed HMAC generation.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "stale_ttl": { + "default": 10, + "description": "The duration, in seconds, after which an old cookie is discarded, starting from the moment when the session becomes outdated and is replaced by a new one.", + "type": "number" + }, + "storage": { + "default": "cookie", + "description": "Determines where the session data is stored. `kong`: Stores encrypted session data into Kong's current database strategy; the cookie will not contain any session data. `cookie`: Stores encrypted session data within the cookie itself.", + "enum": [ + "cookie", + "kong" + ], + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cookie_discard": { + "type": "number" + }, + "cookie_httponly": { + "type": "boolean" + }, + "cookie_idletime": { + "type": "number" + }, + "cookie_lifetime": { + "type": "number" + }, + "cookie_persistent": { + "type": "boolean" + }, + "cookie_renew": { + "type": "number" + }, + "cookie_samesite": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/session/3.9.json b/json_schemas/session/3.9.json new file mode 100644 index 00000000..5b276039 --- /dev/null +++ b/json_schemas/session/3.9.json @@ -0,0 +1,258 @@ +{ + "properties": { + "config": { + "properties": { + "absolute_timeout": { + "default": 86400, + "description": "The session cookie absolute timeout, in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + }, + "audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + }, + "cookie_domain": { + "description": "The domain with which the cookie is intended to be exchanged.", + "type": "string" + }, + "cookie_http_only": { + "default": true, + "description": "Applies the `HttpOnly` tag so that the cookie is sent only to a server.", + "type": "boolean" + }, + "cookie_name": { + "default": "session", + "description": "The name of the cookie.", + "type": "string" + }, + "cookie_path": { + "default": "/", + "description": "The resource in the host where the cookie is available.", + "type": "string" + }, + "cookie_same_site": { + "default": "Strict", + "description": "Determines whether and how a cookie may be sent with cross-site requests.", + "enum": [ + "Default", + "Lax", + "None", + "Strict" + ], + "type": "string" + }, + "cookie_secure": { + "default": true, + "description": "Applies the Secure directive so that the cookie may be sent to the server only with an encrypted request over the HTTPS protocol.", + "type": "boolean" + }, + "idling_timeout": { + "default": 900, + "description": "The session cookie idle time, in seconds.", + "type": "number" + }, + "logout_methods": { + "default": [ + "DELETE", + "POST" + ], + "description": "A set of HTTP methods that the plugin will respond to.", + "items": { + "enum": [ + "DELETE", + "GET", + "POST" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "logout_post_arg": { + "default": "session_logout", + "description": "The POST argument passed to logout requests. Do not change this property.", + "type": "string" + }, + "logout_query_arg": { + "default": "session_logout", + "description": "The query argument passed to logout requests.", + "type": "string" + }, + "read_body_for_logout": { + "default": false, + "type": "boolean" + }, + "remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + }, + "remember_absolute_timeout": { + "default": 2592000, + "description": "The persistent session absolute timeout limit, in seconds.", + "type": "number" + }, + "remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + }, + "remember_rolling_timeout": { + "default": 604800, + "description": "The persistent session rolling timeout window, in seconds.", + "type": "number" + }, + "request_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "response_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "items": { + "enum": [ + "absolute-timeout", + "audience", + "id", + "idling-timeout", + "rolling-timeout", + "subject", + "timeout" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "rolling_timeout": { + "default": 3600, + "description": "The session cookie rolling timeout, in seconds. Specifies how long the session can be used until it needs to be renewed.", + "type": "number" + }, + "secret": { + "default": "lt9BJW1n5RfhCxTbNIKqsj8THW7YNdXTA0VW6KQwBUwg", + "description": "The secret that is used in keyed HMAC generation.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "stale_ttl": { + "default": 10, + "description": "The duration, in seconds, after which an old cookie is discarded, starting from the moment when the session becomes outdated and is replaced by a new one.", + "type": "number" + }, + "storage": { + "default": "cookie", + "description": "Determines where the session data is stored. `kong`: Stores encrypted session data into Kong's current database strategy; the cookie will not contain any session data. `cookie`: Stores encrypted session data within the cookie itself.", + "enum": [ + "cookie", + "kong" + ], + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cookie_discard": { + "type": "number" + }, + "cookie_httponly": { + "type": "boolean" + }, + "cookie_idletime": { + "type": "number" + }, + "cookie_lifetime": { + "type": "number" + }, + "cookie_persistent": { + "type": "boolean" + }, + "cookie_renew": { + "type": "number" + }, + "cookie_samesite": { + "type": "string" + } + }, + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/solace-upstream/.gitkeep b/json_schemas/solace-upstream/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/json_schemas/solace-upstream/.gitkeep @@ -0,0 +1 @@ + diff --git a/json_schemas/solace-upstream/3.11.json b/json_schemas/solace-upstream/3.11.json new file mode 100644 index 00000000..14fea3cc --- /dev/null +++ b/json_schemas/solace-upstream/3.11.json @@ -0,0 +1,247 @@ +{ + "properties": { + "config": { + "properties": { + "message": { + "description": "The message related configuration.", + "properties": { + "ack_timeout": { + "default": 2000, + "description": "When using a non-DIRECT guaranteed delivery mode, this property sets the message acknowledgement timeout (waiting time).", + "maximum": 100000, + "minimum": 1, + "type": "integer" + }, + "default_content": { + "description": "When not using `forward_method`, `forward_uri`, `forward_headers` or `forward_body`, this sets the message content.", + "type": "string" + }, + "delivery_mode": { + "default": "DIRECT", + "description": "Sets the message delivery mode.", + "enum": [ + "DIRECT", + "PERSISTENT" + ], + "type": "string" + }, + "destinations": { + "description": "The message destinations.", + "items": { + "properties": { + "name": { + "description": "The name of the destination. You can use `$(uri_captures['topic_name']` in this field.", + "type": "string" + }, + "type": { + "default": "QUEUE", + "description": "The type of the destination.", + "enum": [ + "QUEUE", + "TOPIC" + ], + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "dmq_eligible": { + "default": false, + "description": "Sets the dead message queue (DMQ) eligible property on the message.", + "type": "boolean" + }, + "forward_body": { + "default": false, + "description": "Include the request body and the body arguments in the message.", + "type": "boolean" + }, + "forward_headers": { + "default": false, + "description": "Include the request headers in the message.", + "type": "boolean" + }, + "forward_method": { + "default": false, + "description": "Include the request method in the message.", + "type": "boolean" + }, + "forward_uri": { + "default": false, + "description": "Include the request URI and the URI arguments (as in, query arguments) in the message.", + "type": "boolean" + }, + "functions": { + "description": "The Lua functions that manipulates (or generates) the message being sent to Solace. The `message` variable can be used to access the current message content, and the function can return a new content.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "priority": { + "default": 4, + "description": "Sets the message priority.", + "maximum": 255, + "minimum": 0, + "type": "integer" + }, + "sender_id": { + "default": "kong", + "description": "Allows the application to set the content of the sender identifier.", + "type": "string" + }, + "tracing": { + "default": false, + "description": "Enable or disable the tracing. This is primarily used for distributed tracing and message correlation, especially in debugging or tracking message flows across multiple systems.", + "type": "boolean" + }, + "tracing_sampled": { + "default": false, + "description": "Indicates whether the message should be included in distributed tracing (i.e., if it should be \"sampled\" for the tracing)", + "type": "boolean" + }, + "ttl": { + "default": 0, + "description": "Sets the time to live (TTL) in milliseconds for the message. Setting the time to live to zero disables the TTL for the message.", + "minimum": -1, + "type": "integer" + } + }, + "required": [ + "destinations" + ], + "type": "object" + }, + "session": { + "description": "Session related configuration.", + "properties": { + "authentication": { + "description": "Session authentication related configuration.", + "properties": { + "access_token": { + "description": "The OAuth2 access token used with `OAUTH2` authentication scheme when connecting to an event broker.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "access_token_header": { + "type": "string" + }, + "id_token": { + "description": "The OpenID Connect ID token used with `OAUTH2` authentication scheme when connecting to an event broker.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "id_token_header": { + "type": "string" + }, + "password": { + "description": "The password used with `BASIC` authentication scheme when connecting to an event broker.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "scheme": { + "default": "BASIC", + "description": "The client authentication scheme used when connection to an event broker.", + "enum": [ + "BASIC", + "NONE", + "OAUTH2" + ], + "type": "string" + }, + "username": { + "description": "The username used with `BASIC` authentication scheme when connecting to an event broker .\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "connect_timeout": { + "default": 3000, + "description": "The timeout period (in milliseconds) for a connect operation to a given host (per host).", + "maximum": 100000, + "minimum": 100, + "type": "integer" + }, + "host": { + "description": "The IPv4 or IPv6 address or host name to connect to (see: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/index.html#host-entry).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "properties": { + "additionalProperties": true, + "description": "Additional Solace session properties (each setting needs to have `SESSION_` prefix).", + "type": "object" + }, + "ssl_validate_certificate": { + "default": false, + "description": "Indicates whether the API should validate server certificates with the trusted certificates.", + "type": "boolean" + }, + "vpn_name": { + "description": "The name of the Message VPN to attempt to join when connecting to an event broker.", + "type": "string" + } + }, + "required": [ + "host" + ], + "type": "object" + } + }, + "required": [ + "message", + "session" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/solace-upstream/3.12.json b/json_schemas/solace-upstream/3.12.json new file mode 100644 index 00000000..44da5a7e --- /dev/null +++ b/json_schemas/solace-upstream/3.12.json @@ -0,0 +1,247 @@ +{ + "properties": { + "config": { + "properties": { + "message": { + "description": "The message related configuration.", + "properties": { + "ack_timeout": { + "default": 2000, + "description": "When using a non-DIRECT guaranteed delivery mode, this property sets the message acknowledgement timeout in milliseconds (waiting time).", + "maximum": 100000, + "minimum": 1, + "type": "integer" + }, + "default_content": { + "description": "When not using `forward_method`, `forward_uri`, `forward_headers` or `forward_body`, this sets the message content.", + "type": "string" + }, + "delivery_mode": { + "default": "DIRECT", + "description": "Sets the message delivery mode.", + "enum": [ + "DIRECT", + "PERSISTENT" + ], + "type": "string" + }, + "destinations": { + "description": "The message destinations.", + "items": { + "properties": { + "name": { + "description": "The name of the destination. You can use `$(uri_captures['topic_name']` in this field.", + "type": "string" + }, + "type": { + "default": "QUEUE", + "description": "The type of the destination.", + "enum": [ + "QUEUE", + "TOPIC" + ], + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "dmq_eligible": { + "default": false, + "description": "Sets the dead message queue (DMQ) eligible property on the message.", + "type": "boolean" + }, + "forward_body": { + "default": false, + "description": "Include the request body and the body arguments in the message.", + "type": "boolean" + }, + "forward_headers": { + "default": false, + "description": "Include the request headers in the message.", + "type": "boolean" + }, + "forward_method": { + "default": false, + "description": "Include the request method in the message.", + "type": "boolean" + }, + "forward_uri": { + "default": false, + "description": "Include the request URI and the URI arguments (as in, query arguments) in the message.", + "type": "boolean" + }, + "functions": { + "description": "The Lua functions that manipulates (or generates) the message being sent to Solace. The `message` variable can be used to access the current message content, and the function can return a new content.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "priority": { + "default": 4, + "description": "Sets the message priority.", + "maximum": 255, + "minimum": 0, + "type": "integer" + }, + "sender_id": { + "default": "kong", + "description": "Allows the application to set the content of the sender identifier.", + "type": "string" + }, + "tracing": { + "default": false, + "description": "Enable or disable the tracing. This is primarily used for distributed tracing and message correlation, especially in debugging or tracking message flows across multiple systems.", + "type": "boolean" + }, + "tracing_sampled": { + "default": false, + "description": "Indicates whether the message should be included in distributed tracing (i.e., if it should be \"sampled\" for the tracing)", + "type": "boolean" + }, + "ttl": { + "default": 0, + "description": "Sets the time to live (TTL) in milliseconds for the message. Setting the time to live to zero disables the TTL for the message.", + "minimum": -1, + "type": "integer" + } + }, + "required": [ + "destinations" + ], + "type": "object" + }, + "session": { + "description": "Session related configuration.", + "properties": { + "authentication": { + "description": "Session authentication related configuration.", + "properties": { + "access_token": { + "description": "The OAuth2 access token used with `OAUTH2` authentication scheme when connecting to an event broker.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "access_token_header": { + "type": "string" + }, + "id_token": { + "description": "The OpenID Connect ID token used with `OAUTH2` authentication scheme when connecting to an event broker.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "id_token_header": { + "type": "string" + }, + "password": { + "description": "The password used with `BASIC` authentication scheme when connecting to an event broker.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "scheme": { + "default": "BASIC", + "description": "The client authentication scheme used when connection to an event broker.", + "enum": [ + "BASIC", + "NONE", + "OAUTH2" + ], + "type": "string" + }, + "username": { + "description": "The username used with `BASIC` authentication scheme when connecting to an event broker.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "connect_timeout": { + "default": 3000, + "description": "The timeout period (in milliseconds) for a connect operation to a given host (per host).", + "maximum": 100000, + "minimum": 100, + "type": "integer" + }, + "host": { + "description": "The IPv4 or IPv6 address or host name to connect to (see: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/index.html#host-entry).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "properties": { + "additionalProperties": true, + "description": "Additional Solace session properties (each setting needs to have `SESSION_` prefix).", + "type": "object" + }, + "ssl_validate_certificate": { + "default": false, + "description": "Indicates whether the API should validate server certificates with the trusted certificates.", + "type": "boolean" + }, + "vpn_name": { + "description": "The name of the Message VPN to attempt to join when connecting to an event broker.", + "type": "string" + } + }, + "required": [ + "host" + ], + "type": "object" + } + }, + "required": [ + "message", + "session" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/standard-webhooks/3.10.json b/json_schemas/standard-webhooks/3.10.json new file mode 100644 index 00000000..7fc01489 --- /dev/null +++ b/json_schemas/standard-webhooks/3.10.json @@ -0,0 +1,86 @@ +{ + "properties": { + "config": { + "properties": { + "secret_v1": { + "description": "Webhook secret\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "tolerance_second": { + "default": 300, + "description": "Tolerance of the webhook timestamp in seconds. If the webhook timestamp is older than this number of seconds, it will be rejected with a '400' response.", + "minimum": -1, + "type": "integer" + } + }, + "required": [ + "secret_v1" + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/standard-webhooks/3.11.json b/json_schemas/standard-webhooks/3.11.json new file mode 100644 index 00000000..cc63f652 --- /dev/null +++ b/json_schemas/standard-webhooks/3.11.json @@ -0,0 +1,78 @@ +{ + "properties": { + "config": { + "properties": { + "secret_v1": { + "description": "Webhook secret\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "tolerance_second": { + "default": 300, + "description": "Tolerance of the webhook timestamp in seconds. If the webhook timestamp is older than this number of seconds, it will be rejected with a '400' response.", + "minimum": -1, + "type": "integer" + } + }, + "required": [ + "secret_v1" + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/standard-webhooks/3.12.json b/json_schemas/standard-webhooks/3.12.json new file mode 100644 index 00000000..cc63f652 --- /dev/null +++ b/json_schemas/standard-webhooks/3.12.json @@ -0,0 +1,78 @@ +{ + "properties": { + "config": { + "properties": { + "secret_v1": { + "description": "Webhook secret\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "tolerance_second": { + "default": 300, + "description": "Tolerance of the webhook timestamp in seconds. If the webhook timestamp is older than this number of seconds, it will be rejected with a '400' response.", + "minimum": -1, + "type": "integer" + } + }, + "required": [ + "secret_v1" + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/standard-webhooks/3.8.json b/json_schemas/standard-webhooks/3.8.json new file mode 100644 index 00000000..40a80744 --- /dev/null +++ b/json_schemas/standard-webhooks/3.8.json @@ -0,0 +1,86 @@ +{ + "properties": { + "config": { + "properties": { + "secret_v1": { + "description": "Webhook secret\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "tolerance_second": { + "default": 300, + "description": "Tolerance of the webhook timestamp in seconds. If the webhook timestamp is older than this number of seconds, it will be rejected with a '400' response.", + "minimum": -1, + "type": "integer" + } + }, + "required": [ + "secret_v1" + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/standard-webhooks/3.9.json b/json_schemas/standard-webhooks/3.9.json new file mode 100644 index 00000000..40a80744 --- /dev/null +++ b/json_schemas/standard-webhooks/3.9.json @@ -0,0 +1,86 @@ +{ + "properties": { + "config": { + "properties": { + "secret_v1": { + "description": "Webhook secret\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "tolerance_second": { + "default": 300, + "description": "Tolerance of the webhook timestamp in seconds. If the webhook timestamp is older than this number of seconds, it will be rejected with a '400' response.", + "minimum": -1, + "type": "integer" + } + }, + "required": [ + "secret_v1" + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/statsd-advanced/2.8.json b/json_schemas/statsd-advanced/2.8.json new file mode 100644 index 00000000..7591ce2b --- /dev/null +++ b/json_schemas/statsd-advanced/2.8.json @@ -0,0 +1,206 @@ +{ + "properties": { + "config": { + "properties": { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "examples": [ + [ + "200-205", + "400-499" + ] + ], + "items": { + "pattern": "^[0-9]+-[0-9]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "host": { + "default": "localhost", + "description": "The IP address or hostname of the StatsD server.", + "examples": [ + "127.0.0.1" + ], + "type": "string" + }, + "hostname_in_prefix": { + "default": false, + "description": "Include the `hostname` in the `prefix` for each metric name.", + "type": "boolean" + }, + "metrics": { + "default": [ + { + "consumer_identifier": "custom_id", + "name": "cache_datastore_misses_total", + "sample_rate": 1, + "service_identifier": "service_name_or_host", + "stat_type": "counter", + "workspace_identifier": "workspace_id" + } + ], + "description": "List of Metrics to be logged. Available values are described under [Metrics](#metrics).", + "items": { + "properties": { + "consumer_identifier": { + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "enum": [ + "cache_datastore_hits_total", + "cache_datastore_misses_total", + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "shdict_usage", + "status_count", + "status_count_per_user", + "status_count_per_user_per_route", + "status_count_per_workspace", + "unique_users", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "minimum": 0, + "type": "number" + }, + "service_identifier": { + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "stat_type": { + "enum": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "workspace_identifier": { + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "The port of the StatsD server.", + "examples": [ + 8125 + ], + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + }, + "udp_packet_size": { + "default": 0, + "description": "Combine UDP packet up to the size configured. If zero (0), don't combine the\nUDP packet. Must be a number between 0 and 65507 (inclusive).", + "maximum": 65507, + "minimum": 0, + "type": "number" + }, + "use_tcp": { + "default": false, + "description": "Use TCP instead of UDP.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/statsd-advanced/3.10.json b/json_schemas/statsd-advanced/3.10.json new file mode 100644 index 00000000..be532c92 --- /dev/null +++ b/json_schemas/statsd-advanced/3.10.json @@ -0,0 +1,298 @@ +{ + "properties": { + "config": { + "properties": { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "items": { + "pattern": "^[0-9]+-[0-9]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_identifier_default": { + "default": "custom_id", + "description": "The default consumer identifier for metrics. This will take effect when a metric's consumer identifier is omitted. Allowed values are `custom_id`, `consumer_id`, `username`.", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "hostname_in_prefix": { + "default": false, + "description": "Include the `hostname` in the `prefix` for each metric name.", + "type": "boolean" + }, + "metrics": { + "default": [ + { + "name": "cache_datastore_misses_total", + "sample_rate": 1, + "stat_type": "counter" + } + ], + "description": "List of Metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "enum": [ + "cache_datastore_hits_total", + "cache_datastore_misses_total", + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "shdict_usage", + "status_count", + "status_count_per_user", + "status_count_per_user_per_route", + "status_count_per_workspace", + "unique_users", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "minimum": 0, + "type": "number" + }, + "service_identifier": { + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "stat_type": { + "enum": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "workspace_identifier": { + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "service_identifier_default": { + "default": "service_name_or_host", + "description": "The default service identifier for metrics. This will take effect when a metric's service identifier is omitted. Allowed values are `service_name_or_host`, `service_id`, `service_name`, `service_host`.", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "udp_packet_size": { + "default": 0, + "description": "Combine UDP packet up to the size configured. If zero (0), don't combine the UDP packet. Must be a number between 0 and 65507 (inclusive).", + "maximum": 65507, + "minimum": 0, + "type": "number" + }, + "use_tcp": { + "default": false, + "description": "Use TCP instead of UDP.", + "type": "boolean" + }, + "workspace_identifier_default": { + "default": "workspace_id", + "description": "The default workspace identifier for metrics. This will take effect when a metric's workspace identifier is omitted. Allowed values are `workspace_id`, `workspace_name`. ", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/statsd-advanced/3.11.json b/json_schemas/statsd-advanced/3.11.json new file mode 100644 index 00000000..b842a66d --- /dev/null +++ b/json_schemas/statsd-advanced/3.11.json @@ -0,0 +1,282 @@ +{ + "properties": { + "config": { + "properties": { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "items": { + "pattern": "^[0-9]+-[0-9]+$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "consumer_identifier_default": { + "default": "custom_id", + "description": "The default consumer identifier for metrics. This will take effect when a metric's consumer identifier is omitted. Allowed values are `custom_id`, `consumer_id`, `username`.", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "hostname_in_prefix": { + "default": false, + "description": "Include the `hostname` in the `prefix` for each metric name.", + "type": "boolean" + }, + "metrics": { + "default": [ + { + "name": "cache_datastore_misses_total", + "sample_rate": 1, + "stat_type": "counter" + } + ], + "description": "List of Metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "enum": [ + "cache_datastore_hits_total", + "cache_datastore_misses_total", + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "shdict_usage", + "status_count", + "status_count_per_user", + "status_count_per_user_per_route", + "status_count_per_workspace", + "unique_users", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "minimum": 0, + "type": "number" + }, + "service_identifier": { + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "stat_type": { + "enum": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "workspace_identifier": { + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "service_identifier_default": { + "default": "service_name_or_host", + "description": "The default service identifier for metrics. This will take effect when a metric's service identifier is omitted. Allowed values are `service_name_or_host`, `service_id`, `service_name`, `service_host`.", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "udp_packet_size": { + "default": 0, + "description": "Combine UDP packet up to the size configured. If zero (0), don't combine the UDP packet. Must be a number between 0 and 65507 (inclusive).", + "maximum": 65507, + "minimum": 0, + "type": "number" + }, + "use_tcp": { + "default": false, + "description": "Use TCP instead of UDP.", + "type": "boolean" + }, + "workspace_identifier_default": { + "default": "workspace_id", + "description": "The default workspace identifier for metrics. This will take effect when a metric's workspace identifier is omitted. Allowed values are `workspace_id`, `workspace_name`. ", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/statsd-advanced/3.12.json b/json_schemas/statsd-advanced/3.12.json new file mode 100644 index 00000000..b842a66d --- /dev/null +++ b/json_schemas/statsd-advanced/3.12.json @@ -0,0 +1,282 @@ +{ + "properties": { + "config": { + "properties": { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "items": { + "pattern": "^[0-9]+-[0-9]+$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "consumer_identifier_default": { + "default": "custom_id", + "description": "The default consumer identifier for metrics. This will take effect when a metric's consumer identifier is omitted. Allowed values are `custom_id`, `consumer_id`, `username`.", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "hostname_in_prefix": { + "default": false, + "description": "Include the `hostname` in the `prefix` for each metric name.", + "type": "boolean" + }, + "metrics": { + "default": [ + { + "name": "cache_datastore_misses_total", + "sample_rate": 1, + "stat_type": "counter" + } + ], + "description": "List of Metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "enum": [ + "cache_datastore_hits_total", + "cache_datastore_misses_total", + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "shdict_usage", + "status_count", + "status_count_per_user", + "status_count_per_user_per_route", + "status_count_per_workspace", + "unique_users", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "minimum": 0, + "type": "number" + }, + "service_identifier": { + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "stat_type": { + "enum": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "workspace_identifier": { + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "service_identifier_default": { + "default": "service_name_or_host", + "description": "The default service identifier for metrics. This will take effect when a metric's service identifier is omitted. Allowed values are `service_name_or_host`, `service_id`, `service_name`, `service_host`.", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "udp_packet_size": { + "default": 0, + "description": "Combine UDP packet up to the size configured. If zero (0), don't combine the UDP packet. Must be a number between 0 and 65507 (inclusive).", + "maximum": 65507, + "minimum": 0, + "type": "number" + }, + "use_tcp": { + "default": false, + "description": "Use TCP instead of UDP.", + "type": "boolean" + }, + "workspace_identifier_default": { + "default": "workspace_id", + "description": "The default workspace identifier for metrics. This will take effect when a metric's workspace identifier is omitted. Allowed values are `workspace_id`, `workspace_name`. ", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/statsd-advanced/3.4.json b/json_schemas/statsd-advanced/3.4.json new file mode 100644 index 00000000..3495f1a3 --- /dev/null +++ b/json_schemas/statsd-advanced/3.4.json @@ -0,0 +1,289 @@ +{ + "properties": { + "config": { + "properties": { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "items": { + "pattern": "^[0-9]+-[0-9]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_identifier_default": { + "default": "custom_id", + "description": "The default consumer identifier for metrics. This will take effect when a metric's consumer identifier is omitted. Allowed values are `custom_id`, `consumer_id`, `username`.", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "hostname_in_prefix": { + "default": false, + "description": "Include the `hostname` in the `prefix` for each metric name.", + "type": "boolean" + }, + "metrics": { + "default": [ + { + "name": "cache_datastore_misses_total", + "sample_rate": 1, + "stat_type": "counter" + } + ], + "description": "List of Metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "enum": [ + "cache_datastore_hits_total", + "cache_datastore_misses_total", + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "shdict_usage", + "status_count", + "status_count_per_user", + "status_count_per_user_per_route", + "status_count_per_workspace", + "unique_users", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "minimum": 0, + "type": "number" + }, + "service_identifier": { + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "stat_type": { + "enum": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "workspace_identifier": { + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "service_identifier_default": { + "default": "service_name_or_host", + "description": "The default service identifier for metrics. This will take effect when a metric's service identifier is omitted. Allowed values are `service_name_or_host`, `service_id`, `service_name`, `service_host`.", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "udp_packet_size": { + "default": 0, + "description": "Combine UDP packet up to the size configured. If zero (0), don't combine the UDP packet. Must be a number between 0 and 65507 (inclusive).", + "maximum": 65507, + "minimum": 0, + "type": "number" + }, + "use_tcp": { + "default": false, + "description": "Use TCP instead of UDP.", + "type": "boolean" + }, + "workspace_identifier_default": { + "default": "workspace_id", + "description": "The default workspace identifier for metrics. This will take effect when a metric's workspace identifier is omitted. Allowed values are `workspace_id`, `workspace_name`. ", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/statsd-advanced/3.7.json b/json_schemas/statsd-advanced/3.7.json new file mode 100644 index 00000000..3495f1a3 --- /dev/null +++ b/json_schemas/statsd-advanced/3.7.json @@ -0,0 +1,289 @@ +{ + "properties": { + "config": { + "properties": { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "items": { + "pattern": "^[0-9]+-[0-9]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_identifier_default": { + "default": "custom_id", + "description": "The default consumer identifier for metrics. This will take effect when a metric's consumer identifier is omitted. Allowed values are `custom_id`, `consumer_id`, `username`.", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "hostname_in_prefix": { + "default": false, + "description": "Include the `hostname` in the `prefix` for each metric name.", + "type": "boolean" + }, + "metrics": { + "default": [ + { + "name": "cache_datastore_misses_total", + "sample_rate": 1, + "stat_type": "counter" + } + ], + "description": "List of Metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "enum": [ + "cache_datastore_hits_total", + "cache_datastore_misses_total", + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "shdict_usage", + "status_count", + "status_count_per_user", + "status_count_per_user_per_route", + "status_count_per_workspace", + "unique_users", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "minimum": 0, + "type": "number" + }, + "service_identifier": { + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "stat_type": { + "enum": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "workspace_identifier": { + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "service_identifier_default": { + "default": "service_name_or_host", + "description": "The default service identifier for metrics. This will take effect when a metric's service identifier is omitted. Allowed values are `service_name_or_host`, `service_id`, `service_name`, `service_host`.", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "udp_packet_size": { + "default": 0, + "description": "Combine UDP packet up to the size configured. If zero (0), don't combine the UDP packet. Must be a number between 0 and 65507 (inclusive).", + "maximum": 65507, + "minimum": 0, + "type": "number" + }, + "use_tcp": { + "default": false, + "description": "Use TCP instead of UDP.", + "type": "boolean" + }, + "workspace_identifier_default": { + "default": "workspace_id", + "description": "The default workspace identifier for metrics. This will take effect when a metric's workspace identifier is omitted. Allowed values are `workspace_id`, `workspace_name`. ", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/statsd-advanced/3.8.json b/json_schemas/statsd-advanced/3.8.json new file mode 100644 index 00000000..be532c92 --- /dev/null +++ b/json_schemas/statsd-advanced/3.8.json @@ -0,0 +1,298 @@ +{ + "properties": { + "config": { + "properties": { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "items": { + "pattern": "^[0-9]+-[0-9]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_identifier_default": { + "default": "custom_id", + "description": "The default consumer identifier for metrics. This will take effect when a metric's consumer identifier is omitted. Allowed values are `custom_id`, `consumer_id`, `username`.", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "hostname_in_prefix": { + "default": false, + "description": "Include the `hostname` in the `prefix` for each metric name.", + "type": "boolean" + }, + "metrics": { + "default": [ + { + "name": "cache_datastore_misses_total", + "sample_rate": 1, + "stat_type": "counter" + } + ], + "description": "List of Metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "enum": [ + "cache_datastore_hits_total", + "cache_datastore_misses_total", + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "shdict_usage", + "status_count", + "status_count_per_user", + "status_count_per_user_per_route", + "status_count_per_workspace", + "unique_users", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "minimum": 0, + "type": "number" + }, + "service_identifier": { + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "stat_type": { + "enum": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "workspace_identifier": { + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "service_identifier_default": { + "default": "service_name_or_host", + "description": "The default service identifier for metrics. This will take effect when a metric's service identifier is omitted. Allowed values are `service_name_or_host`, `service_id`, `service_name`, `service_host`.", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "udp_packet_size": { + "default": 0, + "description": "Combine UDP packet up to the size configured. If zero (0), don't combine the UDP packet. Must be a number between 0 and 65507 (inclusive).", + "maximum": 65507, + "minimum": 0, + "type": "number" + }, + "use_tcp": { + "default": false, + "description": "Use TCP instead of UDP.", + "type": "boolean" + }, + "workspace_identifier_default": { + "default": "workspace_id", + "description": "The default workspace identifier for metrics. This will take effect when a metric's workspace identifier is omitted. Allowed values are `workspace_id`, `workspace_name`. ", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/statsd-advanced/3.9.json b/json_schemas/statsd-advanced/3.9.json new file mode 100644 index 00000000..be532c92 --- /dev/null +++ b/json_schemas/statsd-advanced/3.9.json @@ -0,0 +1,298 @@ +{ + "properties": { + "config": { + "properties": { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "items": { + "pattern": "^[0-9]+-[0-9]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_identifier_default": { + "default": "custom_id", + "description": "The default consumer identifier for metrics. This will take effect when a metric's consumer identifier is omitted. Allowed values are `custom_id`, `consumer_id`, `username`.", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "hostname_in_prefix": { + "default": false, + "description": "Include the `hostname` in the `prefix` for each metric name.", + "type": "boolean" + }, + "metrics": { + "default": [ + { + "name": "cache_datastore_misses_total", + "sample_rate": 1, + "stat_type": "counter" + } + ], + "description": "List of Metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "enum": [ + "cache_datastore_hits_total", + "cache_datastore_misses_total", + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "shdict_usage", + "status_count", + "status_count_per_user", + "status_count_per_user_per_route", + "status_count_per_workspace", + "unique_users", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "minimum": 0, + "type": "number" + }, + "service_identifier": { + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "stat_type": { + "enum": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "workspace_identifier": { + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "service_identifier_default": { + "default": "service_name_or_host", + "description": "The default service identifier for metrics. This will take effect when a metric's service identifier is omitted. Allowed values are `service_name_or_host`, `service_id`, `service_name`, `service_host`.", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "udp_packet_size": { + "default": 0, + "description": "Combine UDP packet up to the size configured. If zero (0), don't combine the UDP packet. Must be a number between 0 and 65507 (inclusive).", + "maximum": 65507, + "minimum": 0, + "type": "number" + }, + "use_tcp": { + "default": false, + "description": "Use TCP instead of UDP.", + "type": "boolean" + }, + "workspace_identifier_default": { + "default": "workspace_id", + "description": "The default workspace identifier for metrics. This will take effect when a metric's workspace identifier is omitted. Allowed values are `workspace_id`, `workspace_name`. ", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/statsd/2.8.json b/json_schemas/statsd/2.8.json new file mode 100644 index 00000000..4df6aa3a --- /dev/null +++ b/json_schemas/statsd/2.8.json @@ -0,0 +1,175 @@ +{ + "properties": { + "config": { + "properties": { + "host": { + "default": "localhost", + "description": "The IP address or hostname of StatsD server to send data to.", + "examples": [ + "127.0.0.1" + ], + "type": "string" + }, + "metrics": { + "default": [ + { + "consumer_identifier": "custom_id", + "name": "status_count_per_user", + "sample_rate": 1, + "stat_type": "counter" + } + ], + "description": "List of metrics to be logged. Available values are described under [Metrics](#metrics).", + "items": { + "properties": { + "consumer_identifier": { + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "enum": [ + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "status_count", + "status_count_per_user", + "unique_users", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "minimum": 0, + "type": "number" + }, + "stat_type": { + "enum": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "The port of StatsD server to send data to.", + "examples": [ + 8125 + ], + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/statsd/3.10.json b/json_schemas/statsd/3.10.json new file mode 100644 index 00000000..a55fdecc --- /dev/null +++ b/json_schemas/statsd/3.10.json @@ -0,0 +1,316 @@ +{ + "properties": { + "config": { + "properties": { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "items": { + "pattern": "^[0-9]+-[0-9]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_identifier_default": { + "default": "custom_id", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "flush_timeout": { + "type": "number" + }, + "host": { + "default": "localhost", + "description": "The IP address or hostname of StatsD server to send data to.", + "type": "string" + }, + "hostname_in_prefix": { + "default": false, + "type": "boolean" + }, + "metrics": { + "default": [ + { + "name": "cache_datastore_misses_total", + "sample_rate": 1, + "stat_type": "counter" + } + ], + "description": "List of metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "description": "Authenticated user detail.", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "description": "StatsD metric’s name.", + "enum": [ + "cache_datastore_hits_total", + "cache_datastore_misses_total", + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "shdict_usage", + "status_count", + "status_count_per_user", + "status_count_per_user_per_route", + "status_count_per_workspace", + "unique_users", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "description": "Sampling rate", + "minimum": 0, + "type": "number" + }, + "service_identifier": { + "description": "Service detail.", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "stat_type": { + "description": "Determines what sort of event a metric represents.", + "enum": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "workspace_identifier": { + "description": "Workspace detail.", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "The port of StatsD server to send data to.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "queue_size": { + "type": "integer" + }, + "retry_count": { + "type": "integer" + }, + "service_identifier_default": { + "default": "service_name_or_host", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "tag_style": { + "enum": [ + "dogstatsd", + "influxdb", + "librato", + "signalfx" + ], + "type": "string" + }, + "udp_packet_size": { + "default": 0, + "maximum": 65507, + "minimum": 0, + "type": "number" + }, + "use_tcp": { + "default": false, + "type": "boolean" + }, + "workspace_identifier_default": { + "default": "workspace_id", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/statsd/3.11.json b/json_schemas/statsd/3.11.json new file mode 100644 index 00000000..930ae300 --- /dev/null +++ b/json_schemas/statsd/3.11.json @@ -0,0 +1,300 @@ +{ + "properties": { + "config": { + "properties": { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "items": { + "pattern": "^[0-9]+-[0-9]+$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "consumer_identifier_default": { + "default": "custom_id", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "flush_timeout": { + "type": "number" + }, + "host": { + "default": "localhost", + "description": "The IP address or hostname of StatsD server to send data to.", + "type": "string" + }, + "hostname_in_prefix": { + "default": false, + "type": "boolean" + }, + "metrics": { + "default": [ + { + "name": "cache_datastore_misses_total", + "sample_rate": 1, + "stat_type": "counter" + } + ], + "description": "List of metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "description": "Authenticated user detail.", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "description": "StatsD metric’s name.", + "enum": [ + "cache_datastore_hits_total", + "cache_datastore_misses_total", + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "shdict_usage", + "status_count", + "status_count_per_user", + "status_count_per_user_per_route", + "status_count_per_workspace", + "unique_users", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "description": "Sampling rate", + "minimum": 0, + "type": "number" + }, + "service_identifier": { + "description": "Service detail.", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "stat_type": { + "description": "Determines what sort of event a metric represents.", + "enum": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "workspace_identifier": { + "description": "Workspace detail.", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "The port of StatsD server to send data to.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "queue_size": { + "type": "integer" + }, + "retry_count": { + "type": "integer" + }, + "service_identifier_default": { + "default": "service_name_or_host", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "tag_style": { + "enum": [ + "dogstatsd", + "influxdb", + "librato", + "signalfx" + ], + "type": "string" + }, + "udp_packet_size": { + "default": 0, + "maximum": 65507, + "minimum": 0, + "type": "number" + }, + "use_tcp": { + "default": false, + "type": "boolean" + }, + "workspace_identifier_default": { + "default": "workspace_id", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/statsd/3.12.json b/json_schemas/statsd/3.12.json new file mode 100644 index 00000000..930ae300 --- /dev/null +++ b/json_schemas/statsd/3.12.json @@ -0,0 +1,300 @@ +{ + "properties": { + "config": { + "properties": { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "items": { + "pattern": "^[0-9]+-[0-9]+$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "consumer_identifier_default": { + "default": "custom_id", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "flush_timeout": { + "type": "number" + }, + "host": { + "default": "localhost", + "description": "The IP address or hostname of StatsD server to send data to.", + "type": "string" + }, + "hostname_in_prefix": { + "default": false, + "type": "boolean" + }, + "metrics": { + "default": [ + { + "name": "cache_datastore_misses_total", + "sample_rate": 1, + "stat_type": "counter" + } + ], + "description": "List of metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "description": "Authenticated user detail.", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "description": "StatsD metric’s name.", + "enum": [ + "cache_datastore_hits_total", + "cache_datastore_misses_total", + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "shdict_usage", + "status_count", + "status_count_per_user", + "status_count_per_user_per_route", + "status_count_per_workspace", + "unique_users", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "description": "Sampling rate", + "minimum": 0, + "type": "number" + }, + "service_identifier": { + "description": "Service detail.", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "stat_type": { + "description": "Determines what sort of event a metric represents.", + "enum": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "workspace_identifier": { + "description": "Workspace detail.", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "The port of StatsD server to send data to.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "queue_size": { + "type": "integer" + }, + "retry_count": { + "type": "integer" + }, + "service_identifier_default": { + "default": "service_name_or_host", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "tag_style": { + "enum": [ + "dogstatsd", + "influxdb", + "librato", + "signalfx" + ], + "type": "string" + }, + "udp_packet_size": { + "default": 0, + "maximum": 65507, + "minimum": 0, + "type": "number" + }, + "use_tcp": { + "default": false, + "type": "boolean" + }, + "workspace_identifier_default": { + "default": "workspace_id", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/statsd/3.4.json b/json_schemas/statsd/3.4.json new file mode 100644 index 00000000..16f7a39c --- /dev/null +++ b/json_schemas/statsd/3.4.json @@ -0,0 +1,307 @@ +{ + "properties": { + "config": { + "properties": { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "items": { + "pattern": "^[0-9]+-[0-9]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_identifier_default": { + "default": "custom_id", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "flush_timeout": { + "type": "number" + }, + "host": { + "default": "localhost", + "description": "The IP address or hostname of StatsD server to send data to.", + "type": "string" + }, + "hostname_in_prefix": { + "default": false, + "type": "boolean" + }, + "metrics": { + "default": [ + { + "name": "cache_datastore_misses_total", + "sample_rate": 1, + "stat_type": "counter" + } + ], + "description": "List of metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "description": "Authenticated user detail.", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "description": "StatsD metric’s name.", + "enum": [ + "cache_datastore_hits_total", + "cache_datastore_misses_total", + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "shdict_usage", + "status_count", + "status_count_per_user", + "status_count_per_user_per_route", + "status_count_per_workspace", + "unique_users", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "description": "Sampling rate", + "minimum": 0, + "type": "number" + }, + "service_identifier": { + "description": "Service detail.", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "stat_type": { + "description": "Determines what sort of event a metric represents.", + "enum": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "workspace_identifier": { + "description": "Workspace detail.", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "The port of StatsD server to send data to.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "queue_size": { + "type": "integer" + }, + "retry_count": { + "type": "integer" + }, + "service_identifier_default": { + "default": "service_name_or_host", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "tag_style": { + "enum": [ + "dogstatsd", + "influxdb", + "librato", + "signalfx" + ], + "type": "string" + }, + "udp_packet_size": { + "default": 0, + "maximum": 65507, + "minimum": 0, + "type": "number" + }, + "use_tcp": { + "default": false, + "type": "boolean" + }, + "workspace_identifier_default": { + "default": "workspace_id", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/statsd/3.7.json b/json_schemas/statsd/3.7.json new file mode 100644 index 00000000..16f7a39c --- /dev/null +++ b/json_schemas/statsd/3.7.json @@ -0,0 +1,307 @@ +{ + "properties": { + "config": { + "properties": { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "items": { + "pattern": "^[0-9]+-[0-9]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_identifier_default": { + "default": "custom_id", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "flush_timeout": { + "type": "number" + }, + "host": { + "default": "localhost", + "description": "The IP address or hostname of StatsD server to send data to.", + "type": "string" + }, + "hostname_in_prefix": { + "default": false, + "type": "boolean" + }, + "metrics": { + "default": [ + { + "name": "cache_datastore_misses_total", + "sample_rate": 1, + "stat_type": "counter" + } + ], + "description": "List of metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "description": "Authenticated user detail.", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "description": "StatsD metric’s name.", + "enum": [ + "cache_datastore_hits_total", + "cache_datastore_misses_total", + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "shdict_usage", + "status_count", + "status_count_per_user", + "status_count_per_user_per_route", + "status_count_per_workspace", + "unique_users", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "description": "Sampling rate", + "minimum": 0, + "type": "number" + }, + "service_identifier": { + "description": "Service detail.", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "stat_type": { + "description": "Determines what sort of event a metric represents.", + "enum": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "workspace_identifier": { + "description": "Workspace detail.", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "The port of StatsD server to send data to.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "queue_size": { + "type": "integer" + }, + "retry_count": { + "type": "integer" + }, + "service_identifier_default": { + "default": "service_name_or_host", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "tag_style": { + "enum": [ + "dogstatsd", + "influxdb", + "librato", + "signalfx" + ], + "type": "string" + }, + "udp_packet_size": { + "default": 0, + "maximum": 65507, + "minimum": 0, + "type": "number" + }, + "use_tcp": { + "default": false, + "type": "boolean" + }, + "workspace_identifier_default": { + "default": "workspace_id", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/statsd/3.8.json b/json_schemas/statsd/3.8.json new file mode 100644 index 00000000..a55fdecc --- /dev/null +++ b/json_schemas/statsd/3.8.json @@ -0,0 +1,316 @@ +{ + "properties": { + "config": { + "properties": { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "items": { + "pattern": "^[0-9]+-[0-9]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_identifier_default": { + "default": "custom_id", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "flush_timeout": { + "type": "number" + }, + "host": { + "default": "localhost", + "description": "The IP address or hostname of StatsD server to send data to.", + "type": "string" + }, + "hostname_in_prefix": { + "default": false, + "type": "boolean" + }, + "metrics": { + "default": [ + { + "name": "cache_datastore_misses_total", + "sample_rate": 1, + "stat_type": "counter" + } + ], + "description": "List of metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "description": "Authenticated user detail.", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "description": "StatsD metric’s name.", + "enum": [ + "cache_datastore_hits_total", + "cache_datastore_misses_total", + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "shdict_usage", + "status_count", + "status_count_per_user", + "status_count_per_user_per_route", + "status_count_per_workspace", + "unique_users", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "description": "Sampling rate", + "minimum": 0, + "type": "number" + }, + "service_identifier": { + "description": "Service detail.", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "stat_type": { + "description": "Determines what sort of event a metric represents.", + "enum": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "workspace_identifier": { + "description": "Workspace detail.", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "The port of StatsD server to send data to.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "queue_size": { + "type": "integer" + }, + "retry_count": { + "type": "integer" + }, + "service_identifier_default": { + "default": "service_name_or_host", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "tag_style": { + "enum": [ + "dogstatsd", + "influxdb", + "librato", + "signalfx" + ], + "type": "string" + }, + "udp_packet_size": { + "default": 0, + "maximum": 65507, + "minimum": 0, + "type": "number" + }, + "use_tcp": { + "default": false, + "type": "boolean" + }, + "workspace_identifier_default": { + "default": "workspace_id", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/statsd/3.9.json b/json_schemas/statsd/3.9.json new file mode 100644 index 00000000..a55fdecc --- /dev/null +++ b/json_schemas/statsd/3.9.json @@ -0,0 +1,316 @@ +{ + "properties": { + "config": { + "properties": { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "items": { + "pattern": "^[0-9]+-[0-9]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "consumer_identifier_default": { + "default": "custom_id", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "flush_timeout": { + "type": "number" + }, + "host": { + "default": "localhost", + "description": "The IP address or hostname of StatsD server to send data to.", + "type": "string" + }, + "hostname_in_prefix": { + "default": false, + "type": "boolean" + }, + "metrics": { + "default": [ + { + "name": "cache_datastore_misses_total", + "sample_rate": 1, + "stat_type": "counter" + } + ], + "description": "List of metrics to be logged.", + "items": { + "properties": { + "consumer_identifier": { + "description": "Authenticated user detail.", + "enum": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + }, + "name": { + "description": "StatsD metric’s name.", + "enum": [ + "cache_datastore_hits_total", + "cache_datastore_misses_total", + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "shdict_usage", + "status_count", + "status_count_per_user", + "status_count_per_user_per_route", + "status_count_per_workspace", + "unique_users", + "upstream_latency" + ], + "type": "string" + }, + "sample_rate": { + "description": "Sampling rate", + "minimum": 0, + "type": "number" + }, + "service_identifier": { + "description": "Service detail.", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "stat_type": { + "description": "Determines what sort of event a metric represents.", + "enum": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string" + }, + "workspace_identifier": { + "description": "Workspace detail.", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + "name", + "stat_type" + ], + "type": "object" + }, + "type": "array" + }, + "port": { + "default": 8125, + "description": "The port of StatsD server to send data to.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "queue_size": { + "type": "integer" + }, + "retry_count": { + "type": "integer" + }, + "service_identifier_default": { + "default": "service_name_or_host", + "enum": [ + "service_host", + "service_id", + "service_name", + "service_name_or_host" + ], + "type": "string" + }, + "tag_style": { + "enum": [ + "dogstatsd", + "influxdb", + "librato", + "signalfx" + ], + "type": "string" + }, + "udp_packet_size": { + "default": 0, + "maximum": 65507, + "minimum": 0, + "type": "number" + }, + "use_tcp": { + "default": false, + "type": "boolean" + }, + "workspace_identifier_default": { + "default": "workspace_id", + "enum": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/syslog/2.8.json b/json_schemas/syslog/2.8.json new file mode 100644 index 00000000..8b7ef182 --- /dev/null +++ b/json_schemas/syslog/2.8.json @@ -0,0 +1,187 @@ +{ + "properties": { + "config": { + "properties": { + "client_errors_severity": { + "default": "info", + "description": "An optional logging severity assigned to all the failed requests with a\nresponse status code 400 or higher but less than 500. Available options: `debug`, `info`, `notice`,\n `warning`, `err`, `crit`, `alert`, `emerg`.", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "A list of key-value pairs, where the key is the name of a log field and\nthe value is a chunk of Lua code, whose return value sets or replaces\nthe log field value.", + "type": "object" + }, + "facility": { + "description": "The facility is used by the operating system to decide how to handle each log message. This\noptional argument defines what must be the facility set by the plugin when logging. Available\noptions: `auth`, `authpriv`, `cron`, `daemon`, `ftp`, `kern`, `lpr`, `mail`, `news`, `syslog`,\n`user`, `uucp`, `local0`, `local1`, `local2`, `local3`, `local4`, `local5`, `local6`, `local7`.", + "enum": [ + "auth", + "authpriv", + "cron", + "daemon", + "ftp", + "kern", + "local0", + "local1", + "local2", + "local3", + "local4", + "local5", + "local6", + "local7", + "lpr", + "mail", + "news", + "syslog", + "user", + "uucp" + ], + "type": "string" + }, + "log_level": { + "default": "info", + "description": "An optional logging severity. Any request with equal or higher severity\nwill be logged to System log. Available options: `debug`, `info`, `notice`, `warning`, `err`, `crit`, `alert`, `emerg`.", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "examples": [ + "info" + ], + "type": "string" + }, + "server_errors_severity": { + "default": "info", + "description": "An optional logging severity assigned to all the failed requests with a\nresponse status code 500 or higher. Available options: `debug`, `info`, `notice`, `warning`, `err`, `crit`, `alert`, `emerg`.", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "successful_severity": { + "default": "info", + "description": "An optional logging severity assigned to all the successful requests with a response\nstatus code less then 400. Available options: `debug`, `info`, `notice`, `warning`, `err`, `crit`, `alert`, `emerg`.", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/syslog/3.10.json b/json_schemas/syslog/3.10.json new file mode 100644 index 00000000..90bd9094 --- /dev/null +++ b/json_schemas/syslog/3.10.json @@ -0,0 +1,171 @@ +{ + "properties": { + "config": { + "properties": { + "client_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "facility": { + "default": "user", + "description": "The facility is used by the operating system to decide how to handle each log message.", + "enum": [ + "auth", + "authpriv", + "cron", + "daemon", + "ftp", + "kern", + "local0", + "local1", + "local2", + "local3", + "local4", + "local5", + "local6", + "local7", + "lpr", + "mail", + "news", + "syslog", + "user", + "uucp" + ], + "type": "string" + }, + "log_level": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "server_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "successful_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/syslog/3.11.json b/json_schemas/syslog/3.11.json new file mode 100644 index 00000000..fbbdbdbe --- /dev/null +++ b/json_schemas/syslog/3.11.json @@ -0,0 +1,159 @@ +{ + "properties": { + "config": { + "properties": { + "client_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "facility": { + "default": "user", + "description": "The facility is used by the operating system to decide how to handle each log message.", + "enum": [ + "auth", + "authpriv", + "cron", + "daemon", + "ftp", + "kern", + "local0", + "local1", + "local2", + "local3", + "local4", + "local5", + "local6", + "local7", + "lpr", + "mail", + "news", + "syslog", + "user", + "uucp" + ], + "type": "string" + }, + "log_level": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "server_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "successful_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/syslog/3.12.json b/json_schemas/syslog/3.12.json new file mode 100644 index 00000000..fbbdbdbe --- /dev/null +++ b/json_schemas/syslog/3.12.json @@ -0,0 +1,159 @@ +{ + "properties": { + "config": { + "properties": { + "client_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "facility": { + "default": "user", + "description": "The facility is used by the operating system to decide how to handle each log message.", + "enum": [ + "auth", + "authpriv", + "cron", + "daemon", + "ftp", + "kern", + "local0", + "local1", + "local2", + "local3", + "local4", + "local5", + "local6", + "local7", + "lpr", + "mail", + "news", + "syslog", + "user", + "uucp" + ], + "type": "string" + }, + "log_level": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "server_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "successful_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/syslog/3.4.json b/json_schemas/syslog/3.4.json new file mode 100644 index 00000000..90bd9094 --- /dev/null +++ b/json_schemas/syslog/3.4.json @@ -0,0 +1,171 @@ +{ + "properties": { + "config": { + "properties": { + "client_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "facility": { + "default": "user", + "description": "The facility is used by the operating system to decide how to handle each log message.", + "enum": [ + "auth", + "authpriv", + "cron", + "daemon", + "ftp", + "kern", + "local0", + "local1", + "local2", + "local3", + "local4", + "local5", + "local6", + "local7", + "lpr", + "mail", + "news", + "syslog", + "user", + "uucp" + ], + "type": "string" + }, + "log_level": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "server_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "successful_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/syslog/3.7.json b/json_schemas/syslog/3.7.json new file mode 100644 index 00000000..90bd9094 --- /dev/null +++ b/json_schemas/syslog/3.7.json @@ -0,0 +1,171 @@ +{ + "properties": { + "config": { + "properties": { + "client_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "facility": { + "default": "user", + "description": "The facility is used by the operating system to decide how to handle each log message.", + "enum": [ + "auth", + "authpriv", + "cron", + "daemon", + "ftp", + "kern", + "local0", + "local1", + "local2", + "local3", + "local4", + "local5", + "local6", + "local7", + "lpr", + "mail", + "news", + "syslog", + "user", + "uucp" + ], + "type": "string" + }, + "log_level": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "server_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "successful_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/syslog/3.8.json b/json_schemas/syslog/3.8.json new file mode 100644 index 00000000..90bd9094 --- /dev/null +++ b/json_schemas/syslog/3.8.json @@ -0,0 +1,171 @@ +{ + "properties": { + "config": { + "properties": { + "client_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "facility": { + "default": "user", + "description": "The facility is used by the operating system to decide how to handle each log message.", + "enum": [ + "auth", + "authpriv", + "cron", + "daemon", + "ftp", + "kern", + "local0", + "local1", + "local2", + "local3", + "local4", + "local5", + "local6", + "local7", + "lpr", + "mail", + "news", + "syslog", + "user", + "uucp" + ], + "type": "string" + }, + "log_level": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "server_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "successful_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/syslog/3.9.json b/json_schemas/syslog/3.9.json new file mode 100644 index 00000000..90bd9094 --- /dev/null +++ b/json_schemas/syslog/3.9.json @@ -0,0 +1,171 @@ +{ + "properties": { + "config": { + "properties": { + "client_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "facility": { + "default": "user", + "description": "The facility is used by the operating system to decide how to handle each log message.", + "enum": [ + "auth", + "authpriv", + "cron", + "daemon", + "ftp", + "kern", + "local0", + "local1", + "local2", + "local3", + "local4", + "local5", + "local6", + "local7", + "lpr", + "mail", + "news", + "syslog", + "user", + "uucp" + ], + "type": "string" + }, + "log_level": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "server_errors_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + }, + "successful_severity": { + "default": "info", + "enum": [ + "alert", + "crit", + "debug", + "emerg", + "err", + "info", + "notice", + "warning" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/tcp-log/2.8.json b/json_schemas/tcp-log/2.8.json new file mode 100644 index 00000000..a2586a49 --- /dev/null +++ b/json_schemas/tcp-log/2.8.json @@ -0,0 +1,133 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "A list of key-value pairs, where the key is the name of a log field and\nthe value is a chunk of Lua code, whose return value sets or replaces\nthe log field value.", + "type": "object" + }, + "host": { + "description": "The IP address or host name to send data to.", + "examples": [ + "127.0.0.1" + ], + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number" + }, + "port": { + "description": "The port to send data to on the upstream server.", + "examples": [ + 9999 + ], + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + }, + "tls": { + "default": false, + "description": "Indicates whether to perform a TLS handshake against the remote server.", + "type": "boolean" + }, + "tls_sni": { + "description": "An optional string that defines the SNI (Server Name Indication) hostname to send in the TLS handshake.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/tcp-log/3.10.json b/json_schemas/tcp-log/3.10.json new file mode 100644 index 00000000..536c9936 --- /dev/null +++ b/json_schemas/tcp-log/3.10.json @@ -0,0 +1,118 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "A list of key-value pairs, where the key is the name of a log field and the value is a chunk of Lua code, whose return value sets or replaces the log field value.", + "type": "object" + }, + "host": { + "description": "The IP address or host name to send data to.", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number" + }, + "port": { + "description": "The port to send data to on the upstream server.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + }, + "tls": { + "default": false, + "description": "Indicates whether to perform a TLS handshake against the remote server.", + "type": "boolean" + }, + "tls_sni": { + "description": "An optional string that defines the SNI (Server Name Indication) hostname to send in the TLS handshake.", + "type": "string" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/tcp-log/3.11.json b/json_schemas/tcp-log/3.11.json new file mode 100644 index 00000000..3980f13d --- /dev/null +++ b/json_schemas/tcp-log/3.11.json @@ -0,0 +1,110 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "A list of key-value pairs, where the key is the name of a log field and the value is a chunk of Lua code, whose return value sets or replaces the log field value.", + "type": "object" + }, + "host": { + "description": "The IP address or host name to send data to.", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number" + }, + "port": { + "description": "The port to send data to on the upstream server.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + }, + "tls": { + "default": false, + "description": "Indicates whether to perform a TLS handshake against the remote server.", + "type": "boolean" + }, + "tls_sni": { + "description": "An optional string that defines the SNI (Server Name Indication) hostname to send in the TLS handshake.", + "type": "string" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/tcp-log/3.12.json b/json_schemas/tcp-log/3.12.json new file mode 100644 index 00000000..3980f13d --- /dev/null +++ b/json_schemas/tcp-log/3.12.json @@ -0,0 +1,110 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "A list of key-value pairs, where the key is the name of a log field and the value is a chunk of Lua code, whose return value sets or replaces the log field value.", + "type": "object" + }, + "host": { + "description": "The IP address or host name to send data to.", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number" + }, + "port": { + "description": "The port to send data to on the upstream server.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + }, + "tls": { + "default": false, + "description": "Indicates whether to perform a TLS handshake against the remote server.", + "type": "boolean" + }, + "tls_sni": { + "description": "An optional string that defines the SNI (Server Name Indication) hostname to send in the TLS handshake.", + "type": "string" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/tcp-log/3.4.json b/json_schemas/tcp-log/3.4.json new file mode 100644 index 00000000..536c9936 --- /dev/null +++ b/json_schemas/tcp-log/3.4.json @@ -0,0 +1,118 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "A list of key-value pairs, where the key is the name of a log field and the value is a chunk of Lua code, whose return value sets or replaces the log field value.", + "type": "object" + }, + "host": { + "description": "The IP address or host name to send data to.", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number" + }, + "port": { + "description": "The port to send data to on the upstream server.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + }, + "tls": { + "default": false, + "description": "Indicates whether to perform a TLS handshake against the remote server.", + "type": "boolean" + }, + "tls_sni": { + "description": "An optional string that defines the SNI (Server Name Indication) hostname to send in the TLS handshake.", + "type": "string" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/tcp-log/3.7.json b/json_schemas/tcp-log/3.7.json new file mode 100644 index 00000000..536c9936 --- /dev/null +++ b/json_schemas/tcp-log/3.7.json @@ -0,0 +1,118 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "A list of key-value pairs, where the key is the name of a log field and the value is a chunk of Lua code, whose return value sets or replaces the log field value.", + "type": "object" + }, + "host": { + "description": "The IP address or host name to send data to.", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number" + }, + "port": { + "description": "The port to send data to on the upstream server.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + }, + "tls": { + "default": false, + "description": "Indicates whether to perform a TLS handshake against the remote server.", + "type": "boolean" + }, + "tls_sni": { + "description": "An optional string that defines the SNI (Server Name Indication) hostname to send in the TLS handshake.", + "type": "string" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/tcp-log/3.8.json b/json_schemas/tcp-log/3.8.json new file mode 100644 index 00000000..536c9936 --- /dev/null +++ b/json_schemas/tcp-log/3.8.json @@ -0,0 +1,118 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "A list of key-value pairs, where the key is the name of a log field and the value is a chunk of Lua code, whose return value sets or replaces the log field value.", + "type": "object" + }, + "host": { + "description": "The IP address or host name to send data to.", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number" + }, + "port": { + "description": "The port to send data to on the upstream server.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + }, + "tls": { + "default": false, + "description": "Indicates whether to perform a TLS handshake against the remote server.", + "type": "boolean" + }, + "tls_sni": { + "description": "An optional string that defines the SNI (Server Name Indication) hostname to send in the TLS handshake.", + "type": "string" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/tcp-log/3.9.json b/json_schemas/tcp-log/3.9.json new file mode 100644 index 00000000..536c9936 --- /dev/null +++ b/json_schemas/tcp-log/3.9.json @@ -0,0 +1,118 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "A list of key-value pairs, where the key is the name of a log field and the value is a chunk of Lua code, whose return value sets or replaces the log field value.", + "type": "object" + }, + "host": { + "description": "The IP address or host name to send data to.", + "type": "string" + }, + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number" + }, + "port": { + "description": "The port to send data to on the upstream server.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + }, + "tls": { + "default": false, + "description": "Indicates whether to perform a TLS handshake against the remote server.", + "type": "boolean" + }, + "tls_sni": { + "description": "An optional string that defines the SNI (Server Name Indication) hostname to send in the TLS handshake.", + "type": "string" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/tls-handshake-modifier/3.10.json b/json_schemas/tls-handshake-modifier/3.10.json new file mode 100644 index 00000000..358d3225 --- /dev/null +++ b/json_schemas/tls-handshake-modifier/3.10.json @@ -0,0 +1,68 @@ +{ + "properties": { + "config": { + "properties": { + "tls_client_certificate": { + "default": "REQUEST", + "description": "TLS Client Certificate", + "enum": [ + "REQUEST" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpcs", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpcs", + "https", + "tls" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/tls-handshake-modifier/3.11.json b/json_schemas/tls-handshake-modifier/3.11.json new file mode 100644 index 00000000..fcfac7cc --- /dev/null +++ b/json_schemas/tls-handshake-modifier/3.11.json @@ -0,0 +1,58 @@ +{ + "properties": { + "config": { + "properties": { + "tls_client_certificate": { + "default": "REQUEST", + "description": "TLS Client Certificate", + "enum": [ + "REQUEST" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpcs", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpcs", + "https", + "tls" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/tls-handshake-modifier/3.12.json b/json_schemas/tls-handshake-modifier/3.12.json new file mode 100644 index 00000000..fcfac7cc --- /dev/null +++ b/json_schemas/tls-handshake-modifier/3.12.json @@ -0,0 +1,58 @@ +{ + "properties": { + "config": { + "properties": { + "tls_client_certificate": { + "default": "REQUEST", + "description": "TLS Client Certificate", + "enum": [ + "REQUEST" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpcs", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpcs", + "https", + "tls" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/tls-handshake-modifier/3.4.json b/json_schemas/tls-handshake-modifier/3.4.json new file mode 100644 index 00000000..358d3225 --- /dev/null +++ b/json_schemas/tls-handshake-modifier/3.4.json @@ -0,0 +1,68 @@ +{ + "properties": { + "config": { + "properties": { + "tls_client_certificate": { + "default": "REQUEST", + "description": "TLS Client Certificate", + "enum": [ + "REQUEST" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpcs", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpcs", + "https", + "tls" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/tls-handshake-modifier/3.7.json b/json_schemas/tls-handshake-modifier/3.7.json new file mode 100644 index 00000000..358d3225 --- /dev/null +++ b/json_schemas/tls-handshake-modifier/3.7.json @@ -0,0 +1,68 @@ +{ + "properties": { + "config": { + "properties": { + "tls_client_certificate": { + "default": "REQUEST", + "description": "TLS Client Certificate", + "enum": [ + "REQUEST" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpcs", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpcs", + "https", + "tls" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/tls-handshake-modifier/3.8.json b/json_schemas/tls-handshake-modifier/3.8.json new file mode 100644 index 00000000..358d3225 --- /dev/null +++ b/json_schemas/tls-handshake-modifier/3.8.json @@ -0,0 +1,68 @@ +{ + "properties": { + "config": { + "properties": { + "tls_client_certificate": { + "default": "REQUEST", + "description": "TLS Client Certificate", + "enum": [ + "REQUEST" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpcs", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpcs", + "https", + "tls" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/tls-handshake-modifier/3.9.json b/json_schemas/tls-handshake-modifier/3.9.json new file mode 100644 index 00000000..358d3225 --- /dev/null +++ b/json_schemas/tls-handshake-modifier/3.9.json @@ -0,0 +1,68 @@ +{ + "properties": { + "config": { + "properties": { + "tls_client_certificate": { + "default": "REQUEST", + "description": "TLS Client Certificate", + "enum": [ + "REQUEST" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpcs", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpcs", + "https", + "tls" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/tls-metadata-headers/3.10.json b/json_schemas/tls-metadata-headers/3.10.json new file mode 100644 index 00000000..3ae3ee64 --- /dev/null +++ b/json_schemas/tls-metadata-headers/3.10.json @@ -0,0 +1,90 @@ +{ + "properties": { + "config": { + "properties": { + "client_cert_fingerprint_header_name": { + "default": "X-Client-Cert-Fingerprint", + "description": "Define the HTTP header name used for the SHA1 fingerprint of the client certificate.", + "type": "string" + }, + "client_cert_header_name": { + "default": "X-Client-Cert", + "description": "Define the HTTP header name used for the PEM format URL encoded client certificate.", + "type": "string" + }, + "client_cert_issuer_dn_header_name": { + "default": "X-Client-Cert-Issuer-DN", + "description": "Define the HTTP header name used for the issuer DN of the client certificate.", + "type": "string" + }, + "client_cert_subject_dn_header_name": { + "default": "X-Client-Cert-Subject-DN", + "description": "Define the HTTP header name used for the subject DN of the client certificate.", + "type": "string" + }, + "client_serial_header_name": { + "default": "X-Client-Cert-Serial", + "description": "Define the HTTP header name used for the serial number of the client certificate.", + "type": "string" + }, + "inject_client_cert_details": { + "default": false, + "description": "Enables TLS client certificate metadata values to be injected into HTTP headers.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpcs", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpcs", + "https", + "tls" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/tls-metadata-headers/3.11.json b/json_schemas/tls-metadata-headers/3.11.json new file mode 100644 index 00000000..d878d7ab --- /dev/null +++ b/json_schemas/tls-metadata-headers/3.11.json @@ -0,0 +1,80 @@ +{ + "properties": { + "config": { + "properties": { + "client_cert_fingerprint_header_name": { + "default": "X-Client-Cert-Fingerprint", + "description": "Define the HTTP header name used for the SHA1 fingerprint of the client certificate.", + "type": "string" + }, + "client_cert_header_name": { + "default": "X-Client-Cert", + "description": "Define the HTTP header name used for the PEM format URL encoded client certificate.", + "type": "string" + }, + "client_cert_issuer_dn_header_name": { + "default": "X-Client-Cert-Issuer-DN", + "description": "Define the HTTP header name used for the issuer DN of the client certificate.", + "type": "string" + }, + "client_cert_subject_dn_header_name": { + "default": "X-Client-Cert-Subject-DN", + "description": "Define the HTTP header name used for the subject DN of the client certificate.", + "type": "string" + }, + "client_serial_header_name": { + "default": "X-Client-Cert-Serial", + "description": "Define the HTTP header name used for the serial number of the client certificate.", + "type": "string" + }, + "inject_client_cert_details": { + "default": false, + "description": "Enables TLS client certificate metadata values to be injected into HTTP headers.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpcs", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpcs", + "https", + "tls" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/tls-metadata-headers/3.12.json b/json_schemas/tls-metadata-headers/3.12.json new file mode 100644 index 00000000..d878d7ab --- /dev/null +++ b/json_schemas/tls-metadata-headers/3.12.json @@ -0,0 +1,80 @@ +{ + "properties": { + "config": { + "properties": { + "client_cert_fingerprint_header_name": { + "default": "X-Client-Cert-Fingerprint", + "description": "Define the HTTP header name used for the SHA1 fingerprint of the client certificate.", + "type": "string" + }, + "client_cert_header_name": { + "default": "X-Client-Cert", + "description": "Define the HTTP header name used for the PEM format URL encoded client certificate.", + "type": "string" + }, + "client_cert_issuer_dn_header_name": { + "default": "X-Client-Cert-Issuer-DN", + "description": "Define the HTTP header name used for the issuer DN of the client certificate.", + "type": "string" + }, + "client_cert_subject_dn_header_name": { + "default": "X-Client-Cert-Subject-DN", + "description": "Define the HTTP header name used for the subject DN of the client certificate.", + "type": "string" + }, + "client_serial_header_name": { + "default": "X-Client-Cert-Serial", + "description": "Define the HTTP header name used for the serial number of the client certificate.", + "type": "string" + }, + "inject_client_cert_details": { + "default": false, + "description": "Enables TLS client certificate metadata values to be injected into HTTP headers.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpcs", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpcs", + "https", + "tls" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/tls-metadata-headers/3.4.json b/json_schemas/tls-metadata-headers/3.4.json new file mode 100644 index 00000000..3ae3ee64 --- /dev/null +++ b/json_schemas/tls-metadata-headers/3.4.json @@ -0,0 +1,90 @@ +{ + "properties": { + "config": { + "properties": { + "client_cert_fingerprint_header_name": { + "default": "X-Client-Cert-Fingerprint", + "description": "Define the HTTP header name used for the SHA1 fingerprint of the client certificate.", + "type": "string" + }, + "client_cert_header_name": { + "default": "X-Client-Cert", + "description": "Define the HTTP header name used for the PEM format URL encoded client certificate.", + "type": "string" + }, + "client_cert_issuer_dn_header_name": { + "default": "X-Client-Cert-Issuer-DN", + "description": "Define the HTTP header name used for the issuer DN of the client certificate.", + "type": "string" + }, + "client_cert_subject_dn_header_name": { + "default": "X-Client-Cert-Subject-DN", + "description": "Define the HTTP header name used for the subject DN of the client certificate.", + "type": "string" + }, + "client_serial_header_name": { + "default": "X-Client-Cert-Serial", + "description": "Define the HTTP header name used for the serial number of the client certificate.", + "type": "string" + }, + "inject_client_cert_details": { + "default": false, + "description": "Enables TLS client certificate metadata values to be injected into HTTP headers.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpcs", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpcs", + "https", + "tls" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/tls-metadata-headers/3.7.json b/json_schemas/tls-metadata-headers/3.7.json new file mode 100644 index 00000000..3ae3ee64 --- /dev/null +++ b/json_schemas/tls-metadata-headers/3.7.json @@ -0,0 +1,90 @@ +{ + "properties": { + "config": { + "properties": { + "client_cert_fingerprint_header_name": { + "default": "X-Client-Cert-Fingerprint", + "description": "Define the HTTP header name used for the SHA1 fingerprint of the client certificate.", + "type": "string" + }, + "client_cert_header_name": { + "default": "X-Client-Cert", + "description": "Define the HTTP header name used for the PEM format URL encoded client certificate.", + "type": "string" + }, + "client_cert_issuer_dn_header_name": { + "default": "X-Client-Cert-Issuer-DN", + "description": "Define the HTTP header name used for the issuer DN of the client certificate.", + "type": "string" + }, + "client_cert_subject_dn_header_name": { + "default": "X-Client-Cert-Subject-DN", + "description": "Define the HTTP header name used for the subject DN of the client certificate.", + "type": "string" + }, + "client_serial_header_name": { + "default": "X-Client-Cert-Serial", + "description": "Define the HTTP header name used for the serial number of the client certificate.", + "type": "string" + }, + "inject_client_cert_details": { + "default": false, + "description": "Enables TLS client certificate metadata values to be injected into HTTP headers.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpcs", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpcs", + "https", + "tls" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/tls-metadata-headers/3.8.json b/json_schemas/tls-metadata-headers/3.8.json new file mode 100644 index 00000000..3ae3ee64 --- /dev/null +++ b/json_schemas/tls-metadata-headers/3.8.json @@ -0,0 +1,90 @@ +{ + "properties": { + "config": { + "properties": { + "client_cert_fingerprint_header_name": { + "default": "X-Client-Cert-Fingerprint", + "description": "Define the HTTP header name used for the SHA1 fingerprint of the client certificate.", + "type": "string" + }, + "client_cert_header_name": { + "default": "X-Client-Cert", + "description": "Define the HTTP header name used for the PEM format URL encoded client certificate.", + "type": "string" + }, + "client_cert_issuer_dn_header_name": { + "default": "X-Client-Cert-Issuer-DN", + "description": "Define the HTTP header name used for the issuer DN of the client certificate.", + "type": "string" + }, + "client_cert_subject_dn_header_name": { + "default": "X-Client-Cert-Subject-DN", + "description": "Define the HTTP header name used for the subject DN of the client certificate.", + "type": "string" + }, + "client_serial_header_name": { + "default": "X-Client-Cert-Serial", + "description": "Define the HTTP header name used for the serial number of the client certificate.", + "type": "string" + }, + "inject_client_cert_details": { + "default": false, + "description": "Enables TLS client certificate metadata values to be injected into HTTP headers.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpcs", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpcs", + "https", + "tls" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/tls-metadata-headers/3.9.json b/json_schemas/tls-metadata-headers/3.9.json new file mode 100644 index 00000000..3ae3ee64 --- /dev/null +++ b/json_schemas/tls-metadata-headers/3.9.json @@ -0,0 +1,90 @@ +{ + "properties": { + "config": { + "properties": { + "client_cert_fingerprint_header_name": { + "default": "X-Client-Cert-Fingerprint", + "description": "Define the HTTP header name used for the SHA1 fingerprint of the client certificate.", + "type": "string" + }, + "client_cert_header_name": { + "default": "X-Client-Cert", + "description": "Define the HTTP header name used for the PEM format URL encoded client certificate.", + "type": "string" + }, + "client_cert_issuer_dn_header_name": { + "default": "X-Client-Cert-Issuer-DN", + "description": "Define the HTTP header name used for the issuer DN of the client certificate.", + "type": "string" + }, + "client_cert_subject_dn_header_name": { + "default": "X-Client-Cert-Subject-DN", + "description": "Define the HTTP header name used for the subject DN of the client certificate.", + "type": "string" + }, + "client_serial_header_name": { + "default": "X-Client-Cert-Serial", + "description": "Define the HTTP header name used for the serial number of the client certificate.", + "type": "string" + }, + "inject_client_cert_details": { + "default": false, + "description": "Enables TLS client certificate metadata values to be injected into HTTP headers.", + "type": "boolean" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpcs", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpcs", + "https", + "tls" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/udp-log/2.8.json b/json_schemas/udp-log/2.8.json new file mode 100644 index 00000000..46480e68 --- /dev/null +++ b/json_schemas/udp-log/2.8.json @@ -0,0 +1,122 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "A list of key-value pairs, where the key is the name of a log field and\nthe value is a chunk of Lua code, whose return value sets or replaces\nthe log field value.", + "type": "object" + }, + "host": { + "description": "The IP address or host name to send data to.", + "examples": [ + "127.0.0.1" + ], + "type": "string" + }, + "port": { + "description": "The port to send data to on the upstream server.", + "examples": [ + 9999 + ], + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "examples": [ + 10000 + ], + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/udp-log/3.10.json b/json_schemas/udp-log/3.10.json new file mode 100644 index 00000000..ce2403da --- /dev/null +++ b/json_schemas/udp-log/3.10.json @@ -0,0 +1,104 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/udp-log/3.11.json b/json_schemas/udp-log/3.11.json new file mode 100644 index 00000000..e5f12f9a --- /dev/null +++ b/json_schemas/udp-log/3.11.json @@ -0,0 +1,96 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/udp-log/3.12.json b/json_schemas/udp-log/3.12.json new file mode 100644 index 00000000..e5f12f9a --- /dev/null +++ b/json_schemas/udp-log/3.12.json @@ -0,0 +1,96 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/udp-log/3.4.json b/json_schemas/udp-log/3.4.json new file mode 100644 index 00000000..ce2403da --- /dev/null +++ b/json_schemas/udp-log/3.4.json @@ -0,0 +1,104 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/udp-log/3.7.json b/json_schemas/udp-log/3.7.json new file mode 100644 index 00000000..ce2403da --- /dev/null +++ b/json_schemas/udp-log/3.7.json @@ -0,0 +1,104 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/udp-log/3.8.json b/json_schemas/udp-log/3.8.json new file mode 100644 index 00000000..ce2403da --- /dev/null +++ b/json_schemas/udp-log/3.8.json @@ -0,0 +1,104 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/udp-log/3.9.json b/json_schemas/udp-log/3.9.json new file mode 100644 index 00000000..ce2403da --- /dev/null +++ b/json_schemas/udp-log/3.9.json @@ -0,0 +1,104 @@ +{ + "properties": { + "config": { + "properties": { + "custom_fields_by_lua": { + "additionalProperties": true, + "description": "Lua code as a key-value map", + "type": "object" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + } + }, + "required": [ + "host", + "port" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/upstream-oauth/3.10.json b/json_schemas/upstream-oauth/3.10.json new file mode 100644 index 00000000..f7e29e9a --- /dev/null +++ b/json_schemas/upstream-oauth/3.10.json @@ -0,0 +1,509 @@ +{ + "properties": { + "config": { + "properties": { + "behavior": { + "properties": { + "idp_error_response_body_template": { + "default": "{ \"code\": \"{{status}}\", \"message\": \"{{message}}\" }", + "description": "The template to use to create the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "minLength": 0, + "type": "string" + }, + "idp_error_response_content_type": { + "default": "application/json; charset=utf-8", + "description": "The Content-Type of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "minLength": 0, + "type": "string" + }, + "idp_error_response_message": { + "default": "Failed to authenticate request to upstream", + "description": "The message to embed in the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "minLength": 0, + "type": "string" + }, + "idp_error_response_status_code": { + "default": 502, + "description": "The response code to return to the consumer if Kong fails to obtain a token from the IdP.", + "maximum": 599, + "minimum": 500, + "type": "integer" + }, + "purge_token_on_upstream_status_codes": { + "default": [ + 401 + ], + "description": "An array of status codes which will force an access token to be purged when returned by the upstream. An empty array will disable this functionality.", + "items": { + "maximum": 599, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "type": "array" + }, + "upstream_access_token_header_name": { + "default": "Authorization", + "description": "The name of the header used to send the access token (obtained from the IdP) to the upstream service.", + "minLength": 0, + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "cache": { + "properties": { + "default_ttl": { + "default": 3600, + "description": "The lifetime of a token without an explicit `expires_in` value.", + "minimum": 0, + "type": "number" + }, + "eagerly_expire": { + "default": 5, + "description": "The number of seconds to eagerly expire a cached token. By default, a cached token expires 5 seconds before its lifetime as defined in `expires_in`.", + "minimum": -1, + "type": "integer" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The shared dictionary used by the plugin to cache tokens if `config.cache.strategy` is set to `memory`.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "default": "memory", + "description": "The method Kong should use to cache tokens issued by the IdP.", + "enum": [ + "memory", + "redis" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "client": { + "properties": { + "auth_method": { + "default": "client_secret_post", + "description": "The authentication method used in client requests to the IdP. Supported values are: `client_secret_basic` to send `client_id` and `client_secret` in the `Authorization: Basic` header, `client_secret_post` to send `client_id` and `client_secret` as part of the request body, or `client_secret_jwt` to send a JWT signed with the `client_secret` using the client assertion as part of the body.", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none" + ], + "type": "string" + }, + "client_secret_jwt_alg": { + "default": "HS512", + "description": "The algorithm to use with JWT when using `client_secret_jwt` authentication.", + "enum": [ + "HS256", + "HS512" + ], + "type": "string" + }, + "http_proxy": { + "description": "The proxy to use when making HTTP requests to the IdP.", + "type": "string" + }, + "http_proxy_authorization": { + "description": "The `Proxy-Authorization` header value to be used with `http_proxy`.", + "type": "string" + }, + "http_version": { + "default": 1.1, + "description": "The HTTP version used for requests made by this plugin. Supported values: `1.1` for HTTP 1.1 and `1.0` for HTTP 1.0.", + "type": "number" + }, + "https_proxy": { + "description": "The proxy to use when making HTTPS requests to the IdP.", + "type": "string" + }, + "https_proxy_authorization": { + "description": "The `Proxy-Authorization` header value to be used with `https_proxy`.", + "type": "string" + }, + "keep_alive": { + "default": true, + "description": "Whether to use keepalive connections to the IdP.", + "type": "boolean" + }, + "no_proxy": { + "description": "A comma-separated list of hosts that should not be proxied.", + "type": "string" + }, + "ssl_verify": { + "default": false, + "description": "Whether to verify the certificate presented by the IdP when using HTTPS.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Network I/O timeout for requests to the IdP in milliseconds.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "oauth": { + "properties": { + "audience": { + "default": [ + + ], + "description": "List of audiences passed to the IdP when obtaining a new token.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "The client ID for the application registration in the IdP.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "client_secret": { + "description": "The client secret for the application registration in the IdP.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "grant_type": { + "default": "client_credentials", + "description": "The OAuth grant type to be used.", + "enum": [ + "client_credentials", + "password" + ], + "type": "string" + }, + "password": { + "description": "The password to use if `config.oauth.grant_type` is set to `password`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "scopes": { + "default": [ + "openid" + ], + "description": "List of scopes to request from the IdP when obtaining a new token.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_endpoint": { + "description": "The token endpoint URI.", + "type": "string" + }, + "token_headers": { + "additionalProperties": true, + "description": "Extra headers to be passed in the token endpoint request.", + "type": "object" + }, + "token_post_args": { + "additionalProperties": true, + "description": "Extra post arguments to be passed in the token endpoint request.", + "type": "object" + }, + "username": { + "description": "The username to use if `config.oauth.grant_type` is set to `password`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + "token_endpoint" + ], + "type": "object" + } + }, + "required": [ + "oauth" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/upstream-oauth/3.11.json b/json_schemas/upstream-oauth/3.11.json new file mode 100644 index 00000000..0c39674a --- /dev/null +++ b/json_schemas/upstream-oauth/3.11.json @@ -0,0 +1,477 @@ +{ + "properties": { + "config": { + "properties": { + "behavior": { + "properties": { + "idp_error_response_body_template": { + "default": "{ \"code\": \"{{status}}\", \"message\": \"{{message}}\" }", + "description": "The template to use to create the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "minLength": 0, + "type": "string" + }, + "idp_error_response_content_type": { + "default": "application/json; charset=utf-8", + "description": "The Content-Type of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "minLength": 0, + "type": "string" + }, + "idp_error_response_message": { + "default": "Failed to authenticate request to upstream", + "description": "The message to embed in the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "minLength": 0, + "type": "string" + }, + "idp_error_response_status_code": { + "default": 502, + "description": "The response code to return to the consumer if Kong fails to obtain a token from the IdP.", + "maximum": 599, + "minimum": 500, + "type": "integer" + }, + "purge_token_on_upstream_status_codes": { + "default": [ + 401 + ], + "description": "An array of status codes which will force an access token to be purged when returned by the upstream. An empty array will disable this functionality.", + "items": { + "maximum": 599, + "minimum": 100, + "required": [], + "type": "integer" + }, + "type": "array" + }, + "upstream_access_token_header_name": { + "default": "Authorization", + "description": "The name of the header used to send the access token (obtained from the IdP) to the upstream service.", + "minLength": 0, + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "cache": { + "properties": { + "default_ttl": { + "default": 3600, + "description": "The lifetime of a token without an explicit `expires_in` value.", + "minimum": 0, + "type": "number" + }, + "eagerly_expire": { + "default": 5, + "description": "The number of seconds to eagerly expire a cached token. By default, a cached token expires 5 seconds before its lifetime as defined in `expires_in`.", + "minimum": -1, + "type": "integer" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The shared dictionary used by the plugin to cache tokens if `config.cache.strategy` is set to `memory`.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "default": "memory", + "description": "The method Kong should use to cache tokens issued by the IdP.", + "enum": [ + "memory", + "redis" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "client": { + "properties": { + "auth_method": { + "default": "client_secret_post", + "description": "The authentication method used in client requests to the IdP. Supported values are: `client_secret_basic` to send `client_id` and `client_secret` in the `Authorization: Basic` header, `client_secret_post` to send `client_id` and `client_secret` as part of the request body, or `client_secret_jwt` to send a JWT signed with the `client_secret` using the client assertion as part of the body.", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none" + ], + "type": "string" + }, + "client_secret_jwt_alg": { + "default": "HS512", + "description": "The algorithm to use with JWT when using `client_secret_jwt` authentication.", + "enum": [ + "HS256", + "HS512" + ], + "type": "string" + }, + "http_proxy": { + "description": "The proxy to use when making HTTP requests to the IdP.", + "type": "string" + }, + "http_proxy_authorization": { + "description": "The `Proxy-Authorization` header value to be used with `http_proxy`.", + "type": "string" + }, + "http_version": { + "default": 1.1, + "description": "The HTTP version used for requests made by this plugin. Supported values: `1.1` for HTTP 1.1 and `1.0` for HTTP 1.0.", + "type": "number" + }, + "https_proxy": { + "description": "The proxy to use when making HTTPS requests to the IdP.", + "type": "string" + }, + "https_proxy_authorization": { + "description": "The `Proxy-Authorization` header value to be used with `https_proxy`.", + "type": "string" + }, + "keep_alive": { + "default": true, + "description": "Whether to use keepalive connections to the IdP.", + "type": "boolean" + }, + "no_proxy": { + "description": "A comma-separated list of hosts that should not be proxied.", + "type": "string" + }, + "ssl_verify": { + "default": false, + "description": "Whether to verify the certificate presented by the IdP when using HTTPS.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Network I/O timeout for requests to the IdP in milliseconds.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "oauth": { + "properties": { + "audience": { + "default": [], + "description": "List of audiences passed to the IdP when obtaining a new token.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "The client ID for the application registration in the IdP.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "client_secret": { + "description": "The client secret for the application registration in the IdP.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "grant_type": { + "default": "client_credentials", + "description": "The OAuth grant type to be used.", + "enum": [ + "client_credentials", + "password" + ], + "type": "string" + }, + "password": { + "description": "The password to use if `config.oauth.grant_type` is set to `password`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "scopes": { + "default": [ + "openid" + ], + "description": "List of scopes to request from the IdP when obtaining a new token.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_endpoint": { + "description": "The token endpoint URI.", + "type": "string" + }, + "token_headers": { + "additionalProperties": true, + "description": "Extra headers to be passed in the token endpoint request.", + "type": "object" + }, + "token_post_args": { + "additionalProperties": true, + "description": "Extra post arguments to be passed in the token endpoint request.", + "type": "object" + }, + "username": { + "description": "The username to use if `config.oauth.grant_type` is set to `password`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + "token_endpoint" + ], + "type": "object" + } + }, + "required": [ + "oauth" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/upstream-oauth/3.12.json b/json_schemas/upstream-oauth/3.12.json new file mode 100644 index 00000000..0c39674a --- /dev/null +++ b/json_schemas/upstream-oauth/3.12.json @@ -0,0 +1,477 @@ +{ + "properties": { + "config": { + "properties": { + "behavior": { + "properties": { + "idp_error_response_body_template": { + "default": "{ \"code\": \"{{status}}\", \"message\": \"{{message}}\" }", + "description": "The template to use to create the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "minLength": 0, + "type": "string" + }, + "idp_error_response_content_type": { + "default": "application/json; charset=utf-8", + "description": "The Content-Type of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "minLength": 0, + "type": "string" + }, + "idp_error_response_message": { + "default": "Failed to authenticate request to upstream", + "description": "The message to embed in the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "minLength": 0, + "type": "string" + }, + "idp_error_response_status_code": { + "default": 502, + "description": "The response code to return to the consumer if Kong fails to obtain a token from the IdP.", + "maximum": 599, + "minimum": 500, + "type": "integer" + }, + "purge_token_on_upstream_status_codes": { + "default": [ + 401 + ], + "description": "An array of status codes which will force an access token to be purged when returned by the upstream. An empty array will disable this functionality.", + "items": { + "maximum": 599, + "minimum": 100, + "required": [], + "type": "integer" + }, + "type": "array" + }, + "upstream_access_token_header_name": { + "default": "Authorization", + "description": "The name of the header used to send the access token (obtained from the IdP) to the upstream service.", + "minLength": 0, + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "cache": { + "properties": { + "default_ttl": { + "default": 3600, + "description": "The lifetime of a token without an explicit `expires_in` value.", + "minimum": 0, + "type": "number" + }, + "eagerly_expire": { + "default": 5, + "description": "The number of seconds to eagerly expire a cached token. By default, a cached token expires 5 seconds before its lifetime as defined in `expires_in`.", + "minimum": -1, + "type": "integer" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The shared dictionary used by the plugin to cache tokens if `config.cache.strategy` is set to `memory`.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "default": "memory", + "description": "The method Kong should use to cache tokens issued by the IdP.", + "enum": [ + "memory", + "redis" + ], + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "client": { + "properties": { + "auth_method": { + "default": "client_secret_post", + "description": "The authentication method used in client requests to the IdP. Supported values are: `client_secret_basic` to send `client_id` and `client_secret` in the `Authorization: Basic` header, `client_secret_post` to send `client_id` and `client_secret` as part of the request body, or `client_secret_jwt` to send a JWT signed with the `client_secret` using the client assertion as part of the body.", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none" + ], + "type": "string" + }, + "client_secret_jwt_alg": { + "default": "HS512", + "description": "The algorithm to use with JWT when using `client_secret_jwt` authentication.", + "enum": [ + "HS256", + "HS512" + ], + "type": "string" + }, + "http_proxy": { + "description": "The proxy to use when making HTTP requests to the IdP.", + "type": "string" + }, + "http_proxy_authorization": { + "description": "The `Proxy-Authorization` header value to be used with `http_proxy`.", + "type": "string" + }, + "http_version": { + "default": 1.1, + "description": "The HTTP version used for requests made by this plugin. Supported values: `1.1` for HTTP 1.1 and `1.0` for HTTP 1.0.", + "type": "number" + }, + "https_proxy": { + "description": "The proxy to use when making HTTPS requests to the IdP.", + "type": "string" + }, + "https_proxy_authorization": { + "description": "The `Proxy-Authorization` header value to be used with `https_proxy`.", + "type": "string" + }, + "keep_alive": { + "default": true, + "description": "Whether to use keepalive connections to the IdP.", + "type": "boolean" + }, + "no_proxy": { + "description": "A comma-separated list of hosts that should not be proxied.", + "type": "string" + }, + "ssl_verify": { + "default": false, + "description": "Whether to verify the certificate presented by the IdP when using HTTPS.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Network I/O timeout for requests to the IdP in milliseconds.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "oauth": { + "properties": { + "audience": { + "default": [], + "description": "List of audiences passed to the IdP when obtaining a new token.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "The client ID for the application registration in the IdP.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "client_secret": { + "description": "The client secret for the application registration in the IdP.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "grant_type": { + "default": "client_credentials", + "description": "The OAuth grant type to be used.", + "enum": [ + "client_credentials", + "password" + ], + "type": "string" + }, + "password": { + "description": "The password to use if `config.oauth.grant_type` is set to `password`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "scopes": { + "default": [ + "openid" + ], + "description": "List of scopes to request from the IdP when obtaining a new token.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "token_endpoint": { + "description": "The token endpoint URI.", + "type": "string" + }, + "token_headers": { + "additionalProperties": true, + "description": "Extra headers to be passed in the token endpoint request.", + "type": "object" + }, + "token_post_args": { + "additionalProperties": true, + "description": "Extra post arguments to be passed in the token endpoint request.", + "type": "object" + }, + "username": { + "description": "The username to use if `config.oauth.grant_type` is set to `password`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + "token_endpoint" + ], + "type": "object" + } + }, + "required": [ + "oauth" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/upstream-oauth/3.8.json b/json_schemas/upstream-oauth/3.8.json new file mode 100644 index 00000000..d6f48b81 --- /dev/null +++ b/json_schemas/upstream-oauth/3.8.json @@ -0,0 +1,510 @@ +{ + "properties": { + "config": { + "properties": { + "behavior": { + "properties": { + "idp_error_response_body_template": { + "default": "{ \"code\": \"{{status}}\", \"message\": \"{{message}}\" }", + "description": "The template to use to create the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "minLength": 0, + "type": "string" + }, + "idp_error_response_content_type": { + "default": "application/json; charset=utf-8", + "description": "The Content-Type of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "minLength": 0, + "type": "string" + }, + "idp_error_response_message": { + "default": "Failed to authenticate request to upstream", + "description": "The message to embed in the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "minLength": 0, + "type": "string" + }, + "idp_error_response_status_code": { + "default": 502, + "description": "The response code to return to the consumer if Kong fails to obtain a token from the IdP.", + "maximum": 599, + "minimum": 500, + "type": "integer" + }, + "purge_token_on_upstream_status_codes": { + "default": [ + 401 + ], + "description": "An array of status codes which will force an access token to be purged when returned by the upstream. An empty array will disable this functionality.", + "items": { + "maximum": 599, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "type": "array" + }, + "upstream_access_token_header_name": { + "default": "Authorization", + "description": "The name of the header used to send the access token (obtained from the IdP) to the upstream service.", + "minLength": 0, + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "cache": { + "properties": { + "default_ttl": { + "default": 3600, + "description": "The lifetime of a token without an explicit `expires_in` value.", + "minimum": 0, + "type": "number" + }, + "eagerly_expire": { + "default": 5, + "description": "The number of seconds to eagerly expire a cached token. By default, a cached token expires 5 seconds before its lifetime as defined in `expires_in`.", + "minimum": -1, + "type": "integer" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The shared dictionary used by the plugin to cache tokens if `config.cache.strategy` is set to `memory`.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "translate_backwards": [ + "connect_timeout" + ], + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "default": "memory", + "description": "The method Kong should use to cache tokens issued by the IdP.", + "enum": [ + "memory", + "redis" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "client": { + "properties": { + "auth_method": { + "default": "client_secret_post", + "description": "The authentication method used in client requests to the IdP. Supported values are: `client_secret_basic` to send `client_id` and `client_secret` in the `Authorization: Basic` header, `client_secret_post` to send `client_id` and `client_secret` as part of the request body, or `client_secret_jwt` to send a JWT signed with the `client_secret` using the client assertion as part of the body.", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none" + ], + "type": "string" + }, + "client_secret_jwt_alg": { + "default": "HS512", + "description": "The algorithm to use with JWT when using `client_secret_jwt` authentication.", + "enum": [ + "HS256", + "HS512" + ], + "type": "string" + }, + "http_proxy": { + "description": "The proxy to use when making HTTP requests to the IdP.", + "type": "string" + }, + "http_proxy_authorization": { + "description": "The `Proxy-Authorization` header value to be used with `http_proxy`.", + "type": "string" + }, + "http_version": { + "default": 1.1, + "description": "The HTTP version used for requests made by this plugin. Supported values: `1.1` for HTTP 1.1 and `1.0` for HTTP 1.0.", + "type": "number" + }, + "https_proxy": { + "description": "The proxy to use when making HTTPS requests to the IdP.", + "type": "string" + }, + "https_proxy_authorization": { + "description": "The `Proxy-Authorization` header value to be used with `https_proxy`.", + "type": "string" + }, + "keep_alive": { + "default": true, + "description": "Whether to use keepalive connections to the IdP.", + "type": "boolean" + }, + "no_proxy": { + "description": "A comma-separated list of hosts that should not be proxied.", + "type": "string" + }, + "ssl_verify": { + "default": false, + "description": "Whether to verify the certificate presented by the IdP when using HTTPS.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Network I/O timeout for requests to the IdP in milliseconds.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "oauth": { + "properties": { + "audience": { + "default": [ + + ], + "description": "List of audiences passed to the IdP when obtaining a new token.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "The client ID for the application registration in the IdP.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "client_secret": { + "description": "The client secret for the application registration in the IdP.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "grant_type": { + "default": "client_credentials", + "description": "The OAuth grant type to be used.", + "enum": [ + "client_credentials", + "password" + ], + "type": "string" + }, + "password": { + "description": "The password to use if `config.oauth.grant_type` is set to `password`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + }, + "scopes": { + "default": [ + "openid" + ], + "description": "List of scopes to request from the IdP when obtaining a new token.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_endpoint": { + "description": "The token endpoint URI.", + "type": "string" + }, + "token_headers": { + "additionalProperties": true, + "description": "Extra headers to be passed in the token endpoint request.", + "type": "object" + }, + "token_post_args": { + "additionalProperties": true, + "description": "Extra post arguments to be passed in the token endpoint request.", + "type": "object" + }, + "username": { + "description": "The username to use if `config.oauth.grant_type` is set to `password`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).\nThis field is [encrypted](/gateway/keyring/).", + "type": "string" + } + }, + "required": [ + "token_endpoint" + ], + "type": "object" + } + }, + "required": [ + "oauth" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/upstream-oauth/3.9.json b/json_schemas/upstream-oauth/3.9.json new file mode 100644 index 00000000..99da85e3 --- /dev/null +++ b/json_schemas/upstream-oauth/3.9.json @@ -0,0 +1,509 @@ +{ + "properties": { + "config": { + "properties": { + "behavior": { + "properties": { + "idp_error_response_body_template": { + "default": "{ \"code\": \"{{status}}\", \"message\": \"{{message}}\" }", + "description": "The template to use to create the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "minLength": 0, + "type": "string" + }, + "idp_error_response_content_type": { + "default": "application/json; charset=utf-8", + "description": "The Content-Type of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "minLength": 0, + "type": "string" + }, + "idp_error_response_message": { + "default": "Failed to authenticate request to upstream", + "description": "The message to embed in the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "minLength": 0, + "type": "string" + }, + "idp_error_response_status_code": { + "default": 502, + "description": "The response code to return to the consumer if Kong fails to obtain a token from the IdP.", + "maximum": 599, + "minimum": 500, + "type": "integer" + }, + "purge_token_on_upstream_status_codes": { + "default": [ + 401 + ], + "description": "An array of status codes which will force an access token to be purged when returned by the upstream. An empty array will disable this functionality.", + "items": { + "maximum": 599, + "minimum": 100, + "required": [ + + ], + "type": "integer" + }, + "type": "array" + }, + "upstream_access_token_header_name": { + "default": "Authorization", + "description": "The name of the header used to send the access token (obtained from the IdP) to the upstream service.", + "minLength": 0, + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "cache": { + "properties": { + "default_ttl": { + "default": 3600, + "description": "The lifetime of a token without an explicit `expires_in` value.", + "minimum": 0, + "type": "number" + }, + "eagerly_expire": { + "default": 5, + "description": "The number of seconds to eagerly expire a cached token. By default, a cached token expires 5 seconds before its lifetime as defined in `expires_in`.", + "minimum": -1, + "type": "integer" + }, + "memory": { + "properties": { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The shared dictionary used by the plugin to cache tokens if `config.cache.strategy` is set to `memory`.", + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "redis": { + "properties": { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + }, + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "items": { + "properties": { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + }, + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + }, + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "maximum": 2147483646, + "minimum": 1, + "type": "integer" + }, + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + }, + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "items": { + "properties": { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + }, + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "maximum": 65535, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "enum": [ + "any", + "master", + "slave" + ], + "type": "string" + }, + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + }, + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + }, + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + }, + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + + ], + "shorthand_fields": { + "cluster_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "sentinel_addresses": { + "items": { + "type": "string" + }, + "minLength": 1, + "type": "array" + }, + "timeout": { + "type": "integer" + } + }, + "type": "object" + }, + "strategy": { + "default": "memory", + "description": "The method Kong should use to cache tokens issued by the IdP.", + "enum": [ + "memory", + "redis" + ], + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "client": { + "properties": { + "auth_method": { + "default": "client_secret_post", + "description": "The authentication method used in client requests to the IdP. Supported values are: `client_secret_basic` to send `client_id` and `client_secret` in the `Authorization: Basic` header, `client_secret_post` to send `client_id` and `client_secret` as part of the request body, or `client_secret_jwt` to send a JWT signed with the `client_secret` using the client assertion as part of the body.", + "enum": [ + "client_secret_basic", + "client_secret_jwt", + "client_secret_post", + "none" + ], + "type": "string" + }, + "client_secret_jwt_alg": { + "default": "HS512", + "description": "The algorithm to use with JWT when using `client_secret_jwt` authentication.", + "enum": [ + "HS256", + "HS512" + ], + "type": "string" + }, + "http_proxy": { + "description": "The proxy to use when making HTTP requests to the IdP.", + "type": "string" + }, + "http_proxy_authorization": { + "description": "The `Proxy-Authorization` header value to be used with `http_proxy`.", + "type": "string" + }, + "http_version": { + "default": 1.1, + "description": "The HTTP version used for requests made by this plugin. Supported values: `1.1` for HTTP 1.1 and `1.0` for HTTP 1.0.", + "type": "number" + }, + "https_proxy": { + "description": "The proxy to use when making HTTPS requests to the IdP.", + "type": "string" + }, + "https_proxy_authorization": { + "description": "The `Proxy-Authorization` header value to be used with `https_proxy`.", + "type": "string" + }, + "keep_alive": { + "default": true, + "description": "Whether to use keepalive connections to the IdP.", + "type": "boolean" + }, + "no_proxy": { + "description": "A comma-separated list of hosts that should not be proxied.", + "type": "string" + }, + "ssl_verify": { + "default": false, + "description": "Whether to verify the certificate presented by the IdP when using HTTPS.", + "type": "boolean" + }, + "timeout": { + "default": 10000, + "description": "Network I/O timeout for requests to the IdP in milliseconds.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "oauth": { + "properties": { + "audience": { + "default": [ + + ], + "description": "List of audiences passed to the IdP when obtaining a new token.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "client_id": { + "description": "The client ID for the application registration in the IdP.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "client_secret": { + "description": "The client secret for the application registration in the IdP.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "grant_type": { + "default": "client_credentials", + "description": "The OAuth grant type to be used.", + "enum": [ + "client_credentials", + "password" + ], + "type": "string" + }, + "password": { + "description": "The password to use if `config.oauth.grant_type` is set to `password`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + }, + "scopes": { + "default": [ + "openid" + ], + "description": "List of scopes to request from the IdP when obtaining a new token.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "token_endpoint": { + "description": "The token endpoint URI.", + "type": "string" + }, + "token_headers": { + "additionalProperties": true, + "description": "Extra headers to be passed in the token endpoint request.", + "type": "object" + }, + "token_post_args": { + "additionalProperties": true, + "description": "Extra post arguments to be passed in the token endpoint request.", + "type": "object" + }, + "username": { + "description": "The username to use if `config.oauth.grant_type` is set to `password`.\nThis field is [encrypted](/gateway/keyring/).\nThis field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).", + "type": "string" + } + }, + "required": [ + "token_endpoint" + ], + "type": "object" + } + }, + "required": [ + "oauth" + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/upstream-timeout/2.8.json b/json_schemas/upstream-timeout/2.8.json new file mode 100644 index 00000000..fb4cb775 --- /dev/null +++ b/json_schemas/upstream-timeout/2.8.json @@ -0,0 +1,116 @@ +{ + "properties": { + "config": { + "properties": { + "connect_timeout": { + "description": "The timeout, in milliseconds, for establishing a connection to the upstream server.\nOverrides the service object [`connect_timeout`](/gateway/latest/how-kong-works/routing-traffic/#proxying-and-upstream-timeouts) setting, if the setting exists.", + "examples": [ + 4000 + ], + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "description": "The timeout, in milliseconds, between two\nsuccessive read operations when receiving a response from the upstream server.\nOverrides the service object [`read_timeout`](/gateway/latest/how-kong-works/routing-traffic/#proxying-and-upstream-timeouts) setting, if the setting exists.", + "examples": [ + 5000 + ], + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "description": "The timeout, in milliseconds, between two\nsuccessive write operations when sending a request to the upstream server.\nOverrides the service object [`write_timeout`](/gateway/latest/how-kong-works/routing-traffic/#proxying-and-upstream-timeouts) setting, if the setting exists.", + "examples": [ + 5000 + ], + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/upstream-timeout/3.10.json b/json_schemas/upstream-timeout/3.10.json new file mode 100644 index 00000000..6ba90827 --- /dev/null +++ b/json_schemas/upstream-timeout/3.10.json @@ -0,0 +1,94 @@ +{ + "properties": { + "config": { + "properties": { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/upstream-timeout/3.11.json b/json_schemas/upstream-timeout/3.11.json new file mode 100644 index 00000000..b21059ae --- /dev/null +++ b/json_schemas/upstream-timeout/3.11.json @@ -0,0 +1,82 @@ +{ + "properties": { + "config": { + "properties": { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 1 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 1 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 1 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/upstream-timeout/3.12.json b/json_schemas/upstream-timeout/3.12.json new file mode 100644 index 00000000..b21059ae --- /dev/null +++ b/json_schemas/upstream-timeout/3.12.json @@ -0,0 +1,82 @@ +{ + "properties": { + "config": { + "properties": { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 1 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 1 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 1 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/upstream-timeout/3.4.json b/json_schemas/upstream-timeout/3.4.json new file mode 100644 index 00000000..6ba90827 --- /dev/null +++ b/json_schemas/upstream-timeout/3.4.json @@ -0,0 +1,94 @@ +{ + "properties": { + "config": { + "properties": { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/upstream-timeout/3.7.json b/json_schemas/upstream-timeout/3.7.json new file mode 100644 index 00000000..6ba90827 --- /dev/null +++ b/json_schemas/upstream-timeout/3.7.json @@ -0,0 +1,94 @@ +{ + "properties": { + "config": { + "properties": { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/upstream-timeout/3.8.json b/json_schemas/upstream-timeout/3.8.json new file mode 100644 index 00000000..6ba90827 --- /dev/null +++ b/json_schemas/upstream-timeout/3.8.json @@ -0,0 +1,94 @@ +{ + "properties": { + "config": { + "properties": { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/upstream-timeout/3.9.json b/json_schemas/upstream-timeout/3.9.json new file mode 100644 index 00000000..6ba90827 --- /dev/null +++ b/json_schemas/upstream-timeout/3.9.json @@ -0,0 +1,94 @@ +{ + "properties": { + "config": { + "properties": { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/vault-auth/2.8.json b/json_schemas/vault-auth/2.8.json new file mode 100644 index 00000000..7eb2c7b0 --- /dev/null +++ b/json_schemas/vault-auth/2.8.json @@ -0,0 +1,104 @@ +{ + "properties": { + "config": { + "properties": { + "access_token_name": { + "default": "access_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for an access token. The client must send the access token in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "anonymous": { + "description": "An optional string (consumer UUID) value to use as an anonymous consumer if authentication fails.\nIf empty (default), the request fails with an authentication failure `4xx`. Note that this value\nmust refer to the consumer `id` attribute that is internal to Kong Gateway, and **not** its `custom_id`.", + "legacy": true, + "type": "string", + "uuid": true + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the header or querystring containing the key) before proxying it.", + "type": "boolean" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + }, + "secret_token_name": { + "default": "secret_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for a secret token. The client must send the secret in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "tokens_in_body": { + "default": false, + "description": "If enabled, the plugin will read the request body (if said request has one and its MIME type is supported) and try to find the key in it. Supported MIME types are `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "vault": { + "description": "A reference to an existing `vault` object within the database. `vault` entities define the connection and authentication parameters used to connect to a Vault HTTP(S) API.", + "examples": { + "id": "00000000-0000-0000-0000-000000000000" + }, + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/vault-auth/3.10.json b/json_schemas/vault-auth/3.10.json new file mode 100644 index 00000000..def22e2a --- /dev/null +++ b/json_schemas/vault-auth/3.10.json @@ -0,0 +1,110 @@ +{ + "properties": { + "config": { + "properties": { + "access_token_name": { + "default": "access_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for an access token. The client must send the access token in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the header or querystring containing the key) before proxying it.", + "type": "boolean" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + }, + "secret_token_name": { + "default": "secret_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for a secret token. The client must send the secret in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "tokens_in_body": { + "default": false, + "description": "If enabled, the plugin will read the request body (if said request has one and its MIME type is supported) and try to find the key in it. Supported MIME types are `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "vault": { + "description": "A reference to an existing `vault` object within the database. `vault` entities define the connection and authentication parameters used to connect to a Vault HTTP(S) API.", + "type": "string" + } + }, + "required": [ + "vault" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/vault-auth/3.11.json b/json_schemas/vault-auth/3.11.json new file mode 100644 index 00000000..ec80e147 --- /dev/null +++ b/json_schemas/vault-auth/3.11.json @@ -0,0 +1,100 @@ +{ + "properties": { + "config": { + "properties": { + "access_token_name": { + "default": "access_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for an access token. The client must send the access token in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "items": { + "description": "A string representing an HTTP header name.", + "required": [], + "type": "string" + }, + "type": "string" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the header or querystring containing the key) before proxying it.", + "type": "boolean" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + }, + "secret_token_name": { + "default": "secret_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for a secret token. The client must send the secret in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "items": { + "description": "A string representing an HTTP header name.", + "required": [], + "type": "string" + }, + "type": "string" + }, + "tokens_in_body": { + "default": false, + "description": "If enabled, the plugin will read the request body (if said request has one and its MIME type is supported) and try to find the key in it. Supported MIME types are `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "vault": { + "description": "A reference to an existing `vault` object within the database. `vault` entities define the connection and authentication parameters used to connect to a Vault HTTP(S) API.", + "type": "string" + } + }, + "required": [ + "vault" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/vault-auth/3.12.json b/json_schemas/vault-auth/3.12.json new file mode 100644 index 00000000..ec80e147 --- /dev/null +++ b/json_schemas/vault-auth/3.12.json @@ -0,0 +1,100 @@ +{ + "properties": { + "config": { + "properties": { + "access_token_name": { + "default": "access_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for an access token. The client must send the access token in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "items": { + "description": "A string representing an HTTP header name.", + "required": [], + "type": "string" + }, + "type": "string" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the header or querystring containing the key) before proxying it.", + "type": "boolean" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + }, + "secret_token_name": { + "default": "secret_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for a secret token. The client must send the secret in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "items": { + "description": "A string representing an HTTP header name.", + "required": [], + "type": "string" + }, + "type": "string" + }, + "tokens_in_body": { + "default": false, + "description": "If enabled, the plugin will read the request body (if said request has one and its MIME type is supported) and try to find the key in it. Supported MIME types are `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "vault": { + "description": "A reference to an existing `vault` object within the database. `vault` entities define the connection and authentication parameters used to connect to a Vault HTTP(S) API.", + "type": "string" + } + }, + "required": [ + "vault" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/vault-auth/3.4.json b/json_schemas/vault-auth/3.4.json new file mode 100644 index 00000000..def22e2a --- /dev/null +++ b/json_schemas/vault-auth/3.4.json @@ -0,0 +1,110 @@ +{ + "properties": { + "config": { + "properties": { + "access_token_name": { + "default": "access_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for an access token. The client must send the access token in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the header or querystring containing the key) before proxying it.", + "type": "boolean" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + }, + "secret_token_name": { + "default": "secret_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for a secret token. The client must send the secret in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "tokens_in_body": { + "default": false, + "description": "If enabled, the plugin will read the request body (if said request has one and its MIME type is supported) and try to find the key in it. Supported MIME types are `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "vault": { + "description": "A reference to an existing `vault` object within the database. `vault` entities define the connection and authentication parameters used to connect to a Vault HTTP(S) API.", + "type": "string" + } + }, + "required": [ + "vault" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/vault-auth/3.7.json b/json_schemas/vault-auth/3.7.json new file mode 100644 index 00000000..def22e2a --- /dev/null +++ b/json_schemas/vault-auth/3.7.json @@ -0,0 +1,110 @@ +{ + "properties": { + "config": { + "properties": { + "access_token_name": { + "default": "access_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for an access token. The client must send the access token in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the header or querystring containing the key) before proxying it.", + "type": "boolean" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + }, + "secret_token_name": { + "default": "secret_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for a secret token. The client must send the secret in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "tokens_in_body": { + "default": false, + "description": "If enabled, the plugin will read the request body (if said request has one and its MIME type is supported) and try to find the key in it. Supported MIME types are `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "vault": { + "description": "A reference to an existing `vault` object within the database. `vault` entities define the connection and authentication parameters used to connect to a Vault HTTP(S) API.", + "type": "string" + } + }, + "required": [ + "vault" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/vault-auth/3.8.json b/json_schemas/vault-auth/3.8.json new file mode 100644 index 00000000..def22e2a --- /dev/null +++ b/json_schemas/vault-auth/3.8.json @@ -0,0 +1,110 @@ +{ + "properties": { + "config": { + "properties": { + "access_token_name": { + "default": "access_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for an access token. The client must send the access token in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the header or querystring containing the key) before proxying it.", + "type": "boolean" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + }, + "secret_token_name": { + "default": "secret_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for a secret token. The client must send the secret in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "tokens_in_body": { + "default": false, + "description": "If enabled, the plugin will read the request body (if said request has one and its MIME type is supported) and try to find the key in it. Supported MIME types are `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "vault": { + "description": "A reference to an existing `vault` object within the database. `vault` entities define the connection and authentication parameters used to connect to a Vault HTTP(S) API.", + "type": "string" + } + }, + "required": [ + "vault" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/vault-auth/3.9.json b/json_schemas/vault-auth/3.9.json new file mode 100644 index 00000000..def22e2a --- /dev/null +++ b/json_schemas/vault-auth/3.9.json @@ -0,0 +1,110 @@ +{ + "properties": { + "config": { + "properties": { + "access_token_name": { + "default": "access_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for an access token. The client must send the access token in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + }, + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the header or querystring containing the key) before proxying it.", + "type": "boolean" + }, + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + }, + "secret_token_name": { + "default": "secret_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for a secret token. The client must send the secret in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "items": { + "description": "A string representing an HTTP header name.", + "required": [ + + ], + "type": "string" + }, + "type": "string" + }, + "tokens_in_body": { + "default": false, + "description": "If enabled, the plugin will read the request body (if said request has one and its MIME type is supported) and try to find the key in it. Supported MIME types are `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + }, + "vault": { + "description": "A reference to an existing `vault` object within the database. `vault` entities define the connection and authentication parameters used to connect to a Vault HTTP(S) API.", + "type": "string" + } + }, + "required": [ + "vault" + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + "config" + ] +} \ No newline at end of file diff --git a/json_schemas/websocket-size-limit/3.10.json b/json_schemas/websocket-size-limit/3.10.json new file mode 100644 index 00000000..483c3c46 --- /dev/null +++ b/json_schemas/websocket-size-limit/3.10.json @@ -0,0 +1,82 @@ +{ + "properties": { + "config": { + "properties": { + "client_max_payload": { + "maximum": 33554432, + "minimum": 1, + "type": "integer" + }, + "upstream_max_payload": { + "maximum": 33554432, + "minimum": 1, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/websocket-size-limit/3.11.json b/json_schemas/websocket-size-limit/3.11.json new file mode 100644 index 00000000..b46f162b --- /dev/null +++ b/json_schemas/websocket-size-limit/3.11.json @@ -0,0 +1,70 @@ +{ + "properties": { + "config": { + "properties": { + "client_max_payload": { + "maximum": 33554432, + "minimum": 1, + "type": "integer" + }, + "upstream_max_payload": { + "maximum": 33554432, + "minimum": 1, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/websocket-size-limit/3.12.json b/json_schemas/websocket-size-limit/3.12.json new file mode 100644 index 00000000..b46f162b --- /dev/null +++ b/json_schemas/websocket-size-limit/3.12.json @@ -0,0 +1,70 @@ +{ + "properties": { + "config": { + "properties": { + "client_max_payload": { + "maximum": 33554432, + "minimum": 1, + "type": "integer" + }, + "upstream_max_payload": { + "maximum": 33554432, + "minimum": 1, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/websocket-size-limit/3.4.json b/json_schemas/websocket-size-limit/3.4.json new file mode 100644 index 00000000..483c3c46 --- /dev/null +++ b/json_schemas/websocket-size-limit/3.4.json @@ -0,0 +1,82 @@ +{ + "properties": { + "config": { + "properties": { + "client_max_payload": { + "maximum": 33554432, + "minimum": 1, + "type": "integer" + }, + "upstream_max_payload": { + "maximum": 33554432, + "minimum": 1, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/websocket-size-limit/3.7.json b/json_schemas/websocket-size-limit/3.7.json new file mode 100644 index 00000000..483c3c46 --- /dev/null +++ b/json_schemas/websocket-size-limit/3.7.json @@ -0,0 +1,82 @@ +{ + "properties": { + "config": { + "properties": { + "client_max_payload": { + "maximum": 33554432, + "minimum": 1, + "type": "integer" + }, + "upstream_max_payload": { + "maximum": 33554432, + "minimum": 1, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/websocket-size-limit/3.8.json b/json_schemas/websocket-size-limit/3.8.json new file mode 100644 index 00000000..483c3c46 --- /dev/null +++ b/json_schemas/websocket-size-limit/3.8.json @@ -0,0 +1,82 @@ +{ + "properties": { + "config": { + "properties": { + "client_max_payload": { + "maximum": 33554432, + "minimum": 1, + "type": "integer" + }, + "upstream_max_payload": { + "maximum": 33554432, + "minimum": 1, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/websocket-size-limit/3.9.json b/json_schemas/websocket-size-limit/3.9.json new file mode 100644 index 00000000..483c3c46 --- /dev/null +++ b/json_schemas/websocket-size-limit/3.9.json @@ -0,0 +1,82 @@ +{ + "properties": { + "config": { + "properties": { + "client_max_payload": { + "maximum": 33554432, + "minimum": 1, + "type": "integer" + }, + "upstream_max_payload": { + "maximum": 33554432, + "minimum": 1, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/websocket-validator/3.10.json b/json_schemas/websocket-validator/3.10.json new file mode 100644 index 00000000..65cf170c --- /dev/null +++ b/json_schemas/websocket-validator/3.10.json @@ -0,0 +1,168 @@ +{ + "properties": { + "config": { + "properties": { + "client": { + "properties": { + "binary": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + }, + "text": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "upstream": { + "properties": { + "binary": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + }, + "text": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/websocket-validator/3.11.json b/json_schemas/websocket-validator/3.11.json new file mode 100644 index 00000000..8c23be44 --- /dev/null +++ b/json_schemas/websocket-validator/3.11.json @@ -0,0 +1,152 @@ +{ + "properties": { + "config": { + "properties": { + "client": { + "properties": { + "binary": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + }, + "text": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "upstream": { + "properties": { + "binary": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + }, + "text": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/websocket-validator/3.12.json b/json_schemas/websocket-validator/3.12.json new file mode 100644 index 00000000..8c23be44 --- /dev/null +++ b/json_schemas/websocket-validator/3.12.json @@ -0,0 +1,152 @@ +{ + "properties": { + "config": { + "properties": { + "client": { + "properties": { + "binary": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + }, + "text": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "upstream": { + "properties": { + "binary": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + }, + "text": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + } + }, + "required": [], + "type": "object" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/websocket-validator/3.4.json b/json_schemas/websocket-validator/3.4.json new file mode 100644 index 00000000..65cf170c --- /dev/null +++ b/json_schemas/websocket-validator/3.4.json @@ -0,0 +1,168 @@ +{ + "properties": { + "config": { + "properties": { + "client": { + "properties": { + "binary": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + }, + "text": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "upstream": { + "properties": { + "binary": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + }, + "text": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/websocket-validator/3.7.json b/json_schemas/websocket-validator/3.7.json new file mode 100644 index 00000000..65cf170c --- /dev/null +++ b/json_schemas/websocket-validator/3.7.json @@ -0,0 +1,168 @@ +{ + "properties": { + "config": { + "properties": { + "client": { + "properties": { + "binary": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + }, + "text": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "upstream": { + "properties": { + "binary": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + }, + "text": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/websocket-validator/3.8.json b/json_schemas/websocket-validator/3.8.json new file mode 100644 index 00000000..65cf170c --- /dev/null +++ b/json_schemas/websocket-validator/3.8.json @@ -0,0 +1,168 @@ +{ + "properties": { + "config": { + "properties": { + "client": { + "properties": { + "binary": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + }, + "text": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "upstream": { + "properties": { + "binary": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + }, + "text": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/websocket-validator/3.9.json b/json_schemas/websocket-validator/3.9.json new file mode 100644 index 00000000..65cf170c --- /dev/null +++ b/json_schemas/websocket-validator/3.9.json @@ -0,0 +1,168 @@ +{ + "properties": { + "config": { + "properties": { + "client": { + "properties": { + "binary": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + }, + "text": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "upstream": { + "properties": { + "binary": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + }, + "text": { + "properties": { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + }, + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "enum": [ + "draft4" + ], + "type": "string" + } + }, + "required": [ + "schema", + "type" + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "ws", + "wss" + ], + "description": "A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support tcp and tls.", + "items": { + "enum": [ + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/xml-threat-protection/3.10.json b/json_schemas/xml-threat-protection/3.10.json new file mode 100644 index 00000000..48a6bd95 --- /dev/null +++ b/json_schemas/xml-threat-protection/3.10.json @@ -0,0 +1,228 @@ +{ + "properties": { + "config": { + "properties": { + "allow_dtd": { + "default": false, + "description": "Indicates whether an XML Document Type Definition (DTD) section is allowed.", + "type": "boolean" + }, + "allowed_content_types": { + "default": [ + + ], + "description": "A list of Content-Type values with payloads that are allowed, but aren't validated.", + "items": { + "pattern": "^[^\\t\\n\\v\\f\\r ]+\\/[^ ;]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "attribute": { + "default": 1048576, + "description": "Maximum size of the attribute value.", + "minimum": 0, + "type": "integer" + }, + "bla_max_amplification": { + "default": 100, + "description": "Sets the maximum allowed amplification. This protects against the Billion Laughs Attack.", + "minimum": 1, + "type": "number" + }, + "bla_threshold": { + "default": 8388608, + "description": "Sets the threshold after which the protection starts. This protects against the Billion Laughs Attack.", + "minimum": 1024, + "type": "integer" + }, + "buffer": { + "default": 1048576, + "description": "Maximum size of the unparsed buffer (see below).", + "minimum": 0, + "type": "integer" + }, + "checked_content_types": { + "default": [ + "application/xml" + ], + "description": "A list of Content-Type values with payloads that must be validated.", + "items": { + "pattern": "^[^\\t\\n\\v\\f\\r ]+\\/[^ ;]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "comment": { + "default": 1024, + "description": "Maximum size of comments.", + "minimum": 0, + "type": "integer" + }, + "document": { + "default": 10485760, + "description": "Maximum size of the entire document.", + "minimum": 0, + "type": "integer" + }, + "entity": { + "default": 1024, + "description": "Maximum size of entity values in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "entityname": { + "default": 1024, + "description": "Maximum size of entity names in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "entityproperty": { + "default": 1024, + "description": "Maximum size of systemId, publicId, or notationName in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "localname": { + "default": 1024, + "description": "Maximum size of the localname. This applies to tags and attributes.", + "minimum": 0, + "type": "integer" + }, + "max_attributes": { + "default": 100, + "description": "Maximum number of attributes allowed on a tag, including default ones. Note: If namespace-aware parsing is disabled, then the namespaces definitions are counted as attributes.", + "minimum": 0, + "type": "integer" + }, + "max_children": { + "default": 100, + "description": "Maximum number of children allowed (Element, Text, Comment, ProcessingInstruction, CDATASection). Note: Adjacent text and CDATA sections are counted as one. For example, text-cdata-text-cdata is one child.", + "minimum": 0, + "type": "integer" + }, + "max_depth": { + "default": 50, + "description": "Maximum depth of tags. Child elements such as Text or Comments are not counted as another level.", + "minimum": 0, + "type": "integer" + }, + "max_namespaces": { + "default": 20, + "description": "Maximum number of namespaces defined on a tag. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "namespace_aware": { + "default": true, + "description": "If not parsing namespace aware, all prefixes and namespace attributes will be counted as regular attributes and element names, and validated as such.", + "type": "boolean" + }, + "namespaceuri": { + "default": 1024, + "description": "Maximum size of the namespace URI. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "pidata": { + "default": 1024, + "description": "Maximum size of processing instruction data.", + "minimum": 0, + "type": "integer" + }, + "pitarget": { + "default": 1024, + "description": "Maximum size of processing instruction targets.", + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": 1024, + "description": "Maximum size of the prefix. This applies to tags and attributes. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "text": { + "default": 1048576, + "description": "Maximum text inside tags (counted over all adjacent text/CDATA elements combined).", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/xml-threat-protection/3.11.json b/json_schemas/xml-threat-protection/3.11.json new file mode 100644 index 00000000..0fea5bfa --- /dev/null +++ b/json_schemas/xml-threat-protection/3.11.json @@ -0,0 +1,210 @@ +{ + "properties": { + "config": { + "properties": { + "allow_dtd": { + "default": false, + "description": "Indicates whether an XML Document Type Definition (DTD) section is allowed.", + "type": "boolean" + }, + "allowed_content_types": { + "default": [], + "description": "A list of Content-Type values with payloads that are allowed, but aren't validated.", + "items": { + "pattern": "^[^\\t\\n\\v\\f\\r ]+\\/[^ ;]+$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "attribute": { + "default": 1048576, + "description": "Maximum size of the attribute value.", + "minimum": 0, + "type": "integer" + }, + "bla_max_amplification": { + "default": 100, + "description": "Sets the maximum allowed amplification. This protects against the Billion Laughs Attack.", + "minimum": 1, + "type": "number" + }, + "bla_threshold": { + "default": 8388608, + "description": "Sets the threshold after which the protection starts. This protects against the Billion Laughs Attack.", + "minimum": 1024, + "type": "integer" + }, + "buffer": { + "default": 1048576, + "description": "Maximum size of the unparsed buffer (see below).", + "minimum": 0, + "type": "integer" + }, + "checked_content_types": { + "default": [ + "application/xml" + ], + "description": "A list of Content-Type values with payloads that must be validated.", + "items": { + "pattern": "^[^\\t\\n\\v\\f\\r ]+\\/[^ ;]+$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "comment": { + "default": 1024, + "description": "Maximum size of comments.", + "minimum": 0, + "type": "integer" + }, + "document": { + "default": 10485760, + "description": "Maximum size of the entire document.", + "minimum": 0, + "type": "integer" + }, + "entity": { + "default": 1024, + "description": "Maximum size of entity values in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "entityname": { + "default": 1024, + "description": "Maximum size of entity names in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "entityproperty": { + "default": 1024, + "description": "Maximum size of systemId, publicId, or notationName in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "localname": { + "default": 1024, + "description": "Maximum size of the localname. This applies to tags and attributes.", + "minimum": 0, + "type": "integer" + }, + "max_attributes": { + "default": 100, + "description": "Maximum number of attributes allowed on a tag, including default ones. Note: If namespace-aware parsing is disabled, then the namespaces definitions are counted as attributes.", + "minimum": 0, + "type": "integer" + }, + "max_children": { + "default": 100, + "description": "Maximum number of children allowed (Element, Text, Comment, ProcessingInstruction, CDATASection). Note: Adjacent text and CDATA sections are counted as one. For example, text-cdata-text-cdata is one child.", + "minimum": 0, + "type": "integer" + }, + "max_depth": { + "default": 50, + "description": "Maximum depth of tags. Child elements such as Text or Comments are not counted as another level.", + "minimum": 0, + "type": "integer" + }, + "max_namespaces": { + "default": 20, + "description": "Maximum number of namespaces defined on a tag. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "namespace_aware": { + "default": true, + "description": "If not parsing namespace aware, all prefixes and namespace attributes will be counted as regular attributes and element names, and validated as such.", + "type": "boolean" + }, + "namespaceuri": { + "default": 1024, + "description": "Maximum size of the namespace URI. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "pidata": { + "default": 1024, + "description": "Maximum size of processing instruction data.", + "minimum": 0, + "type": "integer" + }, + "pitarget": { + "default": 1024, + "description": "Maximum size of processing instruction targets.", + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": 1024, + "description": "Maximum size of the prefix. This applies to tags and attributes. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "text": { + "default": 1048576, + "description": "Maximum text inside tags (counted over all adjacent text/CDATA elements combined).", + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/xml-threat-protection/3.12.json b/json_schemas/xml-threat-protection/3.12.json new file mode 100644 index 00000000..0fea5bfa --- /dev/null +++ b/json_schemas/xml-threat-protection/3.12.json @@ -0,0 +1,210 @@ +{ + "properties": { + "config": { + "properties": { + "allow_dtd": { + "default": false, + "description": "Indicates whether an XML Document Type Definition (DTD) section is allowed.", + "type": "boolean" + }, + "allowed_content_types": { + "default": [], + "description": "A list of Content-Type values with payloads that are allowed, but aren't validated.", + "items": { + "pattern": "^[^\\t\\n\\v\\f\\r ]+\\/[^ ;]+$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "attribute": { + "default": 1048576, + "description": "Maximum size of the attribute value.", + "minimum": 0, + "type": "integer" + }, + "bla_max_amplification": { + "default": 100, + "description": "Sets the maximum allowed amplification. This protects against the Billion Laughs Attack.", + "minimum": 1, + "type": "number" + }, + "bla_threshold": { + "default": 8388608, + "description": "Sets the threshold after which the protection starts. This protects against the Billion Laughs Attack.", + "minimum": 1024, + "type": "integer" + }, + "buffer": { + "default": 1048576, + "description": "Maximum size of the unparsed buffer (see below).", + "minimum": 0, + "type": "integer" + }, + "checked_content_types": { + "default": [ + "application/xml" + ], + "description": "A list of Content-Type values with payloads that must be validated.", + "items": { + "pattern": "^[^\\t\\n\\v\\f\\r ]+\\/[^ ;]+$", + "required": [], + "type": "string" + }, + "type": "array" + }, + "comment": { + "default": 1024, + "description": "Maximum size of comments.", + "minimum": 0, + "type": "integer" + }, + "document": { + "default": 10485760, + "description": "Maximum size of the entire document.", + "minimum": 0, + "type": "integer" + }, + "entity": { + "default": 1024, + "description": "Maximum size of entity values in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "entityname": { + "default": 1024, + "description": "Maximum size of entity names in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "entityproperty": { + "default": 1024, + "description": "Maximum size of systemId, publicId, or notationName in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "localname": { + "default": 1024, + "description": "Maximum size of the localname. This applies to tags and attributes.", + "minimum": 0, + "type": "integer" + }, + "max_attributes": { + "default": 100, + "description": "Maximum number of attributes allowed on a tag, including default ones. Note: If namespace-aware parsing is disabled, then the namespaces definitions are counted as attributes.", + "minimum": 0, + "type": "integer" + }, + "max_children": { + "default": 100, + "description": "Maximum number of children allowed (Element, Text, Comment, ProcessingInstruction, CDATASection). Note: Adjacent text and CDATA sections are counted as one. For example, text-cdata-text-cdata is one child.", + "minimum": 0, + "type": "integer" + }, + "max_depth": { + "default": 50, + "description": "Maximum depth of tags. Child elements such as Text or Comments are not counted as another level.", + "minimum": 0, + "type": "integer" + }, + "max_namespaces": { + "default": 20, + "description": "Maximum number of namespaces defined on a tag. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "namespace_aware": { + "default": true, + "description": "If not parsing namespace aware, all prefixes and namespace attributes will be counted as regular attributes and element names, and validated as such.", + "type": "boolean" + }, + "namespaceuri": { + "default": 1024, + "description": "Maximum size of the namespace URI. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "pidata": { + "default": 1024, + "description": "Maximum size of processing instruction data.", + "minimum": 0, + "type": "integer" + }, + "pitarget": { + "default": 1024, + "description": "Maximum size of processing instruction targets.", + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": 1024, + "description": "Maximum size of the prefix. This applies to tags and attributes. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "text": { + "default": 1048576, + "description": "Maximum text inside tags (counted over all adjacent text/CDATA elements combined).", + "minimum": 0, + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/xml-threat-protection/3.4.json b/json_schemas/xml-threat-protection/3.4.json new file mode 100644 index 00000000..48a6bd95 --- /dev/null +++ b/json_schemas/xml-threat-protection/3.4.json @@ -0,0 +1,228 @@ +{ + "properties": { + "config": { + "properties": { + "allow_dtd": { + "default": false, + "description": "Indicates whether an XML Document Type Definition (DTD) section is allowed.", + "type": "boolean" + }, + "allowed_content_types": { + "default": [ + + ], + "description": "A list of Content-Type values with payloads that are allowed, but aren't validated.", + "items": { + "pattern": "^[^\\t\\n\\v\\f\\r ]+\\/[^ ;]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "attribute": { + "default": 1048576, + "description": "Maximum size of the attribute value.", + "minimum": 0, + "type": "integer" + }, + "bla_max_amplification": { + "default": 100, + "description": "Sets the maximum allowed amplification. This protects against the Billion Laughs Attack.", + "minimum": 1, + "type": "number" + }, + "bla_threshold": { + "default": 8388608, + "description": "Sets the threshold after which the protection starts. This protects against the Billion Laughs Attack.", + "minimum": 1024, + "type": "integer" + }, + "buffer": { + "default": 1048576, + "description": "Maximum size of the unparsed buffer (see below).", + "minimum": 0, + "type": "integer" + }, + "checked_content_types": { + "default": [ + "application/xml" + ], + "description": "A list of Content-Type values with payloads that must be validated.", + "items": { + "pattern": "^[^\\t\\n\\v\\f\\r ]+\\/[^ ;]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "comment": { + "default": 1024, + "description": "Maximum size of comments.", + "minimum": 0, + "type": "integer" + }, + "document": { + "default": 10485760, + "description": "Maximum size of the entire document.", + "minimum": 0, + "type": "integer" + }, + "entity": { + "default": 1024, + "description": "Maximum size of entity values in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "entityname": { + "default": 1024, + "description": "Maximum size of entity names in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "entityproperty": { + "default": 1024, + "description": "Maximum size of systemId, publicId, or notationName in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "localname": { + "default": 1024, + "description": "Maximum size of the localname. This applies to tags and attributes.", + "minimum": 0, + "type": "integer" + }, + "max_attributes": { + "default": 100, + "description": "Maximum number of attributes allowed on a tag, including default ones. Note: If namespace-aware parsing is disabled, then the namespaces definitions are counted as attributes.", + "minimum": 0, + "type": "integer" + }, + "max_children": { + "default": 100, + "description": "Maximum number of children allowed (Element, Text, Comment, ProcessingInstruction, CDATASection). Note: Adjacent text and CDATA sections are counted as one. For example, text-cdata-text-cdata is one child.", + "minimum": 0, + "type": "integer" + }, + "max_depth": { + "default": 50, + "description": "Maximum depth of tags. Child elements such as Text or Comments are not counted as another level.", + "minimum": 0, + "type": "integer" + }, + "max_namespaces": { + "default": 20, + "description": "Maximum number of namespaces defined on a tag. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "namespace_aware": { + "default": true, + "description": "If not parsing namespace aware, all prefixes and namespace attributes will be counted as regular attributes and element names, and validated as such.", + "type": "boolean" + }, + "namespaceuri": { + "default": 1024, + "description": "Maximum size of the namespace URI. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "pidata": { + "default": 1024, + "description": "Maximum size of processing instruction data.", + "minimum": 0, + "type": "integer" + }, + "pitarget": { + "default": 1024, + "description": "Maximum size of processing instruction targets.", + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": 1024, + "description": "Maximum size of the prefix. This applies to tags and attributes. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "text": { + "default": 1048576, + "description": "Maximum text inside tags (counted over all adjacent text/CDATA elements combined).", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/xml-threat-protection/3.7.json b/json_schemas/xml-threat-protection/3.7.json new file mode 100644 index 00000000..48a6bd95 --- /dev/null +++ b/json_schemas/xml-threat-protection/3.7.json @@ -0,0 +1,228 @@ +{ + "properties": { + "config": { + "properties": { + "allow_dtd": { + "default": false, + "description": "Indicates whether an XML Document Type Definition (DTD) section is allowed.", + "type": "boolean" + }, + "allowed_content_types": { + "default": [ + + ], + "description": "A list of Content-Type values with payloads that are allowed, but aren't validated.", + "items": { + "pattern": "^[^\\t\\n\\v\\f\\r ]+\\/[^ ;]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "attribute": { + "default": 1048576, + "description": "Maximum size of the attribute value.", + "minimum": 0, + "type": "integer" + }, + "bla_max_amplification": { + "default": 100, + "description": "Sets the maximum allowed amplification. This protects against the Billion Laughs Attack.", + "minimum": 1, + "type": "number" + }, + "bla_threshold": { + "default": 8388608, + "description": "Sets the threshold after which the protection starts. This protects against the Billion Laughs Attack.", + "minimum": 1024, + "type": "integer" + }, + "buffer": { + "default": 1048576, + "description": "Maximum size of the unparsed buffer (see below).", + "minimum": 0, + "type": "integer" + }, + "checked_content_types": { + "default": [ + "application/xml" + ], + "description": "A list of Content-Type values with payloads that must be validated.", + "items": { + "pattern": "^[^\\t\\n\\v\\f\\r ]+\\/[^ ;]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "comment": { + "default": 1024, + "description": "Maximum size of comments.", + "minimum": 0, + "type": "integer" + }, + "document": { + "default": 10485760, + "description": "Maximum size of the entire document.", + "minimum": 0, + "type": "integer" + }, + "entity": { + "default": 1024, + "description": "Maximum size of entity values in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "entityname": { + "default": 1024, + "description": "Maximum size of entity names in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "entityproperty": { + "default": 1024, + "description": "Maximum size of systemId, publicId, or notationName in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "localname": { + "default": 1024, + "description": "Maximum size of the localname. This applies to tags and attributes.", + "minimum": 0, + "type": "integer" + }, + "max_attributes": { + "default": 100, + "description": "Maximum number of attributes allowed on a tag, including default ones. Note: If namespace-aware parsing is disabled, then the namespaces definitions are counted as attributes.", + "minimum": 0, + "type": "integer" + }, + "max_children": { + "default": 100, + "description": "Maximum number of children allowed (Element, Text, Comment, ProcessingInstruction, CDATASection). Note: Adjacent text and CDATA sections are counted as one. For example, text-cdata-text-cdata is one child.", + "minimum": 0, + "type": "integer" + }, + "max_depth": { + "default": 50, + "description": "Maximum depth of tags. Child elements such as Text or Comments are not counted as another level.", + "minimum": 0, + "type": "integer" + }, + "max_namespaces": { + "default": 20, + "description": "Maximum number of namespaces defined on a tag. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "namespace_aware": { + "default": true, + "description": "If not parsing namespace aware, all prefixes and namespace attributes will be counted as regular attributes and element names, and validated as such.", + "type": "boolean" + }, + "namespaceuri": { + "default": 1024, + "description": "Maximum size of the namespace URI. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "pidata": { + "default": 1024, + "description": "Maximum size of processing instruction data.", + "minimum": 0, + "type": "integer" + }, + "pitarget": { + "default": 1024, + "description": "Maximum size of processing instruction targets.", + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": 1024, + "description": "Maximum size of the prefix. This applies to tags and attributes. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "text": { + "default": 1048576, + "description": "Maximum text inside tags (counted over all adjacent text/CDATA elements combined).", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/xml-threat-protection/3.8.json b/json_schemas/xml-threat-protection/3.8.json new file mode 100644 index 00000000..48a6bd95 --- /dev/null +++ b/json_schemas/xml-threat-protection/3.8.json @@ -0,0 +1,228 @@ +{ + "properties": { + "config": { + "properties": { + "allow_dtd": { + "default": false, + "description": "Indicates whether an XML Document Type Definition (DTD) section is allowed.", + "type": "boolean" + }, + "allowed_content_types": { + "default": [ + + ], + "description": "A list of Content-Type values with payloads that are allowed, but aren't validated.", + "items": { + "pattern": "^[^\\t\\n\\v\\f\\r ]+\\/[^ ;]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "attribute": { + "default": 1048576, + "description": "Maximum size of the attribute value.", + "minimum": 0, + "type": "integer" + }, + "bla_max_amplification": { + "default": 100, + "description": "Sets the maximum allowed amplification. This protects against the Billion Laughs Attack.", + "minimum": 1, + "type": "number" + }, + "bla_threshold": { + "default": 8388608, + "description": "Sets the threshold after which the protection starts. This protects against the Billion Laughs Attack.", + "minimum": 1024, + "type": "integer" + }, + "buffer": { + "default": 1048576, + "description": "Maximum size of the unparsed buffer (see below).", + "minimum": 0, + "type": "integer" + }, + "checked_content_types": { + "default": [ + "application/xml" + ], + "description": "A list of Content-Type values with payloads that must be validated.", + "items": { + "pattern": "^[^\\t\\n\\v\\f\\r ]+\\/[^ ;]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "comment": { + "default": 1024, + "description": "Maximum size of comments.", + "minimum": 0, + "type": "integer" + }, + "document": { + "default": 10485760, + "description": "Maximum size of the entire document.", + "minimum": 0, + "type": "integer" + }, + "entity": { + "default": 1024, + "description": "Maximum size of entity values in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "entityname": { + "default": 1024, + "description": "Maximum size of entity names in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "entityproperty": { + "default": 1024, + "description": "Maximum size of systemId, publicId, or notationName in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "localname": { + "default": 1024, + "description": "Maximum size of the localname. This applies to tags and attributes.", + "minimum": 0, + "type": "integer" + }, + "max_attributes": { + "default": 100, + "description": "Maximum number of attributes allowed on a tag, including default ones. Note: If namespace-aware parsing is disabled, then the namespaces definitions are counted as attributes.", + "minimum": 0, + "type": "integer" + }, + "max_children": { + "default": 100, + "description": "Maximum number of children allowed (Element, Text, Comment, ProcessingInstruction, CDATASection). Note: Adjacent text and CDATA sections are counted as one. For example, text-cdata-text-cdata is one child.", + "minimum": 0, + "type": "integer" + }, + "max_depth": { + "default": 50, + "description": "Maximum depth of tags. Child elements such as Text or Comments are not counted as another level.", + "minimum": 0, + "type": "integer" + }, + "max_namespaces": { + "default": 20, + "description": "Maximum number of namespaces defined on a tag. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "namespace_aware": { + "default": true, + "description": "If not parsing namespace aware, all prefixes and namespace attributes will be counted as regular attributes and element names, and validated as such.", + "type": "boolean" + }, + "namespaceuri": { + "default": 1024, + "description": "Maximum size of the namespace URI. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "pidata": { + "default": 1024, + "description": "Maximum size of processing instruction data.", + "minimum": 0, + "type": "integer" + }, + "pitarget": { + "default": 1024, + "description": "Maximum size of processing instruction targets.", + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": 1024, + "description": "Maximum size of the prefix. This applies to tags and attributes. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "text": { + "default": 1048576, + "description": "Maximum text inside tags (counted over all adjacent text/CDATA elements combined).", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/xml-threat-protection/3.9.json b/json_schemas/xml-threat-protection/3.9.json new file mode 100644 index 00000000..48a6bd95 --- /dev/null +++ b/json_schemas/xml-threat-protection/3.9.json @@ -0,0 +1,228 @@ +{ + "properties": { + "config": { + "properties": { + "allow_dtd": { + "default": false, + "description": "Indicates whether an XML Document Type Definition (DTD) section is allowed.", + "type": "boolean" + }, + "allowed_content_types": { + "default": [ + + ], + "description": "A list of Content-Type values with payloads that are allowed, but aren't validated.", + "items": { + "pattern": "^[^\\t\\n\\v\\f\\r ]+\\/[^ ;]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "attribute": { + "default": 1048576, + "description": "Maximum size of the attribute value.", + "minimum": 0, + "type": "integer" + }, + "bla_max_amplification": { + "default": 100, + "description": "Sets the maximum allowed amplification. This protects against the Billion Laughs Attack.", + "minimum": 1, + "type": "number" + }, + "bla_threshold": { + "default": 8388608, + "description": "Sets the threshold after which the protection starts. This protects against the Billion Laughs Attack.", + "minimum": 1024, + "type": "integer" + }, + "buffer": { + "default": 1048576, + "description": "Maximum size of the unparsed buffer (see below).", + "minimum": 0, + "type": "integer" + }, + "checked_content_types": { + "default": [ + "application/xml" + ], + "description": "A list of Content-Type values with payloads that must be validated.", + "items": { + "pattern": "^[^\\t\\n\\v\\f\\r ]+\\/[^ ;]+$", + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "comment": { + "default": 1024, + "description": "Maximum size of comments.", + "minimum": 0, + "type": "integer" + }, + "document": { + "default": 10485760, + "description": "Maximum size of the entire document.", + "minimum": 0, + "type": "integer" + }, + "entity": { + "default": 1024, + "description": "Maximum size of entity values in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "entityname": { + "default": 1024, + "description": "Maximum size of entity names in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "entityproperty": { + "default": 1024, + "description": "Maximum size of systemId, publicId, or notationName in EntityDecl.", + "minimum": 0, + "type": "integer" + }, + "localname": { + "default": 1024, + "description": "Maximum size of the localname. This applies to tags and attributes.", + "minimum": 0, + "type": "integer" + }, + "max_attributes": { + "default": 100, + "description": "Maximum number of attributes allowed on a tag, including default ones. Note: If namespace-aware parsing is disabled, then the namespaces definitions are counted as attributes.", + "minimum": 0, + "type": "integer" + }, + "max_children": { + "default": 100, + "description": "Maximum number of children allowed (Element, Text, Comment, ProcessingInstruction, CDATASection). Note: Adjacent text and CDATA sections are counted as one. For example, text-cdata-text-cdata is one child.", + "minimum": 0, + "type": "integer" + }, + "max_depth": { + "default": 50, + "description": "Maximum depth of tags. Child elements such as Text or Comments are not counted as another level.", + "minimum": 0, + "type": "integer" + }, + "max_namespaces": { + "default": 20, + "description": "Maximum number of namespaces defined on a tag. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "namespace_aware": { + "default": true, + "description": "If not parsing namespace aware, all prefixes and namespace attributes will be counted as regular attributes and element names, and validated as such.", + "type": "boolean" + }, + "namespaceuri": { + "default": 1024, + "description": "Maximum size of the namespace URI. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "pidata": { + "default": 1024, + "description": "Maximum size of processing instruction data.", + "minimum": 0, + "type": "integer" + }, + "pitarget": { + "default": 1024, + "description": "Maximum size of processing instruction targets.", + "minimum": 0, + "type": "integer" + }, + "prefix": { + "default": 1024, + "description": "Maximum size of the prefix. This applies to tags and attributes. This value is required if parsing is namespace-aware.", + "minimum": 0, + "type": "integer" + }, + "text": { + "default": 1048576, + "description": "Maximum text inside tags (counted over all adjacent text/CDATA elements combined).", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "items": { + "enum": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/zipkin/2.8.json b/json_schemas/zipkin/2.8.json new file mode 100644 index 00000000..4c3da7ff --- /dev/null +++ b/json_schemas/zipkin/2.8.json @@ -0,0 +1,175 @@ +{ + "properties": { + "config": { + "properties": { + "default_header_type": { + "default": "b3", + "description": "Allows specifying the type of header to be added to requests with no pre-existing tracing headers\nand when `config.header_type` is set to `\"preserve\"`.\nWhen `header_type` is set to any other value, `default_header_type` is ignored.\n\nPossible values are `b3`, `b3-single`, `w3c`, `jaeger`, or `ot`.\nSee the entry for `header_type` for value definitions.", + "enum": [ + "b3", + "b3-single", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "default_service_name": { + "description": "Set a default service name to override `unknown-service-name` in the \nZipkin spans.", + "type": "string" + }, + "header_type": { + "default": "preserve", + "description": "All HTTP requests going through the plugin are tagged with a tracing HTTP request.\nThis property codifies what kind of tracing header the plugin expects on incoming requests.\n\nPossible values: `b3`, `b3-single`, `w3c`, `preserve`, `jaeger`, `ot`, or `ignore`.\n* `b3`: Expects [Zipkin's B3 multiple headers](https://github.com/openzipkin/b3-propagation#multiple-headers)\non incoming requests, and will add them to the transmitted requests if the headers are missing from those requests.\n* `b3-single`: Expects or adds Zipkin's B3 single-header tracing headers.\n* `w3c`: Expects or adds W3C's traceparent tracing header.\n* `preserve`: Does not expect any format, and will transmit whatever header is recognized or present,\nwith a default of `b3` if none is found. In case of a mismatch between the expected and incoming\ntracing headers (for example, when `header_type` is set to `b3` but a w3c-style tracing header is\nfound in the incoming request), then the plugin will add both kinds of tracing headers\nto the request and generate a mismatch warning in the logs.\n* `jaeger`: Expects or adds\n[Jaeger-style tracing headers](https://www.jaegertracing.io/docs/1.22/client-libraries/#propagation-format) (`uber-trace-id`).\n* `ot`: Expects or adds [OpenTelemetry tracing headers](https://github.com/open-telemetry/opentelemetry-java/blob/96e8523544f04c305da5382854eee06218599075/extensions/trace_propagators/src/main/java/io/opentelemetry/extensions/trace/propagation/OtTracerPropagator.java) of the form `ot-tracer-*`.\n* `ignore`: Does not read any tracing headers from the incoming request.\nStarts a new request using the `default_header_type` value, or falls back to\n`b3` if there is no `default_header_type` value set.", + "enum": [ + "b3", + "b3-single", + "ignore", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "type": "string" + }, + "http_endpoint": { + "description": "The full HTTP(S) endpoint to which Zipkin spans should be sent by Kong.\nIf not specified, the Zipkin plugin will only act as a tracing header\ngenerator/transmitter.", + "examples": [ + "http://your.zipkin.collector:9411/api/v2/spans" + ], + "type": "string" + }, + "include_credential": { + "default": true, + "description": "Specify whether the credential of the currently authenticated consumer\nshould be included in metadata sent to the Zipkin server.", + "examples": [ + true + ], + "type": "boolean" + }, + "local_service_name": { + "default": "kong", + "description": "The name of the service as displayed in Zipkin. Customize this name to\ntell your Kong Gateway services apart in Zipkin request traces.", + "type": "string" + }, + "sample_ratio": { + "default": 0.001, + "description": "How often to sample requests that do not contain trace IDs.\nSet to `0` to turn sampling off, or to `1` to sample **all** requests. The\nvalue must be between zero (0) and one (1), inclusive.", + "examples": [ + 0.001 + ], + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "static_tags": { + "description": "The tags specified on this property will be added to the generated request traces. For example:\n`[ { \"name\": \"color\", \"value\": \"red\" } ]`.", + "items": { + "properties": { + "name": { + "not_one_of": [ + "error", + "http.method", + "http.path", + "http.status_code", + "kong.balancer.state", + "kong.balancer.try", + "kong.consumer", + "kong.credential", + "kong.node.id", + "kong.route", + "kong.service", + "lc", + "peer.hostname" + ], + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "type": "object" + }, + "type": "array" + }, + "tags_header": { + "default": "Zipkin-Tags", + "description": "The Zipkin plugin will add extra headers to the tags associated with any HTTP\nrequests that come with a header named as configured by this property. The\nformat is `name_of_tag=value_of_tag`, separated by semicolons (`;`).\n\nFor example: with the default value, a request with the header\n`Zipkin-Tags: fg=blue; bg=red` will generate a trace with the tag `fg` with\nvalue `blue`, and another tag called `bg` with value `red`.", + "type": "string" + }, + "traceid_byte_count": { + "default": 16, + "description": "The length in bytes of each request's Trace ID. The value can be either `8` or `16`.", + "enum": [ + 8, + 16 + ], + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer_group": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/zipkin/3.10.json b/json_schemas/zipkin/3.10.json new file mode 100644 index 00000000..c6b1f4a6 --- /dev/null +++ b/json_schemas/zipkin/3.10.json @@ -0,0 +1,371 @@ +{ + "properties": { + "config": { + "properties": { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "default_header_type": { + "default": "b3", + "description": "Allows specifying the type of header to be added to requests with no pre-existing tracing headers and when `config.header_type` is set to `\"preserve\"`. When `header_type` is set to any other value, `default_header_type` is ignored.", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "default_service_name": { + "description": "Set a default service name to override `unknown-service-name` in the Zipkin spans.", + "type": "string" + }, + "header_type": { + "default": "preserve", + "description": "All HTTP requests going through the plugin are tagged with a tracing HTTP request. This property codifies what kind of tracing header the plugin expects on incoming requests", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "ignore", + "instana", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "type": "string" + }, + "http_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "http_response_header_for_traceid": { + "type": "string" + }, + "http_span_name": { + "default": "method", + "description": "Specify whether to include the HTTP path in the span name.", + "enum": [ + "method", + "method_path" + ], + "type": "string" + }, + "include_credential": { + "default": true, + "description": "Specify whether the credential of the currently authenticated consumer should be included in metadata sent to the Zipkin server.", + "type": "boolean" + }, + "local_service_name": { + "default": "kong", + "description": "The name of the service as displayed in Zipkin.", + "type": "string" + }, + "phase_duration_flavor": { + "default": "annotations", + "description": "Specify whether to include the duration of each phase as an annotation or a tag.", + "enum": [ + "annotations", + "tags" + ], + "type": "string" + }, + "propagation": { + "default": { + "default_format": "b3" + }, + "properties": { + "clear": { + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "default_format": { + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "extract": { + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "items": { + "enum": [ + "aws", + "b3", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "w3c" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "inject": { + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "items": { + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "default_format" + ], + "type": "object" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sample_ratio": { + "default": 0.001, + "description": "How often to sample requests that do not contain trace IDs. Set to `0` to turn sampling off, or to `1` to sample **all** requests. ", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "static_tags": { + "description": "The tags specified on this property will be added to the generated request traces.", + "items": { + "properties": { + "name": { + "not_one_of": [ + "error", + "http.method", + "http.path", + "http.status_code", + "kong.balancer.state", + "kong.balancer.try", + "kong.consumer", + "kong.credential", + "kong.node.id", + "kong.route", + "kong.service", + "lc", + "peer.hostname" + ], + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "type": "object" + }, + "type": "array" + }, + "tags_header": { + "default": "Zipkin-Tags", + "description": "The Zipkin plugin will add extra headers to the tags associated with any HTTP requests that come with a header named as configured by this property.", + "type": "string" + }, + "traceid_byte_count": { + "default": 16, + "description": "The length in bytes of each request's Trace ID.", + "enum": [ + 8, + 16 + ], + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/zipkin/3.11.json b/json_schemas/zipkin/3.11.json new file mode 100644 index 00000000..2aa1a891 --- /dev/null +++ b/json_schemas/zipkin/3.11.json @@ -0,0 +1,350 @@ +{ + "properties": { + "config": { + "properties": { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "default_header_type": { + "default": "b3", + "description": "Allows specifying the type of header to be added to requests with no pre-existing tracing headers and when `config.header_type` is set to `\"preserve\"`. When `header_type` is set to any other value, `default_header_type` is ignored.", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "default_service_name": { + "description": "Set a default service name to override `unknown-service-name` in the Zipkin spans.", + "type": "string" + }, + "header_type": { + "default": "preserve", + "description": "All HTTP requests going through the plugin are tagged with a tracing HTTP request. This property codifies what kind of tracing header the plugin expects on incoming requests", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "ignore", + "instana", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "type": "string" + }, + "http_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "http_response_header_for_traceid": { + "type": "string" + }, + "http_span_name": { + "default": "method", + "description": "Specify whether to include the HTTP path in the span name.", + "enum": [ + "method", + "method_path" + ], + "type": "string" + }, + "include_credential": { + "default": true, + "description": "Specify whether the credential of the currently authenticated consumer should be included in metadata sent to the Zipkin server.", + "type": "boolean" + }, + "local_service_name": { + "default": "kong", + "description": "The name of the service as displayed in Zipkin.", + "type": "string" + }, + "phase_duration_flavor": { + "default": "annotations", + "description": "Specify whether to include the duration of each phase as an annotation or a tag.", + "enum": [ + "annotations", + "tags" + ], + "type": "string" + }, + "propagation": { + "default": { + "default_format": "b3" + }, + "properties": { + "clear": { + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "default_format": { + "default": "b3", + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "extract": { + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "items": { + "enum": [ + "aws", + "b3", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "w3c" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "inject": { + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "items": { + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sample_ratio": { + "default": 0.001, + "description": "How often to sample requests that do not contain trace IDs. Set to `0` to turn sampling off, or to `1` to sample **all** requests. ", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "static_tags": { + "description": "The tags specified on this property will be added to the generated request traces.", + "items": { + "properties": { + "name": { + "not_one_of": [ + "error", + "http.method", + "http.path", + "http.status_code", + "kong.balancer.state", + "kong.balancer.try", + "kong.consumer", + "kong.credential", + "kong.node.id", + "kong.route", + "kong.service", + "lc", + "peer.hostname" + ], + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "type": "object" + }, + "type": "array" + }, + "tags_header": { + "default": "Zipkin-Tags", + "description": "The Zipkin plugin will add extra headers to the tags associated with any HTTP requests that come with a header named as configured by this property.", + "type": "string" + }, + "traceid_byte_count": { + "default": 16, + "description": "The length in bytes of each request's Trace ID.", + "enum": [ + 8, + 16 + ], + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/zipkin/3.12.json b/json_schemas/zipkin/3.12.json new file mode 100644 index 00000000..2aa1a891 --- /dev/null +++ b/json_schemas/zipkin/3.12.json @@ -0,0 +1,350 @@ +{ + "properties": { + "config": { + "properties": { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "default_header_type": { + "default": "b3", + "description": "Allows specifying the type of header to be added to requests with no pre-existing tracing headers and when `config.header_type` is set to `\"preserve\"`. When `header_type` is set to any other value, `default_header_type` is ignored.", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "default_service_name": { + "description": "Set a default service name to override `unknown-service-name` in the Zipkin spans.", + "type": "string" + }, + "header_type": { + "default": "preserve", + "description": "All HTTP requests going through the plugin are tagged with a tracing HTTP request. This property codifies what kind of tracing header the plugin expects on incoming requests", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "ignore", + "instana", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "type": "string" + }, + "http_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "http_response_header_for_traceid": { + "type": "string" + }, + "http_span_name": { + "default": "method", + "description": "Specify whether to include the HTTP path in the span name.", + "enum": [ + "method", + "method_path" + ], + "type": "string" + }, + "include_credential": { + "default": true, + "description": "Specify whether the credential of the currently authenticated consumer should be included in metadata sent to the Zipkin server.", + "type": "boolean" + }, + "local_service_name": { + "default": "kong", + "description": "The name of the service as displayed in Zipkin.", + "type": "string" + }, + "phase_duration_flavor": { + "default": "annotations", + "description": "Specify whether to include the duration of each phase as an annotation or a tag.", + "enum": [ + "annotations", + "tags" + ], + "type": "string" + }, + "propagation": { + "default": { + "default_format": "b3" + }, + "properties": { + "clear": { + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "items": { + "required": [], + "type": "string" + }, + "type": "array" + }, + "default_format": { + "default": "b3", + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "extract": { + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "items": { + "enum": [ + "aws", + "b3", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "w3c" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "inject": { + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "items": { + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "instana", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "required": [], + "type": "string" + }, + "type": "array" + } + }, + "required": [], + "type": "object" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [], + "type": "object" + }, + "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sample_ratio": { + "default": 0.001, + "description": "How often to sample requests that do not contain trace IDs. Set to `0` to turn sampling off, or to `1` to sample **all** requests. ", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "static_tags": { + "description": "The tags specified on this property will be added to the generated request traces.", + "items": { + "properties": { + "name": { + "not_one_of": [ + "error", + "http.method", + "http.path", + "http.status_code", + "kong.balancer.state", + "kong.balancer.try", + "kong.consumer", + "kong.credential", + "kong.node.id", + "kong.route", + "kong.service", + "lc", + "peer.hostname" + ], + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "type": "object" + }, + "type": "array" + }, + "tags_header": { + "default": "Zipkin-Tags", + "description": "The Zipkin plugin will add extra headers to the tags associated with any HTTP requests that come with a header named as configured by this property.", + "type": "string" + }, + "traceid_byte_count": { + "default": 16, + "description": "The length in bytes of each request's Trace ID.", + "enum": [ + 8, + 16 + ], + "type": "integer" + } + }, + "required": [], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [], + "type": "object" + } + }, + "required": [] +} \ No newline at end of file diff --git a/json_schemas/zipkin/3.4.json b/json_schemas/zipkin/3.4.json new file mode 100644 index 00000000..cf91080e --- /dev/null +++ b/json_schemas/zipkin/3.4.json @@ -0,0 +1,278 @@ +{ + "properties": { + "config": { + "properties": { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "default_header_type": { + "default": "b3", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "default_service_name": { + "description": "Set a default service name to override `unknown-service-name` in the Zipkin spans.", + "type": "string" + }, + "header_type": { + "default": "preserve", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "ignore", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "type": "string" + }, + "http_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "http_response_header_for_traceid": { + "type": "string" + }, + "http_span_name": { + "default": "method", + "description": "Specify whether to include the HTTP path in the span name.", + "enum": [ + "method", + "method_path" + ], + "type": "string" + }, + "include_credential": { + "default": true, + "description": "Specify whether the credential of the currently authenticated consumer should be included in metadata sent to the Zipkin server.", + "type": "boolean" + }, + "local_service_name": { + "default": "kong", + "description": "The name of the service as displayed in Zipkin.", + "type": "string" + }, + "phase_duration_flavor": { + "default": "annotations", + "description": "Specify whether to include the duration of each phase as an annotation or a tag.", + "enum": [ + "annotations", + "tags" + ], + "type": "string" + }, + "queue": { + "properties": { + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sample_ratio": { + "default": 0.001, + "description": "How often to sample requests that do not contain trace IDs. Set to `0` to turn sampling off, or to `1` to sample **all** requests. ", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "static_tags": { + "description": "The tags specified on this property will be added to the generated request traces.", + "items": { + "properties": { + "name": { + "not_one_of": [ + "error", + "http.method", + "http.path", + "http.status_code", + "kong.balancer.state", + "kong.balancer.try", + "kong.consumer", + "kong.credential", + "kong.node.id", + "kong.route", + "kong.service", + "lc", + "peer.hostname" + ], + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "type": "object" + }, + "type": "array" + }, + "tags_header": { + "default": "Zipkin-Tags", + "description": "The Zipkin plugin will add extra headers to the tags associated with any HTTP requests that come with a header named as configured by this property.", + "type": "string" + }, + "traceid_byte_count": { + "default": 16, + "description": "The length in bytes of each request's Trace ID.", + "enum": [ + 8, + 16 + ], + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/zipkin/3.7.json b/json_schemas/zipkin/3.7.json new file mode 100644 index 00000000..a5627e88 --- /dev/null +++ b/json_schemas/zipkin/3.7.json @@ -0,0 +1,357 @@ +{ + "properties": { + "config": { + "properties": { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "default_header_type": { + "default": "b3", + "description": "Allows specifying the type of header to be added to requests with no pre-existing tracing headers and when `config.header_type` is set to `\"preserve\"`. When `header_type` is set to any other value, `default_header_type` is ignored.", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "default_service_name": { + "description": "Set a default service name to override `unknown-service-name` in the Zipkin spans.", + "type": "string" + }, + "header_type": { + "default": "preserve", + "description": "All HTTP requests going through the plugin are tagged with a tracing HTTP request. This property codifies what kind of tracing header the plugin expects on incoming requests", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "ignore", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "type": "string" + }, + "http_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "http_response_header_for_traceid": { + "type": "string" + }, + "http_span_name": { + "default": "method", + "description": "Specify whether to include the HTTP path in the span name.", + "enum": [ + "method", + "method_path" + ], + "type": "string" + }, + "include_credential": { + "default": true, + "description": "Specify whether the credential of the currently authenticated consumer should be included in metadata sent to the Zipkin server.", + "type": "boolean" + }, + "local_service_name": { + "default": "kong", + "description": "The name of the service as displayed in Zipkin.", + "type": "string" + }, + "phase_duration_flavor": { + "default": "annotations", + "description": "Specify whether to include the duration of each phase as an annotation or a tag.", + "enum": [ + "annotations", + "tags" + ], + "type": "string" + }, + "propagation": { + "default": { + "default_format": "b3" + }, + "properties": { + "clear": { + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "default_format": { + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "extract": { + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "items": { + "enum": [ + "aws", + "b3", + "datadog", + "gcp", + "jaeger", + "ot", + "w3c" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "inject": { + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "items": { + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "default_format" + ], + "type": "object" + }, + "queue": { + "properties": { + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sample_ratio": { + "default": 0.001, + "description": "How often to sample requests that do not contain trace IDs. Set to `0` to turn sampling off, or to `1` to sample **all** requests. ", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "static_tags": { + "description": "The tags specified on this property will be added to the generated request traces.", + "items": { + "properties": { + "name": { + "not_one_of": [ + "error", + "http.method", + "http.path", + "http.status_code", + "kong.balancer.state", + "kong.balancer.try", + "kong.consumer", + "kong.credential", + "kong.node.id", + "kong.route", + "kong.service", + "lc", + "peer.hostname" + ], + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "type": "object" + }, + "type": "array" + }, + "tags_header": { + "default": "Zipkin-Tags", + "description": "The Zipkin plugin will add extra headers to the tags associated with any HTTP requests that come with a header named as configured by this property.", + "type": "string" + }, + "traceid_byte_count": { + "default": 16, + "description": "The length in bytes of each request's Trace ID.", + "enum": [ + 8, + 16 + ], + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/zipkin/3.8.json b/json_schemas/zipkin/3.8.json new file mode 100644 index 00000000..0e5554bb --- /dev/null +++ b/json_schemas/zipkin/3.8.json @@ -0,0 +1,366 @@ +{ + "properties": { + "config": { + "properties": { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "default_header_type": { + "default": "b3", + "description": "Allows specifying the type of header to be added to requests with no pre-existing tracing headers and when `config.header_type` is set to `\"preserve\"`. When `header_type` is set to any other value, `default_header_type` is ignored.", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "default_service_name": { + "description": "Set a default service name to override `unknown-service-name` in the Zipkin spans.", + "type": "string" + }, + "header_type": { + "default": "preserve", + "description": "All HTTP requests going through the plugin are tagged with a tracing HTTP request. This property codifies what kind of tracing header the plugin expects on incoming requests", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "ignore", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "type": "string" + }, + "http_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "http_response_header_for_traceid": { + "type": "string" + }, + "http_span_name": { + "default": "method", + "description": "Specify whether to include the HTTP path in the span name.", + "enum": [ + "method", + "method_path" + ], + "type": "string" + }, + "include_credential": { + "default": true, + "description": "Specify whether the credential of the currently authenticated consumer should be included in metadata sent to the Zipkin server.", + "type": "boolean" + }, + "local_service_name": { + "default": "kong", + "description": "The name of the service as displayed in Zipkin.", + "type": "string" + }, + "phase_duration_flavor": { + "default": "annotations", + "description": "Specify whether to include the duration of each phase as an annotation or a tag.", + "enum": [ + "annotations", + "tags" + ], + "type": "string" + }, + "propagation": { + "default": { + "default_format": "b3" + }, + "properties": { + "clear": { + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "default_format": { + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "extract": { + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "items": { + "enum": [ + "aws", + "b3", + "datadog", + "gcp", + "jaeger", + "ot", + "w3c" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "inject": { + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "items": { + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "default_format" + ], + "type": "object" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sample_ratio": { + "default": 0.001, + "description": "How often to sample requests that do not contain trace IDs. Set to `0` to turn sampling off, or to `1` to sample **all** requests. ", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "static_tags": { + "description": "The tags specified on this property will be added to the generated request traces.", + "items": { + "properties": { + "name": { + "not_one_of": [ + "error", + "http.method", + "http.path", + "http.status_code", + "kong.balancer.state", + "kong.balancer.try", + "kong.consumer", + "kong.credential", + "kong.node.id", + "kong.route", + "kong.service", + "lc", + "peer.hostname" + ], + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "type": "object" + }, + "type": "array" + }, + "tags_header": { + "default": "Zipkin-Tags", + "description": "The Zipkin plugin will add extra headers to the tags associated with any HTTP requests that come with a header named as configured by this property.", + "type": "string" + }, + "traceid_byte_count": { + "default": 16, + "description": "The length in bytes of each request's Trace ID.", + "enum": [ + 8, + 16 + ], + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/json_schemas/zipkin/3.9.json b/json_schemas/zipkin/3.9.json new file mode 100644 index 00000000..0e5554bb --- /dev/null +++ b/json_schemas/zipkin/3.9.json @@ -0,0 +1,366 @@ +{ + "properties": { + "config": { + "properties": { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "default_header_type": { + "default": "b3", + "description": "Allows specifying the type of header to be added to requests with no pre-existing tracing headers and when `config.header_type` is set to `\"preserve\"`. When `header_type` is set to any other value, `default_header_type` is ignored.", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "default_service_name": { + "description": "Set a default service name to override `unknown-service-name` in the Zipkin spans.", + "type": "string" + }, + "header_type": { + "default": "preserve", + "description": "All HTTP requests going through the plugin are tagged with a tracing HTTP request. This property codifies what kind of tracing header the plugin expects on incoming requests", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "ignore", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "type": "string" + }, + "http_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "http_response_header_for_traceid": { + "type": "string" + }, + "http_span_name": { + "default": "method", + "description": "Specify whether to include the HTTP path in the span name.", + "enum": [ + "method", + "method_path" + ], + "type": "string" + }, + "include_credential": { + "default": true, + "description": "Specify whether the credential of the currently authenticated consumer should be included in metadata sent to the Zipkin server.", + "type": "boolean" + }, + "local_service_name": { + "default": "kong", + "description": "The name of the service as displayed in Zipkin.", + "type": "string" + }, + "phase_duration_flavor": { + "default": "annotations", + "description": "Specify whether to include the duration of each phase as an annotation or a tag.", + "enum": [ + "annotations", + "tags" + ], + "type": "string" + }, + "propagation": { + "default": { + "default_format": "b3" + }, + "properties": { + "clear": { + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "items": { + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "default_format": { + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "jaeger", + "ot", + "w3c" + ], + "type": "string" + }, + "extract": { + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "items": { + "enum": [ + "aws", + "b3", + "datadog", + "gcp", + "jaeger", + "ot", + "w3c" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "inject": { + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "items": { + "enum": [ + "aws", + "b3", + "b3-single", + "datadog", + "gcp", + "jaeger", + "ot", + "preserve", + "w3c" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "default_format" + ], + "type": "object" + }, + "queue": { + "properties": { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "enum": [ + -1, + 1 + ], + "type": "integer" + }, + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + }, + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "maximum": 3600, + "minimum": 0, + "type": "number" + }, + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "maximum": 1000000, + "minimum": 1, + "type": "integer" + }, + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "maximum": 1000000, + "minimum": 0.001, + "type": "number" + }, + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + "required": [ + + ], + "type": "object" + }, + "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "sample_ratio": { + "default": 0.001, + "description": "How often to sample requests that do not contain trace IDs. Set to `0` to turn sampling off, or to `1` to sample **all** requests. ", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "maximum": 2147483646, + "minimum": 0, + "type": "integer" + }, + "static_tags": { + "description": "The tags specified on this property will be added to the generated request traces.", + "items": { + "properties": { + "name": { + "not_one_of": [ + "error", + "http.method", + "http.path", + "http.status_code", + "kong.balancer.state", + "kong.balancer.try", + "kong.consumer", + "kong.credential", + "kong.node.id", + "kong.route", + "kong.service", + "lc", + "peer.hostname" + ], + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "type": "object" + }, + "type": "array" + }, + "tags_header": { + "default": "Zipkin-Tags", + "description": "The Zipkin plugin will add extra headers to the tags associated with any HTTP requests that come with a header named as configured by this property.", + "type": "string" + }, + "traceid_byte_count": { + "default": 16, + "description": "The length in bytes of each request's Trace ID.", + "enum": [ + 8, + 16 + ], + "type": "integer" + } + }, + "required": [ + + ], + "type": "object" + }, + "consumer": { + "additionalProperties": false, + "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "items": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "enum": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "required": [ + + ], + "type": "string" + }, + "type": "array" + }, + "route": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + }, + "service": { + "additionalProperties": false, + "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + + ], + "type": "object" + } + }, + "required": [ + + ] +} \ No newline at end of file diff --git a/lib/api/client.rb b/lib/api/client.rb index 3b81026d..c7d10016 100644 --- a/lib/api/client.rb +++ b/lib/api/client.rb @@ -30,5 +30,13 @@ def validate_plugin(body) puts e.message end end + + def root + begin + Net::HTTP.get_response(URI("#{@base_url}/")) + rescue Errno::ECONNREFUSED => e + puts e.message + end + end end end diff --git a/lib/convert_json_schema.rb b/lib/convert_json_schema.rb new file mode 100644 index 00000000..95095dd3 --- /dev/null +++ b/lib/convert_json_schema.rb @@ -0,0 +1,316 @@ +require 'json' +require_relative './json_schema/foreign_keys' +require_relative './json_schema/missing_descriptions' +require 'deepsort' + +class ConvertJsonSchema + def self.run!(plugins:, options:) + new(plugins:, options:).run! + end + + FOREIGN_KEYS = %w[consumer consumer_group route service].freeze + BASE_FIELDS = %w[config protocols].freeze + FIELDS = (BASE_FIELDS + FOREIGN_KEYS) + + def initialize(plugins:, options:) + @plugins = plugins + @options = options + end + + def run! + schemas.each_with_object([]) do |(plugin_name, schema), fields| + next unless File.exist?(schema) + + json_schema = JSON.parse(File.read(schema)) + + # TODO: Process all fields. + # @mheap only needs config, so that's all that's implemented + fields = get_fields(json_schema) + JSONSchema::ForeignKeys.run!(fields) + JSONSchema::MissingDescriptions.run!(fields) + + json_schema = convert_to_json_schema(fields, {}) + json_schema = convert_required_list(json_schema) + + # If an entity is required, but no children are required + # it's not actually required + json_schema = remove_object_required_optional_children(json_schema) + + # Fix any broken defaults + json_schema = fix_broken_defaults(json_schema) + json_schema = fix_regex(json_schema) + + # Write the schema to the destination + FileUtils.mkdir_p("#{@options[:destination]}/#{plugin_name}") + dest = File.join(@options[:destination], plugin_name, "#{@options['version'].gsub('.x', '')}.json") + File.write(dest, JSON.pretty_generate(json_schema.deep_sort)) + end + end + + private + + def get_fields(schema) + { + 'properties' => schema.fetch('fields', []).select { |f| FIELDS.any? { |k| f.key?(k) } } + } + end + + def convert_to_json_schema(props, parent) + is_required = true + + # The default value may be in the parent schema if this is + # a reusable schema with an overridden value + if parent["default"]&.is_a?(Hash) + parent['default'].each do |key, value| + if props[key]&.is_a?(Hash) + props[key]['default'] = value + end + end + end + + # Remove required if default is set + is_required = false unless props['default'].nil? + + # If there's an auto field, and we allow auto fields + is_required = false if @options[:allow_auto_fields] && !props['auto'].nil? + + props.delete("required") unless is_required + + # Loop through each field + props = props.each_with_object({}) do |(k, v), fields| + v = convert_type(v) if k == 'type' + k = 'properties' if k == 'fields' + k = 'minimum' if k == 'gt' + k = 'maximum' if k == 'lt' + k = 'minLength' if k == 'len_min' + k = 'maxLength' if k == 'len_max' + k = 'items' if k == 'elements' + k = 'pattern' if k == 'match' + k = 'enum' if k == 'one_of' + + if (k == 'keys' || k == 'values') + fields['additionalProperties'] = true + next + end + + if k == 'between' + fields['minimum'] = v.first + fields['maximum'] = v.last + next + end + + if k == 'uuid' && fields[k] + fields['format'] = 'uuid' + end + + + if !@options[:skip_custom_annotations] + if k == 'encrypted' + note = 'This field is [encrypted](/gateway/keyring/).' + if fields.key?('description') + fields['description'] << "\n#{note}" + else + fields['description'] = note + end + end + + if k == 'referenceable' + note = 'This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).' + if fields.key?('description') + fields['description'] << "\n#{note}" + else + fields['description'] = note + end + end + end + + if k == 'description' + if fields.key?('description') + fields['description'] = "#{v}\n#{fields['description']}" + else + fields['description'] = v + end + end + + # Remove unused fields + next if [ + 'entity_checks', + 'referenceable', + 'reference', + 'encrypted', + 'err', + 'unique', + 'auto', + 'match_none', + 'starts_with', + 'deprecation', + 'description' + ].include?(k) + + if k == 'type' && v == 'foreign' + v = 'string' + end + + if v.is_a?(Array) && v.first.is_a?(Hash) + v = v.reduce({}, :merge) + end + + if v.is_a?(Hash) + v = convert_to_json_schema(v, props) + end + + if k == 'genai_category' && v['enum'] + v['enum'].delete('video/generation') + end + + fields[k] = v + end + + if props['type'] == "number" && props['enum'] + allPropsAreIntegers = props['enum'].select { |e| e.is_a?(Integer) }.length == props['enum'].length + if allPropsAreIntegers + props['type'] = 'integer' + end + end + + props + end + + def convert_required_list(schema) + + schema['required'] = [] if !schema['required'].is_a?(Array) + + if schema['properties'] + + # Fix empty schema properties that should + # be additionalProperties = true + if schema['properties'].is_a?(Array) + schema['properties'] = {} + schema['additionalProperties'] = true + end + + schema['properties'].each do |k, v| + if v['required'] + schema['required'].push(k) + end + + # Always remove required as "required: false" is invalid too + v.delete('required') + + if v['properties'] + v = convert_required_list(v) + end + + if v['items'] + v['items'] = convert_required_list(v['items']) + end + end + + end + + + schema + end + + def remove_object_required_optional_children(schema) + if schema['required'] && schema['properties'] + unused = [] + schema['required'].each do |k| + next unless schema['properties'][k]['type'] == 'object' + + schema['properties'][k] = remove_object_required_optional_children(schema['properties'][k]) + if !schema['properties'][k]['required'] || schema['properties'][k]['required'].size == 0 + unused.push(k) + end + end + + schema['required'] -= unused + end + schema + end + + def fix_regex(schema) + if schema['pattern'] + # Convert Lua pattern to regex + lua_patterns = { + '%a' => '[a-zA-Z]', + '%c' => '[\x00-\x1F]', # Control characters, cannot be replaced with actual characters + '%d' => '[0-9]', + '%g' => '[\x21-\x7E]', # Printable characters, cannot be replaced with actual characters + '%l' => '[a-z]', + '%p' => '[!-/:-@[-`{-~]', # Punctuation characters + '%s' => '[\t\n\v\f\r ]', # Whitespace characters + '%u' => '[A-Z]', + '%w' => '[a-zA-Z0-9]', + '%x' => '[0-9a-fA-F]' + } + + negative_patterns = {} + lua_patterns.each do |lua_pattern, regex| + negative_patterns["[^"+lua_pattern+"]"] = "[^#{regex[1..-2]}]" + end + + lua_patterns = negative_patterns.merge(lua_patterns) + + lua_patterns.each do |lua_pattern, regex| + schema['pattern'] = schema['pattern'].gsub(lua_pattern, regex) + end + + # Escape forward slashes + schema['pattern'] = schema['pattern'].gsub('%/', '\\/') + end + + if schema['items'] + schema['items'] = fix_regex(schema['items']) + end + + return schema + end + + def fix_broken_defaults(schema) + if schema['default'] && schema['type'] == 'object' && schema['default'].is_a?(Array) + schema.delete('default') + end + + if schema['default'] && schema['type'] == 'array' && schema['default'].is_a?(Hash) + schema['default'] = [schema['default']] + end + + if schema['properties'] + schema['properties'].each do |k, v| + schema['properties'][k] = fix_broken_defaults(v) + schema['properties'][k] = fix_regex(schema['properties'][k]) + end + end + + if schema['items'] + schema['items'] = fix_broken_defaults(schema['items']) + end + + return schema + end + + + def convert_type(type) + case type + when 'record' + 'object' + when 'map' + 'object' + when 'set' + 'array' + else + type + end + end + + def schemas + @schemas ||= @plugins.map do |plugin_name| + [plugin_name, schema_path(plugin_name)] + end + end + + def schema_path(plugin) + File.join(@options['source'], plugin, "#{@options['version']}.json") + end +end diff --git a/lib/data_copier.rb b/lib/data_copier.rb new file mode 100644 index 00000000..d2a73206 --- /dev/null +++ b/lib/data_copier.rb @@ -0,0 +1,32 @@ +require 'fileutils' + +class DataCopier + def self.run!(options:) + new(options:).run! + end + + def initialize(options:) + @options = options + end + + def run! + folders = Dir.glob("#{@options['source']}/**/*").select do |path| + File.directory?(path) && Dir.glob("#{path}/*").none? { |sub| File.directory?(sub) } + end + + folders.each do |folder| + latest = find_latest(folder) + FileUtils.cp(latest, new_path(folder)) + end + end + + private + + def find_latest(folder) + Dir["#{folder}/*.json"].sort.last + end + + def new_path(folder) + [folder, "#{@options[:version]}.json"].join('/') + end +end diff --git a/lib/example_validator.rb b/lib/example_validator.rb index 5410d4f5..63b45a3f 100644 --- a/lib/example_validator.rb +++ b/lib/example_validator.rb @@ -50,6 +50,6 @@ def request_body end def file_path - File.join(@options[:source], @plugin, "#{@options[:version]}.yaml") + File.join(@options[:source], @plugin, "_#{@options[:version]}.yaml") end end diff --git a/lib/json_schema/foreign_keys.rb b/lib/json_schema/foreign_keys.rb new file mode 100644 index 00000000..cdcc20fd --- /dev/null +++ b/lib/json_schema/foreign_keys.rb @@ -0,0 +1,44 @@ +require 'yaml' + +module JSONSchema + class ForeignKeys + def self.run!(schema) + new(schema).run! + end + + def initialize(schema) + @schema = schema + end + + def run! + unsupported_entities.each { |e| properties.delete(e) } + properties.concat(supported_entities) + end + + private + + def properties + @properties ||= @schema['properties'] + end + + def unsupported_entities + @unsupported_entities ||= properties.select do |prop| + available_entities.any? { |k| prop.key?(k) } + end + end + + def supported_entities + @supported_entities ||= foreign_keys + .except(*unsupported_entities.flat_map(&:keys)) + .map { |k, v| { k => v } } + end + + def foreign_keys + @foreign_keys ||= YAML.load(File.read('./config/foreign_keys.yaml')) + end + + def available_entities + @available_entities ||= foreign_keys.keys + end + end +end diff --git a/lib/json_schema/missing_descriptions.rb b/lib/json_schema/missing_descriptions.rb new file mode 100644 index 00000000..36c0173e --- /dev/null +++ b/lib/json_schema/missing_descriptions.rb @@ -0,0 +1,34 @@ +require 'yaml' + +module JSONSchema + class MissingDescriptions + def self.run!(schema) + new(schema).run! + end + + def initialize(schema) + @schema = schema + end + + def run! + @schema.fetch('properties', []).map do |prop| + key = prop.keys.first + values = prop.values.first + + next if values.key?('description') + + values['description'] = descriptions[key] if descriptions.key?(key) + end + end + + private + + def properties + @properties ||= @schema['properties'] + end + + def descriptions + @descriptions ||= YAML.load(File.read('./config/descriptions.yaml')) + end + end +end diff --git a/lib/plugin_priorities.rb b/lib/plugin_priorities.rb new file mode 100644 index 00000000..bf3d27a0 --- /dev/null +++ b/lib/plugin_priorities.rb @@ -0,0 +1,68 @@ +require 'json' +require 'fileutils' +require_relative 'api/client' + +class PluginPriorities + def self.run!(options:) + new(options:).run! + end + + def initialize(options:) + @options = options + @client = API::Client.new(host: @options[:host], port: @options[:port]) + end + + def run! + create_folders + + @res = @client.root + + process_response + end + + private + + def process_response + if success? + @response = JSON.parse(@res.body) + + if @options['verbose'] + puts 'Plugins ordered by priority' + puts JSON.pretty_generate(priorities) + else + puts "#{success? ? '✅' : '❌'}" + end + + write_to_file(priorities) + end + end + + def success? + @res && @res.code == '200' + end + + def priorities + @priorities ||= @response + .dig('plugins', 'available_on_server') + .each_with_object({}) do |(k, v), hash| + next if k == 'konnect-application-auth' + + hash[k] = v['priority'] + end + .sort_by { |k, v| [-v, k] } + .to_h + end + + def write_to_file(priorities) + File.write(file_path, JSON.pretty_generate(priorities)) + end + + def file_path + "#{@options[:destination]}/priorities/#{@options[:type]}/#{@options[:version]}.json" + end + + def create_folders + FileUtils.mkdir_p("#{@options[:destination]}/priorities/ee") + FileUtils.mkdir_p("#{@options[:destination]}/priorities/oss") + end +end diff --git a/lib/schema_copier.rb b/lib/schema_copier.rb new file mode 100644 index 00000000..abd7dfef --- /dev/null +++ b/lib/schema_copier.rb @@ -0,0 +1,35 @@ +require 'fileutils' + +class SchemaCopier + def self.run!(plugin:, options:) + new(plugin:, options:).run! + end + + def initialize(plugin:, options:) + @plugin = plugin + @options = options + end + + def run! + unless File.exist?("#{@options['source']}/#{@plugin}") + puts "#{@options['source']}/#{@plugin} does not exist" + return + end + if latest_example.nil? || !File.exist?(latest_example) + puts "Latest schema for #{@plugin} does not exist" + return + end + + FileUtils.cp(latest_example, new_path) + end + + private + + def latest_example + @latest_example ||= Dir["#{@options['source']}/#{@plugin}/*.json"].sort.last + end + + def new_path + [@options['source'], @plugin, "#{@options[:version]}.json"].join('/') + end +end diff --git a/plugins b/plugins index f37f5894..ecc9c5f7 100755 --- a/plugins +++ b/plugins @@ -2,8 +2,12 @@ require 'thor' require_relative 'lib/schema_downloader' require_relative 'lib/example_validator' +require_relative 'lib/data_copier' require_relative 'lib/example_copier' +require_relative 'lib/schema_copier' require_relative 'lib/referenceable_fields' +require_relative 'lib/plugin_priorities' +require_relative 'lib/convert_json_schema' class Plugins < Thor class_option :verbose, :type => :boolean @@ -58,6 +62,31 @@ class Plugins < Thor puts 'Done!' end + desc 'copy_schemas', 'Copy latest schemas' + option :version, aliases: '-v', type: :string, required: true, default: 'index', desc: 'Kong Version' + option :plugins, aliases: '-p', type: :array, required: true, desc: 'List containing the name of the plugins' + option :source, aliases: '-s', type: :string, default: './schemas', desc: 'Source folder containing the schemas' + def copy_schemas + puts 'Copying schemas...' + + options[:plugins].each do |plugin| + SchemaCopier.run!(plugin:, options:) + end + + puts 'Done!' + end + + desc 'copy_data_files', 'Copy data files' + option :version, aliases: '-v', type: :string, required: true, desc: 'Kong Version' + option :source, aliases: '-s', type: :string, default: './data', desc: 'Source folder containing the data files' + def copy_data_files + puts 'Copying files...' + + DataCopier.run!(options:) + + puts 'Done!' + end + desc 'generate_referenceable_fields_list', 'Generates a json object listing all the referenceable fields for each plugin' option :version, aliases: '-v', type: :string, required: true, desc: 'Kong Version' option :plugins, aliases: '-p', type: :array, required: true, desc: 'List containing the name of the plugins' @@ -70,6 +99,35 @@ class Plugins < Thor puts 'Done!' end + + desc 'generate_plugin_priorities', 'Generates a json object listing all the plugins and their corresponding priorities' + option :version, aliases: '-v', type: :string, required: true, desc: 'Kong Version' + option :host, aliases: '-d', type: :string, default: 'localhost', desc: 'Hostname of the server running the API.' + option :port, aliases: '-h', type: :numeric, default: 8001, desc: 'Port number' + option :type, aliases: '-t', enum: %w(oss ee), required: true, desc: 'Specify whether the API running is the OSS or Enterprise version' + option :destination, aliases: '-dest', type: :string, default: './data', desc: 'Destination folder where the json object containing the plugins and their priorities will be written' + def generate_plugin_priorities + puts 'Listing plugins and their priorities...' + + PluginPriorities.run!(options: options) + + puts 'Done!' + end + + desc 'convert_json_schema', 'Converts Kong plugin schema to JSON schema' + option :version, aliases: '-v', type: :string, required: true, desc: 'Kong Version' + option :plugins, aliases: '-p', type: :array, required: true, desc: 'List containing the name of the plugins' + option :source, aliases: '-s', type: :string, default: './schemas', desc: 'Source folder containing the schemas' + option :destination, aliases: '--dest', type: :string, default: './json_schemas', desc: 'Destination folder where the schemas will be written' + option :skip_custom_annotations, aliases: '--skip-custom-annotations', type: :boolean, default: false, desc: 'Skip custom annotations' + option :allow_auto_fields, aliases: '--allow-auto-fields', type: :boolean, default: false, desc: 'Do not make a field required if it has auto: true' + def convert_json_schema + puts 'Converting plugins to JSON schema...' + + ConvertJsonSchema.run!(plugins: options[:plugins], options: options) + + puts 'Done!' + end end Plugins.start(ARGV) diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..5db72dd6 --- /dev/null +++ b/renovate.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ] +} diff --git a/schemas/.DS_Store b/schemas/.DS_Store new file mode 100644 index 00000000..0067c7c3 Binary files /dev/null and b/schemas/.DS_Store differ diff --git a/schemas/acl/3.10.x.json b/schemas/acl/3.10.x.json new file mode 100644 index 00000000..3137cc09 --- /dev/null +++ b/schemas/acl/3.10.x.json @@ -0,0 +1,106 @@ +{ + "entity_checks": [ + { + "only_one_of": [ + "config.allow", + "config.deny" + ] + }, + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "allow": { + "description": "Arbitrary group names that are allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "deny": { + "description": "Arbitrary group names that are not allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "hide_groups_header": { + "description": "If enabled (`true`), prevents the `X-Consumer-Groups` header from being sent in the request to the upstream service.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "include_consumer_groups": { + "description": "If enabled (`true`), allows the consumer-groups to be used in the `allow|deny` fields", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "always_use_authenticated_groups": { + "description": "If enabled (`true`), the authenticated groups will always be used even when an authenticated consumer already exists. If the authenticated groups don't exist, it will fallback to use the groups associated with the consumer. By default the authenticated groups will only be used when there is no consumer or the consumer is anonymous.", + "type": "boolean", + "default": false, + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/acl/3.11.x.json b/schemas/acl/3.11.x.json new file mode 100644 index 00000000..b0bdfcf8 --- /dev/null +++ b/schemas/acl/3.11.x.json @@ -0,0 +1,106 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "allow": { + "type": "array", + "description": "Arbitrary group names that are allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "elements": { + "type": "string" + } + } + }, + { + "deny": { + "type": "array", + "description": "Arbitrary group names that are not allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "elements": { + "type": "string" + } + } + }, + { + "hide_groups_header": { + "description": "If enabled (`true`), prevents the `X-Consumer-Groups` header from being sent in the request to the upstream service.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "include_consumer_groups": { + "description": "If enabled (`true`), allows the consumer-groups to be used in the `allow|deny` fields", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "always_use_authenticated_groups": { + "description": "If enabled (`true`), the authenticated groups will always be used even when an authenticated consumer already exists. If the authenticated groups don't exist, it will fallback to use the groups associated with the consumer. By default the authenticated groups will only be used when there is no consumer or the consumer is anonymous.", + "required": true, + "default": false, + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "only_one_of": [ + "config.allow", + "config.deny" + ] + }, + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/acl/3.12.x.json b/schemas/acl/3.12.x.json new file mode 100644 index 00000000..d5e8b451 --- /dev/null +++ b/schemas/acl/3.12.x.json @@ -0,0 +1,106 @@ +{ + "entity_checks": [ + { + "only_one_of": [ + "config.allow", + "config.deny" + ] + }, + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } + ], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "allow": { + "description": "Arbitrary group names that are allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "deny": { + "description": "Arbitrary group names that are not allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "hide_groups_header": { + "description": "If enabled (`true`), prevents the `X-Consumer-Groups` header from being sent in the request to the upstream service.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "include_consumer_groups": { + "description": "If enabled (`true`), allows the consumer-groups to be used in the `allow|deny` fields", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "always_use_authenticated_groups": { + "description": "If enabled (`true`), the authenticated groups will always be used even when an authenticated consumer already exists. If the authenticated groups don't exist, it will fallback to use the groups associated with the consumer. By default the authenticated groups will only be used when there is no consumer or the consumer is anonymous.", + "default": false, + "type": "boolean", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/acl/3.4.x.json b/schemas/acl/3.4.x.json index b3c90235..11667e9c 100644 --- a/schemas/acl/3.4.x.json +++ b/schemas/acl/3.4.x.json @@ -2,8 +2,17 @@ "fields": [ { "consumer": { - "eq": null, "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, @@ -15,49 +24,67 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } } }, { "config": { - "required": true, "fields": [ { "allow": { + "type": "array", + "description": "Arbitrary group names that are allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", "elements": { "type": "string" - }, - "type": "array" + } } }, { "deny": { + "type": "array", + "description": "Arbitrary group names that are not allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", "elements": { "type": "string" - }, - "type": "array" + } } }, { "hide_groups_header": { "default": false, "type": "boolean", + "description": "If enabled (`true`), prevents the `X-Consumer-Groups` header from being sent in the request to the upstream service.", "required": true } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + { + "only_one_of": [ + "config.allow", + "config.deny" + ] + }, + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } ] } \ No newline at end of file diff --git a/schemas/acl/3.5.x.json b/schemas/acl/3.5.x.json new file mode 100644 index 00000000..e0c813b4 --- /dev/null +++ b/schemas/acl/3.5.x.json @@ -0,0 +1,90 @@ +{ + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "fields": [ + { + "allow": { + "type": "array", + "description": "Arbitrary group names that are allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "elements": { + "type": "string" + } + } + }, + { + "deny": { + "type": "array", + "description": "Arbitrary group names that are not allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "elements": { + "type": "string" + } + } + }, + { + "hide_groups_header": { + "default": false, + "type": "boolean", + "description": "If enabled (`true`), prevents the `X-Consumer-Groups` header from being sent in the request to the upstream service.", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "only_one_of": [ + "config.allow", + "config.deny" + ] + }, + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/acl/3.6.x.json b/schemas/acl/3.6.x.json new file mode 100644 index 00000000..e380950d --- /dev/null +++ b/schemas/acl/3.6.x.json @@ -0,0 +1,97 @@ +{ + "entity_checks": [ + { + "only_one_of": [ + "config.allow", + "config.deny" + ] + }, + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "allow": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Arbitrary group names that are allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified." + } + }, + { + "deny": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Arbitrary group names that are not allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified." + } + }, + { + "hide_groups_header": { + "required": true, + "type": "boolean", + "default": false, + "description": "If enabled (`true`), prevents the `X-Consumer-Groups` header from being sent in the request to the upstream service." + } + }, + { + "include_consumer_groups": { + "required": false, + "type": "boolean", + "default": false + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/acl/3.7.x.json b/schemas/acl/3.7.x.json new file mode 100644 index 00000000..3209ec69 --- /dev/null +++ b/schemas/acl/3.7.x.json @@ -0,0 +1,97 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "allow": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Arbitrary group names that are allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified." + } + }, + { + "deny": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Arbitrary group names that are not allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified." + } + }, + { + "hide_groups_header": { + "required": true, + "type": "boolean", + "description": "If enabled (`true`), prevents the `X-Consumer-Groups` header from being sent in the request to the upstream service.", + "default": false + } + }, + { + "include_consumer_groups": { + "required": false, + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "only_one_of": [ + "config.allow", + "config.deny" + ] + }, + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/acl/3.8.x.json b/schemas/acl/3.8.x.json new file mode 100644 index 00000000..8ed6b9be --- /dev/null +++ b/schemas/acl/3.8.x.json @@ -0,0 +1,105 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "allow": { + "description": "Arbitrary group names that are allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "deny": { + "description": "Arbitrary group names that are not allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "hide_groups_header": { + "description": "If enabled (`true`), prevents the `X-Consumer-Groups` header from being sent in the request to the upstream service.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "include_consumer_groups": { + "required": false, + "type": "boolean", + "default": false + } + }, + { + "always_use_authenticated_groups": { + "description": "If enabled (`true`), the authenticated groups will always be used even when an authenticated consumer already exists. If the authenticated groups don't exist, it will fallback to use the groups associated with the consumer. By default the authenticated groups will only be used when there is no consumer or the consumer is anonymous.", + "type": "boolean", + "required": true, + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "only_one_of": [ + "config.allow", + "config.deny" + ] + }, + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/acl/3.9.x.json b/schemas/acl/3.9.x.json new file mode 100644 index 00000000..ddcf7860 --- /dev/null +++ b/schemas/acl/3.9.x.json @@ -0,0 +1,106 @@ +{ + "entity_checks": [ + { + "only_one_of": [ + "config.allow", + "config.deny" + ] + }, + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "allow": { + "elements": { + "type": "string" + }, + "description": "Arbitrary group names that are allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "type": "array" + } + }, + { + "deny": { + "elements": { + "type": "string" + }, + "description": "Arbitrary group names that are not allowed to consume the service or route. One of `config.allow` or `config.deny` must be specified.", + "type": "array" + } + }, + { + "hide_groups_header": { + "default": false, + "description": "If enabled (`true`), prevents the `X-Consumer-Groups` header from being sent in the request to the upstream service.", + "required": true, + "type": "boolean" + } + }, + { + "include_consumer_groups": { + "default": false, + "description": "If enabled (`true`), allows the consumer-groups to be used in the `allow|deny` fields", + "required": false, + "type": "boolean" + } + }, + { + "always_use_authenticated_groups": { + "default": false, + "description": "If enabled (`true`), the authenticated groups will always be used even when an authenticated consumer already exists. If the authenticated groups don't exist, it will fallback to use the groups associated with the consumer. By default the authenticated groups will only be used when there is no consumer or the consumer is anonymous.", + "required": true, + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/acme/3.10.x.json b/schemas/acme/3.10.x.json new file mode 100644 index 00000000..55421531 --- /dev/null +++ b/schemas/acme/3.10.x.json @@ -0,0 +1,628 @@ +{ + "entity_checks": [ + { + "conditional": { + "then_err": "terms of service must be accepted, see https://letsencrypt.org/repository/", + "if_match": { + "one_of": [ + "https://acme-v02.api.letsencrypt.org", + "https://acme-staging-v02.api.letsencrypt.org" + ] + }, + "then_field": "config.tos_accepted", + "if_field": "config.api_uri", + "then_match": { + "eq": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.storage_config.redis.host", + "if_field": "config.storage", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.storage_config.redis.port", + "if_field": "config.storage", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.storage" + ] + } + } + ], + "supported_partials": { + "redis-ce": [ + "config.storage_config.redis" + ] + }, + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "service": { + "reference": "services", + "description": "A reference to the 'services' table with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "route": { + "reference": "routes", + "description": "A reference to the 'routes' table with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "account_email": { + "type": "string", + "match": "%w*%p*@+%w*%.?%w*", + "referenceable": true, + "description": "The account identifier. Can be reused in a different plugin instance.", + "encrypted": true, + "required": true + } + }, + { + "account_key": { + "description": "The private key associated with the account.", + "type": "record", + "required": false, + "fields": [ + { + "key_id": { + "description": "The Key ID.", + "type": "string", + "required": true + } + }, + { + "key_set": { + "description": "The ID of the key set to associate the Key ID with.", + "type": "string" + } + } + ] + } + }, + { + "api_uri": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "default": "https://acme-v02.api.letsencrypt.org/directory", + "type": "string" + } + }, + { + "tos_accepted": { + "description": "If you are using Let's Encrypt, you must set this to `true` to agree the terms of service.", + "default": false, + "type": "boolean" + } + }, + { + "eab_kid": { + "description": "External account binding (EAB) key id. You usually don't need to set this unless it is explicitly required by the CA.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "eab_hmac_key": { + "description": "External account binding (EAB) base64-encoded URL string of the HMAC key. You usually don't need to set this unless it is explicitly required by the CA.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "cert_type": { + "description": "The certificate type to create. The possible values are `rsa` for RSA certificate or `ecc` for EC certificate.", + "default": "rsa", + "type": "string", + "one_of": [ + "rsa", + "ecc" + ] + } + }, + { + "rsa_key_size": { + "description": "RSA private key size for the certificate. The possible values are 2048, 3072, or 4096.", + "default": 4096, + "type": "number", + "one_of": [ + 2048, + 3072, + 4096 + ] + } + }, + { + "renew_threshold_days": { + "description": "Days remaining to renew the certificate before it expires.", + "default": 14, + "type": "number" + } + }, + { + "domains": { + "description": "An array of strings representing hosts. A valid host is a string containing one or more labels separated by periods, with at most one wildcard label ('*')", + "elements": { + "match_all": [ + { + "err": "invalid wildcard: must have at most one wildcard", + "pattern": "^[^*]*%*?[^*]*$" + } + ], + "type": "string", + "match_any": { + "err": "invalid wildcard: must be placed at leftmost or rightmost label", + "patterns": [ + "^%*%.", + "%.%*$", + "^[^*]*$" + ] + } + }, + "type": "array" + } + }, + { + "allow_any_domain": { + "description": "If set to `true`, the plugin allows all domains and ignores any values in the `domains` list.", + "default": false, + "type": "boolean" + } + }, + { + "fail_backoff_minutes": { + "description": "Minutes to wait for each domain that fails to create a certificate. This applies to both a\nnew certificate and a renewal certificate.", + "default": 5, + "type": "number" + } + }, + { + "storage": { + "description": "The backend storage type to use. In DB-less mode and Konnect, `kong` storage is unavailable. In hybrid mode and Konnect, `shm` storage is unavailable. `shm` storage does not persist during Kong restarts and does not work for Kong running on different machines, so consider using one of `kong`, `redis`, `consul`, or `vault` in production.", + "default": "shm", + "type": "string", + "one_of": [ + "kong", + "shm", + "redis", + "consul", + "vault" + ] + } + }, + { + "storage_config": { + "type": "record", + "fields": [ + { + "shm": { + "type": "record", + "fields": [ + { + "shm_name": { + "description": "Name of shared memory zone used for Kong API gateway storage", + "type": "string", + "default": "kong" + } + } + ], + "required": true + } + }, + { + "kong": { + "type": "record", + "fields": [ + + ], + "required": true + } + }, + { + "redis": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "type": "string", + "referenceable": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "len_min": 0 + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "extra_options": { + "description": "Custom ACME Redis options", + "type": "record", + "fields": [ + { + "namespace": { + "type": "string", + "len_min": 0, + "description": "A namespace to prepend to all keys stored in Redis.", + "default": "", + "required": true + } + }, + { + "scan_count": { + "description": "The number of keys to return in Redis SCAN calls.", + "default": 10, + "type": "number", + "required": false + } + } + ], + "required": true + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "auth": { + "type": "string", + "len_min": 0, + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "password" + ] + } + ], + "message": "acme: config.storage_config.redis.auth is deprecated, please use config.storage_config.redis.password instead" + } + } + }, + { + "ssl_server_name": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "server_name" + ] + } + ], + "message": "acme: config.storage_config.redis.ssl_server_name is deprecated, please use config.storage_config.redis.server_name instead" + }, + "type": "string" + } + }, + { + "namespace": { + "type": "string", + "len_min": 0, + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "extra_options", + "namespace" + ] + } + ], + "message": "acme: config.storage_config.redis.namespace is deprecated, please use config.storage_config.redis.extra_options.namespace instead" + } + } + }, + { + "scan_count": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "extra_options", + "scan_count" + ] + } + ], + "message": "acme: config.storage_config.redis.scan_count is deprecated, please use config.storage_config.redis.extra_options.scan_count instead" + }, + "type": "integer" + } + } + ], + "required": true + } + }, + { + "consul": { + "type": "record", + "fields": [ + { + "https": { + "description": "Boolean representation of https.", + "default": false, + "type": "boolean" + } + }, + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "kv_path": { + "description": "KV prefix path.", + "type": "string" + } + }, + { + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + } + }, + { + "token": { + "description": "Consul ACL token.", + "type": "string", + "referenceable": true + } + } + ], + "required": true + } + }, + { + "vault": { + "type": "record", + "fields": [ + { + "https": { + "description": "Boolean representation of https.", + "default": false, + "type": "boolean" + } + }, + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "kv_path": { + "description": "KV prefix path.", + "type": "string" + } + }, + { + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + } + }, + { + "token": { + "description": "Consul ACL token.", + "type": "string", + "referenceable": true + } + }, + { + "tls_verify": { + "description": "Turn on TLS verification.", + "default": true, + "type": "boolean" + } + }, + { + "tls_server_name": { + "description": "SNI used in request, default to host if omitted.", + "type": "string" + } + }, + { + "auth_method": { + "description": "Auth Method, default to token, can be 'token' or 'kubernetes'.", + "default": "token", + "type": "string", + "one_of": [ + "token", + "kubernetes" + ] + } + }, + { + "auth_path": { + "description": "Vault's authentication path to use.", + "type": "string" + } + }, + { + "auth_role": { + "description": "The role to try and assign.", + "type": "string" + } + }, + { + "jwt_path": { + "description": "The path to the JWT.", + "type": "string" + } + } + ], + "required": true + } + } + ], + "required": true + } + }, + { + "preferred_chain": { + "description": "A string value that specifies the preferred certificate chain to use when generating certificates.", + "type": "string" + } + }, + { + "enable_ipv4_common_name": { + "description": "A boolean value that controls whether to include the IPv4 address in the common name field of generated certificates.", + "default": true, + "type": "boolean" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/acme/3.11.x.json b/schemas/acme/3.11.x.json new file mode 100644 index 00000000..0ab8ca78 --- /dev/null +++ b/schemas/acme/3.11.x.json @@ -0,0 +1,628 @@ +{ + "entity_checks": [ + { + "conditional": { + "then_err": "terms of service must be accepted, see https://letsencrypt.org/repository/", + "if_match": { + "one_of": [ + "https://acme-v02.api.letsencrypt.org", + "https://acme-staging-v02.api.letsencrypt.org" + ] + }, + "then_field": "config.tos_accepted", + "if_field": "config.api_uri", + "then_match": { + "eq": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.storage_config.redis.host", + "if_field": "config.storage", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.storage_config.redis.port", + "if_field": "config.storage", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.storage" + ] + } + } + ], + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "service": { + "description": "A reference to the 'services' table with a null value allowed.", + "eq": null, + "reference": "services", + "type": "foreign" + } + }, + { + "route": { + "description": "A reference to the 'routes' table with a null value allowed.", + "eq": null, + "reference": "routes", + "type": "foreign" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "account_email": { + "match": "%w*%p*@+%w*%.?%w*", + "required": true, + "description": "The account identifier. Can be reused in a different plugin instance.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "account_key": { + "description": "The private key associated with the account.", + "required": false, + "fields": [ + { + "key_id": { + "required": true, + "description": "The Key ID.", + "type": "string" + } + }, + { + "key_set": { + "description": "The ID of the key set to associate the Key ID with.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "api_uri": { + "default": "https://acme-v02.api.letsencrypt.org/directory", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "tos_accepted": { + "description": "If you are using Let's Encrypt, you must set this to `true` to agree the terms of service.", + "default": false, + "type": "boolean" + } + }, + { + "eab_kid": { + "type": "string", + "description": "External account binding (EAB) key id. You usually don't need to set this unless it is explicitly required by the CA.", + "referenceable": true, + "encrypted": true + } + }, + { + "eab_hmac_key": { + "type": "string", + "description": "External account binding (EAB) base64-encoded URL string of the HMAC key. You usually don't need to set this unless it is explicitly required by the CA.", + "referenceable": true, + "encrypted": true + } + }, + { + "cert_type": { + "one_of": [ + "rsa", + "ecc" + ], + "description": "The certificate type to create. The possible values are `rsa` for RSA certificate or `ecc` for EC certificate.", + "default": "rsa", + "type": "string" + } + }, + { + "rsa_key_size": { + "one_of": [ + 2048, + 3072, + 4096 + ], + "description": "RSA private key size for the certificate. The possible values are 2048, 3072, or 4096.", + "default": 4096, + "type": "number" + } + }, + { + "renew_threshold_days": { + "description": "Days remaining to renew the certificate before it expires.", + "default": 14, + "type": "number" + } + }, + { + "domains": { + "elements": { + "match_any": { + "err": "invalid wildcard: must be placed at leftmost or rightmost label", + "patterns": [ + "^%*%.", + "%.%*$", + "^[^*]*$" + ] + }, + "match_all": [ + { + "pattern": "^[^*]*%*?[^*]*$", + "err": "invalid wildcard: must have at most one wildcard" + } + ], + "type": "string" + }, + "description": "An array of strings representing hosts. A valid host is a string containing one or more labels separated by periods, with at most one wildcard label ('*')", + "type": "array" + } + }, + { + "allow_any_domain": { + "description": "If set to `true`, the plugin allows all domains and ignores any values in the `domains` list.", + "default": false, + "type": "boolean" + } + }, + { + "fail_backoff_minutes": { + "description": "Minutes to wait for each domain that fails to create a certificate. This applies to both a\nnew certificate and a renewal certificate.", + "default": 5, + "type": "number" + } + }, + { + "storage": { + "one_of": [ + "kong", + "shm", + "redis", + "consul", + "vault" + ], + "description": "The backend storage type to use. In DB-less mode and Konnect, `kong` storage is unavailable. In hybrid mode and Konnect, `shm` storage is unavailable. `shm` storage does not persist during Kong restarts and does not work for Kong running on different machines, so consider using one of `kong`, `redis`, `consul`, or `vault` in production.", + "default": "shm", + "type": "string" + } + }, + { + "storage_config": { + "required": true, + "fields": [ + { + "shm": { + "required": true, + "fields": [ + { + "shm_name": { + "description": "Name of shared memory zone used for Kong API gateway storage", + "default": "kong", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "kong": { + "required": true, + "fields": [ + + ], + "type": "record" + } + }, + { + "redis": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "len_min": 0, + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "extra_options": { + "description": "Custom ACME Redis options", + "required": true, + "fields": [ + { + "namespace": { + "required": true, + "description": "A namespace to prepend to all keys stored in Redis.", + "len_min": 0, + "default": "", + "type": "string" + } + }, + { + "scan_count": { + "default": 10, + "required": false, + "description": "The number of keys to return in Redis SCAN calls.", + "type": "number" + } + } + ], + "type": "record" + } + } + ], + "required": true, + "shorthand_fields": [ + { + "auth": { + "len_min": 0, + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "password" + ] + } + ], + "message": "acme: config.storage_config.redis.auth is deprecated, please use config.storage_config.redis.password instead" + }, + "type": "string" + } + }, + { + "ssl_server_name": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "server_name" + ] + } + ], + "message": "acme: config.storage_config.redis.ssl_server_name is deprecated, please use config.storage_config.redis.server_name instead" + }, + "type": "string" + } + }, + { + "namespace": { + "len_min": 0, + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "extra_options", + "namespace" + ] + } + ], + "message": "acme: config.storage_config.redis.namespace is deprecated, please use config.storage_config.redis.extra_options.namespace instead" + }, + "type": "string" + } + }, + { + "scan_count": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "extra_options", + "scan_count" + ] + } + ], + "message": "acme: config.storage_config.redis.scan_count is deprecated, please use config.storage_config.redis.extra_options.scan_count instead" + }, + "type": "integer" + } + } + ], + "type": "record" + } + }, + { + "consul": { + "required": true, + "fields": [ + { + "https": { + "description": "Boolean representation of https.", + "default": false, + "type": "boolean" + } + }, + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "kv_path": { + "description": "KV prefix path.", + "type": "string" + } + }, + { + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + } + }, + { + "token": { + "referenceable": true, + "description": "Consul ACL token.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "vault": { + "required": true, + "fields": [ + { + "https": { + "description": "Boolean representation of https.", + "default": false, + "type": "boolean" + } + }, + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "kv_path": { + "description": "KV prefix path.", + "type": "string" + } + }, + { + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + } + }, + { + "token": { + "referenceable": true, + "description": "Consul ACL token.", + "type": "string" + } + }, + { + "tls_verify": { + "description": "Turn on TLS verification.", + "default": true, + "type": "boolean" + } + }, + { + "tls_server_name": { + "description": "SNI used in request, default to host if omitted.", + "type": "string" + } + }, + { + "auth_method": { + "one_of": [ + "token", + "kubernetes" + ], + "default": "token", + "description": "Auth Method, default to token, can be 'token' or 'kubernetes'.", + "type": "string" + } + }, + { + "auth_path": { + "description": "Vault's authentication path to use.", + "type": "string" + } + }, + { + "auth_role": { + "description": "The role to try and assign.", + "type": "string" + } + }, + { + "jwt_path": { + "description": "The path to the JWT.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "preferred_chain": { + "description": "A string value that specifies the preferred certificate chain to use when generating certificates.", + "type": "string" + } + }, + { + "enable_ipv4_common_name": { + "description": "A boolean value that controls whether to include the IPv4 address in the common name field of generated certificates.", + "default": true, + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "supported_partials": { + "redis-ce": [ + "config.storage_config.redis" + ] + } +} \ No newline at end of file diff --git a/schemas/acme/3.12.x.json b/schemas/acme/3.12.x.json new file mode 100644 index 00000000..8388a924 --- /dev/null +++ b/schemas/acme/3.12.x.json @@ -0,0 +1,626 @@ +{ + "supported_partials": { + "redis-ce": [ + "config.storage_config.redis" + ] + }, + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "service": { + "type": "foreign", + "reference": "services", + "description": "A reference to the 'services' table with a null value allowed.", + "eq": null + } + }, + { + "route": { + "type": "foreign", + "reference": "routes", + "description": "A reference to the 'routes' table with a null value allowed.", + "eq": null + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "account_email": { + "type": "string", + "match": "%w*%p*@+%w*%.?%w*", + "required": true, + "encrypted": true, + "referenceable": true, + "description": "The account identifier. Can be reused in a different plugin instance." + } + }, + { + "account_key": { + "type": "record", + "fields": [ + { + "key_id": { + "type": "string", + "description": "The Key ID.", + "required": true + } + }, + { + "key_set": { + "type": "string", + "description": "The ID of the key set to associate the Key ID with." + } + } + ], + "description": "The private key associated with the account.", + "required": false + } + }, + { + "api_uri": { + "type": "string", + "default": "https://acme-v02.api.letsencrypt.org/directory", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "tos_accepted": { + "type": "boolean", + "default": false, + "description": "If you are using Let's Encrypt, you must set this to `true` to agree the terms of service." + } + }, + { + "eab_kid": { + "encrypted": true, + "type": "string", + "referenceable": true, + "description": "External account binding (EAB) key id. You usually don't need to set this unless it is explicitly required by the CA." + } + }, + { + "eab_hmac_key": { + "encrypted": true, + "type": "string", + "referenceable": true, + "description": "External account binding (EAB) base64-encoded URL string of the HMAC key. You usually don't need to set this unless it is explicitly required by the CA." + } + }, + { + "cert_type": { + "type": "string", + "default": "rsa", + "one_of": [ + "rsa", + "ecc" + ], + "description": "The certificate type to create. The possible values are `rsa` for RSA certificate or `ecc` for EC certificate." + } + }, + { + "rsa_key_size": { + "type": "number", + "default": 4096, + "one_of": [ + 2048, + 3072, + 4096 + ], + "description": "RSA private key size for the certificate. The possible values are 2048, 3072, or 4096." + } + }, + { + "renew_threshold_days": { + "type": "number", + "default": 14, + "description": "Days remaining to renew the certificate before it expires." + } + }, + { + "domains": { + "type": "array", + "elements": { + "type": "string", + "match_any": { + "patterns": [ + "^%*%.", + "%.%*$", + "^[^*]*$" + ], + "err": "invalid wildcard: must be placed at leftmost or rightmost label" + }, + "match_all": [ + { + "pattern": "^[^*]*%*?[^*]*$", + "err": "invalid wildcard: must have at most one wildcard" + } + ] + }, + "description": "An array of strings representing hosts. A valid host is a string containing one or more labels separated by periods, with at most one wildcard label ('*')" + } + }, + { + "allow_any_domain": { + "type": "boolean", + "default": false, + "description": "If set to `true`, the plugin allows all domains and ignores any values in the `domains` list." + } + }, + { + "fail_backoff_minutes": { + "type": "number", + "default": 5, + "description": "Minutes to wait for each domain that fails to create a certificate. This applies to both a\nnew certificate and a renewal certificate." + } + }, + { + "storage": { + "type": "string", + "default": "shm", + "one_of": [ + "kong", + "shm", + "redis", + "consul", + "vault" + ], + "description": "The backend storage type to use. In DB-less mode and Konnect, `kong` storage is unavailable. In hybrid mode and Konnect, `shm` storage is unavailable. `shm` storage does not persist during Kong restarts and does not work for Kong running on different machines, so consider using one of `kong`, `redis`, `consul`, or `vault` in production." + } + }, + { + "storage_config": { + "type": "record", + "fields": [ + { + "shm": { + "type": "record", + "fields": [ + { + "shm_name": { + "type": "string", + "default": "kong", + "description": "Name of shared memory zone used for Kong API gateway storage" + } + } + ], + "required": true + } + }, + { + "kong": { + "type": "record", + "fields": [], + "required": true + } + }, + { + "redis": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "type": "string", + "len_min": 0, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + }, + { + "extra_options": { + "type": "record", + "fields": [ + { + "namespace": { + "type": "string", + "len_min": 0, + "required": true, + "description": "A namespace to prepend to all keys stored in Redis.", + "default": "" + } + }, + { + "scan_count": { + "type": "number", + "default": 10, + "description": "The number of keys to return in Redis SCAN calls.", + "required": false + } + } + ], + "description": "Custom ACME Redis options", + "required": true + } + } + ], + "shorthand_fields": [ + { + "auth": { + "type": "string", + "len_min": 0, + "deprecation": { + "message": "acme: config.storage_config.redis.auth is deprecated, please use config.storage_config.redis.password instead", + "replaced_with": [ + { + "path": [ + "password" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "ssl_server_name": { + "type": "string", + "deprecation": { + "message": "acme: config.storage_config.redis.ssl_server_name is deprecated, please use config.storage_config.redis.server_name instead", + "replaced_with": [ + { + "path": [ + "server_name" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "namespace": { + "type": "string", + "len_min": 0, + "deprecation": { + "message": "acme: config.storage_config.redis.namespace is deprecated, please use config.storage_config.redis.extra_options.namespace instead", + "replaced_with": [ + { + "path": [ + "extra_options", + "namespace" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "scan_count": { + "type": "integer", + "deprecation": { + "message": "acme: config.storage_config.redis.scan_count is deprecated, please use config.storage_config.redis.extra_options.scan_count instead", + "replaced_with": [ + { + "path": [ + "extra_options", + "scan_count" + ] + } + ], + "removal_in_version": "4.0" + } + } + } + ], + "required": true + } + }, + { + "consul": { + "type": "record", + "fields": [ + { + "https": { + "type": "boolean", + "default": false, + "description": "Boolean representation of https." + } + }, + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "kv_path": { + "type": "string", + "description": "KV prefix path." + } + }, + { + "timeout": { + "type": "number", + "description": "Timeout in milliseconds." + } + }, + { + "token": { + "type": "string", + "referenceable": true, + "description": "Consul ACL token." + } + } + ], + "required": true + } + }, + { + "vault": { + "type": "record", + "fields": [ + { + "https": { + "type": "boolean", + "default": false, + "description": "Boolean representation of https." + } + }, + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "kv_path": { + "type": "string", + "description": "KV prefix path." + } + }, + { + "timeout": { + "type": "number", + "description": "Timeout in milliseconds." + } + }, + { + "token": { + "type": "string", + "referenceable": true, + "description": "Consul ACL token." + } + }, + { + "tls_verify": { + "type": "boolean", + "default": true, + "description": "Turn on TLS verification." + } + }, + { + "tls_server_name": { + "type": "string", + "description": "SNI used in request, default to host if omitted." + } + }, + { + "auth_method": { + "type": "string", + "default": "token", + "one_of": [ + "token", + "kubernetes" + ], + "description": "Auth Method, default to token, can be 'token' or 'kubernetes'." + } + }, + { + "auth_path": { + "type": "string", + "description": "Vault's authentication path to use." + } + }, + { + "auth_role": { + "type": "string", + "description": "The role to try and assign." + } + }, + { + "jwt_path": { + "type": "string", + "description": "The path to the JWT." + } + } + ], + "required": true + } + } + ], + "required": true + } + }, + { + "preferred_chain": { + "type": "string", + "description": "A string value that specifies the preferred certificate chain to use when generating certificates." + } + }, + { + "enable_ipv4_common_name": { + "type": "boolean", + "default": true, + "description": "A boolean value that controls whether to include the IPv4 address in the common name field of generated certificates." + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_match": { + "one_of": [ + "https://acme-v02.api.letsencrypt.org", + "https://acme-staging-v02.api.letsencrypt.org" + ] + }, + "then_field": "config.tos_accepted", + "if_field": "config.api_uri", + "then_match": { + "eq": true + }, + "then_err": "terms of service must be accepted, see https://letsencrypt.org/repository/" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + }, + "then_field": "config.storage_config.redis.host", + "if_field": "config.storage" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + }, + "then_field": "config.storage_config.redis.port", + "if_field": "config.storage" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.storage" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/acme/3.4.x.json b/schemas/acme/3.4.x.json index 81602de5..1471e0e9 100644 --- a/schemas/acme/3.4.x.json +++ b/schemas/acme/3.4.x.json @@ -2,6 +2,7 @@ "fields": [ { "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, "reference": "consumers", "type": "foreign" @@ -9,6 +10,7 @@ }, { "service": { + "description": "A reference to the 'services' table with a null value allowed.", "eq": null, "reference": "services", "type": "foreign" @@ -16,120 +18,148 @@ }, { "route": { + "description": "A reference to the 'routes' table with a null value allowed.", "eq": null, "reference": "routes", "type": "foreign" } }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, { "protocols": { - "default": [ - "grpc", - "grpcs", - "http", - "https" - ], + "description": "A set of strings representing HTTP protocols.", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" + ] }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], "required": true, "type": "set" } }, { "config": { - "required": true, "fields": [ { "account_email": { + "description": "The account identifier. Can be reused in a different plugin instance.", + "referenceable": true, "match": "%w*%p*@+%w*%.?%w*", "encrypted": true, "type": "string", - "required": true, - "referenceable": true + "required": true } }, { "account_key": { + "description": "The private key associated with the account.", "required": false, + "type": "record", "fields": [ { "key_id": { - "type": "string", - "required": true + "description": "The Key ID.", + "required": true, + "type": "string" } }, { "key_set": { + "description": "The ID of the key set to associate the Key ID with.", "type": "string" } } - ], - "type": "record" + ] } }, { "api_uri": { + "default": "https://acme-v02.api.letsencrypt.org/directory", "type": "string", - "default": "https://acme-v02.api.letsencrypt.org/directory" + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." } }, { "tos_accepted": { + "description": "If you are using Let's Encrypt, you must set this to `true` to agree the terms of service.", "type": "boolean", "default": false } }, { "eab_kid": { - "encrypted": true, + "description": "External account binding (EAB) key id. You usually don't need to set this unless it is explicitly required by the CA.", "referenceable": true, - "type": "string" + "type": "string", + "encrypted": true } }, { "eab_hmac_key": { - "encrypted": true, + "description": "External account binding (EAB) base64-encoded URL string of the HMAC key. You usually don't need to set this unless it is explicitly required by the CA.", "referenceable": true, - "type": "string" + "type": "string", + "encrypted": true } }, { "cert_type": { "default": "rsa", - "type": "string", "one_of": [ "rsa", "ecc" - ] + ], + "type": "string", + "description": "The certificate type to create. The possible values are `'rsa'` for RSA certificate or `'ecc'` for EC certificate." } }, { "rsa_key_size": { "default": 4096, - "type": "number", "one_of": [ 2048, 3072, 4096 - ] + ], + "type": "number", + "description": "RSA private key size for the certificate. The possible values are 2048, 3072, or 4096." } }, { "renew_threshold_days": { + "default": 14, "type": "number", - "default": 14 + "description": "Days remaining to renew the certificate before it expires." } }, { "domains": { + "description": "An array of strings representing hosts. A valid host is a string containing one or more labels separated by periods, with at most one wildcard label ('*')", "elements": { + "match_all": [ + { + "err": "invalid wildcard: must have at most one wildcard", + "pattern": "^[^*]*%*?[^*]*$" + } + ], + "type": "string", "match_any": { "err": "invalid wildcard: must be placed at leftmost or rightmost label", "patterns": [ @@ -137,76 +167,72 @@ "%.%*$", "^[^*]*$" ] - }, - "match_all": [ - { - "err": "invalid wildcard: must have at most one wildcard", - "pattern": "^[^*]*%*?[^*]*$" - } - ], - "type": "string" + } }, "type": "array" } }, { "allow_any_domain": { + "default": false, "type": "boolean", - "default": false + "description": "If set to `true`, the plugin allows all domains and ignores any values in the `domains` list." } }, { "fail_backoff_minutes": { + "default": 5, "type": "number", - "default": 5 + "description": "Minutes to wait for each domain that fails to create a certificate. This applies to both a\nnew certificate and a renewal certificate." } }, { "storage": { "default": "shm", - "type": "string", "one_of": [ "kong", "shm", "redis", "consul", "vault" - ] + ], + "type": "string", + "description": "The backend storage type to use. The possible values are `'kong'`, `'shm'`, `'redis'`, `'consul'`, or `'vault'`. In DB-less mode, `'kong'` storage is unavailable. Note that `'shm'` storage does not persist during Kong restarts and does not work for Kong running on different machines, so consider using one of `'kong'`, `'redis'`, `'consul'`, or `'vault'` in production. Please refer to the Hybrid Mode sections below as well." } }, { "storage_config": { - "required": true, "fields": [ { "shm": { - "required": true, "fields": [ { "shm_name": { "default": "kong", - "type": "string" + "type": "string", + "description": "Name of shared memory zone used for Kong API gateway storage" } } ], - "type": "record" + "type": "record", + "required": true } }, { "kong": { - "required": true, "fields": [ ], - "type": "record" + "type": "record", + "required": true } }, { "redis": { - "required": true, "fields": [ { "host": { + "description": "A string representing a host name, such as example.com.", "type": "string" } }, @@ -216,64 +242,73 @@ 0, 65535 ], - "type": "integer" + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." } }, { "database": { + "description": "The index of the Redis database to use.", "type": "number" } }, { "auth": { - "type": "string", - "referenceable": true + "description": "The Redis password to use for authentication. ", + "referenceable": true, + "type": "string" } }, { "ssl": { + "description": "Whether to use SSL/TLS encryption when connecting to the Redis server.", "required": true, - "default": false, - "type": "boolean" + "type": "boolean", + "default": false } }, { "ssl_verify": { + "description": "Whether to verify the SSL/TLS certificate presented by the Redis server. This should be a boolean value.", "required": true, - "default": false, - "type": "boolean" + "type": "boolean", + "default": false } }, { "ssl_server_name": { - "type": "string", - "required": false + "description": "The expected server name for the SSL/TLS certificate presented by the Redis server.", + "required": false, + "type": "string" } }, { "namespace": { - "type": "string", - "len_min": 0, + "description": "A namespace to prepend to all keys stored in Redis.", + "default": "", "required": true, - "default": "" + "type": "string", + "len_min": 0 } } ], - "type": "record" + "type": "record", + "required": true } }, { "consul": { - "required": true, "fields": [ { "https": { + "description": "Boolean representation of https.", "type": "boolean", "default": false } }, { "host": { + "description": "A string representing a host name, such as example.com.", "type": "string" } }, @@ -283,41 +318,47 @@ 0, 65535 ], - "type": "integer" + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." } }, { "kv_path": { + "description": "KV prefix path.", "type": "string" } }, { "timeout": { + "description": "Timeout in milliseconds.", "type": "number" } }, { "token": { - "type": "string", - "referenceable": true + "description": "Consul ACL token.", + "referenceable": true, + "type": "string" } } ], - "type": "record" + "type": "record", + "required": true } }, { "vault": { - "required": true, "fields": [ { "https": { + "description": "Boolean representation of https.", "type": "boolean", "default": false } }, { "host": { + "description": "A string representing a host name, such as example.com.", "type": "string" } }, @@ -327,82 +368,122 @@ 0, 65535 ], - "type": "integer" + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." } }, { "kv_path": { + "description": "KV prefix path.", "type": "string" } }, { "timeout": { + "description": "Timeout in milliseconds.", "type": "number" } }, { "token": { - "type": "string", - "referenceable": true + "description": "Consul ACL token.", + "referenceable": true, + "type": "string" } }, { "tls_verify": { + "description": "Turn on TLS verification.", "type": "boolean", "default": true } }, { "tls_server_name": { + "description": "SNI used in request, default to host if omitted.", "type": "string" } }, { "auth_method": { - "default": "token", - "type": "string", + "description": "Auth Method, default to token, can be 'token' or 'kubernetes'.", "one_of": [ "token", "kubernetes" - ] + ], + "type": "string", + "default": "token" } }, { "auth_path": { + "description": "Vault's authentication path to use.", "type": "string" } }, { "auth_role": { + "description": "The role to try and assign.", "type": "string" } }, { "jwt_path": { + "description": "The path to the JWT.", "type": "string" } } ], - "type": "record" + "type": "record", + "required": true } } ], - "type": "record" + "type": "record", + "required": true } }, { "preferred_chain": { - "type": "string" + "type": "string", + "description": "A string value that specifies the preferred certificate chain to use when generating certificates." } }, { "enable_ipv4_common_name": { + "default": true, "type": "boolean", - "default": true + "description": "A boolean value that controls whether to include the IPv4 address in the common name field of generated certificates." } } ], - "type": "record" + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_field": "config.tos_accepted", + "then_match": { + "eq": true + }, + "then_err": "terms of service must be accepted, see https://letsencrypt.org/repository/", + "if_match": { + "one_of": [ + "https://acme-v02.api.letsencrypt.org", + "https://acme-staging-v02.api.letsencrypt.org" + ] + }, + "if_field": "config.api_uri" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.storage" + ] } } ] diff --git a/schemas/acme/3.5.x.json b/schemas/acme/3.5.x.json new file mode 100644 index 00000000..44890b85 --- /dev/null +++ b/schemas/acme/3.5.x.json @@ -0,0 +1,498 @@ +{ + "entity_checks": [ + { + "conditional": { + "if_match": { + "one_of": [ + "https://acme-v02.api.letsencrypt.org", + "https://acme-staging-v02.api.letsencrypt.org" + ] + }, + "then_field": "config.tos_accepted", + "if_field": "config.api_uri", + "then_err": "terms of service must be accepted, see https://letsencrypt.org/repository/", + "then_match": { + "eq": true + } + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.storage" + ] + } + } + ], + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumers" + } + }, + { + "service": { + "type": "foreign", + "eq": null, + "description": "A reference to the 'services' table with a null value allowed.", + "reference": "services" + } + }, + { + "route": { + "type": "foreign", + "eq": null, + "description": "A reference to the 'routes' table with a null value allowed.", + "reference": "routes" + } + }, + { + "consumer_group": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumer_groups" + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "fields": [ + { + "account_email": { + "encrypted": true, + "type": "string", + "match": "%w*%p*@+%w*%.?%w*", + "referenceable": true, + "description": "The account identifier. Can be reused in a different plugin instance.", + "required": true + } + }, + { + "account_key": { + "required": false, + "description": "The private key associated with the account.", + "type": "record", + "fields": [ + { + "key_id": { + "required": true, + "type": "string", + "description": "The Key ID." + } + }, + { + "key_set": { + "type": "string", + "description": "The ID of the key set to associate the Key ID with." + } + } + ] + } + }, + { + "api_uri": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "default": "https://acme-v02.api.letsencrypt.org/directory" + } + }, + { + "tos_accepted": { + "type": "boolean", + "description": "If you are using Let's Encrypt, you must set this to `true` to agree the terms of service.", + "default": false + } + }, + { + "eab_kid": { + "encrypted": true, + "description": "External account binding (EAB) key id. You usually don't need to set this unless it is explicitly required by the CA.", + "type": "string", + "referenceable": true + } + }, + { + "eab_hmac_key": { + "encrypted": true, + "description": "External account binding (EAB) base64-encoded URL string of the HMAC key. You usually don't need to set this unless it is explicitly required by the CA.", + "type": "string", + "referenceable": true + } + }, + { + "cert_type": { + "one_of": [ + "rsa", + "ecc" + ], + "type": "string", + "description": "The certificate type to create. The possible values are `'rsa'` for RSA certificate or `'ecc'` for EC certificate.", + "default": "rsa" + } + }, + { + "rsa_key_size": { + "one_of": [ + 2048, + 3072, + 4096 + ], + "type": "number", + "description": "RSA private key size for the certificate. The possible values are 2048, 3072, or 4096.", + "default": 4096 + } + }, + { + "renew_threshold_days": { + "type": "number", + "description": "Days remaining to renew the certificate before it expires.", + "default": 14 + } + }, + { + "domains": { + "elements": { + "match_all": [ + { + "pattern": "^[^*]*%*?[^*]*$", + "err": "invalid wildcard: must have at most one wildcard" + } + ], + "type": "string", + "match_any": { + "patterns": [ + "^%*%.", + "%.%*$", + "^[^*]*$" + ], + "err": "invalid wildcard: must be placed at leftmost or rightmost label" + } + }, + "type": "array", + "description": "An array of strings representing hosts. A valid host is a string containing one or more labels separated by periods, with at most one wildcard label ('*')" + } + }, + { + "allow_any_domain": { + "type": "boolean", + "description": "If set to `true`, the plugin allows all domains and ignores any values in the `domains` list.", + "default": false + } + }, + { + "fail_backoff_minutes": { + "type": "number", + "description": "Minutes to wait for each domain that fails to create a certificate. This applies to both a\nnew certificate and a renewal certificate.", + "default": 5 + } + }, + { + "storage": { + "one_of": [ + "kong", + "shm", + "redis", + "consul", + "vault" + ], + "type": "string", + "description": "The backend storage type to use. The possible values are `'kong'`, `'shm'`, `'redis'`, `'consul'`, or `'vault'`. In DB-less mode, `'kong'` storage is unavailable. Note that `'shm'` storage does not persist during Kong restarts and does not work for Kong running on different machines, so consider using one of `'kong'`, `'redis'`, `'consul'`, or `'vault'` in production. Please refer to the Hybrid Mode sections below as well.", + "default": "shm" + } + }, + { + "storage_config": { + "fields": [ + { + "shm": { + "fields": [ + { + "shm_name": { + "type": "string", + "description": "Name of shared memory zone used for Kong API gateway storage", + "default": "kong" + } + } + ], + "type": "record", + "required": true + } + }, + { + "kong": { + "fields": [ + + ], + "type": "record", + "required": true + } + }, + { + "redis": { + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "database": { + "type": "number", + "description": "The index of the Redis database to use." + } + }, + { + "auth": { + "referenceable": true, + "type": "string", + "description": "The Redis password to use for authentication. " + } + }, + { + "ssl": { + "required": true, + "type": "boolean", + "description": "Whether to use SSL/TLS encryption when connecting to the Redis server.", + "default": false + } + }, + { + "ssl_verify": { + "required": true, + "type": "boolean", + "description": "Whether to verify the SSL/TLS certificate presented by the Redis server. This should be a boolean value.", + "default": false + } + }, + { + "ssl_server_name": { + "required": false, + "description": "The expected server name for the SSL/TLS certificate presented by the Redis server.", + "type": "string" + } + }, + { + "namespace": { + "required": true, + "type": "string", + "default": "", + "description": "A namespace to prepend to all keys stored in Redis.", + "len_min": 0 + } + }, + { + "scan_count": { + "required": false, + "type": "number", + "description": "The number of keys to return in Redis SCAN calls.", + "default": 10 + } + } + ], + "type": "record", + "required": true + } + }, + { + "consul": { + "fields": [ + { + "https": { + "type": "boolean", + "description": "Boolean representation of https.", + "default": false + } + }, + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "kv_path": { + "type": "string", + "description": "KV prefix path." + } + }, + { + "timeout": { + "type": "number", + "description": "Timeout in milliseconds." + } + }, + { + "token": { + "referenceable": true, + "type": "string", + "description": "Consul ACL token." + } + } + ], + "type": "record", + "required": true + } + }, + { + "vault": { + "fields": [ + { + "https": { + "type": "boolean", + "description": "Boolean representation of https.", + "default": false + } + }, + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "kv_path": { + "type": "string", + "description": "KV prefix path." + } + }, + { + "timeout": { + "type": "number", + "description": "Timeout in milliseconds." + } + }, + { + "token": { + "referenceable": true, + "type": "string", + "description": "Consul ACL token." + } + }, + { + "tls_verify": { + "type": "boolean", + "description": "Turn on TLS verification.", + "default": true + } + }, + { + "tls_server_name": { + "type": "string", + "description": "SNI used in request, default to host if omitted." + } + }, + { + "auth_method": { + "one_of": [ + "token", + "kubernetes" + ], + "type": "string", + "description": "Auth Method, default to token, can be 'token' or 'kubernetes'.", + "default": "token" + } + }, + { + "auth_path": { + "type": "string", + "description": "Vault's authentication path to use." + } + }, + { + "auth_role": { + "type": "string", + "description": "The role to try and assign." + } + }, + { + "jwt_path": { + "type": "string", + "description": "The path to the JWT." + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + }, + { + "preferred_chain": { + "description": "A string value that specifies the preferred certificate chain to use when generating certificates.", + "type": "string" + } + }, + { + "enable_ipv4_common_name": { + "type": "boolean", + "description": "A boolean value that controls whether to include the IPv4 address in the common name field of generated certificates.", + "default": true + } + } + ], + "type": "record", + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/acme/3.6.x.json b/schemas/acme/3.6.x.json new file mode 100644 index 00000000..13f30055 --- /dev/null +++ b/schemas/acme/3.6.x.json @@ -0,0 +1,591 @@ +{ + "entity_checks": [ + { + "conditional": { + "then_match": { + "eq": true + }, + "if_match": { + "one_of": [ + "https://acme-v02.api.letsencrypt.org", + "https://acme-staging-v02.api.letsencrypt.org" + ] + }, + "then_err": "terms of service must be accepted, see https://letsencrypt.org/repository/", + "if_field": "config.api_uri", + "then_field": "config.tos_accepted" + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_match": { + "required": true + }, + "if_field": "config.storage", + "then_field": "config.storage_config.redis.host" + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_match": { + "required": true + }, + "if_field": "config.storage", + "then_field": "config.storage_config.redis.port" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.storage" + ] + } + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign" + } + }, + { + "service": { + "reference": "services", + "eq": null, + "description": "A reference to the 'services' table with a null value allowed.", + "type": "foreign" + } + }, + { + "route": { + "reference": "routes", + "eq": null, + "description": "A reference to the 'routes' table with a null value allowed.", + "type": "foreign" + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "type": "record", + "required": true, + "fields": [ + { + "account_email": { + "referenceable": true, + "required": true, + "type": "string", + "match": "%w*%p*@+%w*%.?%w*", + "description": "The account identifier. Can be reused in a different plugin instance.", + "encrypted": true + } + }, + { + "account_key": { + "type": "record", + "required": false, + "description": "The private key associated with the account.", + "fields": [ + { + "key_id": { + "type": "string", + "required": true, + "description": "The Key ID." + } + }, + { + "key_set": { + "description": "The ID of the key set to associate the Key ID with.", + "type": "string" + } + } + ] + } + }, + { + "api_uri": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "default": "https://acme-v02.api.letsencrypt.org/directory" + } + }, + { + "tos_accepted": { + "type": "boolean", + "description": "If you are using Let's Encrypt, you must set this to `true` to agree the terms of service.", + "default": false + } + }, + { + "eab_kid": { + "referenceable": true, + "encrypted": true, + "description": "External account binding (EAB) key id. You usually don't need to set this unless it is explicitly required by the CA.", + "type": "string" + } + }, + { + "eab_hmac_key": { + "referenceable": true, + "encrypted": true, + "description": "External account binding (EAB) base64-encoded URL string of the HMAC key. You usually don't need to set this unless it is explicitly required by the CA.", + "type": "string" + } + }, + { + "cert_type": { + "type": "string", + "one_of": [ + "rsa", + "ecc" + ], + "description": "The certificate type to create. The possible values are `'rsa'` for RSA certificate or `'ecc'` for EC certificate.", + "default": "rsa" + } + }, + { + "rsa_key_size": { + "type": "number", + "one_of": [ + 2048, + 3072, + 4096 + ], + "description": "RSA private key size for the certificate. The possible values are 2048, 3072, or 4096.", + "default": 4096 + } + }, + { + "renew_threshold_days": { + "type": "number", + "description": "Days remaining to renew the certificate before it expires.", + "default": 14 + } + }, + { + "domains": { + "type": "array", + "elements": { + "type": "string", + "match_all": [ + { + "err": "invalid wildcard: must have at most one wildcard", + "pattern": "^[^*]*%*?[^*]*$" + } + ], + "match_any": { + "patterns": [ + "^%*%.", + "%.%*$", + "^[^*]*$" + ], + "err": "invalid wildcard: must be placed at leftmost or rightmost label" + } + }, + "description": "An array of strings representing hosts. A valid host is a string containing one or more labels separated by periods, with at most one wildcard label ('*')" + } + }, + { + "allow_any_domain": { + "type": "boolean", + "description": "If set to `true`, the plugin allows all domains and ignores any values in the `domains` list.", + "default": false + } + }, + { + "fail_backoff_minutes": { + "type": "number", + "description": "Minutes to wait for each domain that fails to create a certificate. This applies to both a\nnew certificate and a renewal certificate.", + "default": 5 + } + }, + { + "storage": { + "type": "string", + "one_of": [ + "kong", + "shm", + "redis", + "consul", + "vault" + ], + "description": "The backend storage type to use. The possible values are `'kong'`, `'shm'`, `'redis'`, `'consul'`, or `'vault'`. In DB-less mode, `'kong'` storage is unavailable. Note that `'shm'` storage does not persist during Kong restarts and does not work for Kong running on different machines, so consider using one of `'kong'`, `'redis'`, `'consul'`, or `'vault'` in production. Please refer to the Hybrid Mode sections below as well.", + "default": "shm" + } + }, + { + "storage_config": { + "type": "record", + "required": true, + "fields": [ + { + "shm": { + "type": "record", + "required": true, + "fields": [ + { + "shm_name": { + "type": "string", + "description": "Name of shared memory zone used for Kong API gateway storage", + "default": "kong" + } + } + ] + } + }, + { + "kong": { + "type": "record", + "required": true, + "fields": [ + + ] + } + }, + { + "redis": { + "type": "record", + "required": true, + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "default": 6379, + "between": [ + 0, + 65535 + ] + } + }, + { + "timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "default": 2000, + "between": [ + 0, + 2147483646 + ] + } + }, + { + "username": { + "type": "string", + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true + } + }, + { + "password": { + "referenceable": true, + "encrypted": true, + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "len_min": 0 + } + }, + { + "database": { + "type": "integer", + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0 + } + }, + { + "ssl": { + "type": "boolean", + "required": false, + "description": "If set to true, uses SSL to connect to Redis.", + "default": false + } + }, + { + "ssl_verify": { + "type": "boolean", + "required": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false + } + }, + { + "server_name": { + "type": "string", + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS." + } + }, + { + "extra_options": { + "type": "record", + "required": true, + "description": "Custom ACME Redis options", + "fields": [ + { + "namespace": { + "required": true, + "len_min": 0, + "type": "string", + "description": "A namespace to prepend to all keys stored in Redis.", + "default": "" + } + }, + { + "scan_count": { + "type": "number", + "required": false, + "default": 10, + "description": "The number of keys to return in Redis SCAN calls." + } + } + ] + } + } + ], + "shorthand_fields": [ + { + "auth": { + "len_min": 0, + "translate_backwards": [ + "password" + ], + "type": "string" + } + }, + { + "ssl_server_name": { + "type": "string", + "translate_backwards": [ + "server_name" + ] + } + }, + { + "namespace": { + "len_min": 0, + "translate_backwards": [ + "extra_options", + "namespace" + ], + "type": "string" + } + }, + { + "scan_count": { + "type": "integer", + "translate_backwards": [ + "extra_options", + "scan_count" + ] + } + } + ] + } + }, + { + "consul": { + "type": "record", + "required": true, + "fields": [ + { + "https": { + "type": "boolean", + "description": "Boolean representation of https.", + "default": false + } + }, + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "kv_path": { + "description": "KV prefix path.", + "type": "string" + } + }, + { + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + } + }, + { + "token": { + "referenceable": true, + "description": "Consul ACL token.", + "type": "string" + } + } + ] + } + }, + { + "vault": { + "type": "record", + "required": true, + "fields": [ + { + "https": { + "type": "boolean", + "description": "Boolean representation of https.", + "default": false + } + }, + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "kv_path": { + "description": "KV prefix path.", + "type": "string" + } + }, + { + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + } + }, + { + "token": { + "referenceable": true, + "description": "Consul ACL token.", + "type": "string" + } + }, + { + "tls_verify": { + "type": "boolean", + "description": "Turn on TLS verification.", + "default": true + } + }, + { + "tls_server_name": { + "description": "SNI used in request, default to host if omitted.", + "type": "string" + } + }, + { + "auth_method": { + "type": "string", + "one_of": [ + "token", + "kubernetes" + ], + "default": "token", + "description": "Auth Method, default to token, can be 'token' or 'kubernetes'." + } + }, + { + "auth_path": { + "description": "Vault's authentication path to use.", + "type": "string" + } + }, + { + "auth_role": { + "description": "The role to try and assign.", + "type": "string" + } + }, + { + "jwt_path": { + "description": "The path to the JWT.", + "type": "string" + } + } + ] + } + } + ] + } + }, + { + "preferred_chain": { + "description": "A string value that specifies the preferred certificate chain to use when generating certificates.", + "type": "string" + } + }, + { + "enable_ipv4_common_name": { + "type": "boolean", + "description": "A boolean value that controls whether to include the IPv4 address in the common name field of generated certificates.", + "default": true + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/acme/3.7.x.json b/schemas/acme/3.7.x.json new file mode 100644 index 00000000..360878bc --- /dev/null +++ b/schemas/acme/3.7.x.json @@ -0,0 +1,607 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "service": { + "reference": "services", + "type": "foreign", + "description": "A reference to the 'services' table with a null value allowed.", + "eq": null + } + }, + { + "route": { + "reference": "routes", + "type": "foreign", + "description": "A reference to the 'routes' table with a null value allowed.", + "eq": null + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "account_email": { + "encrypted": true, + "referenceable": true, + "required": true, + "type": "string", + "description": "The account identifier. Can be reused in a different plugin instance.", + "match": "%w*%p*@+%w*%.?%w*" + } + }, + { + "account_key": { + "required": false, + "description": "The private key associated with the account.", + "type": "record", + "fields": [ + { + "key_id": { + "required": true, + "type": "string", + "description": "The Key ID." + } + }, + { + "key_set": { + "type": "string", + "description": "The ID of the key set to associate the Key ID with." + } + } + ] + } + }, + { + "api_uri": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "default": "https://acme-v02.api.letsencrypt.org/directory" + } + }, + { + "tos_accepted": { + "type": "boolean", + "description": "If you are using Let's Encrypt, you must set this to `true` to agree the terms of service.", + "default": false + } + }, + { + "eab_kid": { + "type": "string", + "encrypted": true, + "description": "External account binding (EAB) key id. You usually don't need to set this unless it is explicitly required by the CA.", + "referenceable": true + } + }, + { + "eab_hmac_key": { + "type": "string", + "encrypted": true, + "description": "External account binding (EAB) base64-encoded URL string of the HMAC key. You usually don't need to set this unless it is explicitly required by the CA.", + "referenceable": true + } + }, + { + "cert_type": { + "default": "rsa", + "type": "string", + "description": "The certificate type to create. The possible values are `'rsa'` for RSA certificate or `'ecc'` for EC certificate.", + "one_of": [ + "rsa", + "ecc" + ] + } + }, + { + "rsa_key_size": { + "default": 4096, + "type": "number", + "description": "RSA private key size for the certificate. The possible values are 2048, 3072, or 4096.", + "one_of": [ + 2048, + 3072, + 4096 + ] + } + }, + { + "renew_threshold_days": { + "type": "number", + "description": "Days remaining to renew the certificate before it expires.", + "default": 14 + } + }, + { + "domains": { + "elements": { + "match_any": { + "patterns": [ + "^%*%.", + "%.%*$", + "^[^*]*$" + ], + "err": "invalid wildcard: must be placed at leftmost or rightmost label" + }, + "type": "string", + "match_all": [ + { + "pattern": "^[^*]*%*?[^*]*$", + "err": "invalid wildcard: must have at most one wildcard" + } + ] + }, + "type": "array", + "description": "An array of strings representing hosts. A valid host is a string containing one or more labels separated by periods, with at most one wildcard label ('*')" + } + }, + { + "allow_any_domain": { + "type": "boolean", + "description": "If set to `true`, the plugin allows all domains and ignores any values in the `domains` list.", + "default": false + } + }, + { + "fail_backoff_minutes": { + "type": "number", + "description": "Minutes to wait for each domain that fails to create a certificate. This applies to both a\nnew certificate and a renewal certificate.", + "default": 5 + } + }, + { + "storage": { + "default": "shm", + "type": "string", + "description": "The backend storage type to use. The possible values are `'kong'`, `'shm'`, `'redis'`, `'consul'`, or `'vault'`. In DB-less mode, `'kong'` storage is unavailable. Note that `'shm'` storage does not persist during Kong restarts and does not work for Kong running on different machines, so consider using one of `'kong'`, `'redis'`, `'consul'`, or `'vault'` in production. Please refer to the Hybrid Mode sections below as well.", + "one_of": [ + "kong", + "shm", + "redis", + "consul", + "vault" + ] + } + }, + { + "storage_config": { + "fields": [ + { + "shm": { + "fields": [ + { + "shm_name": { + "type": "string", + "description": "Name of shared memory zone used for Kong API gateway storage", + "default": "kong" + } + } + ], + "type": "record", + "required": true + } + }, + { + "kong": { + "fields": [ + + ], + "type": "record", + "required": true + } + }, + { + "redis": { + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "len_min": 0 + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "ssl": { + "required": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "required": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "extra_options": { + "fields": [ + { + "namespace": { + "description": "A namespace to prepend to all keys stored in Redis.", + "required": true, + "type": "string", + "len_min": 0, + "default": "" + } + }, + { + "scan_count": { + "required": false, + "type": "number", + "description": "The number of keys to return in Redis SCAN calls.", + "default": 10 + } + } + ], + "description": "Custom ACME Redis options", + "type": "record", + "required": true + } + } + ], + "shorthand_fields": [ + { + "auth": { + "len_min": 0, + "deprecation": { + "removal_in_version": "4.0", + "message": "acme: config.storage_config.redis.auth is deprecated, please use config.storage_config.redis.password instead" + }, + "type": "string", + "translate_backwards": [ + "password" + ] + } + }, + { + "ssl_server_name": { + "deprecation": { + "removal_in_version": "4.0", + "message": "acme: config.storage_config.redis.ssl_server_name is deprecated, please use config.storage_config.redis.server_name instead" + }, + "type": "string", + "translate_backwards": [ + "server_name" + ] + } + }, + { + "namespace": { + "len_min": 0, + "deprecation": { + "removal_in_version": "4.0", + "message": "acme: config.storage_config.redis.namespace is deprecated, please use config.storage_config.redis.extra_options.namespace instead" + }, + "type": "string", + "translate_backwards": [ + "extra_options", + "namespace" + ] + } + }, + { + "scan_count": { + "deprecation": { + "removal_in_version": "4.0", + "message": "acme: config.storage_config.redis.scan_count is deprecated, please use config.storage_config.redis.extra_options.scan_count instead" + }, + "type": "integer", + "translate_backwards": [ + "extra_options", + "scan_count" + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "consul": { + "fields": [ + { + "https": { + "type": "boolean", + "description": "Boolean representation of https.", + "default": false + } + }, + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "kv_path": { + "type": "string", + "description": "KV prefix path." + } + }, + { + "timeout": { + "type": "number", + "description": "Timeout in milliseconds." + } + }, + { + "token": { + "type": "string", + "referenceable": true, + "description": "Consul ACL token." + } + } + ], + "type": "record", + "required": true + } + }, + { + "vault": { + "fields": [ + { + "https": { + "type": "boolean", + "description": "Boolean representation of https.", + "default": false + } + }, + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "kv_path": { + "type": "string", + "description": "KV prefix path." + } + }, + { + "timeout": { + "type": "number", + "description": "Timeout in milliseconds." + } + }, + { + "token": { + "type": "string", + "referenceable": true, + "description": "Consul ACL token." + } + }, + { + "tls_verify": { + "type": "boolean", + "description": "Turn on TLS verification.", + "default": true + } + }, + { + "tls_server_name": { + "type": "string", + "description": "SNI used in request, default to host if omitted." + } + }, + { + "auth_method": { + "default": "token", + "description": "Auth Method, default to token, can be 'token' or 'kubernetes'.", + "type": "string", + "one_of": [ + "token", + "kubernetes" + ] + } + }, + { + "auth_path": { + "type": "string", + "description": "Vault's authentication path to use." + } + }, + { + "auth_role": { + "type": "string", + "description": "The role to try and assign." + } + }, + { + "jwt_path": { + "type": "string", + "description": "The path to the JWT." + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + }, + { + "preferred_chain": { + "type": "string", + "description": "A string value that specifies the preferred certificate chain to use when generating certificates." + } + }, + { + "enable_ipv4_common_name": { + "type": "boolean", + "description": "A boolean value that controls whether to include the IPv4 address in the common name field of generated certificates.", + "default": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_field": "config.api_uri", + "then_err": "terms of service must be accepted, see https://letsencrypt.org/repository/", + "if_match": { + "one_of": [ + "https://acme-v02.api.letsencrypt.org", + "https://acme-staging-v02.api.letsencrypt.org" + ] + }, + "then_field": "config.tos_accepted", + "then_match": { + "eq": true + } + } + }, + { + "conditional": { + "if_field": "config.storage", + "if_match": { + "eq": "redis" + }, + "then_field": "config.storage_config.redis.host", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "config.storage", + "if_match": { + "eq": "redis" + }, + "then_field": "config.storage_config.redis.port", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.storage" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/acme/3.8.x.json b/schemas/acme/3.8.x.json new file mode 100644 index 00000000..23cd4280 --- /dev/null +++ b/schemas/acme/3.8.x.json @@ -0,0 +1,637 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "service": { + "reference": "services", + "eq": null, + "type": "foreign", + "description": "A reference to the 'services' table with a null value allowed." + } + }, + { + "route": { + "reference": "routes", + "eq": null, + "type": "foreign", + "description": "A reference to the 'routes' table with a null value allowed." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "account_email": { + "description": "The account identifier. Can be reused in a different plugin instance.", + "required": true, + "match": "%w*%p*@+%w*%.?%w*", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "account_key": { + "description": "The private key associated with the account.", + "type": "record", + "required": false, + "fields": [ + { + "key_id": { + "description": "The Key ID.", + "type": "string", + "required": true + } + }, + { + "key_set": { + "description": "The ID of the key set to associate the Key ID with.", + "type": "string" + } + } + ] + } + }, + { + "api_uri": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string", + "default": "https://acme-v02.api.letsencrypt.org/directory" + } + }, + { + "tos_accepted": { + "description": "If you are using Let's Encrypt, you must set this to `true` to agree the terms of service.", + "type": "boolean", + "default": false + } + }, + { + "eab_kid": { + "description": "External account binding (EAB) key id. You usually don't need to set this unless it is explicitly required by the CA.", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "eab_hmac_key": { + "description": "External account binding (EAB) base64-encoded URL string of the HMAC key. You usually don't need to set this unless it is explicitly required by the CA.", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "cert_type": { + "description": "The certificate type to create. The possible values are `'rsa'` for RSA certificate or `'ecc'` for EC certificate.", + "type": "string", + "default": "rsa", + "one_of": [ + "rsa", + "ecc" + ] + } + }, + { + "rsa_key_size": { + "description": "RSA private key size for the certificate. The possible values are 2048, 3072, or 4096.", + "type": "number", + "default": 4096, + "one_of": [ + 2048, + 3072, + 4096 + ] + } + }, + { + "renew_threshold_days": { + "description": "Days remaining to renew the certificate before it expires.", + "type": "number", + "default": 14 + } + }, + { + "domains": { + "description": "An array of strings representing hosts. A valid host is a string containing one or more labels separated by periods, with at most one wildcard label ('*')", + "type": "array", + "elements": { + "type": "string", + "match_all": [ + { + "pattern": "^[^*]*%*?[^*]*$", + "err": "invalid wildcard: must have at most one wildcard" + } + ], + "match_any": { + "patterns": [ + "^%*%.", + "%.%*$", + "^[^*]*$" + ], + "err": "invalid wildcard: must be placed at leftmost or rightmost label" + } + } + } + }, + { + "allow_any_domain": { + "description": "If set to `true`, the plugin allows all domains and ignores any values in the `domains` list.", + "type": "boolean", + "default": false + } + }, + { + "fail_backoff_minutes": { + "description": "Minutes to wait for each domain that fails to create a certificate. This applies to both a\nnew certificate and a renewal certificate.", + "type": "number", + "default": 5 + } + }, + { + "storage": { + "description": "The backend storage type to use. The possible values are `'kong'`, `'shm'`, `'redis'`, `'consul'`, or `'vault'`. In DB-less mode, `'kong'` storage is unavailable. Note that `'shm'` storage does not persist during Kong restarts and does not work for Kong running on different machines, so consider using one of `'kong'`, `'redis'`, `'consul'`, or `'vault'` in production. Please refer to the Hybrid Mode sections below as well.", + "type": "string", + "default": "shm", + "one_of": [ + "kong", + "shm", + "redis", + "consul", + "vault" + ] + } + }, + { + "storage_config": { + "fields": [ + { + "shm": { + "fields": [ + { + "shm_name": { + "description": "Name of shared memory zone used for Kong API gateway storage", + "type": "string", + "default": "kong" + } + } + ], + "type": "record", + "required": true + } + }, + { + "kong": { + "fields": [ + + ], + "type": "record", + "required": true + } + }, + { + "redis": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + }, + { + "timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "len_min": 0, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "extra_options": { + "description": "Custom ACME Redis options", + "type": "record", + "fields": [ + { + "namespace": { + "description": "A namespace to prepend to all keys stored in Redis.", + "required": true, + "type": "string", + "len_min": 0, + "default": "" + } + }, + { + "scan_count": { + "description": "The number of keys to return in Redis SCAN calls.", + "type": "number", + "required": false, + "default": 10 + } + } + ], + "required": true + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "auth": { + "len_min": 0, + "type": "string", + "translate_backwards": [ + "password" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "password" + ] + } + ], + "message": "acme: config.storage_config.redis.auth is deprecated, please use config.storage_config.redis.password instead", + "removal_in_version": "4.0" + } + } + }, + { + "ssl_server_name": { + "type": "string", + "translate_backwards": [ + "server_name" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "server_name" + ] + } + ], + "message": "acme: config.storage_config.redis.ssl_server_name is deprecated, please use config.storage_config.redis.server_name instead", + "removal_in_version": "4.0" + } + } + }, + { + "namespace": { + "len_min": 0, + "type": "string", + "translate_backwards": [ + "extra_options", + "namespace" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "extra_options", + "namespace" + ] + } + ], + "message": "acme: config.storage_config.redis.namespace is deprecated, please use config.storage_config.redis.extra_options.namespace instead", + "removal_in_version": "4.0" + } + } + }, + { + "scan_count": { + "type": "integer", + "translate_backwards": [ + "extra_options", + "scan_count" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "extra_options", + "scan_count" + ] + } + ], + "message": "acme: config.storage_config.redis.scan_count is deprecated, please use config.storage_config.redis.extra_options.scan_count instead", + "removal_in_version": "4.0" + } + } + } + ], + "required": true + } + }, + { + "consul": { + "fields": [ + { + "https": { + "description": "Boolean representation of https.", + "type": "boolean", + "default": false + } + }, + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "kv_path": { + "description": "KV prefix path.", + "type": "string" + } + }, + { + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + } + }, + { + "token": { + "description": "Consul ACL token.", + "type": "string", + "referenceable": true + } + } + ], + "type": "record", + "required": true + } + }, + { + "vault": { + "fields": [ + { + "https": { + "description": "Boolean representation of https.", + "type": "boolean", + "default": false + } + }, + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "kv_path": { + "description": "KV prefix path.", + "type": "string" + } + }, + { + "timeout": { + "description": "Timeout in milliseconds.", + "type": "number" + } + }, + { + "token": { + "description": "Consul ACL token.", + "type": "string", + "referenceable": true + } + }, + { + "tls_verify": { + "description": "Turn on TLS verification.", + "type": "boolean", + "default": true + } + }, + { + "tls_server_name": { + "description": "SNI used in request, default to host if omitted.", + "type": "string" + } + }, + { + "auth_method": { + "description": "Auth Method, default to token, can be 'token' or 'kubernetes'.", + "type": "string", + "default": "token", + "one_of": [ + "token", + "kubernetes" + ] + } + }, + { + "auth_path": { + "description": "Vault's authentication path to use.", + "type": "string" + } + }, + { + "auth_role": { + "description": "The role to try and assign.", + "type": "string" + } + }, + { + "jwt_path": { + "description": "The path to the JWT.", + "type": "string" + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + }, + { + "preferred_chain": { + "description": "A string value that specifies the preferred certificate chain to use when generating certificates.", + "type": "string" + } + }, + { + "enable_ipv4_common_name": { + "description": "A boolean value that controls whether to include the IPv4 address in the common name field of generated certificates.", + "type": "boolean", + "default": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_field": "config.tos_accepted", + "if_field": "config.api_uri", + "then_err": "terms of service must be accepted, see https://letsencrypt.org/repository/", + "if_match": { + "one_of": [ + "https://acme-v02.api.letsencrypt.org", + "https://acme-staging-v02.api.letsencrypt.org" + ] + }, + "then_match": { + "eq": true + } + } + }, + { + "conditional": { + "if_field": "config.storage", + "if_match": { + "eq": "redis" + }, + "then_field": "config.storage_config.redis.host", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "config.storage", + "if_match": { + "eq": "redis" + }, + "then_field": "config.storage_config.redis.port", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.storage" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/acme/3.9.x.json b/schemas/acme/3.9.x.json new file mode 100644 index 00000000..677bf267 --- /dev/null +++ b/schemas/acme/3.9.x.json @@ -0,0 +1,623 @@ +{ + "entity_checks": [ + { + "conditional": { + "then_err": "terms of service must be accepted, see https://letsencrypt.org/repository/", + "if_match": { + "one_of": [ + "https://acme-v02.api.letsencrypt.org", + "https://acme-staging-v02.api.letsencrypt.org" + ] + }, + "then_field": "config.tos_accepted", + "if_field": "config.api_uri", + "then_match": { + "eq": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.storage_config.redis.host", + "if_field": "config.storage", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.storage_config.redis.port", + "if_field": "config.storage", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.storage" + ] + } + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "service": { + "reference": "services", + "eq": null, + "type": "foreign", + "description": "A reference to the 'services' table with a null value allowed." + } + }, + { + "route": { + "reference": "routes", + "eq": null, + "type": "foreign", + "description": "A reference to the 'routes' table with a null value allowed." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "account_email": { + "encrypted": true, + "match": "%w*%p*@+%w*%.?%w*", + "required": true, + "type": "string", + "description": "The account identifier. Can be reused in a different plugin instance.", + "referenceable": true + } + }, + { + "account_key": { + "type": "record", + "description": "The private key associated with the account.", + "required": false, + "fields": [ + { + "key_id": { + "description": "The Key ID.", + "required": true, + "type": "string" + } + }, + { + "key_set": { + "type": "string", + "description": "The ID of the key set to associate the Key ID with." + } + } + ] + } + }, + { + "api_uri": { + "default": "https://acme-v02.api.letsencrypt.org/directory", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "tos_accepted": { + "default": false, + "description": "If you are using Let's Encrypt, you must set this to `true` to agree the terms of service.", + "type": "boolean" + } + }, + { + "eab_kid": { + "encrypted": true, + "description": "External account binding (EAB) key id. You usually don't need to set this unless it is explicitly required by the CA.", + "referenceable": true, + "type": "string" + } + }, + { + "eab_hmac_key": { + "encrypted": true, + "description": "External account binding (EAB) base64-encoded URL string of the HMAC key. You usually don't need to set this unless it is explicitly required by the CA.", + "referenceable": true, + "type": "string" + } + }, + { + "cert_type": { + "default": "rsa", + "description": "The certificate type to create. The possible values are `rsa` for RSA certificate or `ecc` for EC certificate.", + "type": "string", + "one_of": [ + "rsa", + "ecc" + ] + } + }, + { + "rsa_key_size": { + "default": 4096, + "description": "RSA private key size for the certificate. The possible values are 2048, 3072, or 4096.", + "type": "number", + "one_of": [ + 2048, + 3072, + 4096 + ] + } + }, + { + "renew_threshold_days": { + "default": 14, + "description": "Days remaining to renew the certificate before it expires.", + "type": "number" + } + }, + { + "domains": { + "elements": { + "match_all": [ + { + "err": "invalid wildcard: must have at most one wildcard", + "pattern": "^[^*]*%*?[^*]*$" + } + ], + "type": "string", + "match_any": { + "err": "invalid wildcard: must be placed at leftmost or rightmost label", + "patterns": [ + "^%*%.", + "%.%*$", + "^[^*]*$" + ] + } + }, + "description": "An array of strings representing hosts. A valid host is a string containing one or more labels separated by periods, with at most one wildcard label ('*')", + "type": "array" + } + }, + { + "allow_any_domain": { + "default": false, + "description": "If set to `true`, the plugin allows all domains and ignores any values in the `domains` list.", + "type": "boolean" + } + }, + { + "fail_backoff_minutes": { + "default": 5, + "description": "Minutes to wait for each domain that fails to create a certificate. This applies to both a\nnew certificate and a renewal certificate.", + "type": "number" + } + }, + { + "storage": { + "default": "shm", + "description": "The backend storage type to use. In DB-less mode and Konnect, `kong` storage is unavailable. In hybrid mode and Konnect, `shm` storage is unavailable. `shm` storage does not persist during Kong restarts and does not work for Kong running on different machines, so consider using one of `kong`, `redis`, `consul`, or `vault` in production.", + "type": "string", + "one_of": [ + "kong", + "shm", + "redis", + "consul", + "vault" + ] + } + }, + { + "storage_config": { + "fields": [ + { + "shm": { + "fields": [ + { + "shm_name": { + "default": "kong", + "description": "Name of shared memory zone used for Kong API gateway storage", + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "kong": { + "fields": [ + + ], + "required": true, + "type": "record" + } + }, + { + "redis": { + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "len_min": 0 + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean" + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "extra_options": { + "type": "record", + "description": "Custom ACME Redis options", + "required": true, + "fields": [ + { + "namespace": { + "required": true, + "type": "string", + "default": "", + "description": "A namespace to prepend to all keys stored in Redis.", + "len_min": 0 + } + }, + { + "scan_count": { + "default": 10, + "description": "The number of keys to return in Redis SCAN calls.", + "required": false, + "type": "number" + } + } + ] + } + } + ], + "shorthand_fields": [ + { + "auth": { + "type": "string", + "deprecation": { + "message": "acme: config.storage_config.redis.auth is deprecated, please use config.storage_config.redis.password instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "password" + ] + } + ] + }, + "len_min": 0 + } + }, + { + "ssl_server_name": { + "deprecation": { + "message": "acme: config.storage_config.redis.ssl_server_name is deprecated, please use config.storage_config.redis.server_name instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "server_name" + ] + } + ] + }, + "type": "string" + } + }, + { + "namespace": { + "type": "string", + "deprecation": { + "message": "acme: config.storage_config.redis.namespace is deprecated, please use config.storage_config.redis.extra_options.namespace instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "extra_options", + "namespace" + ] + } + ] + }, + "len_min": 0 + } + }, + { + "scan_count": { + "deprecation": { + "message": "acme: config.storage_config.redis.scan_count is deprecated, please use config.storage_config.redis.extra_options.scan_count instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "extra_options", + "scan_count" + ] + } + ] + }, + "type": "integer" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "consul": { + "fields": [ + { + "https": { + "default": false, + "description": "Boolean representation of https.", + "type": "boolean" + } + }, + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "kv_path": { + "type": "string", + "description": "KV prefix path." + } + }, + { + "timeout": { + "type": "number", + "description": "Timeout in milliseconds." + } + }, + { + "token": { + "description": "Consul ACL token.", + "referenceable": true, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "vault": { + "fields": [ + { + "https": { + "default": false, + "description": "Boolean representation of https.", + "type": "boolean" + } + }, + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "kv_path": { + "type": "string", + "description": "KV prefix path." + } + }, + { + "timeout": { + "type": "number", + "description": "Timeout in milliseconds." + } + }, + { + "token": { + "description": "Consul ACL token.", + "referenceable": true, + "type": "string" + } + }, + { + "tls_verify": { + "default": true, + "description": "Turn on TLS verification.", + "type": "boolean" + } + }, + { + "tls_server_name": { + "type": "string", + "description": "SNI used in request, default to host if omitted." + } + }, + { + "auth_method": { + "default": "token", + "description": "Auth Method, default to token, can be 'token' or 'kubernetes'.", + "type": "string", + "one_of": [ + "token", + "kubernetes" + ] + } + }, + { + "auth_path": { + "type": "string", + "description": "Vault's authentication path to use." + } + }, + { + "auth_role": { + "type": "string", + "description": "The role to try and assign." + } + }, + { + "jwt_path": { + "type": "string", + "description": "The path to the JWT." + } + } + ], + "required": true, + "type": "record" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "preferred_chain": { + "description": "A string value that specifies the preferred certificate chain to use when generating certificates.", + "type": "string" + } + }, + { + "enable_ipv4_common_name": { + "default": true, + "description": "A boolean value that controls whether to include the IPv4 address in the common name field of generated certificates.", + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-aws-guardrails/.gitkeep b/schemas/ai-aws-guardrails/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/schemas/ai-aws-guardrails/.gitkeep @@ -0,0 +1 @@ + diff --git a/schemas/ai-aws-guardrails/3.11.x.json b/schemas/ai-aws-guardrails/3.11.x.json new file mode 100644 index 00000000..3c232d24 --- /dev/null +++ b/schemas/ai-aws-guardrails/3.11.x.json @@ -0,0 +1,122 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "guardrails_id": { + "required": true, + "description": "The guardrail identifier used in the request to apply the guardrail", + "type": "string" + } + }, + { + "guardrails_version": { + "required": true, + "description": "The guardrail version used in the request to apply the guardrail", + "type": "string" + } + }, + { + "stop_on_error": { + "description": "Stop processing if an error occurs", + "default": true, + "type": "boolean" + } + }, + { + "timeout": { + "description": "Connection timeout with the bedrock service", + "required": true, + "default": 10000, + "type": "number" + } + }, + { + "guarding_mode": { + "required": true, + "description": "The guardrail mode to use for the request", + "one_of": [ + "INPUT", + "OUTPUT", + "BOTH" + ], + "default": "INPUT", + "type": "string" + } + }, + { + "text_source": { + "required": true, + "description": "Select where to pick the 'text' for the Content Guard Services request.", + "one_of": [ + "concatenate_all_content", + "concatenate_user_content" + ], + "default": "concatenate_all_content", + "type": "string" + } + }, + { + "response_buffer_size": { + "default": 100, + "required": true, + "description": "The amount of token receiving from upstream to be buffered before sending to the guardrails service. This only applies to the response content guard.", + "type": "number" + } + }, + { + "aws_region": { + "required": true, + "description": "The AWS region to use for the Bedrock API", + "type": "string" + } + }, + { + "aws_access_key_id": { + "referenceable": true, + "required": false, + "description": "The AWS access key ID to use for authentication", + "type": "string" + } + }, + { + "aws_secret_access_key": { + "referenceable": true, + "required": false, + "description": "The AWS secret access key to use for authentication", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/ai-aws-guardrails/3.12.x.json b/schemas/ai-aws-guardrails/3.12.x.json new file mode 100644 index 00000000..22ff53a8 --- /dev/null +++ b/schemas/ai-aws-guardrails/3.12.x.json @@ -0,0 +1,141 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "guardrails_id": { + "type": "string", + "description": "The guardrail identifier used in the request to apply the guardrail", + "required": true + } + }, + { + "guardrails_version": { + "type": "string", + "description": "The guardrail version used in the request to apply the guardrail", + "required": true + } + }, + { + "stop_on_error": { + "type": "boolean", + "default": true, + "description": "Stop processing if an error occurs" + } + }, + { + "timeout": { + "type": "number", + "default": 10000, + "description": "Connection timeout with the bedrock service", + "required": true + } + }, + { + "guarding_mode": { + "type": "string", + "required": true, + "description": "The guardrail mode to use for the request", + "default": "INPUT", + "one_of": [ + "INPUT", + "OUTPUT", + "BOTH" + ] + } + }, + { + "text_source": { + "type": "string", + "required": true, + "description": "Select where to pick the 'text' for the Content Guard Services request.", + "default": "concatenate_all_content", + "one_of": [ + "concatenate_all_content", + "concatenate_user_content" + ] + } + }, + { + "response_buffer_size": { + "type": "number", + "default": 100, + "description": "The amount of bytes receiving from upstream to be buffered before sending to the guardrails service. This only applies to the response content guard.", + "required": true + } + }, + { + "aws_region": { + "type": "string", + "description": "The AWS region to use for the Bedrock API", + "required": true + } + }, + { + "aws_access_key_id": { + "type": "string", + "description": "The AWS access key ID to use for authentication", + "referenceable": true, + "required": false + } + }, + { + "aws_secret_access_key": { + "type": "string", + "description": "The AWS secret access key to use for authentication", + "referenceable": true, + "required": false + } + }, + { + "aws_assume_role_arn": { + "type": "string", + "description": "The target AWS IAM role ARN used to access the guardrails service", + "required": false + } + }, + { + "aws_role_session_name": { + "type": "string", + "description": "The identifier of the assumed role session", + "required": false + } + }, + { + "aws_sts_endpoint_url": { + "description": "Override the STS endpoint URL when assuming a different role", + "type": "string", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-azure-content-safety/3.10.x.json b/schemas/ai-azure-content-safety/3.10.x.json new file mode 100644 index 00000000..3d5cc205 --- /dev/null +++ b/schemas/ai-azure-content-safety/3.10.x.json @@ -0,0 +1,176 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "content_safety_url": { + "description": "Full URL, inc protocol, of the Azure Content Safety instance.", + "type": "string", + "required": true, + "referenceable": true + } + }, + { + "azure_api_version": { + "type": "string", + "len_min": 1, + "description": "Sets the ?api-version URL parameter, used for defining the Azure Content Services interchange format.", + "default": "2023-10-01", + "required": true + } + }, + { + "azure_use_managed_identity": { + "description": "If checked, uses (if set) `azure_client_id`, `azure_client_secret`, and/or `azure_tenant_id` for Azure authentication, via Managed or User-assigned identity", + "type": "boolean", + "default": false + } + }, + { + "azure_client_id": { + "description": "If `azure_use_managed_identity` is true, set the client ID if required.", + "type": "string", + "required": false + } + }, + { + "azure_client_secret": { + "description": "If `azure_use_managed_identity` is true, set the client secret if required.", + "type": "string", + "required": false + } + }, + { + "azure_tenant_id": { + "description": "If `azure_use_managed_identity` is true, set the tenant ID if required.", + "type": "string", + "required": false + } + }, + { + "content_safety_key": { + "type": "string", + "referenceable": true, + "description": "If `azure_use_managed_identity` is true, set the API key to call Content Safety.", + "encrypted": true, + "required": false + } + }, + { + "text_source": { + "description": "Select where to pick the 'text' for the Azure Content Services request.", + "type": "string", + "default": "concatenate_all_content", + "one_of": [ + "concatenate_all_content", + "concatenate_user_content" + ] + } + }, + { + "categories": { + "description": "Array of categories, and their thresholds, to measure on.", + "type": "array", + "elements": { + "type": "record", + "required": true, + "fields": [ + { + "name": { + "required": true, + "type": "string" + } + }, + { + "rejection_level": { + "required": true, + "type": "integer" + } + } + ] + } + } + }, + { + "reveal_failure_reason": { + "description": "Set true to tell the caller why their request was rejected, if so.", + "type": "boolean", + "default": true + } + }, + { + "output_type": { + "description": "See https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter#content-filtering-categories", + "type": "string", + "default": "FourSeverityLevels", + "one_of": [ + "FourSeverityLevels", + "EightSeverityLevels" + ] + } + }, + { + "blocklist_names": { + "description": "Use these configured blocklists (in Azure Content Services) when inspecting content.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "halt_on_blocklist_hit": { + "description": "Tells Azure to reject the request if any blocklist filter is hit.", + "type": "boolean", + "default": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-azure-content-safety/3.11.x.json b/schemas/ai-azure-content-safety/3.11.x.json new file mode 100644 index 00000000..872b0357 --- /dev/null +++ b/schemas/ai-azure-content-safety/3.11.x.json @@ -0,0 +1,176 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "content_safety_url": { + "referenceable": true, + "required": true, + "description": "Full URL, inc protocol, of the Azure Content Safety instance.", + "type": "string" + } + }, + { + "azure_api_version": { + "required": true, + "description": "Sets the ?api-version URL parameter, used for defining the Azure Content Services interchange format.", + "len_min": 1, + "default": "2023-10-01", + "type": "string" + } + }, + { + "azure_use_managed_identity": { + "default": false, + "description": "If checked, uses (if set) `azure_client_id`, `azure_client_secret`, and/or `azure_tenant_id` for Azure authentication, via Managed or User-assigned identity", + "type": "boolean" + } + }, + { + "azure_client_id": { + "required": false, + "description": "If `azure_use_managed_identity` is true, set the client ID if required.", + "type": "string" + } + }, + { + "azure_client_secret": { + "required": false, + "description": "If `azure_use_managed_identity` is true, set the client secret if required.", + "type": "string" + } + }, + { + "azure_tenant_id": { + "required": false, + "description": "If `azure_use_managed_identity` is true, set the tenant ID if required.", + "type": "string" + } + }, + { + "content_safety_key": { + "required": false, + "description": "If `azure_use_managed_identity` is true, set the API key to call Content Safety.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "text_source": { + "one_of": [ + "concatenate_all_content", + "concatenate_user_content" + ], + "default": "concatenate_all_content", + "description": "Select where to pick the 'text' for the Azure Content Services request.", + "type": "string" + } + }, + { + "categories": { + "type": "array", + "description": "Array of categories, and their thresholds, to measure on.", + "elements": { + "required": true, + "fields": [ + { + "name": { + "required": true, + "type": "string" + } + }, + { + "rejection_level": { + "required": true, + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "reveal_failure_reason": { + "description": "Set true to tell the caller why their request was rejected, if so.", + "default": true, + "type": "boolean" + } + }, + { + "output_type": { + "one_of": [ + "FourSeverityLevels", + "EightSeverityLevels" + ], + "default": "FourSeverityLevels", + "description": "See https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter#content-filtering-categories", + "type": "string" + } + }, + { + "blocklist_names": { + "type": "array", + "description": "Use these configured blocklists (in Azure Content Services) when inspecting content.", + "elements": { + "type": "string" + } + } + }, + { + "halt_on_blocklist_hit": { + "description": "Tells Azure to reject the request if any blocklist filter is hit.", + "default": true, + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/ai-azure-content-safety/3.12.x.json b/schemas/ai-azure-content-safety/3.12.x.json new file mode 100644 index 00000000..0d35e815 --- /dev/null +++ b/schemas/ai-azure-content-safety/3.12.x.json @@ -0,0 +1,202 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "content_safety_url": { + "type": "string", + "description": "Full URL, inc protocol, of the Azure Content Safety instance.", + "referenceable": true, + "required": true + } + }, + { + "azure_api_version": { + "type": "string", + "len_min": 1, + "required": true, + "description": "Sets the ?api-version URL parameter, used for defining the Azure Content Services interchange format.", + "default": "2023-10-01" + } + }, + { + "azure_use_managed_identity": { + "type": "boolean", + "default": false, + "description": "If checked, uses (if set) `azure_client_id`, `azure_client_secret`, and/or `azure_tenant_id` for Azure authentication, via Managed or User-assigned identity" + } + }, + { + "azure_client_id": { + "type": "string", + "description": "If `azure_use_managed_identity` is true, set the client ID if required.", + "required": false + } + }, + { + "azure_client_secret": { + "type": "string", + "description": "If `azure_use_managed_identity` is true, set the client secret if required.", + "required": false + } + }, + { + "azure_tenant_id": { + "type": "string", + "description": "If `azure_use_managed_identity` is true, set the tenant ID if required.", + "required": false + } + }, + { + "content_safety_key": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "If `azure_use_managed_identity` is true, set the API key to call Content Safety." + } + }, + { + "text_source": { + "type": "string", + "default": "concatenate_all_content", + "one_of": [ + "concatenate_all_content", + "concatenate_user_content" + ], + "description": "Select where to pick the 'text' for the Azure Content Services request." + } + }, + { + "categories": { + "type": "array", + "description": "Array of categories, and their thresholds, to measure on.", + "elements": { + "type": "record", + "fields": [ + { + "name": { + "type": "string", + "required": true + } + }, + { + "rejection_level": { + "type": "integer", + "required": true + } + } + ], + "required": true + } + } + }, + { + "reveal_failure_reason": { + "type": "boolean", + "default": true, + "description": "Set true to tell the caller why their request was rejected, if so." + } + }, + { + "output_type": { + "type": "string", + "default": "FourSeverityLevels", + "one_of": [ + "FourSeverityLevels", + "EightSeverityLevels" + ], + "description": "See https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter#content-filtering-categories" + } + }, + { + "blocklist_names": { + "type": "array", + "description": "Use these configured blocklists (in Azure Content Services) when inspecting content.", + "elements": { + "type": "string" + } + } + }, + { + "halt_on_blocklist_hit": { + "type": "boolean", + "default": true, + "description": "Tells Azure to reject the request if any blocklist filter is hit." + } + }, + { + "guarding_mode": { + "type": "string", + "required": true, + "description": "The guard mode to use for the request", + "default": "INPUT", + "one_of": [ + "INPUT", + "OUTPUT", + "BOTH" + ] + } + }, + { + "stop_on_error": { + "type": "boolean", + "default": true, + "description": "Stop processing if an error occurs" + } + }, + { + "response_buffer_size": { + "type": "number", + "default": 100, + "description": "The amount of bytes receiving from upstream to be buffered before sending to the guardrails service. This only applies to the response content guard.", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-azure-content-safety/3.7.x.json b/schemas/ai-azure-content-safety/3.7.x.json new file mode 100644 index 00000000..db4bc3fc --- /dev/null +++ b/schemas/ai-azure-content-safety/3.7.x.json @@ -0,0 +1,176 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "content_safety_url": { + "required": true, + "type": "string", + "referenceable": true, + "description": "Full URL, inc protocol, of the Azure Content Safety instance." + } + }, + { + "azure_api_version": { + "description": "Sets the ?api-version URL parameter, used for defining the Azure Content Services interchange format.", + "required": true, + "type": "string", + "len_min": 1, + "default": "2023-10-01" + } + }, + { + "azure_use_managed_identity": { + "type": "boolean", + "description": "If checked, uses (if set) `azure_client_id`, `azure_client_secret`, and/or `azure_tenant_id` for Azure authentication, via Managed or User-assigned identity", + "default": false + } + }, + { + "azure_client_id": { + "required": false, + "type": "string", + "description": "If `azure_use_managed_identity` is true, set the client ID if required." + } + }, + { + "azure_client_secret": { + "required": false, + "type": "string", + "description": "If `azure_use_managed_identity` is true, set the client secret if required." + } + }, + { + "azure_tenant_id": { + "required": false, + "type": "string", + "description": "If `azure_use_managed_identity` is true, set the tenant ID if required." + } + }, + { + "content_safety_key": { + "encrypted": true, + "referenceable": true, + "required": false, + "description": "If `azure_use_managed_identity` is true, set the API key to call Content Safety.", + "type": "string" + } + }, + { + "text_source": { + "default": "concatenate_all_content", + "type": "string", + "description": "Select where to pick the 'text' for the Azure Content Services request.", + "one_of": [ + "concatenate_all_content", + "concatenate_user_content" + ] + } + }, + { + "categories": { + "elements": { + "required": true, + "type": "record", + "fields": [ + { + "name": { + "required": true, + "type": "string" + } + }, + { + "rejection_level": { + "required": true, + "type": "integer" + } + } + ] + }, + "type": "array", + "description": "Array of categories, and their thresholds, to measure on." + } + }, + { + "reveal_failure_reason": { + "type": "boolean", + "description": "Set true to tell the caller why their request was rejected, if so.", + "default": true + } + }, + { + "output_type": { + "default": "FourSeverityLevels", + "type": "string", + "description": "See https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter#content-filtering-categories", + "one_of": [ + "FourSeverityLevels", + "EightSeverityLevels" + ] + } + }, + { + "blocklist_names": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Use these configured blocklists (in Azure Content Services) when inspecting content." + } + }, + { + "halt_on_blocklist_hit": { + "type": "boolean", + "description": "Tells Azure to reject the request if any blocklist filter is hit.", + "default": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/ai-azure-content-safety/3.8.x.json b/schemas/ai-azure-content-safety/3.8.x.json new file mode 100644 index 00000000..8b87214a --- /dev/null +++ b/schemas/ai-azure-content-safety/3.8.x.json @@ -0,0 +1,176 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "content_safety_url": { + "description": "Full URL, inc protocol, of the Azure Content Safety instance.", + "required": true, + "type": "string", + "referenceable": true + } + }, + { + "azure_api_version": { + "description": "Sets the ?api-version URL parameter, used for defining the Azure Content Services interchange format.", + "required": true, + "type": "string", + "len_min": 1, + "default": "2023-10-01" + } + }, + { + "azure_use_managed_identity": { + "description": "If checked, uses (if set) `azure_client_id`, `azure_client_secret`, and/or `azure_tenant_id` for Azure authentication, via Managed or User-assigned identity", + "type": "boolean", + "default": false + } + }, + { + "azure_client_id": { + "description": "If `azure_use_managed_identity` is true, set the client ID if required.", + "type": "string", + "required": false + } + }, + { + "azure_client_secret": { + "description": "If `azure_use_managed_identity` is true, set the client secret if required.", + "type": "string", + "required": false + } + }, + { + "azure_tenant_id": { + "description": "If `azure_use_managed_identity` is true, set the tenant ID if required.", + "type": "string", + "required": false + } + }, + { + "content_safety_key": { + "description": "If `azure_use_managed_identity` is true, set the API key to call Content Safety.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "text_source": { + "description": "Select where to pick the 'text' for the Azure Content Services request.", + "type": "string", + "default": "concatenate_all_content", + "one_of": [ + "concatenate_all_content", + "concatenate_user_content" + ] + } + }, + { + "categories": { + "description": "Array of categories, and their thresholds, to measure on.", + "type": "array", + "elements": { + "fields": [ + { + "name": { + "type": "string", + "required": true + } + }, + { + "rejection_level": { + "type": "integer", + "required": true + } + } + ], + "required": true, + "type": "record" + } + } + }, + { + "reveal_failure_reason": { + "description": "Set true to tell the caller why their request was rejected, if so.", + "type": "boolean", + "default": true + } + }, + { + "output_type": { + "description": "See https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter#content-filtering-categories", + "type": "string", + "default": "FourSeverityLevels", + "one_of": [ + "FourSeverityLevels", + "EightSeverityLevels" + ] + } + }, + { + "blocklist_names": { + "description": "Use these configured blocklists (in Azure Content Services) when inspecting content.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "halt_on_blocklist_hit": { + "description": "Tells Azure to reject the request if any blocklist filter is hit.", + "type": "boolean", + "default": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/ai-azure-content-safety/3.9.x.json b/schemas/ai-azure-content-safety/3.9.x.json new file mode 100644 index 00000000..0752c460 --- /dev/null +++ b/schemas/ai-azure-content-safety/3.9.x.json @@ -0,0 +1,176 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "content_safety_url": { + "referenceable": true, + "description": "Full URL, inc protocol, of the Azure Content Safety instance.", + "required": true, + "type": "string" + } + }, + { + "azure_api_version": { + "required": true, + "type": "string", + "default": "2023-10-01", + "description": "Sets the ?api-version URL parameter, used for defining the Azure Content Services interchange format.", + "len_min": 1 + } + }, + { + "azure_use_managed_identity": { + "default": false, + "description": "If checked, uses (if set) `azure_client_id`, `azure_client_secret`, and/or `azure_tenant_id` for Azure authentication, via Managed or User-assigned identity", + "type": "boolean" + } + }, + { + "azure_client_id": { + "description": "If `azure_use_managed_identity` is true, set the client ID if required.", + "required": false, + "type": "string" + } + }, + { + "azure_client_secret": { + "description": "If `azure_use_managed_identity` is true, set the client secret if required.", + "required": false, + "type": "string" + } + }, + { + "azure_tenant_id": { + "description": "If `azure_use_managed_identity` is true, set the tenant ID if required.", + "required": false, + "type": "string" + } + }, + { + "content_safety_key": { + "encrypted": true, + "required": false, + "type": "string", + "description": "If `azure_use_managed_identity` is true, set the API key to call Content Safety.", + "referenceable": true + } + }, + { + "text_source": { + "default": "concatenate_all_content", + "description": "Select where to pick the 'text' for the Azure Content Services request.", + "type": "string", + "one_of": [ + "concatenate_all_content", + "concatenate_user_content" + ] + } + }, + { + "categories": { + "elements": { + "type": "record", + "required": true, + "fields": [ + { + "name": { + "required": true, + "type": "string" + } + }, + { + "rejection_level": { + "required": true, + "type": "integer" + } + } + ] + }, + "description": "Array of categories, and their thresholds, to measure on.", + "type": "array" + } + }, + { + "reveal_failure_reason": { + "default": true, + "description": "Set true to tell the caller why their request was rejected, if so.", + "type": "boolean" + } + }, + { + "output_type": { + "default": "FourSeverityLevels", + "description": "See https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter#content-filtering-categories", + "type": "string", + "one_of": [ + "FourSeverityLevels", + "EightSeverityLevels" + ] + } + }, + { + "blocklist_names": { + "elements": { + "type": "string" + }, + "description": "Use these configured blocklists (in Azure Content Services) when inspecting content.", + "type": "array" + } + }, + { + "halt_on_blocklist_hit": { + "default": true, + "description": "Tells Azure to reject the request if any blocklist filter is hit.", + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-mcp/.gitkeep b/schemas/ai-mcp/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/schemas/ai-mcp/.gitkeep @@ -0,0 +1 @@ + diff --git a/schemas/ai-mcp/3.12.x.json b/schemas/ai-mcp/3.12.x.json new file mode 100644 index 00000000..0388a801 --- /dev/null +++ b/schemas/ai-mcp/3.12.x.json @@ -0,0 +1,245 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "tools": { + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "description": { + "description": "The description of the MCP tool. This is used to provide information about the tool's functionality and usage.", + "type": "string", + "required": true + } + }, + { + "parameters": { + "type": "json", + "json_schema": { + "inline": { + "type": [ + "array", + "null" + ] + } + }, + "description": "The API parameters specification defined in OpenAPI. For example, '[{\"name\": \"city\", \"in\": \"query\", \"description\": \"Name of the city to get the weather for\", \"required\": true, \"schema\": {\"type\": \"string\"}}]'.See https://swagger.io/docs/specification/v3_0/describing-parameters/ for more details." + } + }, + { + "request_body": { + "type": "json", + "json_schema": { + "inline": { + "type": [ + "object", + "null" + ] + } + }, + "description": "The API requestBody specification defined in OpenAPI. For example, '{\"content\":{\"application/x-www-form-urlencoded\":{\"schema\":{\"type\":\"object\",\"properties\":{\"color\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}}}}'.See https://swagger.io/docs/specification/v3_0/describing-request-body/describing-request-body/ for more details." + } + }, + { + "host": { + "description": "The host of the exported API. By default, Kong will extract the host from API configuration. If the configured host is wildcard, this field is required.", + "type": "string" + } + }, + { + "path": { + "type": "string", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "starts_with": "/", + "description": "The path of the exported API. By default, Kong will extract the path from API configuration. If the configured path is not exactly matched, this field is required." + } + }, + { + "method": { + "description": "The method of the exported API. By default, Kong will extract the method from API configuration. If the configured method is not exactly matched, this field is required.", + "one_of": [ + "GET", + "PUT", + "PATCH", + "POST", + "DELETE" + ], + "type": "string" + } + }, + { + "scheme": { + "description": "The scheme of the exported API. By default, Kong will extract the scheme from API configuration. If the configured scheme is not expected, this field can be used to override it.", + "one_of": [ + "http", + "https" + ], + "type": "string" + } + }, + { + "annotations": { + "type": "record", + "fields": [ + { + "title": { + "description": "Human-readable title for the tool", + "type": "string" + } + }, + { + "read_only_hint": { + "description": "If true, the tool does not modify its environment", + "type": "boolean" + } + }, + { + "destructive_hint": { + "description": "If true, the tool may perform destructive updates", + "type": "boolean" + } + }, + { + "idempotent_hint": { + "description": "If true, repeated calls with same args have no additional effect", + "type": "boolean" + } + }, + { + "open_world_hint": { + "description": "If true, tool interacts with external entities", + "type": "boolean" + } + } + ] + } + } + ] + }, + "required": false + } + }, + { + "server": { + "type": "record", + "fields": [ + { + "enabled": { + "description": "Enable or disable the MCP server. If disabled, the server will not be exported.", + "default": true, + "type": "boolean" + } + }, + { + "tag": { + "description": "The tag of the MCP server. This is used to filter the exported MCP tools. The field should contain exactly one tag. ", + "type": "string" + } + }, + { + "timeout": { + "description": "The timeout for calling the tools in milliseconds.", + "default": 10000, + "type": "number" + } + } + ], + "required": false + } + }, + { + "logging": { + "type": "record", + "fields": [ + { + "log_statistics": { + "description": "If enabled, will add mcp metrics into the Kong log plugin(s) output.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "log_payloads": { + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "default": false, + "type": "boolean", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "logging" + ] + } + } + ], + "required": true + } + }, + { + "max_request_body_size": { + "type": "integer", + "default": 8192, + "gt": 0, + "description": "max allowed body size allowed to be handled as MCP request." + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-compressor/.gitkeep b/schemas/ai-prompt-compressor/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/schemas/ai-prompt-compressor/3.11.x.json b/schemas/ai-prompt-compressor/3.11.x.json new file mode 100644 index 00000000..14cde36f --- /dev/null +++ b/schemas/ai-prompt-compressor/3.11.x.json @@ -0,0 +1,138 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "compressor_url": { + "default": "http://localhost:8080", + "required": true, + "description": "The url of the compressor", + "type": "string" + } + }, + { + "timeout": { + "default": 10000, + "description": "Connection timeout with the compressor", + "type": "number" + } + }, + { + "keepalive_timeout": { + "default": 60000, + "description": "The keepalive timeout for the established http connnection", + "type": "number" + } + }, + { + "stop_on_error": { + "default": true, + "description": "Stop processing if an error occurs", + "type": "boolean" + } + }, + { + "log_text_data": { + "default": false, + "description": "Log the text data", + "type": "boolean" + } + }, + { + "message_type": { + "type": "set", + "required": true, + "default": [ + "user" + ], + "elements": { + "one_of": [ + "system", + "assistant", + "user" + ], + "type": "string" + } + } + }, + { + "compressor_type": { + "required": true, + "description": "What compression type to use to compress with", + "one_of": [ + "rate", + "target_token" + ], + "default": "rate", + "type": "string" + } + }, + { + "compression_ranges": { + "type": "array", + "required": true, + "description": "What value to be used to compress with. The 'value' is interpreted as rate or target_token depending on compressor_type.", + "elements": { + "fields": [ + { + "min_tokens": { + "required": true, + "type": "integer" + } + }, + { + "max_tokens": { + "required": true, + "type": "integer" + } + }, + { + "value": { + "required": true, + "type": "number" + } + } + ], + "type": "record" + } + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-compressor/3.12.x.json b/schemas/ai-prompt-compressor/3.12.x.json new file mode 100644 index 00000000..2e3f4cb1 --- /dev/null +++ b/schemas/ai-prompt-compressor/3.12.x.json @@ -0,0 +1,138 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "compressor_url": { + "type": "string", + "default": "http://localhost:8080", + "description": "The url of the compressor", + "required": true + } + }, + { + "timeout": { + "type": "number", + "default": 10000, + "description": "Connection timeout with the compressor" + } + }, + { + "keepalive_timeout": { + "type": "number", + "default": 60000, + "description": "The keepalive timeout for the established http connnection" + } + }, + { + "stop_on_error": { + "type": "boolean", + "default": true, + "description": "Stop processing if an error occurs" + } + }, + { + "log_text_data": { + "type": "boolean", + "default": false, + "description": "Log the text data" + } + }, + { + "message_type": { + "type": "set", + "default": [ + "user" + ], + "elements": { + "type": "string", + "one_of": [ + "system", + "assistant", + "user" + ] + }, + "required": true + } + }, + { + "compressor_type": { + "type": "string", + "required": true, + "description": "What compression type to use to compress with", + "default": "rate", + "one_of": [ + "rate", + "target_token" + ] + } + }, + { + "compression_ranges": { + "type": "array", + "description": "What value to be used to compress with. The 'value' is interpreted as rate or target_token depending on compressor_type.", + "elements": { + "type": "record", + "fields": [ + { + "min_tokens": { + "type": "integer", + "required": true + } + }, + { + "max_tokens": { + "type": "integer", + "required": true + } + }, + { + "value": { + "type": "number", + "required": true + } + } + ] + }, + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-decorator/3.10.x.json b/schemas/ai-prompt-decorator/3.10.x.json new file mode 100644 index 00000000..56cf1d87 --- /dev/null +++ b/schemas/ai-prompt-decorator/3.10.x.json @@ -0,0 +1,139 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.prompts.prepend", + "config.prompts.append" + ] + } + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "prompts": { + "type": "record", + "required": false, + "fields": [ + { + "prepend": { + "type": "array", + "len_max": 15, + "description": "Insert chat messages at the beginning of the chat message array. This array preserves exact order when adding messages.", + "elements": { + "type": "record", + "required": false, + "fields": [ + { + "role": { + "default": "system", + "type": "string", + "one_of": [ + "system", + "assistant", + "user" + ], + "required": true + } + }, + { + "content": { + "len_max": 500, + "type": "string", + "len_min": 1, + "required": true + } + } + ] + }, + "required": false + } + }, + { + "append": { + "type": "array", + "len_max": 15, + "description": "Insert chat messages at the end of the chat message array. This array preserves exact order when adding messages.", + "elements": { + "type": "record", + "required": false, + "fields": [ + { + "role": { + "default": "system", + "type": "string", + "one_of": [ + "system", + "assistant", + "user" + ], + "required": true + } + }, + { + "content": { + "len_max": 500, + "type": "string", + "len_min": 1, + "required": true + } + } + ] + }, + "required": false + } + } + ] + } + }, + { + "max_request_body_size": { + "description": "max allowed body size allowed to be introspected", + "type": "integer", + "default": 8192, + "gt": 0 + } + }, + { + "llm_format": { + "type": "string", + "description": "LLM input and output format and schema to use", + "one_of": [ + "openai", + "bedrock", + "gemini" + ], + "default": "openai", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-decorator/3.11.x.json b/schemas/ai-prompt-decorator/3.11.x.json new file mode 100644 index 00000000..3c838850 --- /dev/null +++ b/schemas/ai-prompt-decorator/3.11.x.json @@ -0,0 +1,141 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "prompts": { + "required": false, + "fields": [ + { + "prepend": { + "required": false, + "description": "Insert chat messages at the beginning of the chat message array. This array preserves exact order when adding messages.", + "len_max": 15, + "type": "array", + "elements": { + "required": false, + "fields": [ + { + "role": { + "one_of": [ + "system", + "assistant", + "user" + ], + "required": true, + "default": "system", + "type": "string" + } + }, + { + "content": { + "len_min": 1, + "required": true, + "len_max": 100000, + "type": "string" + } + } + ], + "type": "record" + } + } + }, + { + "append": { + "required": false, + "description": "Insert chat messages at the end of the chat message array. This array preserves exact order when adding messages.", + "len_max": 15, + "type": "array", + "elements": { + "required": false, + "fields": [ + { + "role": { + "one_of": [ + "system", + "assistant", + "user" + ], + "required": true, + "default": "system", + "type": "string" + } + }, + { + "content": { + "len_min": 1, + "required": true, + "len_max": 100000, + "type": "string" + } + } + ], + "type": "record" + } + } + } + ], + "type": "record" + } + }, + { + "max_request_body_size": { + "default": 8192, + "gt": 0, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "type": "integer" + } + }, + { + "llm_format": { + "required": false, + "description": "LLM input and output format and schema to use", + "one_of": [ + "openai", + "bedrock", + "gemini", + "cohere", + "huggingface" + ], + "default": "openai", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.prompts.prepend", + "config.prompts.append" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-decorator/3.12.x.json b/schemas/ai-prompt-decorator/3.12.x.json new file mode 100644 index 00000000..b30f09e6 --- /dev/null +++ b/schemas/ai-prompt-decorator/3.12.x.json @@ -0,0 +1,141 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.prompts.prepend", + "config.prompts.append" + ] + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "prompts": { + "type": "record", + "fields": [ + { + "prepend": { + "type": "array", + "len_max": 15, + "required": false, + "description": "Insert chat messages at the beginning of the chat message array. This array preserves exact order when adding messages.", + "elements": { + "type": "record", + "fields": [ + { + "role": { + "type": "string", + "default": "system", + "one_of": [ + "system", + "assistant", + "user" + ], + "required": true + } + }, + { + "content": { + "type": "string", + "len_min": 1, + "len_max": 100000, + "required": true + } + } + ], + "required": false + } + } + }, + { + "append": { + "type": "array", + "len_max": 15, + "required": false, + "description": "Insert chat messages at the end of the chat message array. This array preserves exact order when adding messages.", + "elements": { + "type": "record", + "fields": [ + { + "role": { + "type": "string", + "default": "system", + "one_of": [ + "system", + "assistant", + "user" + ], + "required": true + } + }, + { + "content": { + "type": "string", + "len_min": 1, + "len_max": 100000, + "required": true + } + } + ], + "required": false + } + } + } + ], + "required": false + } + }, + { + "max_request_body_size": { + "type": "integer", + "default": 8192, + "gt": 0, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size." + } + }, + { + "llm_format": { + "type": "string", + "required": false, + "description": "LLM input and output format and schema to use", + "default": "openai", + "one_of": [ + "openai", + "bedrock", + "gemini", + "cohere", + "huggingface" + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-decorator/3.6.x.json b/schemas/ai-prompt-decorator/3.6.x.json new file mode 100644 index 00000000..ef88e49e --- /dev/null +++ b/schemas/ai-prompt-decorator/3.6.x.json @@ -0,0 +1,118 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.prompts.prepend", + "config.prompts.append" + ] + } + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "prompts": { + "required": false, + "type": "record", + "fields": [ + { + "prepend": { + "elements": { + "required": false, + "type": "record", + "fields": [ + { + "role": { + "required": true, + "type": "string", + "default": "system", + "one_of": [ + "system", + "assistant", + "user" + ] + } + }, + { + "content": { + "len_max": 500, + "type": "string", + "required": true, + "len_min": 1 + } + } + ] + }, + "type": "array", + "len_max": 15, + "description": "Insert chat messages at the beginning of the chat message array. This array preserves exact order when adding messages.", + "required": false + } + }, + { + "append": { + "elements": { + "required": false, + "type": "record", + "fields": [ + { + "role": { + "required": true, + "type": "string", + "default": "system", + "one_of": [ + "system", + "assistant", + "user" + ] + } + }, + { + "content": { + "len_max": 500, + "type": "string", + "required": true, + "len_min": 1 + } + } + ] + }, + "type": "array", + "len_max": 15, + "description": "Insert chat messages at the end of the chat message array. This array preserves exact order when adding messages.", + "required": false + } + } + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-decorator/3.7.x.json b/schemas/ai-prompt-decorator/3.7.x.json new file mode 100644 index 00000000..1ee146d7 --- /dev/null +++ b/schemas/ai-prompt-decorator/3.7.x.json @@ -0,0 +1,118 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "prompts": { + "required": false, + "type": "record", + "fields": [ + { + "prepend": { + "description": "Insert chat messages at the beginning of the chat message array. This array preserves exact order when adding messages.", + "required": false, + "elements": { + "required": false, + "type": "record", + "fields": [ + { + "role": { + "required": true, + "default": "system", + "type": "string", + "one_of": [ + "system", + "assistant", + "user" + ] + } + }, + { + "content": { + "required": true, + "len_min": 1, + "type": "string", + "len_max": 500 + } + } + ] + }, + "type": "array", + "len_max": 15 + } + }, + { + "append": { + "description": "Insert chat messages at the end of the chat message array. This array preserves exact order when adding messages.", + "required": false, + "elements": { + "required": false, + "type": "record", + "fields": [ + { + "role": { + "required": true, + "default": "system", + "type": "string", + "one_of": [ + "system", + "assistant", + "user" + ] + } + }, + { + "content": { + "required": true, + "len_min": 1, + "type": "string", + "len_max": 500 + } + } + ] + }, + "type": "array", + "len_max": 15 + } + } + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.prompts.prepend", + "config.prompts.append" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-decorator/3.8.x.json b/schemas/ai-prompt-decorator/3.8.x.json new file mode 100644 index 00000000..5465e8bc --- /dev/null +++ b/schemas/ai-prompt-decorator/3.8.x.json @@ -0,0 +1,126 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "prompts": { + "fields": [ + { + "prepend": { + "description": "Insert chat messages at the beginning of the chat message array. This array preserves exact order when adding messages.", + "required": false, + "len_max": 15, + "elements": { + "fields": [ + { + "role": { + "default": "system", + "type": "string", + "required": true, + "one_of": [ + "system", + "assistant", + "user" + ] + } + }, + { + "content": { + "len_min": 1, + "type": "string", + "len_max": 500, + "required": true + } + } + ], + "required": false, + "type": "record" + }, + "type": "array" + } + }, + { + "append": { + "description": "Insert chat messages at the end of the chat message array. This array preserves exact order when adding messages.", + "required": false, + "len_max": 15, + "elements": { + "fields": [ + { + "role": { + "default": "system", + "type": "string", + "required": true, + "one_of": [ + "system", + "assistant", + "user" + ] + } + }, + { + "content": { + "len_min": 1, + "type": "string", + "len_max": 500, + "required": true + } + } + ], + "required": false, + "type": "record" + }, + "type": "array" + } + } + ], + "required": false, + "type": "record" + } + }, + { + "max_request_body_size": { + "description": "max allowed body size allowed to be introspected", + "type": "integer", + "gt": 0, + "default": 8192 + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.prompts.prepend", + "config.prompts.append" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-decorator/3.9.x.json b/schemas/ai-prompt-decorator/3.9.x.json new file mode 100644 index 00000000..4002199f --- /dev/null +++ b/schemas/ai-prompt-decorator/3.9.x.json @@ -0,0 +1,126 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.prompts.prepend", + "config.prompts.append" + ] + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "prompts": { + "type": "record", + "required": false, + "fields": [ + { + "prepend": { + "len_max": 15, + "required": false, + "type": "array", + "elements": { + "type": "record", + "required": false, + "fields": [ + { + "role": { + "default": "system", + "type": "string", + "required": true, + "one_of": [ + "system", + "assistant", + "user" + ] + } + }, + { + "content": { + "len_max": 500, + "type": "string", + "required": true, + "len_min": 1 + } + } + ] + }, + "description": "Insert chat messages at the beginning of the chat message array. This array preserves exact order when adding messages." + } + }, + { + "append": { + "len_max": 15, + "required": false, + "type": "array", + "elements": { + "type": "record", + "required": false, + "fields": [ + { + "role": { + "default": "system", + "type": "string", + "required": true, + "one_of": [ + "system", + "assistant", + "user" + ] + } + }, + { + "content": { + "len_max": 500, + "type": "string", + "required": true, + "len_min": 1 + } + } + ] + }, + "description": "Insert chat messages at the end of the chat message array. This array preserves exact order when adding messages." + } + } + ] + } + }, + { + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "gt": 0, + "type": "integer" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-guard/3.10.x.json b/schemas/ai-prompt-guard/3.10.x.json new file mode 100644 index 00000000..38648982 --- /dev/null +++ b/schemas/ai-prompt-guard/3.10.x.json @@ -0,0 +1,117 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.allow_patterns", + "config.deny_patterns" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "config.allow_all_conversation_history", + "if_field": "config.match_all_roles", + "then_match": { + "eq": false + } + } + } + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "allow_patterns": { + "type": "array", + "len_max": 10, + "description": "Array of valid regex patterns, or valid questions from the 'user' role in chat.", + "elements": { + "len_max": 500, + "type": "string", + "len_min": 1 + }, + "required": false + } + }, + { + "deny_patterns": { + "type": "array", + "len_max": 10, + "description": "Array of invalid regex patterns, or invalid questions from the 'user' role in chat.", + "elements": { + "len_max": 500, + "type": "string", + "len_min": 1 + }, + "required": false + } + }, + { + "allow_all_conversation_history": { + "description": "If true, will ignore all previous chat prompts from the conversation history.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "max_request_body_size": { + "gt": 0, + "default": 8192, + "type": "integer", + "description": "max allowed body size allowed to be introspected" + } + }, + { + "match_all_roles": { + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "llm_format": { + "type": "string", + "description": "LLM input and output format and schema to use", + "one_of": [ + "openai", + "bedrock", + "gemini" + ], + "default": "openai", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-guard/3.11.x.json b/schemas/ai-prompt-guard/3.11.x.json new file mode 100644 index 00000000..479bcb40 --- /dev/null +++ b/schemas/ai-prompt-guard/3.11.x.json @@ -0,0 +1,136 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "allow_patterns": { + "required": false, + "description": "Array of valid regex patterns, or valid questions from the 'user' role in chat.", + "len_max": 10, + "type": "array", + "elements": { + "len_min": 1, + "len_max": 500, + "type": "string" + } + } + }, + { + "deny_patterns": { + "required": false, + "description": "Array of invalid regex patterns, or invalid questions from the 'user' role in chat.", + "len_max": 10, + "type": "array", + "elements": { + "len_min": 1, + "len_max": 500, + "type": "string" + } + } + }, + { + "allow_all_conversation_history": { + "default": false, + "required": true, + "description": "If true, will ignore all previous chat prompts from the conversation history.", + "type": "boolean" + } + }, + { + "max_request_body_size": { + "default": 8192, + "gt": 0, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "type": "integer" + } + }, + { + "match_all_roles": { + "default": false, + "required": true, + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "type": "boolean" + } + }, + { + "llm_format": { + "required": false, + "description": "LLM input and output format and schema to use", + "one_of": [ + "openai", + "bedrock", + "gemini", + "cohere", + "huggingface" + ], + "default": "openai", + "type": "string" + } + }, + { + "genai_category": { + "required": false, + "description": "Generative AI category of the request", + "one_of": [ + "text/generation", + "text/embeddings", + "audio/transcription", + "audio/speech", + "image/generation", + "video/generation", + "realtime/generation" + ], + "default": "text/generation", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.allow_patterns", + "config.deny_patterns" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "config.allow_all_conversation_history", + "if_field": "config.match_all_roles", + "then_match": { + "eq": false + } + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-guard/3.12.x.json b/schemas/ai-prompt-guard/3.12.x.json new file mode 100644 index 00000000..031ae70e --- /dev/null +++ b/schemas/ai-prompt-guard/3.12.x.json @@ -0,0 +1,136 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.allow_patterns", + "config.deny_patterns" + ] + }, + { + "conditional": { + "then_match": { + "eq": false + }, + "if_match": { + "eq": true + }, + "then_field": "config.allow_all_conversation_history", + "if_field": "config.match_all_roles" + } + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "allow_patterns": { + "type": "array", + "len_max": 10, + "required": false, + "description": "Array of valid regex patterns, or valid questions from the 'user' role in chat.", + "elements": { + "type": "string", + "len_min": 1, + "len_max": 500 + } + } + }, + { + "deny_patterns": { + "type": "array", + "len_max": 10, + "required": false, + "description": "Array of invalid regex patterns, or invalid questions from the 'user' role in chat.", + "elements": { + "type": "string", + "len_min": 1, + "len_max": 500 + } + } + }, + { + "allow_all_conversation_history": { + "type": "boolean", + "default": false, + "description": "If true, will ignore all previous chat prompts from the conversation history.", + "required": true + } + }, + { + "max_request_body_size": { + "type": "integer", + "default": 8192, + "gt": 0, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size." + } + }, + { + "match_all_roles": { + "type": "boolean", + "default": false, + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "required": true + } + }, + { + "llm_format": { + "type": "string", + "required": false, + "description": "LLM input and output format and schema to use", + "default": "openai", + "one_of": [ + "openai", + "bedrock", + "gemini", + "cohere", + "huggingface" + ] + } + }, + { + "genai_category": { + "type": "string", + "required": false, + "description": "Generative AI category of the request", + "default": "text/generation", + "one_of": [ + "text/generation", + "text/embeddings", + "audio/transcription", + "audio/speech", + "image/generation", + "video/generation", + "realtime/generation" + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-guard/3.6.x.json b/schemas/ai-prompt-guard/3.6.x.json new file mode 100644 index 00000000..387970a4 --- /dev/null +++ b/schemas/ai-prompt-guard/3.6.x.json @@ -0,0 +1,80 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.allow_patterns", + "config.deny_patterns" + ] + } + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "allow_patterns": { + "elements": { + "len_max": 50, + "type": "string", + "len_min": 1 + }, + "type": "array", + "default": [ + + ], + "len_max": 10, + "description": "Array of valid patterns, or valid questions from the 'user' role in chat." + } + }, + { + "deny_patterns": { + "elements": { + "len_max": 50, + "type": "string", + "len_min": 1 + }, + "type": "array", + "default": [ + + ], + "len_max": 10, + "description": "Array of invalid patterns, or invalid questions from the 'user' role in chat." + } + }, + { + "allow_all_conversation_history": { + "required": true, + "type": "boolean", + "description": "If true, will ignore all previous chat prompts from the conversation history.", + "default": false + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-guard/3.7.x.json b/schemas/ai-prompt-guard/3.7.x.json new file mode 100644 index 00000000..69f97e6a --- /dev/null +++ b/schemas/ai-prompt-guard/3.7.x.json @@ -0,0 +1,80 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "allow_patterns": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "len_min": 1, + "len_max": 500 + }, + "description": "Array of valid patterns, or valid questions from the 'user' role in chat.", + "len_max": 10 + } + }, + { + "deny_patterns": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "len_min": 1, + "len_max": 500 + }, + "description": "Array of invalid patterns, or invalid questions from the 'user' role in chat.", + "len_max": 10 + } + }, + { + "allow_all_conversation_history": { + "required": true, + "description": "If true, will ignore all previous chat prompts from the conversation history.", + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.allow_patterns", + "config.deny_patterns" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-guard/3.8.x.json b/schemas/ai-prompt-guard/3.8.x.json new file mode 100644 index 00000000..83d1ea42 --- /dev/null +++ b/schemas/ai-prompt-guard/3.8.x.json @@ -0,0 +1,104 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "allow_patterns": { + "description": "Array of valid regex patterns, or valid questions from the 'user' role in chat.", + "required": false, + "len_max": 10, + "elements": { + "len_min": 1, + "len_max": 500, + "type": "string" + }, + "type": "array" + } + }, + { + "deny_patterns": { + "description": "Array of invalid regex patterns, or invalid questions from the 'user' role in chat.", + "required": false, + "len_max": 10, + "elements": { + "len_min": 1, + "len_max": 500, + "type": "string" + }, + "type": "array" + } + }, + { + "allow_all_conversation_history": { + "description": "If true, will ignore all previous chat prompts from the conversation history.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "max_request_body_size": { + "description": "max allowed body size allowed to be introspected", + "type": "integer", + "gt": 0, + "default": 8192 + } + }, + { + "match_all_roles": { + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "type": "boolean", + "required": true, + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.allow_patterns", + "config.deny_patterns" + ] + }, + { + "conditional": { + "if_field": "config.match_all_roles", + "if_match": { + "eq": true + }, + "then_field": "config.allow_all_conversation_history", + "then_match": { + "eq": false + } + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-guard/3.9.x.json b/schemas/ai-prompt-guard/3.9.x.json new file mode 100644 index 00000000..1eb02b54 --- /dev/null +++ b/schemas/ai-prompt-guard/3.9.x.json @@ -0,0 +1,104 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.allow_patterns", + "config.deny_patterns" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "config.allow_all_conversation_history", + "if_field": "config.match_all_roles", + "then_match": { + "eq": false + } + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "allow_patterns": { + "len_max": 10, + "required": false, + "type": "array", + "elements": { + "len_max": 500, + "len_min": 1, + "type": "string" + }, + "description": "Array of valid regex patterns, or valid questions from the 'user' role in chat." + } + }, + { + "deny_patterns": { + "len_max": 10, + "required": false, + "type": "array", + "elements": { + "len_max": 500, + "len_min": 1, + "type": "string" + }, + "description": "Array of invalid regex patterns, or invalid questions from the 'user' role in chat." + } + }, + { + "allow_all_conversation_history": { + "default": false, + "description": "If true, will ignore all previous chat prompts from the conversation history.", + "required": true, + "type": "boolean" + } + }, + { + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "gt": 0, + "type": "integer" + } + }, + { + "match_all_roles": { + "default": false, + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "required": true, + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-template/3.10.x.json b/schemas/ai-prompt-template/3.10.x.json new file mode 100644 index 00000000..77a8657e --- /dev/null +++ b/schemas/ai-prompt-template/3.10.x.json @@ -0,0 +1,88 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "templates": { + "description": "Array of templates available to the request context.", + "type": "array", + "elements": { + "type": "record", + "required": true, + "fields": [ + { + "name": { + "description": "Unique name for the template, can be called with `{template://NAME}`", + "type": "string", + "required": true + } + }, + { + "template": { + "description": "Template string for this request, supports mustache-style `{{placeholders}}`", + "type": "string", + "required": true + } + } + ] + }, + "required": true + } + }, + { + "allow_untemplated_requests": { + "description": "Set true to allow requests that don't call or match any template.", + "type": "boolean", + "default": true, + "required": true + } + }, + { + "log_original_request": { + "description": "Set true to add the original request to the Kong log plugin(s) output.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "max_request_body_size": { + "gt": 0, + "type": "integer", + "description": "max allowed body size allowed to be introspected", + "default": 8192 + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-template/3.11.x.json b/schemas/ai-prompt-template/3.11.x.json new file mode 100644 index 00000000..1e7ea0d1 --- /dev/null +++ b/schemas/ai-prompt-template/3.11.x.json @@ -0,0 +1,88 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "templates": { + "type": "array", + "required": true, + "description": "Array of templates available to the request context.", + "elements": { + "required": true, + "fields": [ + { + "name": { + "required": true, + "description": "Unique name for the template, can be called with `{template://NAME}`", + "type": "string" + } + }, + { + "template": { + "required": true, + "description": "Template string for this request, supports mustache-style `{{placeholders}}`", + "type": "string" + } + } + ], + "type": "record" + } + } + }, + { + "allow_untemplated_requests": { + "description": "Set true to allow requests that don't call or match any template.", + "required": true, + "default": true, + "type": "boolean" + } + }, + { + "log_original_request": { + "description": "Set true to add the original request to the Kong log plugin(s) output.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "max_request_body_size": { + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "gt": 0, + "default": 8192, + "type": "integer" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-template/3.12.x.json b/schemas/ai-prompt-template/3.12.x.json new file mode 100644 index 00000000..05ed3b96 --- /dev/null +++ b/schemas/ai-prompt-template/3.12.x.json @@ -0,0 +1,86 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "templates": { + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "name": { + "description": "Unique name for the template, can be called with `{template://NAME}`", + "type": "string", + "required": true + } + }, + { + "template": { + "description": "Template string for this request, supports mustache-style `{{placeholders}}`", + "type": "string", + "required": true + } + } + ], + "required": true + }, + "description": "Array of templates available to the request context.", + "required": true + } + }, + { + "allow_untemplated_requests": { + "type": "boolean", + "default": true, + "description": "Set true to allow requests that don't call or match any template.", + "required": true + } + }, + { + "log_original_request": { + "type": "boolean", + "default": false, + "description": "Set true to add the original request to the Kong log plugin(s) output.", + "required": true + } + }, + { + "max_request_body_size": { + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "default": 8192, + "gt": 0, + "type": "integer" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-template/3.6.x.json b/schemas/ai-prompt-template/3.6.x.json new file mode 100644 index 00000000..97476bdd --- /dev/null +++ b/schemas/ai-prompt-template/3.6.x.json @@ -0,0 +1,88 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "templates": { + "required": true, + "type": "array", + "description": "Array of templates available to the request context.", + "elements": { + "required": true, + "type": "record", + "fields": [ + { + "name": { + "required": true, + "type": "string", + "description": "Unique name for the template, can be called with `{template://NAME}`" + } + }, + { + "template": { + "required": true, + "type": "string", + "description": "Template string for this request, supports mustache-style `{{placeholders}}`" + } + } + ] + } + } + }, + { + "allow_untemplated_requests": { + "required": true, + "type": "boolean", + "default": true, + "description": "Set true to allow requests that don't call or match any template." + } + }, + { + "log_original_request": { + "required": true, + "type": "boolean", + "default": false, + "description": "Set true to add the original request to the Kong log plugin(s) output." + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-template/3.7.x.json b/schemas/ai-prompt-template/3.7.x.json new file mode 100644 index 00000000..1af322a2 --- /dev/null +++ b/schemas/ai-prompt-template/3.7.x.json @@ -0,0 +1,88 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "templates": { + "required": true, + "elements": { + "required": true, + "type": "record", + "fields": [ + { + "name": { + "required": true, + "description": "Unique name for the template, can be called with `{template://NAME}`", + "type": "string" + } + }, + { + "template": { + "required": true, + "description": "Template string for this request, supports mustache-style `{{placeholders}}`", + "type": "string" + } + } + ] + }, + "description": "Array of templates available to the request context.", + "type": "array" + } + }, + { + "allow_untemplated_requests": { + "required": true, + "description": "Set true to allow requests that don't call or match any template.", + "type": "boolean", + "default": true + } + }, + { + "log_original_request": { + "required": true, + "description": "Set true to add the original request to the Kong log plugin(s) output.", + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-template/3.8.x.json b/schemas/ai-prompt-template/3.8.x.json new file mode 100644 index 00000000..6c8f6ed5 --- /dev/null +++ b/schemas/ai-prompt-template/3.8.x.json @@ -0,0 +1,88 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "templates": { + "description": "Array of templates available to the request context.", + "type": "array", + "required": true, + "elements": { + "fields": [ + { + "name": { + "description": "Unique name for the template, can be called with `{template://NAME}`", + "type": "string", + "required": true + } + }, + { + "template": { + "description": "Template string for this request, supports mustache-style `{{placeholders}}`", + "type": "string", + "required": true + } + } + ], + "required": true, + "type": "record" + } + } + }, + { + "allow_untemplated_requests": { + "description": "Set true to allow requests that don't call or match any template.", + "type": "boolean", + "required": true, + "default": true + } + }, + { + "log_original_request": { + "description": "Set true to add the original request to the Kong log plugin(s) output.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "max_request_body_size": { + "description": "max allowed body size allowed to be introspected", + "type": "integer", + "gt": 0, + "default": 8192 + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/ai-prompt-template/3.9.x.json b/schemas/ai-prompt-template/3.9.x.json new file mode 100644 index 00000000..2822bb38 --- /dev/null +++ b/schemas/ai-prompt-template/3.9.x.json @@ -0,0 +1,88 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "templates": { + "elements": { + "type": "record", + "required": true, + "fields": [ + { + "name": { + "description": "Unique name for the template, can be called with `{template://NAME}`", + "required": true, + "type": "string" + } + }, + { + "template": { + "description": "Template string for this request, supports mustache-style `{{placeholders}}`", + "required": true, + "type": "string" + } + } + ] + }, + "description": "Array of templates available to the request context.", + "required": true, + "type": "array" + } + }, + { + "allow_untemplated_requests": { + "default": true, + "description": "Set true to allow requests that don't call or match any template.", + "required": true, + "type": "boolean" + } + }, + { + "log_original_request": { + "default": false, + "description": "Set true to add the original request to the Kong log plugin(s) output.", + "required": true, + "type": "boolean" + } + }, + { + "max_request_body_size": { + "gt": 0, + "description": "max allowed body size allowed to be introspected", + "default": 8192, + "type": "integer" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-proxy-advanced/3.10.x.json b/schemas/ai-proxy-advanced/3.10.x.json new file mode 100644 index 00000000..55cd619e --- /dev/null +++ b/schemas/ai-proxy-advanced/3.10.x.json @@ -0,0 +1,1701 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.targets", + "config.balancer" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.targets", + "config.balancer" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.targets", + "config.llm_format" + ] + } + } + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "balancer": { + "type": "record", + "required": true, + "fields": [ + { + "algorithm": { + "description": "Which load balancing algorithm to use.", + "default": "round-robin", + "type": "string", + "one_of": [ + "round-robin", + "lowest-latency", + "lowest-usage", + "consistent-hashing", + "semantic", + "priority" + ] + } + }, + { + "tokens_count_strategy": { + "description": "What tokens to use for usage calculation. Available values are: `total_tokens` `prompt_tokens`, `completion_tokens` and `cost`.", + "default": "total-tokens", + "type": "string", + "one_of": [ + "total-tokens", + "prompt-tokens", + "completion-tokens", + "cost" + ] + } + }, + { + "latency_strategy": { + "description": "What metrics to use for latency. Available values are: `tpot` (time-per-output-token) and `e2e`.", + "default": "tpot", + "type": "string", + "one_of": [ + "tpot", + "e2e" + ] + } + }, + { + "hash_on_header": { + "description": "The header to use for consistent-hashing.", + "default": "X-Kong-LLM-Request-ID", + "type": "string" + } + }, + { + "slots": { + "description": "The number of slots in the load balancer algorithm.", + "default": 10000, + "type": "integer", + "between": [ + 10, + 65536 + ] + } + }, + { + "retries": { + "description": "The number of retries to execute upon failure to proxy.", + "default": 5, + "type": "integer", + "between": [ + 0, + 32767 + ] + } + }, + { + "connect_timeout": { + "between": [ + 1, + 2147483646 + ], + "default": 60000, + "type": "integer" + } + }, + { + "write_timeout": { + "between": [ + 1, + 2147483646 + ], + "default": 60000, + "type": "integer" + } + }, + { + "read_timeout": { + "between": [ + 1, + 2147483646 + ], + "default": 60000, + "type": "integer" + } + }, + { + "failover_criteria": { + "description": "Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "error", + "timeout", + "invalid_header", + "http_500", + "http_502", + "http_503", + "http_504", + "http_403", + "http_404", + "http_429", + "non_idempotent" + ] + }, + "default": [ + "error", + "timeout" + ] + } + } + ] + } + }, + { + "embeddings": { + "entity_checks": [ + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.deployment_id" + ] + } + } + ], + "type": "record", + "fields": [ + { + "auth": { + "type": "record", + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "header_value": { + "type": "string", + "referenceable": true, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "encrypted": true, + "required": false + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "param_value": { + "type": "string", + "referenceable": true, + "description": "Specify the full parameter value for 'param_name'.", + "encrypted": true, + "required": false + } + }, + { + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string", + "one_of": [ + "query", + "body" + ], + "required": false + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "azure_client_secret": { + "type": "string", + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "encrypted": true, + "required": false + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "gcp_service_account_json": { + "type": "string", + "referenceable": true, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "encrypted": true, + "required": false + } + }, + { + "aws_access_key_id": { + "type": "string", + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "encrypted": true, + "required": false + } + }, + { + "aws_secret_access_key": { + "type": "string", + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "encrypted": true, + "required": false + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean", + "default": false, + "required": false + } + } + ], + "required": false + } + }, + { + "model": { + "type": "record", + "fields": [ + { + "provider": { + "description": "AI provider format to use for embeddings API", + "type": "string", + "one_of": [ + "openai", + "mistral", + "huggingface", + "azure", + "bedrock", + "gemini" + ], + "required": true + } + }, + { + "name": { + "description": "Model name to execute.", + "type": "string", + "required": true + } + }, + { + "options": { + "description": "Key/value settings for the model", + "type": "record", + "fields": [ + { + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string", + "required": false + } + }, + { + "azure": { + "type": "record", + "fields": [ + { + "instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string", + "required": false + } + }, + { + "api_version": { + "description": "'api-version' for Azure OpenAI instances.", + "type": "string", + "default": "2023-05-15", + "required": false + } + }, + { + "deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string", + "required": false + } + } + ], + "required": true + } + }, + { + "bedrock": { + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "type": "record", + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + }, + { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string", + "required": false + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + } + ], + "required": false + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "type": "record", + "fields": [ + { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string", + "required": false + } + }, + { + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string", + "required": false + } + }, + { + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string", + "required": false + } + } + ], + "required": false + } + }, + { + "huggingface": { + "type": "record", + "fields": [ + { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean", + "required": false + } + }, + { + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean", + "required": false + } + } + ], + "required": false + } + } + ], + "required": false + } + } + ], + "required": true + } + } + ], + "required": false + } + }, + { + "vectordb": { + "type": "record", + "fields": [ + { + "strategy": { + "description": "which vector database driver to use", + "type": "string", + "one_of": [ + "redis", + "pgvector" + ], + "required": true + } + }, + { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer", + "required": true + } + }, + { + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number", + "required": true + } + }, + { + "distance_metric": { + "description": "the distance metric to use for vector searches", + "type": "string", + "one_of": [ + "cosine", + "euclidean" + ], + "required": true + } + }, + { + "redis": { + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + }, + "required": false + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + }, + "required": false + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "default": false, + "type": "boolean", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "type": "array", + "elements": { + "type": "string" + }, + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "len_min": 1 + } + }, + { + "cluster_addresses": { + "type": "array", + "elements": { + "type": "string" + }, + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "len_min": 1 + } + } + ], + "required": true + } + }, + { + "pgvector": { + "type": "record", + "fields": [ + { + "host": { + "description": "the host of the pgvector database", + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "the port of the pgvector database", + "type": "integer", + "default": 5432 + } + }, + { + "user": { + "description": "the user of the pgvector database", + "type": "string", + "default": "postgres", + "referenceable": true + } + }, + { + "password": { + "description": "the password of the pgvector database", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "database": { + "description": "the database of the pgvector database", + "type": "string", + "default": "kong-pgvector" + } + }, + { + "timeout": { + "description": "the timeout of the pgvector database", + "type": "number", + "default": 5000 + } + }, + { + "ssl": { + "description": "whether to use ssl for the pgvector database", + "type": "boolean", + "default": false + } + }, + { + "ssl_required": { + "description": "whether ssl is required for the pgvector database", + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "description": "whether to verify ssl for the pgvector database", + "type": "boolean", + "default": false + } + }, + { + "ssl_version": { + "description": "the ssl version to use for the pgvector database", + "type": "string", + "one_of": [ + "tlsv1_2", + "tlsv1_3", + "any" + ], + "default": "tlsv1_2" + } + }, + { + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + } + }, + { + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + } + } + ], + "required": true + } + } + ], + "required": false + } + }, + { + "response_streaming": { + "type": "string", + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "one_of": [ + "allow", + "deny", + "always" + ], + "default": "allow", + "required": false + } + }, + { + "max_request_body_size": { + "description": "max allowed body size allowed to be introspected", + "default": 8192, + "type": "integer", + "gt": 0 + } + }, + { + "model_name_header": { + "description": "Display the model name selected in the X-Kong-LLM-Model response header", + "default": true, + "type": "boolean" + } + }, + { + "targets": { + "elements": { + "entity_checks": [ + { + "conditional": { + "then_err": "bedrock and gemini only support auth.allow_override = false", + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "then_field": "auth.allow_override", + "if_field": "model.provider", + "then_match": { + "eq": false + } + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.llama2_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.mistral_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.anthropic_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.upstream_url" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + } + ], + "type": "record", + "fields": [ + { + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "type": "string", + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "required": true + } + }, + { + "auth": { + "type": "record", + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "header_value": { + "type": "string", + "referenceable": true, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "encrypted": true, + "required": false + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "param_value": { + "type": "string", + "referenceable": true, + "description": "Specify the full parameter value for 'param_name'.", + "encrypted": true, + "required": false + } + }, + { + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string", + "one_of": [ + "query", + "body" + ], + "required": false + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "azure_client_secret": { + "type": "string", + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "encrypted": true, + "required": false + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "gcp_service_account_json": { + "type": "string", + "referenceable": true, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "encrypted": true, + "required": false + } + }, + { + "aws_access_key_id": { + "type": "string", + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "encrypted": true, + "required": false + } + }, + { + "aws_secret_access_key": { + "type": "string", + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "encrypted": true, + "required": false + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean", + "default": false, + "required": false + } + } + ], + "required": false + } + }, + { + "model": { + "type": "record", + "fields": [ + { + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "type": "string", + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock", + "huggingface" + ], + "required": true + } + }, + { + "name": { + "description": "Model name to execute.", + "type": "string", + "required": false + } + }, + { + "options": { + "description": "Key/value settings for the model", + "type": "record", + "fields": [ + { + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer", + "required": false + } + }, + { + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "type": "number", + "gt": 0, + "required": false + } + }, + { + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "type": "number", + "gt": 0, + "required": false + } + }, + { + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "type": "number", + "between": [ + 0, + 5 + ], + "required": false + } + }, + { + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "type": "number", + "between": [ + 0, + 1 + ], + "required": false + } + }, + { + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "type": "integer", + "between": [ + 0, + 500 + ], + "required": false + } + }, + { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string", + "required": false + } + }, + { + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string", + "required": false + } + }, + { + "azure_api_version": { + "description": "'api-version' for Azure OpenAI instances.", + "type": "string", + "default": "2023-05-15", + "required": false + } + }, + { + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string", + "required": false + } + }, + { + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "type": "string", + "one_of": [ + "raw", + "openai", + "ollama" + ], + "required": false + } + }, + { + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "type": "string", + "one_of": [ + "openai", + "ollama" + ], + "required": false + } + }, + { + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string", + "required": false + } + }, + { + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string", + "deprecation": { + "message": "llm: config.model.options.upstream_path is deprecated, please use config.model.options.upstream_url instead", + "removal_in_version": "4.0" + }, + "required": false + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "type": "record", + "fields": [ + { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string", + "required": false + } + }, + { + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string", + "required": false + } + }, + { + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string", + "required": false + } + } + ], + "required": false + } + }, + { + "bedrock": { + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "type": "record", + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + }, + { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string", + "required": false + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + } + ], + "required": false + } + }, + { + "huggingface": { + "type": "record", + "fields": [ + { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean", + "required": false + } + }, + { + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean", + "required": false + } + } + ], + "required": false + } + } + ], + "required": false + } + } + ], + "required": true + } + }, + { + "weight": { + "description": "The weight this target gets within the upstream loadbalancer (1-65535).", + "default": 100, + "type": "integer", + "between": [ + 1, + 65535 + ] + } + }, + { + "description": { + "description": "The semantic description of the target, required if using semantic load balancing. Specially, setting this to 'CATCHALL' will indicate such target to be used when no other targets match the semantic threshold.", + "type": "string", + "required": false + } + }, + { + "logging": { + "type": "record", + "fields": [ + { + "log_statistics": { + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "log_payloads": { + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean", + "default": false, + "required": true + } + } + ], + "required": true + } + } + ] + }, + "type": "array", + "required": true + } + }, + { + "llm_format": { + "type": "string", + "description": "LLM input and output format and schema to use", + "one_of": [ + "openai", + "bedrock", + "gemini" + ], + "default": "openai", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-proxy-advanced/3.11.x.json b/schemas/ai-proxy-advanced/3.11.x.json new file mode 100644 index 00000000..382df213 --- /dev/null +++ b/schemas/ai-proxy-advanced/3.11.x.json @@ -0,0 +1,1839 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "config": { + "required": true, + "fields": [ + { + "balancer": { + "required": true, + "fields": [ + { + "algorithm": { + "one_of": [ + "round-robin", + "lowest-latency", + "lowest-usage", + "consistent-hashing", + "semantic", + "priority" + ], + "description": "Which load balancing algorithm to use.", + "default": "round-robin", + "type": "string" + } + }, + { + "tokens_count_strategy": { + "one_of": [ + "total-tokens", + "prompt-tokens", + "completion-tokens", + "cost" + ], + "description": "What tokens to use for usage calculation. Available values are: `total_tokens` `prompt_tokens`, `completion_tokens` and `cost`.", + "default": "total-tokens", + "type": "string" + } + }, + { + "latency_strategy": { + "one_of": [ + "tpot", + "e2e" + ], + "description": "What metrics to use for latency. Available values are: `tpot` (time-per-output-token) and `e2e`.", + "default": "tpot", + "type": "string" + } + }, + { + "hash_on_header": { + "description": "The header to use for consistent-hashing.", + "default": "X-Kong-LLM-Request-ID", + "type": "string" + } + }, + { + "slots": { + "description": "The number of slots in the load balancer algorithm.", + "between": [ + 10, + 65536 + ], + "default": 10000, + "type": "integer" + } + }, + { + "retries": { + "description": "The number of retries to execute upon failure to proxy.", + "between": [ + 0, + 32767 + ], + "default": 5, + "type": "integer" + } + }, + { + "connect_timeout": { + "between": [ + 1, + 2147483646 + ], + "default": 60000, + "type": "integer" + } + }, + { + "write_timeout": { + "between": [ + 1, + 2147483646 + ], + "default": 60000, + "type": "integer" + } + }, + { + "read_timeout": { + "between": [ + 1, + 2147483646 + ], + "default": 60000, + "type": "integer" + } + }, + { + "failover_criteria": { + "type": "array", + "description": "Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream", + "default": [ + "error", + "timeout" + ], + "elements": { + "one_of": [ + "error", + "timeout", + "invalid_header", + "http_500", + "http_502", + "http_503", + "http_504", + "http_403", + "http_404", + "http_429", + "non_idempotent" + ], + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "embeddings": { + "entity_checks": [ + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.deployment_id" + ] + } + } + ], + "required": false, + "fields": [ + { + "auth": { + "required": false, + "fields": [ + { + "header_name": { + "referenceable": true, + "required": false, + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "type": "string" + } + }, + { + "header_value": { + "required": false, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "param_name": { + "referenceable": true, + "required": false, + "description": "If AI model requires authentication via query parameter, specify its name here.", + "type": "string" + } + }, + { + "param_value": { + "required": false, + "description": "Specify the full parameter value for 'param_name'.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "param_location": { + "one_of": [ + "query", + "body" + ], + "required": false, + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string" + } + }, + { + "azure_use_managed_identity": { + "default": false, + "required": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + } + }, + { + "azure_client_id": { + "referenceable": true, + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "type": "string" + } + }, + { + "azure_client_secret": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "azure_tenant_id": { + "referenceable": true, + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "type": "string" + } + }, + { + "gcp_use_service_account": { + "default": false, + "required": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + } + }, + { + "gcp_service_account_json": { + "required": false, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "aws_access_key_id": { + "required": false, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "aws_secret_access_key": { + "required": false, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "allow_override": { + "default": false, + "required": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "model": { + "required": true, + "fields": [ + { + "provider": { + "one_of": [ + "openai", + "mistral", + "huggingface", + "azure", + "bedrock", + "gemini" + ], + "required": true, + "description": "AI provider format to use for embeddings API", + "type": "string" + } + }, + { + "name": { + "required": true, + "description": "Model name to execute.", + "type": "string" + } + }, + { + "options": { + "fields": [ + { + "upstream_url": { + "required": false, + "description": "upstream url for the embeddings", + "type": "string" + } + }, + { + "azure": { + "required": true, + "fields": [ + { + "instance": { + "required": false, + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + { + "api_version": { + "default": "2023-05-15", + "required": false, + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + } + }, + { + "deployment_id": { + "required": false, + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "bedrock": { + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "required": false, + "fields": [ + { + "aws_region": { + "required": false, + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + } + }, + { + "aws_assume_role_arn": { + "required": false, + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + { + "embeddings_normalize": { + "default": false, + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "type": "boolean" + } + }, + { + "performance_config_latency": { + "required": false, + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "required": false, + "fields": [ + { + "api_endpoint": { + "required": false, + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + } + }, + { + "project_id": { + "required": false, + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + { + "location_id": { + "required": false, + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "huggingface": { + "required": false, + "fields": [ + { + "use_cache": { + "required": false, + "description": "Use the cache layer on the inference API", + "type": "boolean" + } + }, + { + "wait_for_model": { + "required": false, + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "required": false, + "description": "Key/value settings for the model", + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "vectordb": { + "required": false, + "fields": [ + { + "strategy": { + "one_of": [ + "redis", + "pgvector" + ], + "required": true, + "description": "which vector database driver to use", + "type": "string" + } + }, + { + "dimensions": { + "required": true, + "description": "the desired dimensionality for the vectors", + "type": "integer" + } + }, + { + "threshold": { + "required": true, + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number" + } + }, + { + "distance_metric": { + "one_of": [ + "cosine", + "euclidean" + ], + "required": true, + "description": "the distance metric to use for vector searches", + "type": "string" + } + }, + { + "redis": { + "required": true, + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer" + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer" + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer" + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer" + } + }, + { + "username": { + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string" + } + }, + { + "sentinel_username": { + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "referenceable": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "default": 256, + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1, + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer" + } + } + ], + "type": "record" + }, + "type": "array" + } + }, + { + "cluster_nodes": { + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1, + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer" + } + } + ], + "type": "record" + }, + "type": "array" + } + }, + { + "ssl": { + "default": false, + "required": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "required": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "required": false, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "required": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "array" + } + }, + { + "cluster_addresses": { + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "array" + } + } + ], + "type": "record" + } + }, + { + "pgvector": { + "required": true, + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "the host of the pgvector database", + "type": "string" + } + }, + { + "port": { + "default": 5432, + "description": "the port of the pgvector database", + "type": "integer" + } + }, + { + "user": { + "description": "the user of the pgvector database", + "referenceable": true, + "default": "postgres", + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "description": "the password of the pgvector database", + "type": "string" + } + }, + { + "database": { + "default": "kong-pgvector", + "description": "the database of the pgvector database", + "type": "string" + } + }, + { + "timeout": { + "default": 5000, + "description": "the timeout of the pgvector database", + "type": "number" + } + }, + { + "ssl": { + "default": false, + "description": "whether to use ssl for the pgvector database", + "type": "boolean" + } + }, + { + "ssl_required": { + "default": false, + "description": "whether ssl is required for the pgvector database", + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "whether to verify ssl for the pgvector database", + "type": "boolean" + } + }, + { + "ssl_version": { + "one_of": [ + "tlsv1_2", + "tlsv1_3", + "any" + ], + "default": "tlsv1_2", + "description": "the ssl version to use for the pgvector database", + "type": "string" + } + }, + { + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + } + }, + { + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "response_streaming": { + "required": false, + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "one_of": [ + "allow", + "deny", + "always" + ], + "default": "allow", + "type": "string" + } + }, + { + "max_request_body_size": { + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "gt": 0, + "default": 8192, + "type": "integer" + } + }, + { + "model_name_header": { + "description": "Display the model name selected in the X-Kong-LLM-Model response header", + "default": true, + "type": "boolean" + } + }, + { + "targets": { + "required": true, + "type": "array", + "elements": { + "entity_checks": [ + { + "conditional": { + "then_err": "bedrock and gemini only support auth.allow_override = false", + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "then_field": "auth.allow_override", + "if_field": "model.provider", + "then_match": { + "eq": false + } + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.llama2_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.mistral_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.anthropic_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.upstream_url" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model" + ] + } + } + ], + "fields": [ + { + "route_type": { + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "llm/v1/embeddings", + "llm/v1/responses", + "llm/v1/assistants", + "llm/v1/batches", + "llm/v1/files", + "image/v1/images/generations", + "image/v1/images/edits", + "audio/v1/audio/transcriptions", + "audio/v1/audio/speech", + "audio/v1/audio/translations", + "realtime/v1/realtime", + "preserve" + ], + "required": true, + "description": "The model's operation implementation, for this provider. ", + "type": "string" + } + }, + { + "auth": { + "required": false, + "fields": [ + { + "header_name": { + "referenceable": true, + "required": false, + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "type": "string" + } + }, + { + "header_value": { + "required": false, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "param_name": { + "referenceable": true, + "required": false, + "description": "If AI model requires authentication via query parameter, specify its name here.", + "type": "string" + } + }, + { + "param_value": { + "required": false, + "description": "Specify the full parameter value for 'param_name'.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "param_location": { + "one_of": [ + "query", + "body" + ], + "required": false, + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string" + } + }, + { + "azure_use_managed_identity": { + "default": false, + "required": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + } + }, + { + "azure_client_id": { + "referenceable": true, + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "type": "string" + } + }, + { + "azure_client_secret": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "azure_tenant_id": { + "referenceable": true, + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "type": "string" + } + }, + { + "gcp_use_service_account": { + "default": false, + "required": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + } + }, + { + "gcp_service_account_json": { + "required": false, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "aws_access_key_id": { + "required": false, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "aws_secret_access_key": { + "required": false, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "allow_override": { + "default": false, + "required": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "model": { + "required": true, + "fields": [ + { + "provider": { + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock", + "huggingface" + ], + "required": true, + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "type": "string" + } + }, + { + "name": { + "required": false, + "description": "Model name to execute.", + "type": "string" + } + }, + { + "options": { + "fields": [ + { + "max_tokens": { + "required": false, + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + } + }, + { + "input_cost": { + "gt": 0, + "required": false, + "description": "Defines the cost per 1M tokens in your prompt.", + "type": "number" + } + }, + { + "output_cost": { + "gt": 0, + "required": false, + "description": "Defines the cost per 1M tokens in the output of the AI.", + "type": "number" + } + }, + { + "temperature": { + "between": [ + 0, + 5 + ], + "required": false, + "description": "Defines the matching temperature, if using chat or completion models.", + "type": "number" + } + }, + { + "top_p": { + "between": [ + 0, + 1 + ], + "required": false, + "description": "Defines the top-p probability mass, if supported.", + "type": "number" + } + }, + { + "top_k": { + "between": [ + 0, + 500 + ], + "required": false, + "description": "Defines the top-k most likely tokens, if supported.", + "type": "integer" + } + }, + { + "anthropic_version": { + "required": false, + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + } + }, + { + "azure_instance": { + "required": false, + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + { + "azure_api_version": { + "default": "2023-05-15", + "required": false, + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + } + }, + { + "azure_deployment_id": { + "required": false, + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + } + }, + { + "llama2_format": { + "one_of": [ + "raw", + "openai", + "ollama" + ], + "required": false, + "description": "If using llama2 provider, select the upstream message format.", + "type": "string" + } + }, + { + "mistral_format": { + "one_of": [ + "openai", + "ollama" + ], + "required": false, + "description": "If using mistral provider, select the upstream message format.", + "type": "string" + } + }, + { + "upstream_url": { + "required": false, + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + { + "upstream_path": { + "deprecation": { + "removal_in_version": "4.0", + "message": "llm: config.model.options.upstream_path is deprecated, please use config.model.options.upstream_url instead" + }, + "required": false, + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + } + }, + { + "embeddings_dimensions": { + "gt": 0, + "required": false, + "description": "If using embeddings models, set the number of dimensions to generate.", + "type": "integer" + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "required": false, + "fields": [ + { + "api_endpoint": { + "required": false, + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + } + }, + { + "project_id": { + "required": false, + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + { + "location_id": { + "required": false, + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "bedrock": { + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "required": false, + "fields": [ + { + "aws_region": { + "required": false, + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + } + }, + { + "aws_assume_role_arn": { + "required": false, + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + { + "embeddings_normalize": { + "default": false, + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "type": "boolean" + } + }, + { + "performance_config_latency": { + "required": false, + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "huggingface": { + "required": false, + "fields": [ + { + "use_cache": { + "required": false, + "description": "Use the cache layer on the inference API", + "type": "boolean" + } + }, + { + "wait_for_model": { + "required": false, + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "cohere": { + "required": false, + "fields": [ + { + "embedding_input_type": { + "required": false, + "description": "The purpose of the input text to calculate embedding vectors.", + "one_of": [ + "search_document", + "search_query", + "classification", + "clustering", + "image" + ], + "default": "classification", + "type": "string" + } + }, + { + "wait_for_model": { + "required": false, + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "required": false, + "description": "Key/value settings for the model", + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "weight": { + "description": "The weight this target gets within the upstream loadbalancer (1-65535).", + "between": [ + 1, + 65535 + ], + "default": 100, + "type": "integer" + } + }, + { + "description": { + "required": false, + "description": "The semantic description of the target, required if using semantic load balancing. Specially, setting this to 'CATCHALL' will indicate such target to be used when no other targets match the semantic threshold.", + "type": "string" + } + }, + { + "logging": { + "required": true, + "fields": [ + { + "log_statistics": { + "default": false, + "required": true, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + { + "log_payloads": { + "default": false, + "required": true, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + }, + { + "llm_format": { + "required": false, + "description": "LLM input and output format and schema to use", + "one_of": [ + "openai", + "bedrock", + "gemini", + "cohere", + "huggingface" + ], + "default": "openai", + "type": "string" + } + }, + { + "genai_category": { + "required": false, + "description": "Generative AI category of the request", + "one_of": [ + "text/generation", + "text/embeddings", + "audio/transcription", + "audio/speech", + "image/generation", + "video/generation", + "realtime/generation" + ], + "default": "text/generation", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.targets", + "config.balancer" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.targets", + "config.balancer" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.targets", + "config.llm_format" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.genai_category", + "config.targets" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.model_name_header", + "config.targets" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-proxy-advanced/3.12.x.json b/schemas/ai-proxy-advanced/3.12.x.json new file mode 100644 index 00000000..2cd21270 --- /dev/null +++ b/schemas/ai-proxy-advanced/3.12.x.json @@ -0,0 +1,1840 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.targets", + "config.balancer" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.targets", + "config.balancer" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.targets", + "config.llm_format" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.genai_category", + "config.targets" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.model_name_header", + "config.targets" + ] + } + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "balancer": { + "type": "record", + "fields": [ + { + "algorithm": { + "type": "string", + "default": "round-robin", + "one_of": [ + "round-robin", + "lowest-latency", + "lowest-usage", + "consistent-hashing", + "semantic", + "priority" + ], + "description": "Which load balancing algorithm to use." + } + }, + { + "tokens_count_strategy": { + "type": "string", + "default": "total-tokens", + "one_of": [ + "total-tokens", + "prompt-tokens", + "completion-tokens", + "cost" + ], + "description": "What tokens to use for usage calculation. Available values are: `total_tokens` `prompt_tokens`, `completion_tokens` and `cost`." + } + }, + { + "latency_strategy": { + "type": "string", + "default": "tpot", + "one_of": [ + "tpot", + "e2e" + ], + "description": "What metrics to use for latency. Available values are: `tpot` (time-per-output-token) and `e2e`." + } + }, + { + "hash_on_header": { + "type": "string", + "default": "X-Kong-LLM-Request-ID", + "description": "The header to use for consistent-hashing." + } + }, + { + "slots": { + "type": "integer", + "default": 10000, + "between": [ + 10, + 65536 + ], + "description": "The number of slots in the load balancer algorithm." + } + }, + { + "retries": { + "type": "integer", + "default": 5, + "between": [ + 0, + 32767 + ], + "description": "The number of retries to execute upon failure to proxy." + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 60000, + "between": [ + 1, + 2147483646 + ] + } + }, + { + "write_timeout": { + "type": "integer", + "default": 60000, + "between": [ + 1, + 2147483646 + ] + } + }, + { + "read_timeout": { + "type": "integer", + "default": 60000, + "between": [ + 1, + 2147483646 + ] + } + }, + { + "failover_criteria": { + "type": "array", + "default": [ + "error", + "timeout" + ], + "description": "Specifies in which cases an upstream response should be failover to the next target. Each option in the array is equivalent to the function of http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream", + "elements": { + "type": "string", + "one_of": [ + "error", + "timeout", + "invalid_header", + "http_500", + "http_502", + "http_503", + "http_504", + "http_403", + "http_404", + "http_429", + "non_idempotent" + ] + } + } + } + ], + "required": true + } + }, + { + "embeddings": { + "type": "record", + "fields": [ + { + "auth": { + "type": "record", + "fields": [ + { + "header_name": { + "type": "string", + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "referenceable": true, + "required": false + } + }, + { + "header_value": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'." + } + }, + { + "param_name": { + "type": "string", + "description": "If AI model requires authentication via query parameter, specify its name here.", + "referenceable": true, + "required": false + } + }, + { + "param_value": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Specify the full parameter value for 'param_name'." + } + }, + { + "param_location": { + "type": "string", + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "one_of": [ + "query", + "body" + ], + "required": false + } + }, + { + "azure_use_managed_identity": { + "type": "boolean", + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false + } + }, + { + "azure_client_id": { + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "referenceable": true, + "required": false + } + }, + { + "azure_client_secret": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret." + } + }, + { + "azure_tenant_id": { + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "referenceable": true, + "required": false + } + }, + { + "gcp_use_service_account": { + "type": "boolean", + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "required": false + } + }, + { + "gcp_service_account_json": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`." + } + }, + { + "aws_access_key_id": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance." + } + }, + { + "aws_secret_access_key": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance." + } + }, + { + "allow_override": { + "type": "boolean", + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false + } + } + ], + "required": false + } + }, + { + "model": { + "type": "record", + "fields": [ + { + "provider": { + "type": "string", + "description": "AI provider format to use for embeddings API", + "one_of": [ + "openai", + "mistral", + "huggingface", + "azure", + "bedrock", + "gemini" + ], + "required": true + } + }, + { + "name": { + "type": "string", + "description": "Model name to execute.", + "required": true + } + }, + { + "options": { + "description": "Key/value settings for the model", + "fields": [ + { + "upstream_url": { + "type": "string", + "description": "upstream url for the embeddings", + "required": false + } + }, + { + "azure": { + "type": "record", + "fields": [ + { + "instance": { + "type": "string", + "description": "Instance name for Azure OpenAI hosted models.", + "required": false + } + }, + { + "api_version": { + "type": "string", + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "required": false + } + }, + { + "deployment_id": { + "type": "string", + "description": "Deployment ID for Azure OpenAI instances.", + "required": false + } + } + ], + "required": true + } + }, + { + "bedrock": { + "type": "record", + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + }, + { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string", + "required": false + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + { + "embeddings_normalize": { + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "default": false, + "type": "boolean" + } + }, + { + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "required": false + } + }, + { + "gemini": { + "type": "record", + "fields": [ + { + "api_endpoint": { + "type": "string", + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "required": false + } + }, + { + "project_id": { + "type": "string", + "description": "If running Gemini on Vertex, specify the project ID.", + "required": false + } + }, + { + "location_id": { + "type": "string", + "description": "If running Gemini on Vertex, specify the location ID.", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "required": false + } + }, + { + "huggingface": { + "type": "record", + "fields": [ + { + "use_cache": { + "type": "boolean", + "description": "Use the cache layer on the inference API", + "required": false + } + }, + { + "wait_for_model": { + "type": "boolean", + "description": "Wait for the model if it is not ready", + "required": false + } + } + ], + "required": false + } + } + ], + "type": "record", + "required": false + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure.instance" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure.api_version" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure.deployment_id" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + } + ], + "required": false + } + }, + { + "vectordb": { + "type": "record", + "fields": [ + { + "strategy": { + "type": "string", + "description": "which vector database driver to use", + "one_of": [ + "redis", + "pgvector" + ], + "required": true + } + }, + { + "dimensions": { + "type": "integer", + "description": "the desired dimensionality for the vectors", + "required": true + } + }, + { + "threshold": { + "type": "number", + "description": "the default similarity threshold for accepting semantic search results (float)", + "required": true + } + }, + { + "distance_metric": { + "type": "string", + "description": "the distance metric to use for vector searches", + "one_of": [ + "cosine", + "euclidean" + ], + "required": true + } + }, + { + "redis": { + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "database", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + } + ], + "required": true, + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis." + } + }, + { + "sentinel_username": { + "type": "string", + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels." + } + }, + { + "database": { + "type": "integer", + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy" + } + }, + { + "keepalive_pool_size": { + "type": "integer", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low." + } + }, + { + "keepalive_backlog": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "type": "boolean", + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + } + } + }, + { + "cluster_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + } + } + } + ] + } + }, + { + "pgvector": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "the host of the pgvector database" + } + }, + { + "port": { + "type": "integer", + "default": 5432, + "description": "the port of the pgvector database" + } + }, + { + "user": { + "type": "string", + "default": "postgres", + "referenceable": true, + "description": "the user of the pgvector database" + } + }, + { + "password": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "the password of the pgvector database" + } + }, + { + "database": { + "type": "string", + "default": "kong-pgvector", + "description": "the database of the pgvector database" + } + }, + { + "timeout": { + "type": "number", + "default": 5000, + "description": "the timeout of the pgvector database" + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "whether to use ssl for the pgvector database" + } + }, + { + "ssl_required": { + "type": "boolean", + "default": false, + "description": "whether ssl is required for the pgvector database" + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "whether to verify ssl for the pgvector database" + } + }, + { + "ssl_version": { + "type": "string", + "default": "tlsv1_2", + "one_of": [ + "tlsv1_2", + "tlsv1_3", + "any" + ], + "description": "the ssl version to use for the pgvector database" + } + }, + { + "ssl_cert": { + "type": "string", + "description": "the path of ssl cert to use for the pgvector database" + } + }, + { + "ssl_cert_key": { + "type": "string", + "description": "the path of ssl cert key to use for the pgvector database" + } + } + ], + "required": true + } + } + ], + "required": false + } + }, + { + "response_streaming": { + "type": "string", + "required": false, + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "default": "allow", + "one_of": [ + "allow", + "deny", + "always" + ] + } + }, + { + "max_request_body_size": { + "type": "integer", + "default": 8192, + "gt": 0, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size." + } + }, + { + "model_name_header": { + "type": "boolean", + "default": true, + "description": "Display the model name selected in the X-Kong-LLM-Model response header" + } + }, + { + "targets": { + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "route_type": { + "type": "string", + "description": "The model's operation implementation, for this provider. ", + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "llm/v1/embeddings", + "llm/v1/responses", + "llm/v1/assistants", + "llm/v1/batches", + "llm/v1/files", + "image/v1/images/generations", + "image/v1/images/edits", + "audio/v1/audio/transcriptions", + "audio/v1/audio/speech", + "audio/v1/audio/translations", + "realtime/v1/realtime", + "preserve" + ], + "required": true + } + }, + { + "auth": { + "type": "record", + "fields": [ + { + "header_name": { + "type": "string", + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "referenceable": true, + "required": false + } + }, + { + "header_value": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'." + } + }, + { + "param_name": { + "type": "string", + "description": "If AI model requires authentication via query parameter, specify its name here.", + "referenceable": true, + "required": false + } + }, + { + "param_value": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Specify the full parameter value for 'param_name'." + } + }, + { + "param_location": { + "type": "string", + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "one_of": [ + "query", + "body" + ], + "required": false + } + }, + { + "azure_use_managed_identity": { + "type": "boolean", + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false + } + }, + { + "azure_client_id": { + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "referenceable": true, + "required": false + } + }, + { + "azure_client_secret": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret." + } + }, + { + "azure_tenant_id": { + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "referenceable": true, + "required": false + } + }, + { + "gcp_use_service_account": { + "type": "boolean", + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "required": false + } + }, + { + "gcp_service_account_json": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`." + } + }, + { + "aws_access_key_id": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance." + } + }, + { + "aws_secret_access_key": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance." + } + }, + { + "allow_override": { + "type": "boolean", + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false + } + } + ], + "required": false + } + }, + { + "model": { + "type": "record", + "fields": [ + { + "provider": { + "type": "string", + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock", + "huggingface" + ], + "required": true + } + }, + { + "name": { + "type": "string", + "description": "Model name to execute.", + "required": false + } + }, + { + "options": { + "description": "Key/value settings for the model", + "fields": [ + { + "max_tokens": { + "type": "integer", + "description": "Defines the max_tokens, if using chat or completion models.", + "required": false + } + }, + { + "input_cost": { + "type": "number", + "description": "Defines the cost per 1M tokens in your prompt.", + "gt": 0, + "required": false + } + }, + { + "output_cost": { + "type": "number", + "description": "Defines the cost per 1M tokens in the output of the AI.", + "gt": 0, + "required": false + } + }, + { + "temperature": { + "type": "number", + "description": "Defines the matching temperature, if using chat or completion models.", + "between": [ + 0, + 5 + ], + "required": false + } + }, + { + "top_p": { + "type": "number", + "description": "Defines the top-p probability mass, if supported.", + "between": [ + 0, + 1 + ], + "required": false + } + }, + { + "top_k": { + "type": "integer", + "description": "Defines the top-k most likely tokens, if supported.", + "between": [ + 0, + 500 + ], + "required": false + } + }, + { + "anthropic_version": { + "type": "string", + "description": "Defines the schema/API version, if using Anthropic provider.", + "required": false + } + }, + { + "azure_instance": { + "type": "string", + "description": "Instance name for Azure OpenAI hosted models.", + "required": false + } + }, + { + "azure_api_version": { + "type": "string", + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "required": false + } + }, + { + "azure_deployment_id": { + "type": "string", + "description": "Deployment ID for Azure OpenAI instances.", + "required": false + } + }, + { + "llama2_format": { + "type": "string", + "description": "If using llama2 provider, select the upstream message format.", + "one_of": [ + "raw", + "openai", + "ollama" + ], + "required": false + } + }, + { + "mistral_format": { + "type": "string", + "description": "If using mistral provider, select the upstream message format.", + "one_of": [ + "openai", + "ollama" + ], + "required": false + } + }, + { + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string", + "required": false + } + }, + { + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "deprecation": { + "message": "llm: config.model.options.upstream_path is deprecated, please use config.model.options.upstream_url instead", + "removal_in_version": "4.0" + }, + "type": "string", + "required": false + } + }, + { + "embeddings_dimensions": { + "type": "integer", + "description": "If using embeddings models, set the number of dimensions to generate.", + "gt": 0, + "required": false + } + }, + { + "gemini": { + "type": "record", + "fields": [ + { + "api_endpoint": { + "type": "string", + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "required": false + } + }, + { + "project_id": { + "type": "string", + "description": "If running Gemini on Vertex, specify the project ID.", + "required": false + } + }, + { + "location_id": { + "type": "string", + "description": "If running Gemini on Vertex, specify the location ID.", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "required": false + } + }, + { + "bedrock": { + "type": "record", + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + }, + { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string", + "required": false + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + { + "embeddings_normalize": { + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "default": false, + "type": "boolean" + } + }, + { + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "required": false + } + }, + { + "huggingface": { + "type": "record", + "fields": [ + { + "use_cache": { + "type": "boolean", + "description": "Use the cache layer on the inference API", + "required": false + } + }, + { + "wait_for_model": { + "type": "boolean", + "description": "Wait for the model if it is not ready", + "required": false + } + } + ], + "required": false + } + }, + { + "cohere": { + "type": "record", + "fields": [ + { + "embedding_input_type": { + "type": "string", + "required": false, + "description": "The purpose of the input text to calculate embedding vectors.", + "default": "classification", + "one_of": [ + "search_document", + "search_query", + "classification", + "clustering", + "image" + ] + } + }, + { + "wait_for_model": { + "type": "boolean", + "description": "Wait for the model if it is not ready", + "required": false + } + } + ], + "required": false + } + } + ], + "type": "record", + "required": false + } + } + ], + "required": true + } + }, + { + "weight": { + "type": "integer", + "default": 100, + "between": [ + 1, + 65535 + ], + "description": "The weight this target gets within the upstream loadbalancer (1-65535)." + } + }, + { + "description": { + "type": "string", + "description": "The semantic description of the target, required if using semantic load balancing. Specially, setting this to 'CATCHALL' will indicate such target to be used when no other targets match the semantic threshold.", + "required": false + } + }, + { + "logging": { + "type": "record", + "fields": [ + { + "log_statistics": { + "type": "boolean", + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "required": true + } + }, + { + "log_payloads": { + "type": "boolean", + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "required": true + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "then_field": "auth.allow_override", + "if_field": "model.provider", + "then_match": { + "eq": false + }, + "then_err": "bedrock and gemini only support auth.allow_override = false" + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.llama2_format" + ], + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.mistral_format" + ], + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.anthropic_version" + ], + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_instance" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_api_version" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.upstream_url" + ], + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models", + "if_field": "model.provider" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model" + ] + } + } + ], + "required": true + }, + "required": true + } + }, + { + "llm_format": { + "type": "string", + "required": false, + "description": "LLM input and output format and schema to use", + "default": "openai", + "one_of": [ + "openai", + "bedrock", + "gemini", + "cohere", + "huggingface" + ] + } + }, + { + "genai_category": { + "type": "string", + "required": false, + "description": "Generative AI category of the request", + "default": "text/generation", + "one_of": [ + "text/generation", + "text/embeddings", + "audio/transcription", + "audio/speech", + "image/generation", + "video/generation", + "realtime/generation" + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-proxy-advanced/3.8.x.json b/schemas/ai-proxy-advanced/3.8.x.json new file mode 100644 index 00000000..7be23c4c --- /dev/null +++ b/schemas/ai-proxy-advanced/3.8.x.json @@ -0,0 +1,1349 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "balancer": { + "fields": [ + { + "algorithm": { + "description": "Which load balancing algorithm to use.", + "type": "string", + "default": "round-robin", + "one_of": [ + "round-robin", + "lowest-latency", + "lowest-usage", + "consistent-hashing", + "semantic" + ] + } + }, + { + "tokens_count_strategy": { + "description": "What tokens to use for usage calculation. Available values are: `total_tokens` `prompt_tokens`, and `completion_tokens`.", + "type": "string", + "default": "total-tokens", + "one_of": [ + "total-tokens", + "prompt-tokens", + "completion-tokens" + ] + } + }, + { + "latency_strategy": { + "description": "What metrics to use for latency. Available values are: `tpot` (time-per-output-token) and `e2e`.", + "type": "string", + "default": "tpot", + "one_of": [ + "tpot", + "e2e" + ] + } + }, + { + "hash_on_header": { + "description": "The header to use for consistent-hashing.", + "type": "string", + "default": "X-Kong-LLM-Request-ID" + } + }, + { + "slots": { + "description": "The number of slots in the load balancer algorithm.", + "type": "integer", + "between": [ + 10, + 65536 + ], + "default": 10000 + } + }, + { + "retries": { + "description": "The number of retries to execute upon failure to proxy.", + "type": "integer", + "between": [ + 0, + 32767 + ], + "default": 5 + } + }, + { + "connect_timeout": { + "type": "integer", + "between": [ + 1, + 2147483646 + ], + "default": 60000 + } + }, + { + "write_timeout": { + "type": "integer", + "between": [ + 1, + 2147483646 + ], + "default": 60000 + } + }, + { + "read_timeout": { + "type": "integer", + "between": [ + 1, + 2147483646 + ], + "default": 60000 + } + } + ], + "required": true, + "type": "record" + } + }, + { + "embeddings": { + "fields": [ + { + "auth": { + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "param_value": { + "description": "Specify the full parameter value for 'param_name'.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string", + "required": false, + "one_of": [ + "query", + "body" + ] + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean", + "required": false, + "default": false + } + } + ], + "required": false, + "type": "record" + } + }, + { + "model": { + "fields": [ + { + "provider": { + "description": "AI provider format to use for embeddings API", + "type": "string", + "required": true, + "one_of": [ + "openai", + "mistral" + ] + } + }, + { + "name": { + "description": "Model name to execute.", + "type": "string", + "required": true, + "one_of": [ + "text-embedding-3-large", + "text-embedding-3-small", + "mistral-embed" + ] + } + }, + { + "options": { + "description": "Key/value settings for the model", + "type": "record", + "fields": [ + { + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string", + "required": false + } + } + ], + "required": false + } + } + ], + "required": true, + "type": "record" + } + } + ], + "required": false, + "type": "record" + } + }, + { + "vectordb": { + "fields": [ + { + "strategy": { + "description": "which vector database driver to use", + "type": "string", + "required": true, + "one_of": [ + "redis" + ] + } + }, + { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer", + "required": true + } + }, + { + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number", + "required": true + } + }, + { + "distance_metric": { + "description": "the distance metric to use for vector searches", + "type": "string", + "required": true, + "one_of": [ + "cosine", + "euclidean" + ] + } + }, + { + "redis": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer", + "between": [ + 1, + 2147483646 + ], + "default": 256 + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer", + "default": 5 + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean", + "default": false + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_nodes" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_nodes" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_field": "connection_is_proxied", + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host" + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "translate_backwards": [ + "connect_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "required": true, + "type": "record" + } + } + ], + "required": false, + "type": "record" + } + }, + { + "max_request_body_size": { + "description": "max allowed body size allowed to be introspected", + "type": "integer", + "gt": 0, + "default": 8192 + } + }, + { + "model_name_header": { + "description": "Display the model name selected in the X-Kong-LLM-Model response header", + "type": "boolean", + "default": true + } + }, + { + "targets": { + "type": "array", + "required": true, + "elements": { + "fields": [ + { + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "type": "string", + "required": true, + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ] + } + }, + { + "auth": { + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "param_value": { + "description": "Specify the full parameter value for 'param_name'.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string", + "required": false, + "one_of": [ + "query", + "body" + ] + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean", + "required": false, + "default": false + } + } + ], + "required": false, + "type": "record" + } + }, + { + "model": { + "fields": [ + { + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "type": "string", + "required": true, + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock" + ] + } + }, + { + "name": { + "description": "Model name to execute.", + "type": "string", + "required": false + } + }, + { + "options": { + "description": "Key/value settings for the model", + "type": "record", + "fields": [ + { + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer", + "required": false, + "default": 256 + } + }, + { + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "type": "number", + "gt": 0, + "required": false + } + }, + { + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "type": "number", + "gt": 0, + "required": false + } + }, + { + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "type": "number", + "between": [ + 0, + 5 + ], + "required": false + } + }, + { + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "type": "number", + "between": [ + 0, + 1 + ], + "required": false + } + }, + { + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "type": "integer", + "between": [ + 0, + 500 + ], + "required": false + } + }, + { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string", + "required": false + } + }, + { + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string", + "required": false + } + }, + { + "azure_api_version": { + "description": "'api-version' for Azure OpenAI instances.", + "type": "string", + "required": false, + "default": "2023-05-15" + } + }, + { + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string", + "required": false + } + }, + { + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "type": "string", + "required": false, + "one_of": [ + "raw", + "openai", + "ollama" + ] + } + }, + { + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "type": "string", + "required": false, + "one_of": [ + "openai", + "ollama" + ] + } + }, + { + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "required": false, + "type": "string" + } + }, + { + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string", + "required": false + } + }, + { + "gemini": { + "fields": [ + { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string", + "required": false + } + }, + { + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string", + "required": false + } + }, + { + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string", + "required": false + } + } + ], + "required": false, + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "type": "record" + } + }, + { + "bedrock": { + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + } + ], + "required": false, + "type": "record" + } + } + ], + "required": false + } + } + ], + "required": true, + "type": "record" + } + }, + { + "weight": { + "description": "The weight this target gets within the upstream loadbalancer (1-65535).", + "type": "integer", + "between": [ + 1, + 65535 + ], + "default": 100 + } + }, + { + "description": { + "description": "The semantic description of the target, required if using semantic load balancing.", + "required": false, + "type": "string" + } + }, + { + "logging": { + "fields": [ + { + "log_statistics": { + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "log_payloads": { + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean", + "required": true, + "default": false + } + } + ], + "required": true, + "type": "record" + } + } + ], + "type": "record", + "entity_checks": [ + { + "conditional": { + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "if_field": "model.provider", + "then_err": "bedrock and gemini only support auth.allow_override = false", + "then_field": "auth.allow_override", + "then_match": { + "eq": false + } + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.llama2_format" + ], + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.mistral_format" + ], + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.anthropic_version" + ], + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_instance" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_api_version" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.upstream_url" + ], + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + } + ] + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.targets" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.targets", + "config.balancer" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-proxy-advanced/3.9.x.json b/schemas/ai-proxy-advanced/3.9.x.json new file mode 100644 index 00000000..0e657ace --- /dev/null +++ b/schemas/ai-proxy-advanced/3.9.x.json @@ -0,0 +1,1344 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.targets" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config.targets", + "config.balancer" + ] + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "balancer": { + "type": "record", + "required": true, + "fields": [ + { + "algorithm": { + "default": "round-robin", + "description": "Which load balancing algorithm to use.", + "type": "string", + "one_of": [ + "round-robin", + "lowest-latency", + "lowest-usage", + "consistent-hashing", + "semantic" + ] + } + }, + { + "tokens_count_strategy": { + "default": "total-tokens", + "description": "What tokens to use for usage calculation. Available values are: `total_tokens` `prompt_tokens`, and `completion_tokens`.", + "type": "string", + "one_of": [ + "total-tokens", + "prompt-tokens", + "completion-tokens" + ] + } + }, + { + "latency_strategy": { + "default": "tpot", + "description": "What metrics to use for latency. Available values are: `tpot` (time-per-output-token) and `e2e`.", + "type": "string", + "one_of": [ + "tpot", + "e2e" + ] + } + }, + { + "hash_on_header": { + "default": "X-Kong-LLM-Request-ID", + "description": "The header to use for consistent-hashing.", + "type": "string" + } + }, + { + "slots": { + "default": 10000, + "description": "The number of slots in the load balancer algorithm.", + "between": [ + 10, + 65536 + ], + "type": "integer" + } + }, + { + "retries": { + "default": 5, + "description": "The number of retries to execute upon failure to proxy.", + "between": [ + 0, + 32767 + ], + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 60000, + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "write_timeout": { + "default": 60000, + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "read_timeout": { + "default": 60000, + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + } + ] + } + }, + { + "embeddings": { + "fields": [ + { + "auth": { + "fields": [ + { + "header_name": { + "referenceable": true, + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "required": false, + "type": "string" + } + }, + { + "header_value": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "referenceable": true + } + }, + { + "param_name": { + "referenceable": true, + "description": "If AI model requires authentication via query parameter, specify its name here.", + "required": false, + "type": "string" + } + }, + { + "param_value": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Specify the full parameter value for 'param_name'.", + "referenceable": true + } + }, + { + "param_location": { + "one_of": [ + "query", + "body" + ], + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "required": false, + "type": "string" + } + }, + { + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false, + "type": "boolean" + } + }, + { + "azure_client_id": { + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "required": false, + "type": "string" + } + }, + { + "azure_client_secret": { + "encrypted": true, + "required": false, + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "referenceable": true + } + }, + { + "azure_tenant_id": { + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "required": false, + "type": "string" + } + }, + { + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "required": false, + "type": "boolean" + } + }, + { + "gcp_service_account_json": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "referenceable": true + } + }, + { + "aws_access_key_id": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "referenceable": true + } + }, + { + "aws_secret_access_key": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "referenceable": true + } + }, + { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false, + "type": "boolean" + } + } + ], + "required": false, + "type": "record" + } + }, + { + "model": { + "fields": [ + { + "provider": { + "one_of": [ + "openai", + "mistral" + ], + "description": "AI provider format to use for embeddings API", + "required": true, + "type": "string" + } + }, + { + "name": { + "description": "Model name to execute.", + "required": true, + "type": "string" + } + }, + { + "options": { + "fields": [ + { + "upstream_url": { + "description": "upstream url for the embeddings", + "required": false, + "type": "string" + } + } + ], + "description": "Key/value settings for the model", + "required": false, + "type": "record" + } + } + ], + "required": true, + "type": "record" + } + } + ], + "required": false, + "type": "record" + } + }, + { + "vectordb": { + "fields": [ + { + "strategy": { + "one_of": [ + "redis" + ], + "description": "which vector database driver to use", + "required": true, + "type": "string" + } + }, + { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "required": true, + "type": "integer" + } + }, + { + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "required": true, + "type": "number" + } + }, + { + "distance_metric": { + "one_of": [ + "cosine", + "euclidean" + ], + "description": "the distance metric to use for vector searches", + "required": true, + "type": "string" + } + }, + { + "redis": { + "required": true, + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ] + } + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ] + }, + "len_min": 1, + "type": "array" + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ] + }, + "len_min": 1, + "type": "array" + } + } + ], + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "one_of": [ + "master", + "slave", + "any" + ], + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "type": "array", + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ], + "type": "record" + }, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "required": false, + "type": "array", + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ], + "type": "record" + }, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean" + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean" + } + } + ] + } + } + ], + "required": false, + "type": "record" + } + }, + { + "response_streaming": { + "required": false, + "type": "string", + "default": "allow", + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "one_of": [ + "allow", + "deny", + "always" + ] + } + }, + { + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "gt": 0, + "type": "integer" + } + }, + { + "model_name_header": { + "default": true, + "description": "Display the model name selected in the X-Kong-LLM-Model response header", + "type": "boolean" + } + }, + { + "targets": { + "elements": { + "entity_checks": [ + { + "conditional": { + "then_err": "bedrock and gemini only support auth.allow_override = false", + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "then_field": "auth.allow_override", + "if_field": "model.provider", + "then_match": { + "eq": false + } + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.llama2_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.mistral_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.anthropic_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.upstream_url" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + } + ], + "type": "record", + "required": true, + "fields": [ + { + "route_type": { + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "required": true, + "type": "string" + } + }, + { + "auth": { + "fields": [ + { + "header_name": { + "referenceable": true, + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "required": false, + "type": "string" + } + }, + { + "header_value": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "referenceable": true + } + }, + { + "param_name": { + "referenceable": true, + "description": "If AI model requires authentication via query parameter, specify its name here.", + "required": false, + "type": "string" + } + }, + { + "param_value": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Specify the full parameter value for 'param_name'.", + "referenceable": true + } + }, + { + "param_location": { + "one_of": [ + "query", + "body" + ], + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "required": false, + "type": "string" + } + }, + { + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false, + "type": "boolean" + } + }, + { + "azure_client_id": { + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "required": false, + "type": "string" + } + }, + { + "azure_client_secret": { + "encrypted": true, + "required": false, + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "referenceable": true + } + }, + { + "azure_tenant_id": { + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "required": false, + "type": "string" + } + }, + { + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "required": false, + "type": "boolean" + } + }, + { + "gcp_service_account_json": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "referenceable": true + } + }, + { + "aws_access_key_id": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "referenceable": true + } + }, + { + "aws_secret_access_key": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "referenceable": true + } + }, + { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false, + "type": "boolean" + } + } + ], + "required": false, + "type": "record" + } + }, + { + "model": { + "fields": [ + { + "provider": { + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock", + "huggingface" + ], + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "required": true, + "type": "string" + } + }, + { + "name": { + "description": "Model name to execute.", + "required": false, + "type": "string" + } + }, + { + "options": { + "fields": [ + { + "max_tokens": { + "default": 256, + "description": "Defines the max_tokens, if using chat or completion models.", + "required": false, + "type": "integer" + } + }, + { + "input_cost": { + "gt": 0, + "description": "Defines the cost per 1M tokens in your prompt.", + "required": false, + "type": "number" + } + }, + { + "output_cost": { + "gt": 0, + "description": "Defines the cost per 1M tokens in the output of the AI.", + "required": false, + "type": "number" + } + }, + { + "temperature": { + "between": [ + 0, + 5 + ], + "description": "Defines the matching temperature, if using chat or completion models.", + "required": false, + "type": "number" + } + }, + { + "top_p": { + "between": [ + 0, + 1 + ], + "description": "Defines the top-p probability mass, if supported.", + "required": false, + "type": "number" + } + }, + { + "top_k": { + "between": [ + 0, + 500 + ], + "description": "Defines the top-k most likely tokens, if supported.", + "required": false, + "type": "integer" + } + }, + { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "required": false, + "type": "string" + } + }, + { + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "required": false, + "type": "string" + } + }, + { + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "required": false, + "type": "string" + } + }, + { + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "required": false, + "type": "string" + } + }, + { + "llama2_format": { + "one_of": [ + "raw", + "openai", + "ollama" + ], + "description": "If using llama2 provider, select the upstream message format.", + "required": false, + "type": "string" + } + }, + { + "mistral_format": { + "one_of": [ + "openai", + "ollama" + ], + "description": "If using mistral provider, select the upstream message format.", + "required": false, + "type": "string" + } + }, + { + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "required": false, + "type": "string" + } + }, + { + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "required": false, + "type": "string" + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "fields": [ + { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "required": false, + "type": "string" + } + }, + { + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "required": false, + "type": "string" + } + }, + { + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "required": false, + "type": "string" + } + } + ], + "required": false, + "type": "record" + } + }, + { + "bedrock": { + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "required": false, + "type": "string" + } + } + ], + "required": false, + "type": "record" + } + }, + { + "huggingface": { + "fields": [ + { + "use_cache": { + "description": "Use the cache layer on the inference API", + "required": false, + "type": "boolean" + } + }, + { + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "required": false, + "type": "boolean" + } + } + ], + "required": false, + "type": "record" + } + } + ], + "description": "Key/value settings for the model", + "required": false, + "type": "record" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "weight": { + "default": 100, + "description": "The weight this target gets within the upstream loadbalancer (1-65535).", + "between": [ + 1, + 65535 + ], + "type": "integer" + } + }, + { + "description": { + "description": "The semantic description of the target, required if using semantic load balancing.", + "required": false, + "type": "string" + } + }, + { + "logging": { + "fields": [ + { + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "required": true, + "type": "boolean" + } + }, + { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "required": true, + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + } + ] + }, + "required": true, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-proxy/3.10.x.json b/schemas/ai-proxy/3.10.x.json new file mode 100644 index 00000000..a083f75a --- /dev/null +++ b/schemas/ai-proxy/3.10.x.json @@ -0,0 +1,692 @@ +{ + "entity_checks": [ + { + "conditional": { + "then_err": "native provider options in llm_format can only be used with the 'llm/v1/chat' route_type", + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "then_field": "config.route_type", + "if_field": "config.llm_format", + "then_match": { + "eq": "llm/v1/chat" + } + } + }, + { + "conditional": { + "then_err": "native llm_format 'bedrock' can only be used with the 'bedrock' model.provider", + "if_match": { + "eq": "bedrock" + }, + "then_field": "config.model.provider", + "if_field": "config.llm_format", + "then_match": { + "eq": "bedrock" + } + } + }, + { + "conditional": { + "then_err": "native llm_format 'gemini' can only be used with the 'gemini' model.provider", + "if_match": { + "eq": "gemini" + }, + "then_field": "config.model.provider", + "if_field": "config.llm_format", + "then_match": { + "eq": "gemini" + } + } + } + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "entity_checks": [ + { + "conditional": { + "then_err": "bedrock and gemini only support auth.allow_override = false", + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "then_field": "auth.allow_override", + "if_field": "model.provider", + "then_match": { + "eq": false + } + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.llama2_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.mistral_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.anthropic_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.upstream_url" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + } + ], + "type": "record", + "fields": [ + { + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "type": "string", + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "required": true + } + }, + { + "auth": { + "type": "record", + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "header_value": { + "type": "string", + "referenceable": true, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "encrypted": true, + "required": false + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "param_value": { + "type": "string", + "referenceable": true, + "description": "Specify the full parameter value for 'param_name'.", + "encrypted": true, + "required": false + } + }, + { + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string", + "one_of": [ + "query", + "body" + ], + "required": false + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "azure_client_secret": { + "type": "string", + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "encrypted": true, + "required": false + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "gcp_service_account_json": { + "type": "string", + "referenceable": true, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "encrypted": true, + "required": false + } + }, + { + "aws_access_key_id": { + "type": "string", + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "encrypted": true, + "required": false + } + }, + { + "aws_secret_access_key": { + "type": "string", + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "encrypted": true, + "required": false + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean", + "default": false, + "required": false + } + } + ], + "required": false + } + }, + { + "model": { + "type": "record", + "fields": [ + { + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "type": "string", + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock", + "huggingface" + ], + "required": true + } + }, + { + "name": { + "description": "Model name to execute.", + "type": "string", + "required": false + } + }, + { + "options": { + "description": "Key/value settings for the model", + "type": "record", + "fields": [ + { + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer", + "required": false + } + }, + { + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "type": "number", + "gt": 0, + "required": false + } + }, + { + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "type": "number", + "gt": 0, + "required": false + } + }, + { + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "type": "number", + "between": [ + 0, + 5 + ], + "required": false + } + }, + { + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "type": "number", + "between": [ + 0, + 1 + ], + "required": false + } + }, + { + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "type": "integer", + "between": [ + 0, + 500 + ], + "required": false + } + }, + { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string", + "required": false + } + }, + { + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string", + "required": false + } + }, + { + "azure_api_version": { + "description": "'api-version' for Azure OpenAI instances.", + "type": "string", + "default": "2023-05-15", + "required": false + } + }, + { + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string", + "required": false + } + }, + { + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "type": "string", + "one_of": [ + "raw", + "openai", + "ollama" + ], + "required": false + } + }, + { + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "type": "string", + "one_of": [ + "openai", + "ollama" + ], + "required": false + } + }, + { + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string", + "required": false + } + }, + { + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string", + "deprecation": { + "message": "llm: config.model.options.upstream_path is deprecated, please use config.model.options.upstream_url instead", + "removal_in_version": "4.0" + }, + "required": false + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "type": "record", + "fields": [ + { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string", + "required": false + } + }, + { + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string", + "required": false + } + }, + { + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string", + "required": false + } + } + ], + "required": false + } + }, + { + "bedrock": { + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "type": "record", + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + }, + { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string", + "required": false + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + } + ], + "required": false + } + }, + { + "huggingface": { + "type": "record", + "fields": [ + { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean", + "required": false + } + }, + { + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean", + "required": false + } + } + ], + "required": false + } + } + ], + "required": false + } + } + ], + "required": true + } + }, + { + "logging": { + "type": "record", + "fields": [ + { + "log_statistics": { + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "log_payloads": { + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean", + "default": false, + "required": true + } + } + ], + "required": true + } + }, + { + "response_streaming": { + "type": "string", + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "one_of": [ + "allow", + "deny", + "always" + ], + "default": "allow", + "required": false + } + }, + { + "max_request_body_size": { + "gt": 0, + "type": "integer", + "description": "max allowed body size allowed to be introspected", + "default": 8192 + } + }, + { + "model_name_header": { + "description": "Display the model name selected in the X-Kong-LLM-Model response header", + "type": "boolean", + "default": true + } + }, + { + "llm_format": { + "type": "string", + "description": "LLM input and output format and schema to use", + "one_of": [ + "openai", + "bedrock", + "gemini" + ], + "default": "openai", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-proxy/3.11.x.json b/schemas/ai-proxy/3.11.x.json new file mode 100644 index 00000000..ee160297 --- /dev/null +++ b/schemas/ai-proxy/3.11.x.json @@ -0,0 +1,910 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "config": { + "required": true, + "entity_checks": [ + { + "conditional": { + "then_err": "bedrock and gemini only support auth.allow_override = false", + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "then_field": "auth.allow_override", + "if_field": "model.provider", + "then_match": { + "eq": false + } + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.llama2_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.mistral_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.anthropic_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.upstream_url" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model" + ] + } + } + ], + "fields": [ + { + "route_type": { + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "llm/v1/embeddings", + "llm/v1/responses", + "llm/v1/assistants", + "llm/v1/batches", + "llm/v1/files", + "image/v1/images/generations", + "image/v1/images/edits", + "audio/v1/audio/transcriptions", + "audio/v1/audio/speech", + "audio/v1/audio/translations", + "realtime/v1/realtime", + "preserve" + ], + "required": true, + "description": "The model's operation implementation, for this provider. ", + "type": "string" + } + }, + { + "auth": { + "required": false, + "fields": [ + { + "header_name": { + "referenceable": true, + "required": false, + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "type": "string" + } + }, + { + "header_value": { + "required": false, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "param_name": { + "referenceable": true, + "required": false, + "description": "If AI model requires authentication via query parameter, specify its name here.", + "type": "string" + } + }, + { + "param_value": { + "required": false, + "description": "Specify the full parameter value for 'param_name'.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "param_location": { + "one_of": [ + "query", + "body" + ], + "required": false, + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string" + } + }, + { + "azure_use_managed_identity": { + "default": false, + "required": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean" + } + }, + { + "azure_client_id": { + "referenceable": true, + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "type": "string" + } + }, + { + "azure_client_secret": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "azure_tenant_id": { + "referenceable": true, + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "type": "string" + } + }, + { + "gcp_use_service_account": { + "default": false, + "required": false, + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean" + } + }, + { + "gcp_service_account_json": { + "required": false, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "aws_access_key_id": { + "required": false, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "aws_secret_access_key": { + "required": false, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "allow_override": { + "default": false, + "required": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "model": { + "required": true, + "fields": [ + { + "provider": { + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock", + "huggingface" + ], + "required": true, + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "type": "string" + } + }, + { + "name": { + "required": false, + "description": "Model name to execute.", + "type": "string" + } + }, + { + "options": { + "fields": [ + { + "max_tokens": { + "required": false, + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + } + }, + { + "input_cost": { + "gt": 0, + "required": false, + "description": "Defines the cost per 1M tokens in your prompt.", + "type": "number" + } + }, + { + "output_cost": { + "gt": 0, + "required": false, + "description": "Defines the cost per 1M tokens in the output of the AI.", + "type": "number" + } + }, + { + "temperature": { + "between": [ + 0, + 5 + ], + "required": false, + "description": "Defines the matching temperature, if using chat or completion models.", + "type": "number" + } + }, + { + "top_p": { + "between": [ + 0, + 1 + ], + "required": false, + "description": "Defines the top-p probability mass, if supported.", + "type": "number" + } + }, + { + "top_k": { + "between": [ + 0, + 500 + ], + "required": false, + "description": "Defines the top-k most likely tokens, if supported.", + "type": "integer" + } + }, + { + "anthropic_version": { + "required": false, + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + } + }, + { + "azure_instance": { + "required": false, + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + { + "azure_api_version": { + "default": "2023-05-15", + "required": false, + "description": "'api-version' for Azure OpenAI instances.", + "type": "string" + } + }, + { + "azure_deployment_id": { + "required": false, + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + } + }, + { + "llama2_format": { + "one_of": [ + "raw", + "openai", + "ollama" + ], + "required": false, + "description": "If using llama2 provider, select the upstream message format.", + "type": "string" + } + }, + { + "mistral_format": { + "one_of": [ + "openai", + "ollama" + ], + "required": false, + "description": "If using mistral provider, select the upstream message format.", + "type": "string" + } + }, + { + "upstream_url": { + "required": false, + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + { + "upstream_path": { + "deprecation": { + "removal_in_version": "4.0", + "message": "llm: config.model.options.upstream_path is deprecated, please use config.model.options.upstream_url instead" + }, + "required": false, + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + } + }, + { + "embeddings_dimensions": { + "gt": 0, + "required": false, + "description": "If using embeddings models, set the number of dimensions to generate.", + "type": "integer" + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "required": false, + "fields": [ + { + "api_endpoint": { + "required": false, + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + } + }, + { + "project_id": { + "required": false, + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + { + "location_id": { + "required": false, + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "bedrock": { + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "required": false, + "fields": [ + { + "aws_region": { + "required": false, + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + } + }, + { + "aws_assume_role_arn": { + "required": false, + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + { + "embeddings_normalize": { + "default": false, + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "type": "boolean" + } + }, + { + "performance_config_latency": { + "required": false, + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "huggingface": { + "required": false, + "fields": [ + { + "use_cache": { + "required": false, + "description": "Use the cache layer on the inference API", + "type": "boolean" + } + }, + { + "wait_for_model": { + "required": false, + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "cohere": { + "required": false, + "fields": [ + { + "embedding_input_type": { + "required": false, + "description": "The purpose of the input text to calculate embedding vectors.", + "one_of": [ + "search_document", + "search_query", + "classification", + "clustering", + "image" + ], + "default": "classification", + "type": "string" + } + }, + { + "wait_for_model": { + "required": false, + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "required": false, + "description": "Key/value settings for the model", + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "logging": { + "required": true, + "fields": [ + { + "log_statistics": { + "default": false, + "required": true, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean" + } + }, + { + "log_payloads": { + "default": false, + "required": true, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "response_streaming": { + "required": false, + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "one_of": [ + "allow", + "deny", + "always" + ], + "default": "allow", + "type": "string" + } + }, + { + "max_request_body_size": { + "default": 8192, + "gt": 0, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "type": "integer" + } + }, + { + "model_name_header": { + "default": true, + "description": "Display the model name selected in the X-Kong-LLM-Model response header", + "type": "boolean" + } + }, + { + "llm_format": { + "required": false, + "description": "LLM input and output format and schema to use", + "one_of": [ + "openai", + "bedrock", + "gemini", + "cohere", + "huggingface" + ], + "default": "openai", + "type": "string" + } + }, + { + "genai_category": { + "required": false, + "description": "Generative AI category of the request", + "one_of": [ + "text/generation", + "text/embeddings", + "audio/transcription", + "audio/speech", + "image/generation", + "video/generation" + ], + "default": "text/generation", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_err": "native provider options in llm_format can only be used with the 'llm/v1/chat' route_type", + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "then_field": "config.route_type", + "if_field": "config.llm_format", + "then_match": { + "eq": "llm/v1/chat" + } + } + }, + { + "conditional": { + "then_err": "native llm_format 'bedrock' can only be used with the 'bedrock' model.provider", + "if_match": { + "eq": "bedrock" + }, + "then_field": "config.model.provider", + "if_field": "config.llm_format", + "then_match": { + "eq": "bedrock" + } + } + }, + { + "conditional": { + "then_err": "native llm_format 'gemini' can only be used with the 'gemini' model.provider", + "if_match": { + "eq": "gemini" + }, + "then_field": "config.model.provider", + "if_field": "config.llm_format", + "then_match": { + "eq": "gemini" + } + } + }, + { + "conditional": { + "then_err": "current route type doesn't have model name thus can't return model_name_header", + "if_match": { + "one_of": [ + "llm/v1/assistants", + "llm/v1/files", + "llm/v1/batches" + ] + }, + "then_field": "config.model_name_header", + "if_field": "config.route_type", + "then_match": { + "eq": false + } + } + }, + { + "conditional": { + "then_err": "native llm_format 'cohere' can only be used with the 'cohere' model.provider", + "if_match": { + "eq": "cohere" + }, + "then_field": "config.model.provider", + "if_field": "config.llm_format", + "then_match": { + "eq": "cohere" + } + } + }, + { + "conditional": { + "then_err": "category 'text/generation' cannot be used with this route_type", + "if_match": { + "eq": "text/generation" + }, + "then_field": "config.route_type", + "if_field": "config.genai_category", + "then_match": { + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "llm/v1/responses", + "llm/v1/assistants", + "llm/v1/files", + "llm/v1/batches", + "preserve" + ] + } + } + }, + { + "conditional": { + "then_err": "category 'text/embeddings' cannot be used with this route_type", + "if_match": { + "eq": "text/embeddings" + }, + "then_field": "config.route_type", + "if_field": "config.genai_category", + "then_match": { + "eq": "llm/v1/embeddings" + } + } + }, + { + "conditional": { + "then_err": "category 'image/generation' cannot be used with this route_type", + "if_match": { + "eq": "image/generation" + }, + "then_field": "config.route_type", + "if_field": "config.genai_category", + "then_match": { + "one_of": [ + "image/v1/images/generations", + "image/v1/images/edits" + ] + } + } + }, + { + "conditional": { + "then_err": "category 'audio/speech' cannot be used with this route_type", + "if_match": { + "eq": "audio/speech" + }, + "then_field": "config.route_type", + "if_field": "config.genai_category", + "then_match": { + "one_of": [ + "audio/v1/audio/speech" + ] + } + } + }, + { + "conditional": { + "then_err": "category 'audio/transcription' cannot be used with this route_type", + "if_match": { + "eq": "audio/transcription" + }, + "then_field": "config.route_type", + "if_field": "config.genai_category", + "then_match": { + "one_of": [ + "audio/v1/audio/transcriptions", + "audio/v1/audio/translations" + ] + } + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-proxy/3.12.x.json b/schemas/ai-proxy/3.12.x.json new file mode 100644 index 00000000..36e08a05 --- /dev/null +++ b/schemas/ai-proxy/3.12.x.json @@ -0,0 +1,907 @@ +{ + "entity_checks": [ + { + "conditional": { + "if_match": { + "eq": "bedrock" + }, + "then_field": "config.model.provider", + "if_field": "config.llm_format", + "then_match": { + "eq": "bedrock" + }, + "then_err": "native llm_format 'bedrock' can only be used with the 'bedrock' model.provider" + } + }, + { + "conditional": { + "if_match": { + "eq": "gemini" + }, + "then_field": "config.model.provider", + "if_field": "config.llm_format", + "then_match": { + "eq": "gemini" + }, + "then_err": "native llm_format 'gemini' can only be used with the 'gemini' model.provider" + } + }, + { + "conditional": { + "if_match": { + "eq": "cohere" + }, + "then_field": "config.model.provider", + "if_field": "config.llm_format", + "then_match": { + "eq": "cohere" + }, + "then_err": "native llm_format 'cohere' can only be used with the 'cohere' model.provider" + } + }, + { + "conditional": { + "if_match": { + "eq": "huggingface" + }, + "then_field": "config.model.provider", + "if_field": "config.llm_format", + "then_match": { + "eq": "huggingface" + }, + "then_err": "native llm_format 'huggingface' can only be used with the 'huggingface' model.provider" + } + }, + { + "conditional": { + "if_match": { + "one_of": [ + "llm/v1/assistants", + "llm/v1/files", + "llm/v1/batches" + ] + }, + "then_field": "config.model_name_header", + "if_field": "config.route_type", + "then_match": { + "eq": false + }, + "then_err": "current route type doesn't have model name thus can't return model_name_header" + } + }, + { + "conditional": { + "if_match": { + "eq": "text/generation" + }, + "then_field": "config.route_type", + "if_field": "config.genai_category", + "then_match": { + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "llm/v1/responses", + "llm/v1/assistants", + "llm/v1/files", + "llm/v1/batches", + "preserve" + ] + }, + "then_err": "category 'text/generation' cannot be used with this route_type" + } + }, + { + "conditional": { + "if_match": { + "eq": "text/embeddings" + }, + "then_field": "config.route_type", + "if_field": "config.genai_category", + "then_match": { + "eq": "llm/v1/embeddings" + }, + "then_err": "category 'text/embeddings' cannot be used with this route_type" + } + }, + { + "conditional": { + "if_match": { + "eq": "image/generation" + }, + "then_field": "config.route_type", + "if_field": "config.genai_category", + "then_match": { + "one_of": [ + "image/v1/images/generations", + "image/v1/images/edits" + ] + }, + "then_err": "category 'image/generation' cannot be used with this route_type" + } + }, + { + "conditional": { + "if_match": { + "eq": "audio/speech" + }, + "then_field": "config.route_type", + "if_field": "config.genai_category", + "then_match": { + "one_of": [ + "audio/v1/audio/speech" + ] + }, + "then_err": "category 'audio/speech' cannot be used with this route_type" + } + }, + { + "conditional": { + "if_match": { + "eq": "audio/transcription" + }, + "then_field": "config.route_type", + "if_field": "config.genai_category", + "then_match": { + "one_of": [ + "audio/v1/audio/transcriptions", + "audio/v1/audio/translations" + ] + }, + "then_err": "category 'audio/transcription' cannot be used with this route_type" + } + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "route_type": { + "type": "string", + "description": "The model's operation implementation, for this provider. ", + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "llm/v1/embeddings", + "llm/v1/responses", + "llm/v1/assistants", + "llm/v1/batches", + "llm/v1/files", + "image/v1/images/generations", + "image/v1/images/edits", + "audio/v1/audio/transcriptions", + "audio/v1/audio/speech", + "audio/v1/audio/translations", + "realtime/v1/realtime", + "preserve" + ], + "required": true + } + }, + { + "auth": { + "type": "record", + "fields": [ + { + "header_name": { + "type": "string", + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "referenceable": true, + "required": false + } + }, + { + "header_value": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'." + } + }, + { + "param_name": { + "type": "string", + "description": "If AI model requires authentication via query parameter, specify its name here.", + "referenceable": true, + "required": false + } + }, + { + "param_value": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Specify the full parameter value for 'param_name'." + } + }, + { + "param_location": { + "type": "string", + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "one_of": [ + "query", + "body" + ], + "required": false + } + }, + { + "azure_use_managed_identity": { + "type": "boolean", + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false + } + }, + { + "azure_client_id": { + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "referenceable": true, + "required": false + } + }, + { + "azure_client_secret": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret." + } + }, + { + "azure_tenant_id": { + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "referenceable": true, + "required": false + } + }, + { + "gcp_use_service_account": { + "type": "boolean", + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "required": false + } + }, + { + "gcp_service_account_json": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`." + } + }, + { + "aws_access_key_id": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance." + } + }, + { + "aws_secret_access_key": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance." + } + }, + { + "allow_override": { + "type": "boolean", + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false + } + } + ], + "required": false + } + }, + { + "model": { + "type": "record", + "fields": [ + { + "provider": { + "type": "string", + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock", + "huggingface" + ], + "required": true + } + }, + { + "name": { + "type": "string", + "description": "Model name to execute.", + "required": false + } + }, + { + "options": { + "description": "Key/value settings for the model", + "fields": [ + { + "max_tokens": { + "type": "integer", + "description": "Defines the max_tokens, if using chat or completion models.", + "required": false + } + }, + { + "input_cost": { + "type": "number", + "description": "Defines the cost per 1M tokens in your prompt.", + "gt": 0, + "required": false + } + }, + { + "output_cost": { + "type": "number", + "description": "Defines the cost per 1M tokens in the output of the AI.", + "gt": 0, + "required": false + } + }, + { + "temperature": { + "type": "number", + "description": "Defines the matching temperature, if using chat or completion models.", + "between": [ + 0, + 5 + ], + "required": false + } + }, + { + "top_p": { + "type": "number", + "description": "Defines the top-p probability mass, if supported.", + "between": [ + 0, + 1 + ], + "required": false + } + }, + { + "top_k": { + "type": "integer", + "description": "Defines the top-k most likely tokens, if supported.", + "between": [ + 0, + 500 + ], + "required": false + } + }, + { + "anthropic_version": { + "type": "string", + "description": "Defines the schema/API version, if using Anthropic provider.", + "required": false + } + }, + { + "azure_instance": { + "type": "string", + "description": "Instance name for Azure OpenAI hosted models.", + "required": false + } + }, + { + "azure_api_version": { + "type": "string", + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "required": false + } + }, + { + "azure_deployment_id": { + "type": "string", + "description": "Deployment ID for Azure OpenAI instances.", + "required": false + } + }, + { + "llama2_format": { + "type": "string", + "description": "If using llama2 provider, select the upstream message format.", + "one_of": [ + "raw", + "openai", + "ollama" + ], + "required": false + } + }, + { + "mistral_format": { + "type": "string", + "description": "If using mistral provider, select the upstream message format.", + "one_of": [ + "openai", + "ollama" + ], + "required": false + } + }, + { + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string", + "required": false + } + }, + { + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "deprecation": { + "message": "llm: config.model.options.upstream_path is deprecated, please use config.model.options.upstream_url instead", + "removal_in_version": "4.0" + }, + "type": "string", + "required": false + } + }, + { + "embeddings_dimensions": { + "type": "integer", + "description": "If using embeddings models, set the number of dimensions to generate.", + "gt": 0, + "required": false + } + }, + { + "gemini": { + "type": "record", + "fields": [ + { + "api_endpoint": { + "type": "string", + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "required": false + } + }, + { + "project_id": { + "type": "string", + "description": "If running Gemini on Vertex, specify the project ID.", + "required": false + } + }, + { + "location_id": { + "type": "string", + "description": "If running Gemini on Vertex, specify the location ID.", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "required": false + } + }, + { + "bedrock": { + "type": "record", + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + }, + { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string", + "required": false + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + { + "embeddings_normalize": { + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "default": false, + "type": "boolean" + } + }, + { + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "required": false + } + }, + { + "huggingface": { + "type": "record", + "fields": [ + { + "use_cache": { + "type": "boolean", + "description": "Use the cache layer on the inference API", + "required": false + } + }, + { + "wait_for_model": { + "type": "boolean", + "description": "Wait for the model if it is not ready", + "required": false + } + } + ], + "required": false + } + }, + { + "cohere": { + "type": "record", + "fields": [ + { + "embedding_input_type": { + "type": "string", + "required": false, + "description": "The purpose of the input text to calculate embedding vectors.", + "default": "classification", + "one_of": [ + "search_document", + "search_query", + "classification", + "clustering", + "image" + ] + } + }, + { + "wait_for_model": { + "type": "boolean", + "description": "Wait for the model if it is not ready", + "required": false + } + } + ], + "required": false + } + } + ], + "type": "record", + "required": false + } + } + ], + "required": true + } + }, + { + "logging": { + "type": "record", + "fields": [ + { + "log_statistics": { + "type": "boolean", + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "required": true + } + }, + { + "log_payloads": { + "type": "boolean", + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "required": true + } + } + ], + "required": true + } + }, + { + "response_streaming": { + "type": "string", + "required": false, + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "default": "allow", + "one_of": [ + "allow", + "deny", + "always" + ] + } + }, + { + "max_request_body_size": { + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "default": 8192, + "gt": 0, + "type": "integer" + } + }, + { + "model_name_header": { + "description": "Display the model name selected in the X-Kong-LLM-Model response header", + "default": true, + "type": "boolean" + } + }, + { + "llm_format": { + "type": "string", + "required": false, + "description": "LLM input and output format and schema to use", + "default": "openai", + "one_of": [ + "openai", + "bedrock", + "gemini", + "cohere", + "huggingface" + ] + } + }, + { + "genai_category": { + "type": "string", + "required": false, + "description": "Generative AI category of the request", + "default": "text/generation", + "one_of": [ + "text/generation", + "text/embeddings", + "audio/transcription", + "audio/speech", + "image/generation", + "video/generation" + ] + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "then_field": "auth.allow_override", + "if_field": "model.provider", + "then_match": { + "eq": false + }, + "then_err": "bedrock and gemini only support auth.allow_override = false" + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.llama2_format" + ], + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.mistral_format" + ], + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.anthropic_version" + ], + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_instance" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_api_version" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.upstream_url" + ], + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models", + "if_field": "model.provider" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model" + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-proxy/3.6.x.json b/schemas/ai-proxy/3.6.x.json new file mode 100644 index 00000000..87860e6a --- /dev/null +++ b/schemas/ai-proxy/3.6.x.json @@ -0,0 +1,427 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "service": { + "reference": "services", + "type": "foreign", + "eq": null, + "description": "A reference to the 'services' table with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "auth.header_name", + "auth.param_name" + ], + "if_field": "model.provider", + "then_err": "must set one of %s, and its respective options, when provider is not self-hosted", + "if_match": { + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere" + ] + } + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.llama2_format" + ], + "if_field": "model.provider", + "then_err": "must set %s for llama2 provider", + "if_match": { + "one_of": [ + "llama2" + ] + } + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.mistral_format" + ], + "if_field": "model.provider", + "then_err": "must set %s for mistral provider", + "if_match": { + "one_of": [ + "mistral" + ] + } + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.name" + ], + "if_field": "model.provider", + "then_err": "Must set a model name. Refer to https://docs.konghq.com/hub/kong-inc/ai-proxy/ for supported models.", + "if_match": [ + + ] + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.anthropic_version" + ], + "if_field": "model.provider", + "then_err": "must set %s for anthropic provider", + "if_match": { + "one_of": [ + "anthropic" + ] + } + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_instance" + ], + "if_field": "model.provider", + "then_err": "must set %s for azure provider", + "if_match": { + "one_of": [ + "azure" + ] + } + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_api_version" + ], + "if_field": "model.provider", + "then_err": "must set %s for azure provider", + "if_match": { + "one_of": [ + "azure" + ] + } + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ], + "if_field": "model.provider", + "then_err": "must set %s for azure provider", + "if_match": { + "one_of": [ + "azure" + ] + } + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.upstream_url" + ], + "if_field": "model.provider", + "then_err": "must set %s for self-hosted providers/models", + "if_match": { + "one_of": [ + "mistral", + "llama2" + ] + } + } + } + ], + "type": "record", + "fields": [ + { + "route_type": { + "required": true, + "type": "string", + "description": "The model's operation implementation, for this provider.", + "one_of": [ + "llm/v1/chat", + "llm/v1/completions" + ] + } + }, + { + "auth": { + "required": false, + "type": "record", + "fields": [ + { + "header_name": { + "required": false, + "type": "string", + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "referenceable": true + } + }, + { + "header_value": { + "referenceable": true, + "type": "string", + "required": false, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "encrypted": true + } + }, + { + "param_name": { + "required": false, + "type": "string", + "description": "If AI model requires authentication via query parameter, specify its name here.", + "referenceable": true + } + }, + { + "param_value": { + "referenceable": true, + "type": "string", + "required": false, + "description": "Specify the full parameter value for 'param_name'.", + "encrypted": true + } + }, + { + "param_location": { + "required": false, + "type": "string", + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "one_of": [ + "query", + "body" + ] + } + } + ] + } + }, + { + "model": { + "required": true, + "type": "record", + "fields": [ + { + "provider": { + "required": true, + "type": "string", + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2" + ] + } + }, + { + "name": { + "required": false, + "type": "string", + "description": "Model name to execute." + } + }, + { + "options": { + "required": false, + "type": "record", + "description": "Key/value settings for the model", + "fields": [ + { + "max_tokens": { + "required": false, + "type": "integer", + "description": "Defines the max_tokens, if using chat or completion models.", + "default": 256 + } + }, + { + "temperature": { + "type": "number", + "default": 1, + "between": [ + 0, + 5 + ], + "required": false, + "description": "Defines the matching temperature, if using chat or completion models." + } + }, + { + "top_p": { + "type": "number", + "default": 1, + "between": [ + 0, + 1 + ], + "required": false, + "description": "Defines the top-p probability mass, if supported." + } + }, + { + "top_k": { + "type": "integer", + "default": 0, + "between": [ + 0, + 500 + ], + "required": false, + "description": "Defines the top-k most likely tokens, if supported." + } + }, + { + "anthropic_version": { + "required": false, + "type": "string", + "description": "Defines the schema/API version, if using Anthropic provider." + } + }, + { + "azure_instance": { + "required": false, + "type": "string", + "description": "Instance name for Azure OpenAI hosted models." + } + }, + { + "azure_api_version": { + "required": false, + "type": "string", + "description": "'api-version' for Azure OpenAI instances.", + "default": "2023-05-15" + } + }, + { + "azure_deployment_id": { + "required": false, + "type": "string", + "description": "Deployment ID for Azure OpenAI instances." + } + }, + { + "llama2_format": { + "required": false, + "type": "string", + "description": "If using llama2 provider, select the upstream message format.", + "one_of": [ + "raw", + "openai", + "ollama" + ] + } + }, + { + "mistral_format": { + "required": false, + "type": "string", + "description": "If using mistral provider, select the upstream message format.", + "one_of": [ + "openai", + "ollama" + ] + } + }, + { + "upstream_url": { + "required": false, + "type": "string", + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint." + } + } + ] + } + } + ] + } + }, + { + "logging": { + "required": true, + "type": "record", + "fields": [ + { + "log_statistics": { + "required": true, + "type": "boolean", + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "default": true + } + }, + { + "log_payloads": { + "required": true, + "type": "boolean", + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "default": false + } + } + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-proxy/3.7.x.json b/schemas/ai-proxy/3.7.x.json new file mode 100644 index 00000000..be44ee57 --- /dev/null +++ b/schemas/ai-proxy/3.7.x.json @@ -0,0 +1,490 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "service": { + "reference": "services", + "type": "foreign", + "description": "A reference to the 'services' table with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "route_type": { + "required": true, + "type": "string", + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ] + } + }, + { + "auth": { + "required": false, + "type": "record", + "fields": [ + { + "header_name": { + "required": false, + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "referenceable": true, + "type": "string" + } + }, + { + "header_value": { + "encrypted": true, + "referenceable": true, + "required": false, + "type": "string", + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'." + } + }, + { + "param_name": { + "required": false, + "description": "If AI model requires authentication via query parameter, specify its name here.", + "referenceable": true, + "type": "string" + } + }, + { + "param_value": { + "encrypted": true, + "referenceable": true, + "required": false, + "type": "string", + "description": "Specify the full parameter value for 'param_name'." + } + }, + { + "param_location": { + "required": false, + "type": "string", + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "one_of": [ + "query", + "body" + ] + } + }, + { + "azure_use_managed_identity": { + "required": false, + "type": "boolean", + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "default": false + } + }, + { + "azure_client_id": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "referenceable": true, + "type": "string" + } + }, + { + "azure_client_secret": { + "encrypted": true, + "referenceable": true, + "required": false, + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret." + } + }, + { + "azure_tenant_id": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "referenceable": true, + "type": "string" + } + } + ] + } + }, + { + "model": { + "required": true, + "type": "record", + "fields": [ + { + "provider": { + "required": true, + "type": "string", + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2" + ] + } + }, + { + "name": { + "required": false, + "type": "string", + "description": "Model name to execute." + } + }, + { + "options": { + "required": false, + "type": "record", + "description": "Key/value settings for the model", + "fields": [ + { + "response_streaming": { + "default": "allow", + "required": false, + "type": "string", + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "one_of": [ + "allow", + "deny", + "always" + ] + } + }, + { + "max_tokens": { + "required": false, + "type": "integer", + "description": "Defines the max_tokens, if using chat or completion models.", + "default": 256 + } + }, + { + "temperature": { + "required": false, + "type": "number", + "description": "Defines the matching temperature, if using chat or completion models.", + "between": [ + 0, + 5 + ] + } + }, + { + "top_p": { + "required": false, + "type": "number", + "description": "Defines the top-p probability mass, if supported.", + "between": [ + 0, + 1 + ] + } + }, + { + "top_k": { + "required": false, + "type": "integer", + "description": "Defines the top-k most likely tokens, if supported.", + "between": [ + 0, + 500 + ] + } + }, + { + "anthropic_version": { + "required": false, + "type": "string", + "description": "Defines the schema/API version, if using Anthropic provider." + } + }, + { + "azure_instance": { + "required": false, + "type": "string", + "description": "Instance name for Azure OpenAI hosted models." + } + }, + { + "azure_api_version": { + "required": false, + "type": "string", + "description": "'api-version' for Azure OpenAI instances.", + "default": "2023-05-15" + } + }, + { + "azure_deployment_id": { + "required": false, + "type": "string", + "description": "Deployment ID for Azure OpenAI instances." + } + }, + { + "llama2_format": { + "required": false, + "type": "string", + "description": "If using llama2 provider, select the upstream message format.", + "one_of": [ + "raw", + "openai", + "ollama" + ] + } + }, + { + "mistral_format": { + "required": false, + "type": "string", + "description": "If using mistral provider, select the upstream message format.", + "one_of": [ + "openai", + "ollama" + ] + } + }, + { + "upstream_url": { + "required": false, + "type": "string", + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint." + } + }, + { + "upstream_path": { + "required": false, + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + } + } + ] + } + } + ] + } + }, + { + "logging": { + "required": true, + "type": "record", + "fields": [ + { + "log_statistics": { + "required": true, + "type": "boolean", + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "default": false + } + }, + { + "log_payloads": { + "required": true, + "type": "boolean", + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "default": false + } + } + ] + } + } + ], + "entity_checks": [ + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "auth.header_name", + "auth.param_name" + ], + "if_match": { + "one_of": [ + "openai", + "anthropic", + "cohere" + ] + }, + "then_err": "must set one of %s, and its respective options, when provider is not self-hosted" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "auth.header_name", + "auth.param_name", + "auth.azure_use_managed_identity" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set one of %s, and its respective options, when azure provider is set" + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.llama2_format" + ], + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.mistral_format" + ], + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.anthropic_version" + ], + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_instance" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_api_version" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.upstream_url" + ], + "if_match": { + "one_of": [ + "mistral", + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/ai-proxy/3.8.x.json b/schemas/ai-proxy/3.8.x.json new file mode 100644 index 00000000..46d054a9 --- /dev/null +++ b/schemas/ai-proxy/3.8.x.json @@ -0,0 +1,585 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "type": "string", + "required": true, + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ] + } + }, + { + "auth": { + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "param_value": { + "description": "Specify the full parameter value for 'param_name'.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string", + "required": false, + "one_of": [ + "query", + "body" + ] + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean", + "required": false, + "default": false + } + } + ], + "required": false, + "type": "record" + } + }, + { + "model": { + "fields": [ + { + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "type": "string", + "required": true, + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock" + ] + } + }, + { + "name": { + "description": "Model name to execute.", + "type": "string", + "required": false + } + }, + { + "options": { + "description": "Key/value settings for the model", + "type": "record", + "fields": [ + { + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer", + "required": false, + "default": 256 + } + }, + { + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "type": "number", + "gt": 0, + "required": false + } + }, + { + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "type": "number", + "gt": 0, + "required": false + } + }, + { + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "type": "number", + "between": [ + 0, + 5 + ], + "required": false + } + }, + { + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "type": "number", + "between": [ + 0, + 1 + ], + "required": false + } + }, + { + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "type": "integer", + "between": [ + 0, + 500 + ], + "required": false + } + }, + { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string", + "required": false + } + }, + { + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string", + "required": false + } + }, + { + "azure_api_version": { + "description": "'api-version' for Azure OpenAI instances.", + "type": "string", + "required": false, + "default": "2023-05-15" + } + }, + { + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string", + "required": false + } + }, + { + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "type": "string", + "required": false, + "one_of": [ + "raw", + "openai", + "ollama" + ] + } + }, + { + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "type": "string", + "required": false, + "one_of": [ + "openai", + "ollama" + ] + } + }, + { + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "required": false, + "type": "string" + } + }, + { + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string", + "required": false + } + }, + { + "gemini": { + "fields": [ + { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string", + "required": false + } + }, + { + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string", + "required": false + } + }, + { + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string", + "required": false + } + } + ], + "required": false, + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "type": "record" + } + }, + { + "bedrock": { + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + } + ], + "required": false, + "type": "record" + } + } + ], + "required": false + } + } + ], + "required": true, + "type": "record" + } + }, + { + "logging": { + "fields": [ + { + "log_statistics": { + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "log_payloads": { + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean", + "required": true, + "default": false + } + } + ], + "required": true, + "type": "record" + } + }, + { + "response_streaming": { + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "required": false, + "one_of": [ + "allow", + "deny", + "always" + ], + "type": "string", + "default": "allow" + } + }, + { + "max_request_body_size": { + "description": "max allowed body size allowed to be introspected", + "type": "integer", + "gt": 0, + "default": 8192 + } + }, + { + "model_name_header": { + "description": "Display the model name selected in the X-Kong-LLM-Model response header", + "type": "boolean", + "default": true + } + } + ], + "type": "record", + "entity_checks": [ + { + "conditional": { + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "if_field": "model.provider", + "then_err": "bedrock and gemini only support auth.allow_override = false", + "then_field": "auth.allow_override", + "then_match": { + "eq": false + } + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.llama2_format" + ], + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.mistral_format" + ], + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.anthropic_version" + ], + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_instance" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_api_version" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.upstream_url" + ], + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/ai-proxy/3.9.x.json b/schemas/ai-proxy/3.9.x.json new file mode 100644 index 00000000..d66b2f6d --- /dev/null +++ b/schemas/ai-proxy/3.9.x.json @@ -0,0 +1,608 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "entity_checks": [ + { + "conditional": { + "then_err": "bedrock and gemini only support auth.allow_override = false", + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "then_field": "auth.allow_override", + "if_field": "model.provider", + "then_match": { + "eq": false + } + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.llama2_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.mistral_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.anthropic_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.upstream_url" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + } + ], + "type": "record", + "required": true, + "fields": [ + { + "route_type": { + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "required": true, + "type": "string" + } + }, + { + "auth": { + "fields": [ + { + "header_name": { + "referenceable": true, + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "required": false, + "type": "string" + } + }, + { + "header_value": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "referenceable": true + } + }, + { + "param_name": { + "referenceable": true, + "description": "If AI model requires authentication via query parameter, specify its name here.", + "required": false, + "type": "string" + } + }, + { + "param_value": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Specify the full parameter value for 'param_name'.", + "referenceable": true + } + }, + { + "param_location": { + "one_of": [ + "query", + "body" + ], + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "required": false, + "type": "string" + } + }, + { + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false, + "type": "boolean" + } + }, + { + "azure_client_id": { + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "required": false, + "type": "string" + } + }, + { + "azure_client_secret": { + "encrypted": true, + "required": false, + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "referenceable": true + } + }, + { + "azure_tenant_id": { + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "required": false, + "type": "string" + } + }, + { + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "required": false, + "type": "boolean" + } + }, + { + "gcp_service_account_json": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "referenceable": true + } + }, + { + "aws_access_key_id": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "referenceable": true + } + }, + { + "aws_secret_access_key": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "referenceable": true + } + }, + { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false, + "type": "boolean" + } + } + ], + "required": false, + "type": "record" + } + }, + { + "model": { + "fields": [ + { + "provider": { + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock", + "huggingface" + ], + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "required": true, + "type": "string" + } + }, + { + "name": { + "description": "Model name to execute.", + "required": false, + "type": "string" + } + }, + { + "options": { + "fields": [ + { + "max_tokens": { + "default": 256, + "description": "Defines the max_tokens, if using chat or completion models.", + "required": false, + "type": "integer" + } + }, + { + "input_cost": { + "gt": 0, + "description": "Defines the cost per 1M tokens in your prompt.", + "required": false, + "type": "number" + } + }, + { + "output_cost": { + "gt": 0, + "description": "Defines the cost per 1M tokens in the output of the AI.", + "required": false, + "type": "number" + } + }, + { + "temperature": { + "between": [ + 0, + 5 + ], + "description": "Defines the matching temperature, if using chat or completion models.", + "required": false, + "type": "number" + } + }, + { + "top_p": { + "between": [ + 0, + 1 + ], + "description": "Defines the top-p probability mass, if supported.", + "required": false, + "type": "number" + } + }, + { + "top_k": { + "between": [ + 0, + 500 + ], + "description": "Defines the top-k most likely tokens, if supported.", + "required": false, + "type": "integer" + } + }, + { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "required": false, + "type": "string" + } + }, + { + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "required": false, + "type": "string" + } + }, + { + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "required": false, + "type": "string" + } + }, + { + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "required": false, + "type": "string" + } + }, + { + "llama2_format": { + "one_of": [ + "raw", + "openai", + "ollama" + ], + "description": "If using llama2 provider, select the upstream message format.", + "required": false, + "type": "string" + } + }, + { + "mistral_format": { + "one_of": [ + "openai", + "ollama" + ], + "description": "If using mistral provider, select the upstream message format.", + "required": false, + "type": "string" + } + }, + { + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "required": false, + "type": "string" + } + }, + { + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "required": false, + "type": "string" + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "fields": [ + { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "required": false, + "type": "string" + } + }, + { + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "required": false, + "type": "string" + } + }, + { + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "required": false, + "type": "string" + } + } + ], + "required": false, + "type": "record" + } + }, + { + "bedrock": { + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "required": false, + "type": "string" + } + } + ], + "required": false, + "type": "record" + } + }, + { + "huggingface": { + "fields": [ + { + "use_cache": { + "description": "Use the cache layer on the inference API", + "required": false, + "type": "boolean" + } + }, + { + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "required": false, + "type": "boolean" + } + } + ], + "required": false, + "type": "record" + } + } + ], + "description": "Key/value settings for the model", + "required": false, + "type": "record" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "logging": { + "fields": [ + { + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "required": true, + "type": "boolean" + } + }, + { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "required": true, + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "response_streaming": { + "required": false, + "type": "string", + "default": "allow", + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "one_of": [ + "allow", + "deny", + "always" + ] + } + }, + { + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "gt": 0, + "type": "integer" + } + }, + { + "model_name_header": { + "default": true, + "description": "Display the model name selected in the X-Kong-LLM-Model response header", + "type": "boolean" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-rag-injector/3.10.x.json b/schemas/ai-rag-injector/3.10.x.json new file mode 100644 index 00000000..a4b3943c --- /dev/null +++ b/schemas/ai-rag-injector/3.10.x.json @@ -0,0 +1,945 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.inject_template" + ] + } + } + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "stop_on_failure": { + "description": "Halt the LLM request process in case of a vectordb or embeddings service failure", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "inject_as_role": { + "one_of": [ + "system", + "assistant", + "user" + ], + "type": "string", + "default": "user", + "required": true + } + }, + { + "inject_template": { + "default": "\n", + "type": "string", + "required": true + } + }, + { + "fetch_chunks_count": { + "description": "The maximum number of chunks to fetch from vectordb", + "type": "number", + "default": 5, + "required": true + } + }, + { + "vectordb_namespace": { + "description": "The namespace of the vectordb to use for embeddings lookup", + "type": "string", + "default": "kong_rag_injector", + "required": true + } + }, + { + "embeddings": { + "entity_checks": [ + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.deployment_id" + ] + } + } + ], + "type": "record", + "required": true, + "fields": [ + { + "auth": { + "type": "record", + "required": false, + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "header_value": { + "type": "string", + "referenceable": true, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "encrypted": true, + "required": false + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "param_value": { + "type": "string", + "referenceable": true, + "description": "Specify the full parameter value for 'param_name'.", + "encrypted": true, + "required": false + } + }, + { + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string", + "one_of": [ + "query", + "body" + ], + "required": false + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "azure_client_secret": { + "type": "string", + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "encrypted": true, + "required": false + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "gcp_service_account_json": { + "type": "string", + "referenceable": true, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "encrypted": true, + "required": false + } + }, + { + "aws_access_key_id": { + "type": "string", + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "encrypted": true, + "required": false + } + }, + { + "aws_secret_access_key": { + "type": "string", + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "encrypted": true, + "required": false + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean", + "default": false, + "required": false + } + } + ] + } + }, + { + "model": { + "type": "record", + "required": true, + "fields": [ + { + "provider": { + "description": "AI provider format to use for embeddings API", + "type": "string", + "one_of": [ + "openai", + "mistral", + "huggingface", + "azure", + "bedrock", + "gemini" + ], + "required": true + } + }, + { + "name": { + "description": "Model name to execute.", + "type": "string", + "required": true + } + }, + { + "options": { + "description": "Key/value settings for the model", + "type": "record", + "required": false, + "fields": [ + { + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string", + "required": false + } + }, + { + "azure": { + "type": "record", + "fields": [ + { + "instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string", + "required": false + } + }, + { + "api_version": { + "description": "'api-version' for Azure OpenAI instances.", + "type": "string", + "default": "2023-05-15", + "required": false + } + }, + { + "deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string", + "required": false + } + } + ], + "required": true + } + }, + { + "bedrock": { + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "type": "record", + "required": false, + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + }, + { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string", + "required": false + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + } + ] + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "type": "record", + "required": false, + "fields": [ + { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string", + "required": false + } + }, + { + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string", + "required": false + } + }, + { + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string", + "required": false + } + } + ] + } + }, + { + "huggingface": { + "type": "record", + "required": false, + "fields": [ + { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean", + "required": false + } + }, + { + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean", + "required": false + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "vectordb": { + "type": "record", + "fields": [ + { + "strategy": { + "description": "which vector database driver to use", + "type": "string", + "one_of": [ + "redis", + "pgvector" + ], + "required": true + } + }, + { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer", + "required": true + } + }, + { + "distance_metric": { + "description": "the distance metric to use for vector searches", + "type": "string", + "one_of": [ + "cosine", + "euclidean" + ], + "required": true + } + }, + { + "redis": { + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + }, + "required": false + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + }, + "required": false + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "default": false, + "type": "boolean", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "type": "array", + "elements": { + "type": "string" + }, + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "len_min": 1 + } + }, + { + "cluster_addresses": { + "type": "array", + "elements": { + "type": "string" + }, + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "len_min": 1 + } + } + ], + "required": true + } + }, + { + "pgvector": { + "type": "record", + "required": true, + "fields": [ + { + "host": { + "description": "the host of the pgvector database", + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "the port of the pgvector database", + "type": "integer", + "default": 5432 + } + }, + { + "user": { + "description": "the user of the pgvector database", + "type": "string", + "default": "postgres", + "referenceable": true + } + }, + { + "password": { + "description": "the password of the pgvector database", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "database": { + "description": "the database of the pgvector database", + "type": "string", + "default": "kong-pgvector" + } + }, + { + "timeout": { + "description": "the timeout of the pgvector database", + "type": "number", + "default": 5000 + } + }, + { + "ssl": { + "description": "whether to use ssl for the pgvector database", + "type": "boolean", + "default": false + } + }, + { + "ssl_required": { + "description": "whether ssl is required for the pgvector database", + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "description": "whether to verify ssl for the pgvector database", + "type": "boolean", + "default": false + } + }, + { + "ssl_version": { + "description": "the ssl version to use for the pgvector database", + "type": "string", + "one_of": [ + "tlsv1_2", + "tlsv1_3", + "any" + ], + "default": "tlsv1_2" + } + }, + { + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + } + }, + { + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + } + } + ] + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-rag-injector/3.11.x.json b/schemas/ai-rag-injector/3.11.x.json new file mode 100644 index 00000000..db4ab648 --- /dev/null +++ b/schemas/ai-rag-injector/3.11.x.json @@ -0,0 +1,959 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "stop_on_failure": { + "description": "Halt the LLM request process in case of a vectordb or embeddings service failure", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "inject_as_role": { + "one_of": [ + "system", + "assistant", + "user" + ], + "required": true, + "default": "user", + "type": "string" + } + }, + { + "inject_template": { + "required": true, + "default": "\n", + "type": "string" + } + }, + { + "fetch_chunks_count": { + "description": "The maximum number of chunks to fetch from vectordb", + "required": true, + "default": 5, + "type": "number" + } + }, + { + "vectordb_namespace": { + "description": "The namespace of the vectordb to use for embeddings lookup", + "required": true, + "default": "kong_rag_injector", + "type": "string" + } + }, + { + "embeddings": { + "entity_checks": [ + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.deployment_id" + ] + } + } + ], + "required": true, + "fields": [ + { + "auth": { + "required": false, + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "header_value": { + "required": false, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "param_value": { + "required": false, + "description": "Specify the full parameter value for 'param_name'.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "param_location": { + "one_of": [ + "query", + "body" + ], + "required": false, + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string" + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "azure_client_secret": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "gcp_service_account_json": { + "required": false, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "aws_access_key_id": { + "required": false, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "aws_secret_access_key": { + "required": false, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false, + "default": false, + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "model": { + "required": true, + "fields": [ + { + "provider": { + "one_of": [ + "openai", + "mistral", + "huggingface", + "azure", + "bedrock", + "gemini" + ], + "required": true, + "description": "AI provider format to use for embeddings API", + "type": "string" + } + }, + { + "name": { + "required": true, + "description": "Model name to execute.", + "type": "string" + } + }, + { + "options": { + "description": "Key/value settings for the model", + "required": false, + "fields": [ + { + "upstream_url": { + "required": false, + "description": "upstream url for the embeddings", + "type": "string" + } + }, + { + "azure": { + "required": true, + "fields": [ + { + "instance": { + "required": false, + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + { + "api_version": { + "description": "'api-version' for Azure OpenAI instances.", + "required": false, + "default": "2023-05-15", + "type": "string" + } + }, + { + "deployment_id": { + "required": false, + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "bedrock": { + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "required": false, + "fields": [ + { + "aws_region": { + "required": false, + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + } + }, + { + "aws_assume_role_arn": { + "required": false, + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + { + "embeddings_normalize": { + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "default": false, + "type": "boolean" + } + }, + { + "performance_config_latency": { + "required": false, + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "required": false, + "fields": [ + { + "api_endpoint": { + "required": false, + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + } + }, + { + "project_id": { + "required": false, + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + { + "location_id": { + "required": false, + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "huggingface": { + "required": false, + "fields": [ + { + "use_cache": { + "required": false, + "description": "Use the cache layer on the inference API", + "type": "boolean" + } + }, + { + "wait_for_model": { + "required": false, + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "vectordb": { + "required": true, + "fields": [ + { + "strategy": { + "one_of": [ + "redis", + "pgvector" + ], + "required": true, + "description": "which vector database driver to use", + "type": "string" + } + }, + { + "dimensions": { + "required": true, + "description": "the desired dimensionality for the vectors", + "type": "integer" + } + }, + { + "distance_metric": { + "one_of": [ + "cosine", + "euclidean" + ], + "required": true, + "description": "the distance metric to use for vector searches", + "type": "string" + } + }, + { + "redis": { + "required": true, + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer" + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer" + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer" + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer" + } + }, + { + "username": { + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string" + } + }, + { + "sentinel_username": { + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "referenceable": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "default": 256, + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1, + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer" + } + } + ], + "type": "record" + }, + "type": "array" + } + }, + { + "cluster_nodes": { + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1, + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer" + } + } + ], + "type": "record" + }, + "type": "array" + } + }, + { + "ssl": { + "default": false, + "required": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "required": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "required": false, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "required": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "array" + } + }, + { + "cluster_addresses": { + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "array" + } + } + ], + "type": "record" + } + }, + { + "pgvector": { + "required": true, + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "the host of the pgvector database", + "type": "string" + } + }, + { + "port": { + "default": 5432, + "description": "the port of the pgvector database", + "type": "integer" + } + }, + { + "user": { + "description": "the user of the pgvector database", + "referenceable": true, + "default": "postgres", + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "description": "the password of the pgvector database", + "type": "string" + } + }, + { + "database": { + "default": "kong-pgvector", + "description": "the database of the pgvector database", + "type": "string" + } + }, + { + "timeout": { + "default": 5000, + "description": "the timeout of the pgvector database", + "type": "number" + } + }, + { + "ssl": { + "default": false, + "description": "whether to use ssl for the pgvector database", + "type": "boolean" + } + }, + { + "ssl_required": { + "default": false, + "description": "whether ssl is required for the pgvector database", + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "whether to verify ssl for the pgvector database", + "type": "boolean" + } + }, + { + "ssl_version": { + "one_of": [ + "tlsv1_2", + "tlsv1_3", + "any" + ], + "default": "tlsv1_2", + "description": "the ssl version to use for the pgvector database", + "type": "string" + } + }, + { + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + } + }, + { + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.inject_template" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-rag-injector/3.12.x.json b/schemas/ai-rag-injector/3.12.x.json new file mode 100644 index 00000000..7fb48148 --- /dev/null +++ b/schemas/ai-rag-injector/3.12.x.json @@ -0,0 +1,959 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.inject_template" + ] + } + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "stop_on_failure": { + "description": "Halt the LLM request process in case of a vectordb or embeddings service failure", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "inject_as_role": { + "type": "string", + "default": "user", + "one_of": [ + "system", + "assistant", + "user" + ], + "required": true + } + }, + { + "inject_template": { + "type": "string", + "default": "\n", + "required": true + } + }, + { + "fetch_chunks_count": { + "description": "The maximum number of chunks to fetch from vectordb", + "default": 5, + "type": "number", + "required": true + } + }, + { + "vectordb_namespace": { + "description": "The namespace of the vectordb to use for embeddings lookup", + "default": "kong_rag_injector", + "type": "string", + "required": true + } + }, + { + "embeddings": { + "type": "record", + "fields": [ + { + "auth": { + "type": "record", + "fields": [ + { + "header_name": { + "type": "string", + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "referenceable": true, + "required": false + } + }, + { + "header_value": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'." + } + }, + { + "param_name": { + "type": "string", + "description": "If AI model requires authentication via query parameter, specify its name here.", + "referenceable": true, + "required": false + } + }, + { + "param_value": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Specify the full parameter value for 'param_name'." + } + }, + { + "param_location": { + "type": "string", + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "one_of": [ + "query", + "body" + ], + "required": false + } + }, + { + "azure_use_managed_identity": { + "type": "boolean", + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false + } + }, + { + "azure_client_id": { + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "referenceable": true, + "required": false + } + }, + { + "azure_client_secret": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret." + } + }, + { + "azure_tenant_id": { + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "referenceable": true, + "required": false + } + }, + { + "gcp_use_service_account": { + "type": "boolean", + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "required": false + } + }, + { + "gcp_service_account_json": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`." + } + }, + { + "aws_access_key_id": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance." + } + }, + { + "aws_secret_access_key": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance." + } + }, + { + "allow_override": { + "type": "boolean", + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false + } + } + ], + "required": false + } + }, + { + "model": { + "type": "record", + "fields": [ + { + "provider": { + "type": "string", + "description": "AI provider format to use for embeddings API", + "one_of": [ + "openai", + "mistral", + "huggingface", + "azure", + "bedrock", + "gemini" + ], + "required": true + } + }, + { + "name": { + "type": "string", + "description": "Model name to execute.", + "required": true + } + }, + { + "options": { + "description": "Key/value settings for the model", + "fields": [ + { + "upstream_url": { + "type": "string", + "description": "upstream url for the embeddings", + "required": false + } + }, + { + "azure": { + "type": "record", + "fields": [ + { + "instance": { + "type": "string", + "description": "Instance name for Azure OpenAI hosted models.", + "required": false + } + }, + { + "api_version": { + "type": "string", + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "required": false + } + }, + { + "deployment_id": { + "type": "string", + "description": "Deployment ID for Azure OpenAI instances.", + "required": false + } + } + ], + "required": true + } + }, + { + "bedrock": { + "type": "record", + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + }, + { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string", + "required": false + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + { + "embeddings_normalize": { + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "default": false, + "type": "boolean" + } + }, + { + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "required": false + } + }, + { + "gemini": { + "type": "record", + "fields": [ + { + "api_endpoint": { + "type": "string", + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "required": false + } + }, + { + "project_id": { + "type": "string", + "description": "If running Gemini on Vertex, specify the project ID.", + "required": false + } + }, + { + "location_id": { + "type": "string", + "description": "If running Gemini on Vertex, specify the location ID.", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "required": false + } + }, + { + "huggingface": { + "type": "record", + "fields": [ + { + "use_cache": { + "type": "boolean", + "description": "Use the cache layer on the inference API", + "required": false + } + }, + { + "wait_for_model": { + "type": "boolean", + "description": "Wait for the model if it is not ready", + "required": false + } + } + ], + "required": false + } + } + ], + "type": "record", + "required": false + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure.instance" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure.api_version" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure.deployment_id" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + } + ], + "required": true + } + }, + { + "vectordb": { + "type": "record", + "fields": [ + { + "strategy": { + "type": "string", + "description": "which vector database driver to use", + "one_of": [ + "redis", + "pgvector" + ], + "required": true + } + }, + { + "dimensions": { + "type": "integer", + "description": "the desired dimensionality for the vectors", + "required": true + } + }, + { + "distance_metric": { + "type": "string", + "description": "the distance metric to use for vector searches", + "one_of": [ + "cosine", + "euclidean" + ], + "required": true + } + }, + { + "redis": { + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "database", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + } + ], + "required": true, + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis." + } + }, + { + "sentinel_username": { + "type": "string", + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels." + } + }, + { + "database": { + "type": "integer", + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy" + } + }, + { + "keepalive_pool_size": { + "type": "integer", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low." + } + }, + { + "keepalive_backlog": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "type": "boolean", + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + } + } + }, + { + "cluster_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + } + } + } + ] + } + }, + { + "pgvector": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "the host of the pgvector database" + } + }, + { + "port": { + "type": "integer", + "default": 5432, + "description": "the port of the pgvector database" + } + }, + { + "user": { + "type": "string", + "default": "postgres", + "referenceable": true, + "description": "the user of the pgvector database" + } + }, + { + "password": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "the password of the pgvector database" + } + }, + { + "database": { + "type": "string", + "default": "kong-pgvector", + "description": "the database of the pgvector database" + } + }, + { + "timeout": { + "type": "number", + "default": 5000, + "description": "the timeout of the pgvector database" + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "whether to use ssl for the pgvector database" + } + }, + { + "ssl_required": { + "type": "boolean", + "default": false, + "description": "whether ssl is required for the pgvector database" + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "whether to verify ssl for the pgvector database" + } + }, + { + "ssl_version": { + "type": "string", + "default": "tlsv1_2", + "one_of": [ + "tlsv1_2", + "tlsv1_3", + "any" + ], + "description": "the ssl version to use for the pgvector database" + } + }, + { + "ssl_cert": { + "type": "string", + "description": "the path of ssl cert to use for the pgvector database" + } + }, + { + "ssl_cert_key": { + "type": "string", + "description": "the path of ssl cert key to use for the pgvector database" + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-rate-limiting-advanced/3.10.x.json b/schemas/ai-rate-limiting-advanced/3.10.x.json new file mode 100644 index 00000000..2fbb2e9b --- /dev/null +++ b/schemas/ai-rate-limiting-advanced/3.10.x.json @@ -0,0 +1,616 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + }, + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "identifier": { + "type": "string", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`. Note if `identifier` is `consumer-group`, the plugin must be applied on a consumer group entity. Because a consumer may belong to multiple consumer groups, the plugin needs to know explicitly which consumer group to limit the rate.", + "one_of": [ + "ip", + "credential", + "consumer", + "service", + "header", + "path", + "consumer-group" + ], + "default": "consumer", + "required": true + } + }, + { + "window_type": { + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "default": "sliding", + "type": "string", + "one_of": [ + "fixed", + "sliding" + ] + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + } + }, + { + "llm_providers": { + "description": "The provider config. Takes an array of `name`, `limit` and `window size` values.", + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "type": "array", + "elements": { + "type": "number" + }, + "required": true + } + }, + { + "name": { + "description": "The LLM provider to which the rate limit applies.", + "type": "string", + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "bedrock", + "gemini", + "huggingface", + "requestPrompt" + ], + "required": true + } + }, + { + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "type": "array", + "elements": { + "type": "number" + }, + "required": true + } + } + ] + }, + "required": true + } + }, + { + "strategy": { + "type": "string", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "one_of": [ + "cluster", + "redis", + "local" + ], + "default": "local", + "required": true + } + }, + { + "dictionary_name": { + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "default": "kong_rate_limiting_counters", + "type": "string", + "required": true + } + }, + { + "hide_client_headers": { + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "default": false, + "type": "boolean" + } + }, + { + "retry_after_jitter_max": { + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "default": 0, + "type": "number" + } + }, + { + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + { + "path": { + "starts_with": "/", + "type": "string", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)." + } + }, + { + "redis": { + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "default": 256, + "type": "integer", + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "default": false, + "type": "boolean", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + } + ], + "required": true + } + }, + { + "disable_penalty": { + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type and the request prompt provider.", + "default": false, + "type": "boolean" + } + }, + { + "request_prompt_count_function": { + "description": "If defined, it use custom function to count requests for the request prompt provider", + "type": "string", + "required": false + } + }, + { + "error_code": { + "description": "Set a custom error code to return when the rate limit is exceeded.", + "default": 429, + "gt": 0, + "type": "number" + } + }, + { + "error_message": { + "description": "Set a custom error message to return when the rate limit is exceeded.", + "default": "AI token rate limit exceeded for provider(s): ", + "type": "string" + } + }, + { + "error_hide_providers": { + "description": "Optionally hide informative response that would otherwise provide information about the provider in the error message.", + "default": false, + "type": "boolean" + } + }, + { + "tokens_count_strategy": { + "type": "string", + "description": "What tokens to use for cost calculation. Available values are: `total_tokens` `prompt_tokens`, `completion_tokens` or `cost`.", + "one_of": [ + "total_tokens", + "prompt_tokens", + "completion_tokens", + "cost" + ], + "default": "total_tokens", + "required": true + } + }, + { + "llm_format": { + "type": "string", + "description": "LLM input and output format and schema to use", + "one_of": [ + "openai", + "bedrock", + "gemini" + ], + "default": "openai", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-rate-limiting-advanced/3.11.x.json b/schemas/ai-rate-limiting-advanced/3.11.x.json new file mode 100644 index 00000000..df15e899 --- /dev/null +++ b/schemas/ai-rate-limiting-advanced/3.11.x.json @@ -0,0 +1,624 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "identifier": { + "required": true, + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`. Note if `identifier` is `consumer-group`, the plugin must be applied on a consumer group entity. Because a consumer may belong to multiple consumer groups, the plugin needs to know explicitly which consumer group to limit the rate.", + "one_of": [ + "ip", + "credential", + "consumer", + "service", + "header", + "path", + "consumer-group" + ], + "default": "consumer", + "type": "string" + } + }, + { + "window_type": { + "one_of": [ + "fixed", + "sliding" + ], + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "type": "string" + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + } + }, + { + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same.", + "type": "string" + } + }, + { + "llm_providers": { + "type": "array", + "required": true, + "description": "The provider config. Takes an array of `name`, `limit` and `window size` values.", + "elements": { + "fields": [ + { + "window_size": { + "type": "array", + "required": true, + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "elements": { + "type": "number" + } + } + }, + { + "name": { + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "bedrock", + "gemini", + "huggingface", + "requestPrompt" + ], + "required": true, + "description": "The LLM provider to which the rate limit applies.", + "type": "string" + } + }, + { + "limit": { + "type": "array", + "required": true, + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "elements": { + "type": "number" + } + } + } + ], + "type": "record" + } + } + }, + { + "strategy": { + "required": true, + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "one_of": [ + "cluster", + "redis", + "local" + ], + "default": "local", + "type": "string" + } + }, + { + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "required": true, + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string" + } + }, + { + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + } + }, + { + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + } + }, + { + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + { + "path": { + "type": "string", + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + }, + { + "redis": { + "required": true, + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "cluster_nodes": { + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "default": 5, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "default": false, + "type": "boolean" + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type and the request prompt provider.", + "type": "boolean" + } + }, + { + "request_prompt_count_function": { + "required": false, + "description": "If defined, it use custom function to count requests for the request prompt provider", + "type": "string" + } + }, + { + "error_code": { + "default": 429, + "gt": 0, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "type": "number" + } + }, + { + "error_message": { + "default": "AI token rate limit exceeded for provider(s): ", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + } + }, + { + "error_hide_providers": { + "default": false, + "description": "Optionally hide informative response that would otherwise provide information about the provider in the error message.", + "type": "boolean" + } + }, + { + "tokens_count_strategy": { + "required": true, + "description": "What tokens to use for cost calculation. Available values are: `total_tokens` `prompt_tokens`, `completion_tokens` or `cost`.", + "one_of": [ + "total_tokens", + "prompt_tokens", + "completion_tokens", + "cost" + ], + "default": "total_tokens", + "type": "string" + } + }, + { + "llm_format": { + "required": false, + "description": "LLM input and output format and schema to use", + "one_of": [ + "openai", + "bedrock", + "gemini", + "cohere", + "huggingface" + ], + "default": "openai", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + } +} \ No newline at end of file diff --git a/schemas/ai-rate-limiting-advanced/3.12.x.json b/schemas/ai-rate-limiting-advanced/3.12.x.json new file mode 100644 index 00000000..d309565e --- /dev/null +++ b/schemas/ai-rate-limiting-advanced/3.12.x.json @@ -0,0 +1,624 @@ +{ + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + }, + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "identifier": { + "type": "string", + "required": true, + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`. Note if `identifier` is `consumer-group`, the plugin must be applied on a consumer group entity. Because a consumer may belong to multiple consumer groups, the plugin needs to know explicitly which consumer group to limit the rate.", + "default": "consumer", + "one_of": [ + "ip", + "credential", + "consumer", + "service", + "header", + "path", + "consumer-group" + ] + } + }, + { + "window_type": { + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "default": "sliding", + "one_of": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + { + "sync_rate": { + "type": "number", + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms)." + } + }, + { + "namespace": { + "type": "string", + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same." + } + }, + { + "llm_providers": { + "description": "The provider config. Takes an array of `name`, `limit` and `window size` values.", + "elements": { + "type": "record", + "fields": [ + { + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "elements": { + "type": "number" + }, + "type": "array", + "required": true + } + }, + { + "name": { + "description": "The LLM provider to which the rate limit applies.", + "type": "string", + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "bedrock", + "gemini", + "huggingface", + "requestPrompt" + ], + "required": true + } + }, + { + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "elements": { + "type": "number" + }, + "type": "array", + "required": true + } + } + ] + }, + "type": "array", + "required": true + } + }, + { + "strategy": { + "type": "string", + "required": true, + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "default": "local", + "one_of": [ + "cluster", + "redis", + "local" + ] + } + }, + { + "dictionary_name": { + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "default": "kong_rate_limiting_counters", + "type": "string", + "required": true + } + }, + { + "hide_client_headers": { + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "default": false, + "type": "boolean" + } + }, + { + "retry_after_jitter_max": { + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "default": 0, + "type": "number" + } + }, + { + "header_name": { + "type": "string", + "description": "A string representing an HTTP header name." + } + }, + { + "path": { + "type": "string", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)." + } + }, + { + "redis": { + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "database", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + } + ], + "required": true, + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "type": "string", + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "type": "integer", + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy" + } + }, + { + "keepalive_pool_size": { + "type": "integer", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low." + } + }, + { + "keepalive_backlog": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "type": "boolean", + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "cluster_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + } + ] + } + }, + { + "disable_penalty": { + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type and the request prompt provider.", + "default": false, + "type": "boolean" + } + }, + { + "request_prompt_count_function": { + "description": "If defined, it use custom function to count requests for the request prompt provider", + "type": "string", + "required": false + } + }, + { + "error_code": { + "description": "Set a custom error code to return when the rate limit is exceeded.", + "default": 429, + "gt": 0, + "type": "number" + } + }, + { + "error_message": { + "description": "Set a custom error message to return when the rate limit is exceeded.", + "default": "AI token rate limit exceeded for provider(s): ", + "type": "string" + } + }, + { + "error_hide_providers": { + "description": "Optionally hide informative response that would otherwise provide information about the provider in the error message.", + "default": false, + "type": "boolean" + } + }, + { + "tokens_count_strategy": { + "type": "string", + "required": true, + "description": "What tokens to use for cost calculation. Available values are: `total_tokens` `prompt_tokens`, `completion_tokens` or `cost`.", + "default": "total_tokens", + "one_of": [ + "total_tokens", + "prompt_tokens", + "completion_tokens", + "cost" + ] + } + }, + { + "llm_format": { + "type": "string", + "required": false, + "description": "LLM input and output format and schema to use", + "default": "openai", + "one_of": [ + "openai", + "bedrock", + "gemini", + "cohere", + "huggingface" + ] + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-rate-limiting-advanced/3.7.x.json b/schemas/ai-rate-limiting-advanced/3.7.x.json new file mode 100644 index 00000000..ea346eed --- /dev/null +++ b/schemas/ai-rate-limiting-advanced/3.7.x.json @@ -0,0 +1,463 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "identifier": { + "default": "consumer", + "required": true, + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`.", + "type": "string", + "one_of": [ + "ip", + "credential", + "consumer", + "service", + "header", + "path", + "consumer-group" + ] + } + }, + { + "window_type": { + "default": "sliding", + "type": "string", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "one_of": [ + "fixed", + "sliding" + ] + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + } + }, + { + "llm_providers": { + "required": true, + "elements": { + "type": "record", + "fields": [ + { + "window_size": { + "required": true, + "type": "number", + "description": "The window size to apply a limit (defined in seconds)." + } + }, + { + "name": { + "required": true, + "type": "string", + "description": "The LLM provider to which the rate limit applies.", + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "requestPrompt" + ] + } + }, + { + "limit": { + "required": true, + "type": "number", + "description": "The limit applies to the LLM provider within the defined window size. It used the query cost from the tokens to increment the counter." + } + } + ] + }, + "type": "array", + "description": "The provider config. Takes an array of `name`, `limit` and `window size` values." + } + }, + { + "strategy": { + "default": "local", + "required": true, + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "type": "string", + "one_of": [ + "cluster", + "redis", + "local" + ] + } + }, + { + "dictionary_name": { + "required": true, + "type": "string", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "default": "kong_rate_limiting_counters" + } + }, + { + "hide_client_headers": { + "type": "boolean", + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "default": false + } + }, + { + "retry_after_jitter_max": { + "type": "number", + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "default": 0 + } + }, + { + "header_name": { + "type": "string", + "description": "A string representing an HTTP header name." + } + }, + { + "path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + } + }, + { + "redis": { + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "connect_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "send_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "read_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "type": "integer", + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "default": 256, + "type": "integer", + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "type": "integer", + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "type": "string", + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_addresses": { + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", + "elements": { + "type": "string" + }, + "type": "array", + "len_min": 1 + } + }, + { + "cluster_addresses": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", + "elements": { + "type": "string" + }, + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "required": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "required": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_addresses" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_addresses" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + } + ], + "type": "record", + "required": true + } + }, + { + "disable_penalty": { + "type": "boolean", + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type and the request prompt provider.", + "default": false + } + }, + { + "request_prompt_count_function": { + "required": false, + "type": "string", + "description": "If defined, it use custom function to count requests for the request prompt provider" + } + }, + { + "error_code": { + "default": 429, + "type": "number", + "description": "Set a custom error code to return when the rate limit is exceeded.", + "gt": 0 + } + }, + { + "error_message": { + "type": "string", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "default": "API rate limit exceeded for provider(s): " + } + }, + { + "error_hide_providers": { + "type": "boolean", + "description": "Optionally hide informative response that would otherwise provide information about the provider in the error message.", + "default": false + } + }, + { + "tokens_count_strategy": { + "default": "total_tokens", + "required": true, + "description": "What tokens to use for cost calculation. Available values are: `total_tokens` `prompt_tokens`, and `completion_tokens`.", + "type": "string", + "one_of": [ + "total_tokens", + "prompt_tokens", + "completion_tokens" + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-rate-limiting-advanced/3.8.x.json b/schemas/ai-rate-limiting-advanced/3.8.x.json new file mode 100644 index 00000000..7564c293 --- /dev/null +++ b/schemas/ai-rate-limiting-advanced/3.8.x.json @@ -0,0 +1,628 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "identifier": { + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`.", + "required": true, + "one_of": [ + "ip", + "credential", + "consumer", + "service", + "header", + "path", + "consumer-group" + ], + "type": "string", + "default": "consumer" + } + }, + { + "window_type": { + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "type": "string", + "default": "sliding", + "one_of": [ + "fixed", + "sliding" + ] + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + } + }, + { + "llm_providers": { + "description": "The provider config. Takes an array of `name`, `limit` and `window size` values.", + "type": "array", + "required": true, + "elements": { + "fields": [ + { + "window_size": { + "description": "The window size to apply a limit (defined in seconds).", + "type": "number", + "required": true + } + }, + { + "name": { + "description": "The LLM provider to which the rate limit applies.", + "type": "string", + "required": true, + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "bedrock", + "gemini", + "requestPrompt" + ] + } + }, + { + "limit": { + "description": "The limit applies to the LLM provider within the defined window size. It used the query cost from the tokens to increment the counter.", + "type": "number", + "required": true + } + } + ], + "type": "record" + } + } + }, + { + "strategy": { + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "required": true, + "one_of": [ + "cluster", + "redis", + "local" + ], + "type": "string", + "default": "local" + } + }, + { + "dictionary_name": { + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string", + "required": true, + "default": "kong_rate_limiting_counters" + } + }, + { + "hide_client_headers": { + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean", + "default": false + } + }, + { + "retry_after_jitter_max": { + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number", + "default": 0 + } + }, + { + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + { + "path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "type": "string", + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)." + } + }, + { + "redis": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer", + "between": [ + 1, + 2147483646 + ], + "default": 256 + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer", + "default": 5 + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean", + "default": false + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_nodes" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_nodes" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_field": "connection_is_proxied", + "if_match": { + "eq": true + }, + "then_field": "host", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "translate_backwards": [ + "connect_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + }, + { + "disable_penalty": { + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type and the request prompt provider.", + "type": "boolean", + "default": false + } + }, + { + "request_prompt_count_function": { + "description": "If defined, it use custom function to count requests for the request prompt provider", + "type": "string", + "required": false + } + }, + { + "error_code": { + "description": "Set a custom error code to return when the rate limit is exceeded.", + "type": "number", + "gt": 0, + "default": 429 + } + }, + { + "error_message": { + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string", + "default": "API rate limit exceeded for provider(s): " + } + }, + { + "error_hide_providers": { + "description": "Optionally hide informative response that would otherwise provide information about the provider in the error message.", + "type": "boolean", + "default": false + } + }, + { + "tokens_count_strategy": { + "description": "What tokens to use for cost calculation. Available values are: `total_tokens` `prompt_tokens`, `completion_tokens` or `cost`.", + "required": true, + "one_of": [ + "total_tokens", + "prompt_tokens", + "completion_tokens", + "cost" + ], + "type": "string", + "default": "total_tokens" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-rate-limiting-advanced/3.9.x.json b/schemas/ai-rate-limiting-advanced/3.9.x.json new file mode 100644 index 00000000..07010f21 --- /dev/null +++ b/schemas/ai-rate-limiting-advanced/3.9.x.json @@ -0,0 +1,592 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "identifier": { + "required": true, + "type": "string", + "default": "consumer", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`.", + "one_of": [ + "ip", + "credential", + "consumer", + "service", + "header", + "path", + "consumer-group" + ] + } + }, + { + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "type": "string", + "one_of": [ + "fixed", + "sliding" + ] + } + }, + { + "sync_rate": { + "type": "number", + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms)." + } + }, + { + "llm_providers": { + "elements": { + "type": "record", + "fields": [ + { + "window_size": { + "description": "The window size to apply a limit (defined in seconds).", + "required": true, + "type": "number" + } + }, + { + "name": { + "type": "string", + "description": "The LLM provider to which the rate limit applies.", + "required": true, + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "bedrock", + "gemini", + "huggingface", + "requestPrompt" + ] + } + }, + { + "limit": { + "description": "The limit applies to the LLM provider within the defined window size. It used the query cost from the tokens to increment the counter.", + "required": true, + "type": "number" + } + } + ] + }, + "description": "The provider config. Takes an array of `name`, `limit` and `window size` values.", + "required": true, + "type": "array" + } + }, + { + "strategy": { + "required": true, + "type": "string", + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "one_of": [ + "cluster", + "redis", + "local" + ] + } + }, + { + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "required": true, + "type": "string" + } + }, + { + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + } + }, + { + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + } + }, + { + "header_name": { + "type": "string", + "description": "A string representing an HTTP header name." + } + }, + { + "path": { + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "type": "string" + } + }, + { + "redis": { + "required": true, + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ] + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ] + }, + "type": "array" + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ] + }, + "type": "array" + } + } + ], + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "type": "string", + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean" + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean" + } + } + ] + } + }, + { + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type and the request prompt provider.", + "type": "boolean" + } + }, + { + "request_prompt_count_function": { + "description": "If defined, it use custom function to count requests for the request prompt provider", + "required": false, + "type": "string" + } + }, + { + "error_code": { + "gt": 0, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "default": 429, + "type": "number" + } + }, + { + "error_message": { + "default": "AI token rate limit exceeded for provider(s): ", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + } + }, + { + "error_hide_providers": { + "default": false, + "description": "Optionally hide informative response that would otherwise provide information about the provider in the error message.", + "type": "boolean" + } + }, + { + "tokens_count_strategy": { + "required": true, + "type": "string", + "default": "total_tokens", + "description": "What tokens to use for cost calculation. Available values are: `total_tokens` `prompt_tokens`, `completion_tokens` or `cost`.", + "one_of": [ + "total_tokens", + "prompt_tokens", + "completion_tokens", + "cost" + ] + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-request-transformer/3.10.x.json b/schemas/ai-request-transformer/3.10.x.json new file mode 100644 index 00000000..abd0bb15 --- /dev/null +++ b/schemas/ai-request-transformer/3.10.x.json @@ -0,0 +1,722 @@ +{ + "entity_checks": [ + { + "conditional": { + "then_err": "'config.llm.route_type' must be 'llm/v1/chat' for AI transformer plugins", + "if_match": { + "not_one_of": [ + "llm/v1/chat" + ] + }, + "then_field": "config.llm.route_type", + "if_field": "config.llm.route_type", + "then_match": { + "eq": "llm/v1/chat" + } + } + }, + { + "mutually_required": [ + "config.http_proxy_host", + "config.http_proxy_port" + ] + }, + { + "mutually_required": [ + "config.https_proxy_host", + "config.https_proxy_port" + ] + } + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "prompt": { + "description": "Use this prompt to tune the LLM system/assistant message for the incoming proxy request (from the client), and what you are expecting in return.", + "type": "string", + "required": true + } + }, + { + "transformation_extract_pattern": { + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the request phase. The first match will be set as the outgoing body. If the AI service's response doesn't match this pattern, it is marked as a failure.", + "type": "string", + "required": false + } + }, + { + "http_timeout": { + "description": "Timeout in milliseconds for the AI upstream service.", + "type": "integer", + "default": 60000, + "required": true + } + }, + { + "https_verify": { + "description": "Verify the TLS certificate of the AI upstream service.", + "type": "boolean", + "default": true, + "required": true + } + }, + { + "max_request_body_size": { + "description": "max allowed body size allowed to be introspected", + "type": "integer", + "default": 8192, + "gt": 0 + } + }, + { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "http_proxy_port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "https_proxy_port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "llm": { + "entity_checks": [ + { + "conditional": { + "then_err": "bedrock and gemini only support auth.allow_override = false", + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "then_field": "auth.allow_override", + "if_field": "model.provider", + "then_match": { + "eq": false + } + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.llama2_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.mistral_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.anthropic_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.upstream_url" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + } + ], + "type": "record", + "fields": [ + { + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "type": "string", + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "required": true + } + }, + { + "auth": { + "type": "record", + "required": false, + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "header_value": { + "type": "string", + "referenceable": true, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "encrypted": true, + "required": false + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "param_value": { + "type": "string", + "referenceable": true, + "description": "Specify the full parameter value for 'param_name'.", + "encrypted": true, + "required": false + } + }, + { + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string", + "one_of": [ + "query", + "body" + ], + "required": false + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "azure_client_secret": { + "type": "string", + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "encrypted": true, + "required": false + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "gcp_service_account_json": { + "type": "string", + "referenceable": true, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "encrypted": true, + "required": false + } + }, + { + "aws_access_key_id": { + "type": "string", + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "encrypted": true, + "required": false + } + }, + { + "aws_secret_access_key": { + "type": "string", + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "encrypted": true, + "required": false + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean", + "default": false, + "required": false + } + } + ] + } + }, + { + "model": { + "type": "record", + "required": true, + "fields": [ + { + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "type": "string", + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock", + "huggingface" + ], + "required": true + } + }, + { + "name": { + "description": "Model name to execute.", + "type": "string", + "required": false + } + }, + { + "options": { + "description": "Key/value settings for the model", + "type": "record", + "required": false, + "fields": [ + { + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer", + "required": false + } + }, + { + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "type": "number", + "gt": 0, + "required": false + } + }, + { + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "type": "number", + "gt": 0, + "required": false + } + }, + { + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "type": "number", + "between": [ + 0, + 5 + ], + "required": false + } + }, + { + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "type": "number", + "between": [ + 0, + 1 + ], + "required": false + } + }, + { + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "type": "integer", + "between": [ + 0, + 500 + ], + "required": false + } + }, + { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string", + "required": false + } + }, + { + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string", + "required": false + } + }, + { + "azure_api_version": { + "description": "'api-version' for Azure OpenAI instances.", + "type": "string", + "default": "2023-05-15", + "required": false + } + }, + { + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string", + "required": false + } + }, + { + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "type": "string", + "one_of": [ + "raw", + "openai", + "ollama" + ], + "required": false + } + }, + { + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "type": "string", + "one_of": [ + "openai", + "ollama" + ], + "required": false + } + }, + { + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string", + "required": false + } + }, + { + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string", + "required": false, + "deprecation": { + "message": "llm: config.model.options.upstream_path is deprecated, please use config.model.options.upstream_url instead", + "removal_in_version": "4.0" + } + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "type": "record", + "required": false, + "fields": [ + { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string", + "required": false + } + }, + { + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string", + "required": false + } + }, + { + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string", + "required": false + } + } + ] + } + }, + { + "bedrock": { + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "type": "record", + "required": false, + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + }, + { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string", + "required": false + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + } + ] + } + }, + { + "huggingface": { + "type": "record", + "required": false, + "fields": [ + { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean", + "required": false + } + }, + { + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean", + "required": false + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "logging": { + "type": "record", + "required": true, + "fields": [ + { + "log_statistics": { + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "log_payloads": { + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean", + "default": false, + "required": true + } + } + ] + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-request-transformer/3.11.x.json b/schemas/ai-request-transformer/3.11.x.json new file mode 100644 index 00000000..ea19a050 --- /dev/null +++ b/schemas/ai-request-transformer/3.11.x.json @@ -0,0 +1,808 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "prompt": { + "required": true, + "description": "Use this prompt to tune the LLM system/assistant message for the incoming proxy request (from the client), and what you are expecting in return.", + "type": "string" + } + }, + { + "transformation_extract_pattern": { + "required": false, + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the request phase. The first match will be set as the outgoing body. If the AI service's response doesn't match this pattern, it is marked as a failure.", + "type": "string" + } + }, + { + "http_timeout": { + "description": "Timeout in milliseconds for the AI upstream service.", + "required": true, + "default": 60000, + "type": "integer" + } + }, + { + "https_verify": { + "description": "Verify the TLS certificate of the AI upstream service.", + "required": true, + "default": true, + "type": "boolean" + } + }, + { + "max_request_body_size": { + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "gt": 0, + "default": 8192, + "type": "integer" + } + }, + { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "http_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "https_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "llm": { + "required": true, + "entity_checks": [ + { + "conditional": { + "then_err": "bedrock and gemini only support auth.allow_override = false", + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "then_field": "auth.allow_override", + "if_field": "model.provider", + "then_match": { + "eq": false + } + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.llama2_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.mistral_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.anthropic_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.upstream_url" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model" + ] + } + } + ], + "fields": [ + { + "route_type": { + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "llm/v1/embeddings", + "llm/v1/responses", + "llm/v1/assistants", + "llm/v1/batches", + "llm/v1/files", + "image/v1/images/generations", + "image/v1/images/edits", + "audio/v1/audio/transcriptions", + "audio/v1/audio/speech", + "audio/v1/audio/translations", + "realtime/v1/realtime", + "preserve" + ], + "required": true, + "description": "The model's operation implementation, for this provider. ", + "type": "string" + } + }, + { + "auth": { + "required": false, + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "header_value": { + "required": false, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "param_value": { + "required": false, + "description": "Specify the full parameter value for 'param_name'.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "param_location": { + "one_of": [ + "query", + "body" + ], + "required": false, + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string" + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "azure_client_secret": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "gcp_service_account_json": { + "required": false, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "aws_access_key_id": { + "required": false, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "aws_secret_access_key": { + "required": false, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false, + "default": false, + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "model": { + "required": true, + "fields": [ + { + "provider": { + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock", + "huggingface" + ], + "required": true, + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "type": "string" + } + }, + { + "name": { + "required": false, + "description": "Model name to execute.", + "type": "string" + } + }, + { + "options": { + "description": "Key/value settings for the model", + "required": false, + "fields": [ + { + "max_tokens": { + "required": false, + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + } + }, + { + "input_cost": { + "gt": 0, + "required": false, + "description": "Defines the cost per 1M tokens in your prompt.", + "type": "number" + } + }, + { + "output_cost": { + "gt": 0, + "required": false, + "description": "Defines the cost per 1M tokens in the output of the AI.", + "type": "number" + } + }, + { + "temperature": { + "between": [ + 0, + 5 + ], + "required": false, + "description": "Defines the matching temperature, if using chat or completion models.", + "type": "number" + } + }, + { + "top_p": { + "between": [ + 0, + 1 + ], + "required": false, + "description": "Defines the top-p probability mass, if supported.", + "type": "number" + } + }, + { + "top_k": { + "between": [ + 0, + 500 + ], + "required": false, + "description": "Defines the top-k most likely tokens, if supported.", + "type": "integer" + } + }, + { + "anthropic_version": { + "required": false, + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + } + }, + { + "azure_instance": { + "required": false, + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + { + "azure_api_version": { + "description": "'api-version' for Azure OpenAI instances.", + "required": false, + "default": "2023-05-15", + "type": "string" + } + }, + { + "azure_deployment_id": { + "required": false, + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + } + }, + { + "llama2_format": { + "one_of": [ + "raw", + "openai", + "ollama" + ], + "required": false, + "description": "If using llama2 provider, select the upstream message format.", + "type": "string" + } + }, + { + "mistral_format": { + "one_of": [ + "openai", + "ollama" + ], + "required": false, + "description": "If using mistral provider, select the upstream message format.", + "type": "string" + } + }, + { + "upstream_url": { + "required": false, + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + { + "upstream_path": { + "deprecation": { + "message": "llm: config.model.options.upstream_path is deprecated, please use config.model.options.upstream_url instead", + "removal_in_version": "4.0" + }, + "required": false, + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + } + }, + { + "embeddings_dimensions": { + "gt": 0, + "required": false, + "description": "If using embeddings models, set the number of dimensions to generate.", + "type": "integer" + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "required": false, + "fields": [ + { + "api_endpoint": { + "required": false, + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + } + }, + { + "project_id": { + "required": false, + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + { + "location_id": { + "required": false, + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "bedrock": { + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "required": false, + "fields": [ + { + "aws_region": { + "required": false, + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + } + }, + { + "aws_assume_role_arn": { + "required": false, + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + { + "embeddings_normalize": { + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "default": false, + "type": "boolean" + } + }, + { + "performance_config_latency": { + "required": false, + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "huggingface": { + "required": false, + "fields": [ + { + "use_cache": { + "required": false, + "description": "Use the cache layer on the inference API", + "type": "boolean" + } + }, + { + "wait_for_model": { + "required": false, + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "cohere": { + "required": false, + "fields": [ + { + "embedding_input_type": { + "required": false, + "description": "The purpose of the input text to calculate embedding vectors.", + "one_of": [ + "search_document", + "search_query", + "classification", + "clustering", + "image" + ], + "default": "classification", + "type": "string" + } + }, + { + "wait_for_model": { + "required": false, + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "logging": { + "required": true, + "fields": [ + { + "log_statistics": { + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "log_payloads": { + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "required": true, + "default": false, + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_err": "'config.llm.route_type' must be 'llm/v1/chat' for AI transformer plugins", + "if_match": { + "not_one_of": [ + "llm/v1/chat" + ] + }, + "then_field": "config.llm.route_type", + "if_field": "config.llm.route_type", + "then_match": { + "eq": "llm/v1/chat" + } + } + }, + { + "mutually_required": [ + "config.http_proxy_host", + "config.http_proxy_port" + ] + }, + { + "mutually_required": [ + "config.https_proxy_host", + "config.https_proxy_port" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/ai-request-transformer/3.12.x.json b/schemas/ai-request-transformer/3.12.x.json new file mode 100644 index 00000000..d70c14c8 --- /dev/null +++ b/schemas/ai-request-transformer/3.12.x.json @@ -0,0 +1,808 @@ +{ + "entity_checks": [ + { + "conditional": { + "if_match": { + "not_one_of": [ + "llm/v1/chat" + ] + }, + "then_field": "config.llm.route_type", + "if_field": "config.llm.route_type", + "then_match": { + "eq": "llm/v1/chat" + }, + "then_err": "'config.llm.route_type' must be 'llm/v1/chat' for AI transformer plugins" + } + }, + { + "mutually_required": [ + "config.http_proxy_host", + "config.http_proxy_port" + ] + }, + { + "mutually_required": [ + "config.https_proxy_host", + "config.https_proxy_port" + ] + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "prompt": { + "type": "string", + "description": "Use this prompt to tune the LLM system/assistant message for the incoming proxy request (from the client), and what you are expecting in return.", + "required": true + } + }, + { + "transformation_extract_pattern": { + "type": "string", + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the request phase. The first match will be set as the outgoing body. If the AI service's response doesn't match this pattern, it is marked as a failure.", + "required": false + } + }, + { + "http_timeout": { + "type": "integer", + "default": 60000, + "description": "Timeout in milliseconds for the AI upstream service.", + "required": true + } + }, + { + "https_verify": { + "type": "boolean", + "default": true, + "description": "Verify the TLS certificate of the AI upstream service.", + "required": true + } + }, + { + "max_request_body_size": { + "type": "integer", + "default": 8192, + "gt": 0, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size." + } + }, + { + "http_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "http_proxy_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "https_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "https_proxy_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "llm": { + "type": "record", + "fields": [ + { + "route_type": { + "type": "string", + "description": "The model's operation implementation, for this provider. ", + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "llm/v1/embeddings", + "llm/v1/responses", + "llm/v1/assistants", + "llm/v1/batches", + "llm/v1/files", + "image/v1/images/generations", + "image/v1/images/edits", + "audio/v1/audio/transcriptions", + "audio/v1/audio/speech", + "audio/v1/audio/translations", + "realtime/v1/realtime", + "preserve" + ], + "required": true + } + }, + { + "auth": { + "type": "record", + "fields": [ + { + "header_name": { + "type": "string", + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "referenceable": true, + "required": false + } + }, + { + "header_value": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'." + } + }, + { + "param_name": { + "type": "string", + "description": "If AI model requires authentication via query parameter, specify its name here.", + "referenceable": true, + "required": false + } + }, + { + "param_value": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Specify the full parameter value for 'param_name'." + } + }, + { + "param_location": { + "type": "string", + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "one_of": [ + "query", + "body" + ], + "required": false + } + }, + { + "azure_use_managed_identity": { + "type": "boolean", + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false + } + }, + { + "azure_client_id": { + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "referenceable": true, + "required": false + } + }, + { + "azure_client_secret": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret." + } + }, + { + "azure_tenant_id": { + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "referenceable": true, + "required": false + } + }, + { + "gcp_use_service_account": { + "type": "boolean", + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "required": false + } + }, + { + "gcp_service_account_json": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`." + } + }, + { + "aws_access_key_id": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance." + } + }, + { + "aws_secret_access_key": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance." + } + }, + { + "allow_override": { + "type": "boolean", + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false + } + } + ], + "required": false + } + }, + { + "model": { + "type": "record", + "fields": [ + { + "provider": { + "type": "string", + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock", + "huggingface" + ], + "required": true + } + }, + { + "name": { + "type": "string", + "description": "Model name to execute.", + "required": false + } + }, + { + "options": { + "description": "Key/value settings for the model", + "fields": [ + { + "max_tokens": { + "type": "integer", + "description": "Defines the max_tokens, if using chat or completion models.", + "required": false + } + }, + { + "input_cost": { + "type": "number", + "description": "Defines the cost per 1M tokens in your prompt.", + "gt": 0, + "required": false + } + }, + { + "output_cost": { + "type": "number", + "description": "Defines the cost per 1M tokens in the output of the AI.", + "gt": 0, + "required": false + } + }, + { + "temperature": { + "type": "number", + "description": "Defines the matching temperature, if using chat or completion models.", + "between": [ + 0, + 5 + ], + "required": false + } + }, + { + "top_p": { + "type": "number", + "description": "Defines the top-p probability mass, if supported.", + "between": [ + 0, + 1 + ], + "required": false + } + }, + { + "top_k": { + "type": "integer", + "description": "Defines the top-k most likely tokens, if supported.", + "between": [ + 0, + 500 + ], + "required": false + } + }, + { + "anthropic_version": { + "type": "string", + "description": "Defines the schema/API version, if using Anthropic provider.", + "required": false + } + }, + { + "azure_instance": { + "type": "string", + "description": "Instance name for Azure OpenAI hosted models.", + "required": false + } + }, + { + "azure_api_version": { + "type": "string", + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "required": false + } + }, + { + "azure_deployment_id": { + "type": "string", + "description": "Deployment ID for Azure OpenAI instances.", + "required": false + } + }, + { + "llama2_format": { + "type": "string", + "description": "If using llama2 provider, select the upstream message format.", + "one_of": [ + "raw", + "openai", + "ollama" + ], + "required": false + } + }, + { + "mistral_format": { + "type": "string", + "description": "If using mistral provider, select the upstream message format.", + "one_of": [ + "openai", + "ollama" + ], + "required": false + } + }, + { + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string", + "required": false + } + }, + { + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "deprecation": { + "message": "llm: config.model.options.upstream_path is deprecated, please use config.model.options.upstream_url instead", + "removal_in_version": "4.0" + }, + "type": "string", + "required": false + } + }, + { + "embeddings_dimensions": { + "type": "integer", + "description": "If using embeddings models, set the number of dimensions to generate.", + "gt": 0, + "required": false + } + }, + { + "gemini": { + "type": "record", + "fields": [ + { + "api_endpoint": { + "type": "string", + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "required": false + } + }, + { + "project_id": { + "type": "string", + "description": "If running Gemini on Vertex, specify the project ID.", + "required": false + } + }, + { + "location_id": { + "type": "string", + "description": "If running Gemini on Vertex, specify the location ID.", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "required": false + } + }, + { + "bedrock": { + "type": "record", + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + }, + { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string", + "required": false + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + { + "embeddings_normalize": { + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "default": false, + "type": "boolean" + } + }, + { + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "required": false + } + }, + { + "huggingface": { + "type": "record", + "fields": [ + { + "use_cache": { + "type": "boolean", + "description": "Use the cache layer on the inference API", + "required": false + } + }, + { + "wait_for_model": { + "type": "boolean", + "description": "Wait for the model if it is not ready", + "required": false + } + } + ], + "required": false + } + }, + { + "cohere": { + "type": "record", + "fields": [ + { + "embedding_input_type": { + "type": "string", + "required": false, + "description": "The purpose of the input text to calculate embedding vectors.", + "default": "classification", + "one_of": [ + "search_document", + "search_query", + "classification", + "clustering", + "image" + ] + } + }, + { + "wait_for_model": { + "type": "boolean", + "description": "Wait for the model if it is not ready", + "required": false + } + } + ], + "required": false + } + } + ], + "type": "record", + "required": false + } + } + ], + "required": true + } + }, + { + "logging": { + "type": "record", + "fields": [ + { + "log_statistics": { + "type": "boolean", + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "required": true + } + }, + { + "log_payloads": { + "type": "boolean", + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "required": true + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "then_field": "auth.allow_override", + "if_field": "model.provider", + "then_match": { + "eq": false + }, + "then_err": "bedrock and gemini only support auth.allow_override = false" + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.llama2_format" + ], + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.mistral_format" + ], + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.anthropic_version" + ], + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_instance" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_api_version" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.upstream_url" + ], + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models", + "if_field": "model.provider" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model" + ] + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-request-transformer/3.6.x.json b/schemas/ai-request-transformer/3.6.x.json new file mode 100644 index 00000000..c2c31fb7 --- /dev/null +++ b/schemas/ai-request-transformer/3.6.x.json @@ -0,0 +1,515 @@ +{ + "entity_checks": [ + { + "conditional": { + "then_match": { + "eq": "llm/v1/chat" + }, + "then_err": "'config.llm.route_type' must be 'llm/v1/chat' for AI transformer plugins", + "if_match": { + "not_one_of": [ + "llm/v1/chat" + ] + }, + "if_field": "config.llm.route_type", + "then_field": "config.llm.route_type" + } + }, + { + "mutually_required": [ + "config.http_proxy_host", + "config.http_proxy_port" + ] + }, + { + "mutually_required": [ + "config.https_proxy_host", + "config.https_proxy_port" + ] + } + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "prompt": { + "required": true, + "type": "string", + "description": "Use this prompt to tune the LLM system/assistant message for the incoming proxy request (from the client), and what you are expecting in return." + } + }, + { + "transformation_extract_pattern": { + "required": false, + "type": "string", + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the request phase. The first match will be set as the outgoing body. If the AI service's response doesn't match this pattern, it is marked as a failure." + } + }, + { + "http_timeout": { + "required": true, + "type": "integer", + "default": 60000, + "description": "Timeout in milliseconds for the AI upstream service." + } + }, + { + "https_verify": { + "required": true, + "type": "boolean", + "default": true, + "description": "Verify the TLS certificate of the AI upstream service." + } + }, + { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "http_proxy_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "https_proxy_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "llm": { + "entity_checks": [ + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "auth.header_name", + "auth.param_name" + ], + "if_field": "model.provider", + "then_err": "must set one of %s, and its respective options, when provider is not self-hosted", + "if_match": { + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere" + ] + } + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.llama2_format" + ], + "if_field": "model.provider", + "then_err": "must set %s for llama2 provider", + "if_match": { + "one_of": [ + "llama2" + ] + } + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.mistral_format" + ], + "if_field": "model.provider", + "then_err": "must set %s for mistral provider", + "if_match": { + "one_of": [ + "mistral" + ] + } + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.name" + ], + "if_field": "model.provider", + "then_err": "Must set a model name. Refer to https://docs.konghq.com/hub/kong-inc/ai-proxy/ for supported models.", + "if_match": [ + + ] + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.anthropic_version" + ], + "if_field": "model.provider", + "then_err": "must set %s for anthropic provider", + "if_match": { + "one_of": [ + "anthropic" + ] + } + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_instance" + ], + "if_field": "model.provider", + "then_err": "must set %s for azure provider", + "if_match": { + "one_of": [ + "azure" + ] + } + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_api_version" + ], + "if_field": "model.provider", + "then_err": "must set %s for azure provider", + "if_match": { + "one_of": [ + "azure" + ] + } + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ], + "if_field": "model.provider", + "then_err": "must set %s for azure provider", + "if_match": { + "one_of": [ + "azure" + ] + } + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.upstream_url" + ], + "if_field": "model.provider", + "then_err": "must set %s for self-hosted providers/models", + "if_match": { + "one_of": [ + "mistral", + "llama2" + ] + } + } + } + ], + "type": "record", + "fields": [ + { + "route_type": { + "required": true, + "type": "string", + "description": "The model's operation implementation, for this provider.", + "one_of": [ + "llm/v1/chat", + "llm/v1/completions" + ] + } + }, + { + "auth": { + "required": false, + "type": "record", + "fields": [ + { + "header_name": { + "required": false, + "type": "string", + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "referenceable": true + } + }, + { + "header_value": { + "referenceable": true, + "type": "string", + "required": false, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "encrypted": true + } + }, + { + "param_name": { + "required": false, + "type": "string", + "description": "If AI model requires authentication via query parameter, specify its name here.", + "referenceable": true + } + }, + { + "param_value": { + "referenceable": true, + "type": "string", + "required": false, + "description": "Specify the full parameter value for 'param_name'.", + "encrypted": true + } + }, + { + "param_location": { + "required": false, + "type": "string", + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "one_of": [ + "query", + "body" + ] + } + } + ] + } + }, + { + "model": { + "required": true, + "type": "record", + "fields": [ + { + "provider": { + "required": true, + "type": "string", + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2" + ] + } + }, + { + "name": { + "required": false, + "type": "string", + "description": "Model name to execute." + } + }, + { + "options": { + "required": false, + "type": "record", + "description": "Key/value settings for the model", + "fields": [ + { + "max_tokens": { + "required": false, + "type": "integer", + "description": "Defines the max_tokens, if using chat or completion models.", + "default": 256 + } + }, + { + "temperature": { + "type": "number", + "default": 1, + "between": [ + 0, + 5 + ], + "required": false, + "description": "Defines the matching temperature, if using chat or completion models." + } + }, + { + "top_p": { + "type": "number", + "default": 1, + "between": [ + 0, + 1 + ], + "required": false, + "description": "Defines the top-p probability mass, if supported." + } + }, + { + "top_k": { + "type": "integer", + "default": 0, + "between": [ + 0, + 500 + ], + "required": false, + "description": "Defines the top-k most likely tokens, if supported." + } + }, + { + "anthropic_version": { + "required": false, + "type": "string", + "description": "Defines the schema/API version, if using Anthropic provider." + } + }, + { + "azure_instance": { + "required": false, + "type": "string", + "description": "Instance name for Azure OpenAI hosted models." + } + }, + { + "azure_api_version": { + "required": false, + "type": "string", + "description": "'api-version' for Azure OpenAI instances.", + "default": "2023-05-15" + } + }, + { + "azure_deployment_id": { + "required": false, + "type": "string", + "description": "Deployment ID for Azure OpenAI instances." + } + }, + { + "llama2_format": { + "required": false, + "type": "string", + "description": "If using llama2 provider, select the upstream message format.", + "one_of": [ + "raw", + "openai", + "ollama" + ] + } + }, + { + "mistral_format": { + "required": false, + "type": "string", + "description": "If using mistral provider, select the upstream message format.", + "one_of": [ + "openai", + "ollama" + ] + } + }, + { + "upstream_url": { + "required": false, + "type": "string", + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint." + } + } + ] + } + } + ] + } + }, + { + "logging": { + "required": true, + "type": "record", + "fields": [ + { + "log_statistics": { + "required": true, + "type": "boolean", + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "default": true + } + }, + { + "log_payloads": { + "required": true, + "type": "boolean", + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "default": false + } + } + ] + } + } + ], + "required": true + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-request-transformer/3.7.x.json b/schemas/ai-request-transformer/3.7.x.json new file mode 100644 index 00000000..f57f678f --- /dev/null +++ b/schemas/ai-request-transformer/3.7.x.json @@ -0,0 +1,578 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "prompt": { + "required": true, + "type": "string", + "description": "Use this prompt to tune the LLM system/assistant message for the incoming proxy request (from the client), and what you are expecting in return." + } + }, + { + "transformation_extract_pattern": { + "required": false, + "type": "string", + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the request phase. The first match will be set as the outgoing body. If the AI service's response doesn't match this pattern, it is marked as a failure." + } + }, + { + "http_timeout": { + "required": true, + "description": "Timeout in milliseconds for the AI upstream service.", + "type": "integer", + "default": 60000 + } + }, + { + "https_verify": { + "required": true, + "description": "Verify the TLS certificate of the AI upstream service.", + "type": "boolean", + "default": true + } + }, + { + "http_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "http_proxy_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "https_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "https_proxy_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "llm": { + "fields": [ + { + "route_type": { + "required": true, + "type": "string", + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ] + } + }, + { + "auth": { + "required": false, + "type": "record", + "fields": [ + { + "header_name": { + "required": false, + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "referenceable": true, + "type": "string" + } + }, + { + "header_value": { + "encrypted": true, + "referenceable": true, + "required": false, + "type": "string", + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'." + } + }, + { + "param_name": { + "required": false, + "description": "If AI model requires authentication via query parameter, specify its name here.", + "referenceable": true, + "type": "string" + } + }, + { + "param_value": { + "encrypted": true, + "referenceable": true, + "required": false, + "type": "string", + "description": "Specify the full parameter value for 'param_name'." + } + }, + { + "param_location": { + "required": false, + "type": "string", + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "one_of": [ + "query", + "body" + ] + } + }, + { + "azure_use_managed_identity": { + "required": false, + "type": "boolean", + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "default": false + } + }, + { + "azure_client_id": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "referenceable": true, + "type": "string" + } + }, + { + "azure_client_secret": { + "encrypted": true, + "referenceable": true, + "required": false, + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret." + } + }, + { + "azure_tenant_id": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "referenceable": true, + "type": "string" + } + } + ] + } + }, + { + "model": { + "required": true, + "type": "record", + "fields": [ + { + "provider": { + "required": true, + "type": "string", + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2" + ] + } + }, + { + "name": { + "required": false, + "type": "string", + "description": "Model name to execute." + } + }, + { + "options": { + "required": false, + "type": "record", + "description": "Key/value settings for the model", + "fields": [ + { + "response_streaming": { + "default": "allow", + "required": false, + "type": "string", + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "one_of": [ + "allow", + "deny", + "always" + ] + } + }, + { + "max_tokens": { + "required": false, + "type": "integer", + "description": "Defines the max_tokens, if using chat or completion models.", + "default": 256 + } + }, + { + "temperature": { + "required": false, + "type": "number", + "description": "Defines the matching temperature, if using chat or completion models.", + "between": [ + 0, + 5 + ] + } + }, + { + "top_p": { + "required": false, + "type": "number", + "description": "Defines the top-p probability mass, if supported.", + "between": [ + 0, + 1 + ] + } + }, + { + "top_k": { + "required": false, + "type": "integer", + "description": "Defines the top-k most likely tokens, if supported.", + "between": [ + 0, + 500 + ] + } + }, + { + "anthropic_version": { + "required": false, + "type": "string", + "description": "Defines the schema/API version, if using Anthropic provider." + } + }, + { + "azure_instance": { + "required": false, + "type": "string", + "description": "Instance name for Azure OpenAI hosted models." + } + }, + { + "azure_api_version": { + "required": false, + "type": "string", + "description": "'api-version' for Azure OpenAI instances.", + "default": "2023-05-15" + } + }, + { + "azure_deployment_id": { + "required": false, + "type": "string", + "description": "Deployment ID for Azure OpenAI instances." + } + }, + { + "llama2_format": { + "required": false, + "type": "string", + "description": "If using llama2 provider, select the upstream message format.", + "one_of": [ + "raw", + "openai", + "ollama" + ] + } + }, + { + "mistral_format": { + "required": false, + "type": "string", + "description": "If using mistral provider, select the upstream message format.", + "one_of": [ + "openai", + "ollama" + ] + } + }, + { + "upstream_url": { + "required": false, + "type": "string", + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint." + } + }, + { + "upstream_path": { + "required": false, + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + } + } + ] + } + } + ] + } + }, + { + "logging": { + "required": true, + "type": "record", + "fields": [ + { + "log_statistics": { + "required": true, + "type": "boolean", + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "default": false + } + }, + { + "log_payloads": { + "required": true, + "type": "boolean", + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "default": false + } + } + ] + } + } + ], + "entity_checks": [ + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "auth.header_name", + "auth.param_name" + ], + "if_match": { + "one_of": [ + "openai", + "anthropic", + "cohere" + ] + }, + "then_err": "must set one of %s, and its respective options, when provider is not self-hosted" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "auth.header_name", + "auth.param_name", + "auth.azure_use_managed_identity" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set one of %s, and its respective options, when azure provider is set" + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.llama2_format" + ], + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.mistral_format" + ], + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.anthropic_version" + ], + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_instance" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_api_version" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.upstream_url" + ], + "if_match": { + "one_of": [ + "mistral", + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_field": "config.llm.route_type", + "then_err": "'config.llm.route_type' must be 'llm/v1/chat' for AI transformer plugins", + "if_match": { + "not_one_of": [ + "llm/v1/chat" + ] + }, + "then_field": "config.llm.route_type", + "then_match": { + "eq": "llm/v1/chat" + } + } + }, + { + "mutually_required": [ + "config.http_proxy_host", + "config.http_proxy_port" + ] + }, + { + "mutually_required": [ + "config.https_proxy_host", + "config.https_proxy_port" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/ai-request-transformer/3.8.x.json b/schemas/ai-request-transformer/3.8.x.json new file mode 100644 index 00000000..e1f190ab --- /dev/null +++ b/schemas/ai-request-transformer/3.8.x.json @@ -0,0 +1,669 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "prompt": { + "description": "Use this prompt to tune the LLM system/assistant message for the incoming proxy request (from the client), and what you are expecting in return.", + "required": true, + "type": "string" + } + }, + { + "transformation_extract_pattern": { + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the request phase. The first match will be set as the outgoing body. If the AI service's response doesn't match this pattern, it is marked as a failure.", + "required": false, + "type": "string" + } + }, + { + "http_timeout": { + "description": "Timeout in milliseconds for the AI upstream service.", + "type": "integer", + "required": true, + "default": 60000 + } + }, + { + "https_verify": { + "description": "Verify the TLS certificate of the AI upstream service.", + "type": "boolean", + "required": true, + "default": true + } + }, + { + "max_request_body_size": { + "description": "max allowed body size allowed to be introspected", + "type": "integer", + "gt": 0, + "default": 8192 + } + }, + { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "llm": { + "fields": [ + { + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "type": "string", + "required": true, + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ] + } + }, + { + "auth": { + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "param_value": { + "description": "Specify the full parameter value for 'param_name'.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string", + "required": false, + "one_of": [ + "query", + "body" + ] + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean", + "required": false, + "default": false + } + } + ], + "required": false, + "type": "record" + } + }, + { + "model": { + "fields": [ + { + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "type": "string", + "required": true, + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock" + ] + } + }, + { + "name": { + "description": "Model name to execute.", + "type": "string", + "required": false + } + }, + { + "options": { + "description": "Key/value settings for the model", + "type": "record", + "required": false, + "fields": [ + { + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer", + "required": false, + "default": 256 + } + }, + { + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "type": "number", + "gt": 0, + "required": false + } + }, + { + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "type": "number", + "gt": 0, + "required": false + } + }, + { + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "type": "number", + "between": [ + 0, + 5 + ], + "required": false + } + }, + { + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "type": "number", + "between": [ + 0, + 1 + ], + "required": false + } + }, + { + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "type": "integer", + "between": [ + 0, + 500 + ], + "required": false + } + }, + { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string", + "required": false + } + }, + { + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string", + "required": false + } + }, + { + "azure_api_version": { + "description": "'api-version' for Azure OpenAI instances.", + "type": "string", + "required": false, + "default": "2023-05-15" + } + }, + { + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string", + "required": false + } + }, + { + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "type": "string", + "required": false, + "one_of": [ + "raw", + "openai", + "ollama" + ] + } + }, + { + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "type": "string", + "required": false, + "one_of": [ + "openai", + "ollama" + ] + } + }, + { + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "required": false, + "type": "string" + } + }, + { + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string", + "required": false + } + }, + { + "gemini": { + "fields": [ + { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string", + "required": false + } + }, + { + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string", + "required": false + } + }, + { + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string", + "required": false + } + } + ], + "required": false, + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ] + } + }, + { + "bedrock": { + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + } + ], + "required": false, + "type": "record" + } + } + ] + } + } + ], + "required": true, + "type": "record" + } + }, + { + "logging": { + "fields": [ + { + "log_statistics": { + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "log_payloads": { + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean", + "required": true, + "default": false + } + } + ], + "required": true, + "type": "record" + } + } + ], + "type": "record", + "entity_checks": [ + { + "conditional": { + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "if_field": "model.provider", + "then_err": "bedrock and gemini only support auth.allow_override = false", + "then_match": { + "eq": false + }, + "then_field": "auth.allow_override" + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.llama2_format" + ], + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.mistral_format" + ], + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.anthropic_version" + ], + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_instance" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_api_version" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.upstream_url" + ], + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + } + ], + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_field": "config.llm.route_type", + "if_field": "config.llm.route_type", + "then_err": "'config.llm.route_type' must be 'llm/v1/chat' for AI transformer plugins", + "if_match": { + "not_one_of": [ + "llm/v1/chat" + ] + }, + "then_match": { + "eq": "llm/v1/chat" + } + } + }, + { + "mutually_required": [ + "config.http_proxy_host", + "config.http_proxy_port" + ] + }, + { + "mutually_required": [ + "config.https_proxy_host", + "config.https_proxy_port" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/ai-request-transformer/3.9.x.json b/schemas/ai-request-transformer/3.9.x.json new file mode 100644 index 00000000..1373c841 --- /dev/null +++ b/schemas/ai-request-transformer/3.9.x.json @@ -0,0 +1,692 @@ +{ + "entity_checks": [ + { + "conditional": { + "then_err": "'config.llm.route_type' must be 'llm/v1/chat' for AI transformer plugins", + "if_match": { + "not_one_of": [ + "llm/v1/chat" + ] + }, + "then_field": "config.llm.route_type", + "if_field": "config.llm.route_type", + "then_match": { + "eq": "llm/v1/chat" + } + } + }, + { + "mutually_required": [ + "config.http_proxy_host", + "config.http_proxy_port" + ] + }, + { + "mutually_required": [ + "config.https_proxy_host", + "config.https_proxy_port" + ] + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "prompt": { + "description": "Use this prompt to tune the LLM system/assistant message for the incoming proxy request (from the client), and what you are expecting in return.", + "required": true, + "type": "string" + } + }, + { + "transformation_extract_pattern": { + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the request phase. The first match will be set as the outgoing body. If the AI service's response doesn't match this pattern, it is marked as a failure.", + "required": false, + "type": "string" + } + }, + { + "http_timeout": { + "default": 60000, + "description": "Timeout in milliseconds for the AI upstream service.", + "required": true, + "type": "integer" + } + }, + { + "https_verify": { + "default": true, + "description": "Verify the TLS certificate of the AI upstream service.", + "required": true, + "type": "boolean" + } + }, + { + "max_request_body_size": { + "gt": 0, + "description": "max allowed body size allowed to be introspected", + "default": 8192, + "type": "integer" + } + }, + { + "http_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "http_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "https_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "https_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "llm": { + "entity_checks": [ + { + "conditional": { + "then_err": "bedrock and gemini only support auth.allow_override = false", + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "then_field": "auth.allow_override", + "if_field": "model.provider", + "then_match": { + "eq": false + } + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.llama2_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.mistral_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.anthropic_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.upstream_url" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + } + ], + "fields": [ + { + "route_type": { + "type": "string", + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "required": true, + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ] + } + }, + { + "auth": { + "type": "record", + "required": false, + "fields": [ + { + "header_name": { + "required": false, + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "referenceable": true, + "type": "string" + } + }, + { + "header_value": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "referenceable": true + } + }, + { + "param_name": { + "required": false, + "description": "If AI model requires authentication via query parameter, specify its name here.", + "referenceable": true, + "type": "string" + } + }, + { + "param_value": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Specify the full parameter value for 'param_name'.", + "referenceable": true + } + }, + { + "param_location": { + "type": "string", + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "required": false, + "one_of": [ + "query", + "body" + ] + } + }, + { + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false, + "type": "boolean" + } + }, + { + "azure_client_id": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "referenceable": true, + "type": "string" + } + }, + { + "azure_client_secret": { + "encrypted": true, + "required": false, + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "referenceable": true + } + }, + { + "azure_tenant_id": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "referenceable": true, + "type": "string" + } + }, + { + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "required": false, + "type": "boolean" + } + }, + { + "gcp_service_account_json": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "referenceable": true + } + }, + { + "aws_access_key_id": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "referenceable": true + } + }, + { + "aws_secret_access_key": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "referenceable": true + } + }, + { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false, + "type": "boolean" + } + } + ] + } + }, + { + "model": { + "type": "record", + "required": true, + "fields": [ + { + "provider": { + "type": "string", + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "required": true, + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock", + "huggingface" + ] + } + }, + { + "name": { + "description": "Model name to execute.", + "required": false, + "type": "string" + } + }, + { + "options": { + "type": "record", + "description": "Key/value settings for the model", + "required": false, + "fields": [ + { + "max_tokens": { + "default": 256, + "description": "Defines the max_tokens, if using chat or completion models.", + "required": false, + "type": "integer" + } + }, + { + "input_cost": { + "gt": 0, + "description": "Defines the cost per 1M tokens in your prompt.", + "required": false, + "type": "number" + } + }, + { + "output_cost": { + "gt": 0, + "description": "Defines the cost per 1M tokens in the output of the AI.", + "required": false, + "type": "number" + } + }, + { + "temperature": { + "between": [ + 0, + 5 + ], + "description": "Defines the matching temperature, if using chat or completion models.", + "required": false, + "type": "number" + } + }, + { + "top_p": { + "between": [ + 0, + 1 + ], + "description": "Defines the top-p probability mass, if supported.", + "required": false, + "type": "number" + } + }, + { + "top_k": { + "between": [ + 0, + 500 + ], + "description": "Defines the top-k most likely tokens, if supported.", + "required": false, + "type": "integer" + } + }, + { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "required": false, + "type": "string" + } + }, + { + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "required": false, + "type": "string" + } + }, + { + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "required": false, + "type": "string" + } + }, + { + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "required": false, + "type": "string" + } + }, + { + "llama2_format": { + "type": "string", + "description": "If using llama2 provider, select the upstream message format.", + "required": false, + "one_of": [ + "raw", + "openai", + "ollama" + ] + } + }, + { + "mistral_format": { + "type": "string", + "description": "If using mistral provider, select the upstream message format.", + "required": false, + "one_of": [ + "openai", + "ollama" + ] + } + }, + { + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "required": false, + "type": "string" + } + }, + { + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "required": false, + "type": "string" + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "type": "record", + "required": false, + "fields": [ + { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "required": false, + "type": "string" + } + }, + { + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "required": false, + "type": "string" + } + }, + { + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "required": false, + "type": "string" + } + } + ] + } + }, + { + "bedrock": { + "type": "record", + "required": false, + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "required": false, + "type": "string" + } + } + ] + } + }, + { + "huggingface": { + "type": "record", + "required": false, + "fields": [ + { + "use_cache": { + "description": "Use the cache layer on the inference API", + "required": false, + "type": "boolean" + } + }, + { + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "required": false, + "type": "boolean" + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "logging": { + "type": "record", + "required": true, + "fields": [ + { + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "required": true, + "type": "boolean" + } + }, + { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "required": true, + "type": "boolean" + } + } + ] + } + } + ], + "required": true, + "type": "record" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-response-transformer/3.10.x.json b/schemas/ai-response-transformer/3.10.x.json new file mode 100644 index 00000000..afa1c58b --- /dev/null +++ b/schemas/ai-response-transformer/3.10.x.json @@ -0,0 +1,722 @@ +{ + "entity_checks": [ + { + "conditional": { + "then_err": "'config.llm.route_type' must be 'llm/v1/chat' for AI transformer plugins", + "if_match": { + "not_one_of": [ + "llm/v1/chat" + ] + }, + "then_field": "config.llm.route_type", + "if_field": "config.llm.route_type", + "then_match": { + "eq": "llm/v1/chat" + } + } + }, + { + "mutually_required": [ + "config.http_proxy_host", + "config.http_proxy_port" + ] + }, + { + "mutually_required": [ + "config.https_proxy_host", + "config.https_proxy_port" + ] + } + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "prompt": { + "description": "Use this prompt to tune the LLM system/assistant message for the returning proxy response (from the upstream), adn what response format you are expecting.", + "type": "string", + "required": true + } + }, + { + "transformation_extract_pattern": { + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the response phase. The first match will be set as the returning body. If the AI service's response doesn't match this pattern, a failure is returned to the client.", + "type": "string", + "required": false + } + }, + { + "parse_llm_response_json_instructions": { + "description": "Set true to read specific response format from the LLM, and accordingly set the status code / body / headers that proxy back to the client. You need to engineer your LLM prompt to return the correct format, see plugin docs 'Overview' page for usage instructions.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "http_timeout": { + "description": "Timeout in milliseconds for the AI upstream service.", + "default": 60000, + "type": "integer", + "required": true + } + }, + { + "https_verify": { + "description": "Verify the TLS certificate of the AI upstream service.", + "default": true, + "type": "boolean", + "required": true + } + }, + { + "max_request_body_size": { + "gt": 0, + "default": 8192, + "type": "integer", + "description": "max allowed body size allowed to be introspected" + } + }, + { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "http_proxy_port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "https_proxy_port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "llm": { + "entity_checks": [ + { + "conditional": { + "then_err": "bedrock and gemini only support auth.allow_override = false", + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "then_field": "auth.allow_override", + "if_field": "model.provider", + "then_match": { + "eq": false + } + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.llama2_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.mistral_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.anthropic_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.upstream_url" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + } + ], + "type": "record", + "fields": [ + { + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "type": "string", + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ], + "required": true + } + }, + { + "auth": { + "type": "record", + "required": false, + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "header_value": { + "type": "string", + "referenceable": true, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "encrypted": true, + "required": false + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "param_value": { + "type": "string", + "referenceable": true, + "description": "Specify the full parameter value for 'param_name'.", + "encrypted": true, + "required": false + } + }, + { + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string", + "one_of": [ + "query", + "body" + ], + "required": false + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "azure_client_secret": { + "type": "string", + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "encrypted": true, + "required": false + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "gcp_service_account_json": { + "type": "string", + "referenceable": true, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "encrypted": true, + "required": false + } + }, + { + "aws_access_key_id": { + "type": "string", + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "encrypted": true, + "required": false + } + }, + { + "aws_secret_access_key": { + "type": "string", + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "encrypted": true, + "required": false + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean", + "default": false, + "required": false + } + } + ] + } + }, + { + "model": { + "type": "record", + "required": true, + "fields": [ + { + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "type": "string", + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock", + "huggingface" + ], + "required": true + } + }, + { + "name": { + "description": "Model name to execute.", + "type": "string", + "required": false + } + }, + { + "options": { + "description": "Key/value settings for the model", + "type": "record", + "required": false, + "fields": [ + { + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer", + "required": false + } + }, + { + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "type": "number", + "gt": 0, + "required": false + } + }, + { + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "type": "number", + "gt": 0, + "required": false + } + }, + { + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "type": "number", + "between": [ + 0, + 5 + ], + "required": false + } + }, + { + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "type": "number", + "between": [ + 0, + 1 + ], + "required": false + } + }, + { + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "type": "integer", + "between": [ + 0, + 500 + ], + "required": false + } + }, + { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string", + "required": false + } + }, + { + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string", + "required": false + } + }, + { + "azure_api_version": { + "description": "'api-version' for Azure OpenAI instances.", + "type": "string", + "default": "2023-05-15", + "required": false + } + }, + { + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string", + "required": false + } + }, + { + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "type": "string", + "one_of": [ + "raw", + "openai", + "ollama" + ], + "required": false + } + }, + { + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "type": "string", + "one_of": [ + "openai", + "ollama" + ], + "required": false + } + }, + { + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string", + "required": false + } + }, + { + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string", + "required": false, + "deprecation": { + "message": "llm: config.model.options.upstream_path is deprecated, please use config.model.options.upstream_url instead", + "removal_in_version": "4.0" + } + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "type": "record", + "required": false, + "fields": [ + { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string", + "required": false + } + }, + { + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string", + "required": false + } + }, + { + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string", + "required": false + } + } + ] + } + }, + { + "bedrock": { + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "type": "record", + "required": false, + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + }, + { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string", + "required": false + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + } + ] + } + }, + { + "huggingface": { + "type": "record", + "required": false, + "fields": [ + { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean", + "required": false + } + }, + { + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean", + "required": false + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "logging": { + "type": "record", + "required": true, + "fields": [ + { + "log_statistics": { + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "log_payloads": { + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean", + "default": false, + "required": true + } + } + ] + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-response-transformer/3.11.x.json b/schemas/ai-response-transformer/3.11.x.json new file mode 100644 index 00000000..6cfc6fc5 --- /dev/null +++ b/schemas/ai-response-transformer/3.11.x.json @@ -0,0 +1,808 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "prompt": { + "required": true, + "description": "Use this prompt to tune the LLM system/assistant message for the returning proxy response (from the upstream), adn what response format you are expecting.", + "type": "string" + } + }, + { + "transformation_extract_pattern": { + "required": false, + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the response phase. The first match will be set as the returning body. If the AI service's response doesn't match this pattern, a failure is returned to the client.", + "type": "string" + } + }, + { + "parse_llm_response_json_instructions": { + "default": false, + "required": true, + "description": "Set true to read specific response format from the LLM, and accordingly set the status code / body / headers that proxy back to the client. You need to engineer your LLM prompt to return the correct format, see plugin docs 'Overview' page for usage instructions.", + "type": "boolean" + } + }, + { + "http_timeout": { + "description": "Timeout in milliseconds for the AI upstream service.", + "required": true, + "default": 60000, + "type": "integer" + } + }, + { + "https_verify": { + "description": "Verify the TLS certificate of the AI upstream service.", + "required": true, + "default": true, + "type": "boolean" + } + }, + { + "max_request_body_size": { + "default": 8192, + "gt": 0, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "type": "integer" + } + }, + { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "http_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "https_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "llm": { + "required": true, + "entity_checks": [ + { + "conditional": { + "then_err": "bedrock and gemini only support auth.allow_override = false", + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "then_field": "auth.allow_override", + "if_field": "model.provider", + "then_match": { + "eq": false + } + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.llama2_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.mistral_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.anthropic_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.upstream_url" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model" + ] + } + } + ], + "fields": [ + { + "route_type": { + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "llm/v1/embeddings", + "llm/v1/responses", + "llm/v1/assistants", + "llm/v1/batches", + "llm/v1/files", + "image/v1/images/generations", + "image/v1/images/edits", + "audio/v1/audio/transcriptions", + "audio/v1/audio/speech", + "audio/v1/audio/translations", + "realtime/v1/realtime", + "preserve" + ], + "required": true, + "description": "The model's operation implementation, for this provider. ", + "type": "string" + } + }, + { + "auth": { + "required": false, + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "header_value": { + "required": false, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "param_value": { + "required": false, + "description": "Specify the full parameter value for 'param_name'.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "param_location": { + "one_of": [ + "query", + "body" + ], + "required": false, + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string" + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "azure_client_secret": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "gcp_service_account_json": { + "required": false, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "aws_access_key_id": { + "required": false, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "aws_secret_access_key": { + "required": false, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false, + "default": false, + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "model": { + "required": true, + "fields": [ + { + "provider": { + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock", + "huggingface" + ], + "required": true, + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "type": "string" + } + }, + { + "name": { + "required": false, + "description": "Model name to execute.", + "type": "string" + } + }, + { + "options": { + "description": "Key/value settings for the model", + "required": false, + "fields": [ + { + "max_tokens": { + "required": false, + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer" + } + }, + { + "input_cost": { + "gt": 0, + "required": false, + "description": "Defines the cost per 1M tokens in your prompt.", + "type": "number" + } + }, + { + "output_cost": { + "gt": 0, + "required": false, + "description": "Defines the cost per 1M tokens in the output of the AI.", + "type": "number" + } + }, + { + "temperature": { + "between": [ + 0, + 5 + ], + "required": false, + "description": "Defines the matching temperature, if using chat or completion models.", + "type": "number" + } + }, + { + "top_p": { + "between": [ + 0, + 1 + ], + "required": false, + "description": "Defines the top-p probability mass, if supported.", + "type": "number" + } + }, + { + "top_k": { + "between": [ + 0, + 500 + ], + "required": false, + "description": "Defines the top-k most likely tokens, if supported.", + "type": "integer" + } + }, + { + "anthropic_version": { + "required": false, + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string" + } + }, + { + "azure_instance": { + "required": false, + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + { + "azure_api_version": { + "description": "'api-version' for Azure OpenAI instances.", + "required": false, + "default": "2023-05-15", + "type": "string" + } + }, + { + "azure_deployment_id": { + "required": false, + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + } + }, + { + "llama2_format": { + "one_of": [ + "raw", + "openai", + "ollama" + ], + "required": false, + "description": "If using llama2 provider, select the upstream message format.", + "type": "string" + } + }, + { + "mistral_format": { + "one_of": [ + "openai", + "ollama" + ], + "required": false, + "description": "If using mistral provider, select the upstream message format.", + "type": "string" + } + }, + { + "upstream_url": { + "required": false, + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string" + } + }, + { + "upstream_path": { + "deprecation": { + "message": "llm: config.model.options.upstream_path is deprecated, please use config.model.options.upstream_url instead", + "removal_in_version": "4.0" + }, + "required": false, + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + } + }, + { + "embeddings_dimensions": { + "gt": 0, + "required": false, + "description": "If using embeddings models, set the number of dimensions to generate.", + "type": "integer" + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "required": false, + "fields": [ + { + "api_endpoint": { + "required": false, + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + } + }, + { + "project_id": { + "required": false, + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + { + "location_id": { + "required": false, + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "bedrock": { + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "required": false, + "fields": [ + { + "aws_region": { + "required": false, + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + } + }, + { + "aws_assume_role_arn": { + "required": false, + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + { + "embeddings_normalize": { + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "default": false, + "type": "boolean" + } + }, + { + "performance_config_latency": { + "required": false, + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "huggingface": { + "required": false, + "fields": [ + { + "use_cache": { + "required": false, + "description": "Use the cache layer on the inference API", + "type": "boolean" + } + }, + { + "wait_for_model": { + "required": false, + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "cohere": { + "required": false, + "fields": [ + { + "embedding_input_type": { + "required": false, + "description": "The purpose of the input text to calculate embedding vectors.", + "one_of": [ + "search_document", + "search_query", + "classification", + "clustering", + "image" + ], + "default": "classification", + "type": "string" + } + }, + { + "wait_for_model": { + "required": false, + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "logging": { + "required": true, + "fields": [ + { + "log_statistics": { + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "log_payloads": { + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "required": true, + "default": false, + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_err": "'config.llm.route_type' must be 'llm/v1/chat' for AI transformer plugins", + "if_match": { + "not_one_of": [ + "llm/v1/chat" + ] + }, + "then_field": "config.llm.route_type", + "if_field": "config.llm.route_type", + "then_match": { + "eq": "llm/v1/chat" + } + } + }, + { + "mutually_required": [ + "config.http_proxy_host", + "config.http_proxy_port" + ] + }, + { + "mutually_required": [ + "config.https_proxy_host", + "config.https_proxy_port" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/ai-response-transformer/3.12.x.json b/schemas/ai-response-transformer/3.12.x.json new file mode 100644 index 00000000..09d7ea8c --- /dev/null +++ b/schemas/ai-response-transformer/3.12.x.json @@ -0,0 +1,808 @@ +{ + "entity_checks": [ + { + "conditional": { + "if_match": { + "not_one_of": [ + "llm/v1/chat" + ] + }, + "then_field": "config.llm.route_type", + "if_field": "config.llm.route_type", + "then_match": { + "eq": "llm/v1/chat" + }, + "then_err": "'config.llm.route_type' must be 'llm/v1/chat' for AI transformer plugins" + } + }, + { + "mutually_required": [ + "config.http_proxy_host", + "config.http_proxy_port" + ] + }, + { + "mutually_required": [ + "config.https_proxy_host", + "config.https_proxy_port" + ] + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "prompt": { + "type": "string", + "description": "Use this prompt to tune the LLM system/assistant message for the returning proxy response (from the upstream), adn what response format you are expecting.", + "required": true + } + }, + { + "transformation_extract_pattern": { + "type": "string", + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the response phase. The first match will be set as the returning body. If the AI service's response doesn't match this pattern, a failure is returned to the client.", + "required": false + } + }, + { + "parse_llm_response_json_instructions": { + "type": "boolean", + "default": false, + "description": "Set true to read specific response format from the LLM, and accordingly set the status code / body / headers that proxy back to the client. You need to engineer your LLM prompt to return the correct format, see plugin docs 'Overview' page for usage instructions.", + "required": true + } + }, + { + "http_timeout": { + "type": "integer", + "default": 60000, + "description": "Timeout in milliseconds for the AI upstream service.", + "required": true + } + }, + { + "https_verify": { + "type": "boolean", + "default": true, + "description": "Verify the TLS certificate of the AI upstream service.", + "required": true + } + }, + { + "max_request_body_size": { + "type": "integer", + "default": 8192, + "gt": 0, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size." + } + }, + { + "http_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "http_proxy_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "https_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "https_proxy_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "llm": { + "type": "record", + "fields": [ + { + "route_type": { + "type": "string", + "description": "The model's operation implementation, for this provider. ", + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "llm/v1/embeddings", + "llm/v1/responses", + "llm/v1/assistants", + "llm/v1/batches", + "llm/v1/files", + "image/v1/images/generations", + "image/v1/images/edits", + "audio/v1/audio/transcriptions", + "audio/v1/audio/speech", + "audio/v1/audio/translations", + "realtime/v1/realtime", + "preserve" + ], + "required": true + } + }, + { + "auth": { + "type": "record", + "fields": [ + { + "header_name": { + "type": "string", + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "referenceable": true, + "required": false + } + }, + { + "header_value": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'." + } + }, + { + "param_name": { + "type": "string", + "description": "If AI model requires authentication via query parameter, specify its name here.", + "referenceable": true, + "required": false + } + }, + { + "param_value": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Specify the full parameter value for 'param_name'." + } + }, + { + "param_location": { + "type": "string", + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "one_of": [ + "query", + "body" + ], + "required": false + } + }, + { + "azure_use_managed_identity": { + "type": "boolean", + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false + } + }, + { + "azure_client_id": { + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "referenceable": true, + "required": false + } + }, + { + "azure_client_secret": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret." + } + }, + { + "azure_tenant_id": { + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "referenceable": true, + "required": false + } + }, + { + "gcp_use_service_account": { + "type": "boolean", + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "required": false + } + }, + { + "gcp_service_account_json": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`." + } + }, + { + "aws_access_key_id": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance." + } + }, + { + "aws_secret_access_key": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance." + } + }, + { + "allow_override": { + "type": "boolean", + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false + } + } + ], + "required": false + } + }, + { + "model": { + "type": "record", + "fields": [ + { + "provider": { + "type": "string", + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock", + "huggingface" + ], + "required": true + } + }, + { + "name": { + "type": "string", + "description": "Model name to execute.", + "required": false + } + }, + { + "options": { + "description": "Key/value settings for the model", + "fields": [ + { + "max_tokens": { + "type": "integer", + "description": "Defines the max_tokens, if using chat or completion models.", + "required": false + } + }, + { + "input_cost": { + "type": "number", + "description": "Defines the cost per 1M tokens in your prompt.", + "gt": 0, + "required": false + } + }, + { + "output_cost": { + "type": "number", + "description": "Defines the cost per 1M tokens in the output of the AI.", + "gt": 0, + "required": false + } + }, + { + "temperature": { + "type": "number", + "description": "Defines the matching temperature, if using chat or completion models.", + "between": [ + 0, + 5 + ], + "required": false + } + }, + { + "top_p": { + "type": "number", + "description": "Defines the top-p probability mass, if supported.", + "between": [ + 0, + 1 + ], + "required": false + } + }, + { + "top_k": { + "type": "integer", + "description": "Defines the top-k most likely tokens, if supported.", + "between": [ + 0, + 500 + ], + "required": false + } + }, + { + "anthropic_version": { + "type": "string", + "description": "Defines the schema/API version, if using Anthropic provider.", + "required": false + } + }, + { + "azure_instance": { + "type": "string", + "description": "Instance name for Azure OpenAI hosted models.", + "required": false + } + }, + { + "azure_api_version": { + "type": "string", + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "required": false + } + }, + { + "azure_deployment_id": { + "type": "string", + "description": "Deployment ID for Azure OpenAI instances.", + "required": false + } + }, + { + "llama2_format": { + "type": "string", + "description": "If using llama2 provider, select the upstream message format.", + "one_of": [ + "raw", + "openai", + "ollama" + ], + "required": false + } + }, + { + "mistral_format": { + "type": "string", + "description": "If using mistral provider, select the upstream message format.", + "one_of": [ + "openai", + "ollama" + ], + "required": false + } + }, + { + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "type": "string", + "required": false + } + }, + { + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "deprecation": { + "message": "llm: config.model.options.upstream_path is deprecated, please use config.model.options.upstream_url instead", + "removal_in_version": "4.0" + }, + "type": "string", + "required": false + } + }, + { + "embeddings_dimensions": { + "type": "integer", + "description": "If using embeddings models, set the number of dimensions to generate.", + "gt": 0, + "required": false + } + }, + { + "gemini": { + "type": "record", + "fields": [ + { + "api_endpoint": { + "type": "string", + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "required": false + } + }, + { + "project_id": { + "type": "string", + "description": "If running Gemini on Vertex, specify the project ID.", + "required": false + } + }, + { + "location_id": { + "type": "string", + "description": "If running Gemini on Vertex, specify the location ID.", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "required": false + } + }, + { + "bedrock": { + "type": "record", + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + }, + { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string", + "required": false + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + { + "embeddings_normalize": { + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "default": false, + "type": "boolean" + } + }, + { + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "required": false + } + }, + { + "huggingface": { + "type": "record", + "fields": [ + { + "use_cache": { + "type": "boolean", + "description": "Use the cache layer on the inference API", + "required": false + } + }, + { + "wait_for_model": { + "type": "boolean", + "description": "Wait for the model if it is not ready", + "required": false + } + } + ], + "required": false + } + }, + { + "cohere": { + "type": "record", + "fields": [ + { + "embedding_input_type": { + "type": "string", + "required": false, + "description": "The purpose of the input text to calculate embedding vectors.", + "default": "classification", + "one_of": [ + "search_document", + "search_query", + "classification", + "clustering", + "image" + ] + } + }, + { + "wait_for_model": { + "type": "boolean", + "description": "Wait for the model if it is not ready", + "required": false + } + } + ], + "required": false + } + } + ], + "type": "record", + "required": false + } + } + ], + "required": true + } + }, + { + "logging": { + "type": "record", + "fields": [ + { + "log_statistics": { + "type": "boolean", + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "required": true + } + }, + { + "log_payloads": { + "type": "boolean", + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "required": true + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "then_field": "auth.allow_override", + "if_field": "model.provider", + "then_match": { + "eq": false + }, + "then_err": "bedrock and gemini only support auth.allow_override = false" + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.llama2_format" + ], + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.mistral_format" + ], + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.anthropic_version" + ], + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_instance" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_api_version" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.upstream_url" + ], + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models", + "if_field": "model.provider" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model" + ] + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-response-transformer/3.6.x.json b/schemas/ai-response-transformer/3.6.x.json new file mode 100644 index 00000000..9bf49b2d --- /dev/null +++ b/schemas/ai-response-transformer/3.6.x.json @@ -0,0 +1,523 @@ +{ + "entity_checks": [ + { + "conditional": { + "then_match": { + "eq": "llm/v1/chat" + }, + "then_err": "'config.llm.route_type' must be 'llm/v1/chat' for AI transformer plugins", + "if_match": { + "not_one_of": [ + "llm/v1/chat" + ] + }, + "if_field": "config.llm.route_type", + "then_field": "config.llm.route_type" + } + }, + { + "mutually_required": [ + "config.http_proxy_host", + "config.http_proxy_port" + ] + }, + { + "mutually_required": [ + "config.https_proxy_host", + "config.https_proxy_port" + ] + } + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "prompt": { + "required": true, + "type": "string", + "description": "Use this prompt to tune the LLM system/assistant message for the returning proxy response (from the upstream), adn what response format you are expecting." + } + }, + { + "transformation_extract_pattern": { + "required": false, + "type": "string", + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the response phase. The first match will be set as the returning body. If the AI service's response doesn't match this pattern, a failure is returned to the client." + } + }, + { + "parse_llm_response_json_instructions": { + "required": true, + "type": "boolean", + "default": false, + "description": "Set true to read specific response format from the LLM, and accordingly set the status code / body / headers that proxy back to the client. You need to engineer your LLM prompt to return the correct format, see plugin docs 'Overview' page for usage instructions." + } + }, + { + "http_timeout": { + "required": true, + "type": "integer", + "default": 60000, + "description": "Timeout in milliseconds for the AI upstream service." + } + }, + { + "https_verify": { + "required": true, + "type": "boolean", + "default": true, + "description": "Verify the TLS certificate of the AI upstream service." + } + }, + { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "http_proxy_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "https_proxy_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "llm": { + "entity_checks": [ + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "auth.header_name", + "auth.param_name" + ], + "if_field": "model.provider", + "then_err": "must set one of %s, and its respective options, when provider is not self-hosted", + "if_match": { + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere" + ] + } + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.llama2_format" + ], + "if_field": "model.provider", + "then_err": "must set %s for llama2 provider", + "if_match": { + "one_of": [ + "llama2" + ] + } + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.mistral_format" + ], + "if_field": "model.provider", + "then_err": "must set %s for mistral provider", + "if_match": { + "one_of": [ + "mistral" + ] + } + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.name" + ], + "if_field": "model.provider", + "then_err": "Must set a model name. Refer to https://docs.konghq.com/hub/kong-inc/ai-proxy/ for supported models.", + "if_match": [ + + ] + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.anthropic_version" + ], + "if_field": "model.provider", + "then_err": "must set %s for anthropic provider", + "if_match": { + "one_of": [ + "anthropic" + ] + } + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_instance" + ], + "if_field": "model.provider", + "then_err": "must set %s for azure provider", + "if_match": { + "one_of": [ + "azure" + ] + } + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_api_version" + ], + "if_field": "model.provider", + "then_err": "must set %s for azure provider", + "if_match": { + "one_of": [ + "azure" + ] + } + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ], + "if_field": "model.provider", + "then_err": "must set %s for azure provider", + "if_match": { + "one_of": [ + "azure" + ] + } + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.upstream_url" + ], + "if_field": "model.provider", + "then_err": "must set %s for self-hosted providers/models", + "if_match": { + "one_of": [ + "mistral", + "llama2" + ] + } + } + } + ], + "type": "record", + "fields": [ + { + "route_type": { + "required": true, + "type": "string", + "description": "The model's operation implementation, for this provider.", + "one_of": [ + "llm/v1/chat", + "llm/v1/completions" + ] + } + }, + { + "auth": { + "required": false, + "type": "record", + "fields": [ + { + "header_name": { + "required": false, + "type": "string", + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "referenceable": true + } + }, + { + "header_value": { + "referenceable": true, + "type": "string", + "required": false, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "encrypted": true + } + }, + { + "param_name": { + "required": false, + "type": "string", + "description": "If AI model requires authentication via query parameter, specify its name here.", + "referenceable": true + } + }, + { + "param_value": { + "referenceable": true, + "type": "string", + "required": false, + "description": "Specify the full parameter value for 'param_name'.", + "encrypted": true + } + }, + { + "param_location": { + "required": false, + "type": "string", + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "one_of": [ + "query", + "body" + ] + } + } + ] + } + }, + { + "model": { + "required": true, + "type": "record", + "fields": [ + { + "provider": { + "required": true, + "type": "string", + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2" + ] + } + }, + { + "name": { + "required": false, + "type": "string", + "description": "Model name to execute." + } + }, + { + "options": { + "required": false, + "type": "record", + "description": "Key/value settings for the model", + "fields": [ + { + "max_tokens": { + "required": false, + "type": "integer", + "description": "Defines the max_tokens, if using chat or completion models.", + "default": 256 + } + }, + { + "temperature": { + "type": "number", + "default": 1, + "between": [ + 0, + 5 + ], + "required": false, + "description": "Defines the matching temperature, if using chat or completion models." + } + }, + { + "top_p": { + "type": "number", + "default": 1, + "between": [ + 0, + 1 + ], + "required": false, + "description": "Defines the top-p probability mass, if supported." + } + }, + { + "top_k": { + "type": "integer", + "default": 0, + "between": [ + 0, + 500 + ], + "required": false, + "description": "Defines the top-k most likely tokens, if supported." + } + }, + { + "anthropic_version": { + "required": false, + "type": "string", + "description": "Defines the schema/API version, if using Anthropic provider." + } + }, + { + "azure_instance": { + "required": false, + "type": "string", + "description": "Instance name for Azure OpenAI hosted models." + } + }, + { + "azure_api_version": { + "required": false, + "type": "string", + "description": "'api-version' for Azure OpenAI instances.", + "default": "2023-05-15" + } + }, + { + "azure_deployment_id": { + "required": false, + "type": "string", + "description": "Deployment ID for Azure OpenAI instances." + } + }, + { + "llama2_format": { + "required": false, + "type": "string", + "description": "If using llama2 provider, select the upstream message format.", + "one_of": [ + "raw", + "openai", + "ollama" + ] + } + }, + { + "mistral_format": { + "required": false, + "type": "string", + "description": "If using mistral provider, select the upstream message format.", + "one_of": [ + "openai", + "ollama" + ] + } + }, + { + "upstream_url": { + "required": false, + "type": "string", + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint." + } + } + ] + } + } + ] + } + }, + { + "logging": { + "required": true, + "type": "record", + "fields": [ + { + "log_statistics": { + "required": true, + "type": "boolean", + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "default": true + } + }, + { + "log_payloads": { + "required": true, + "type": "boolean", + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "default": false + } + } + ] + } + } + ], + "required": true + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-response-transformer/3.7.x.json b/schemas/ai-response-transformer/3.7.x.json new file mode 100644 index 00000000..488710ce --- /dev/null +++ b/schemas/ai-response-transformer/3.7.x.json @@ -0,0 +1,586 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "prompt": { + "required": true, + "type": "string", + "description": "Use this prompt to tune the LLM system/assistant message for the returning proxy response (from the upstream), adn what response format you are expecting." + } + }, + { + "transformation_extract_pattern": { + "required": false, + "type": "string", + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the response phase. The first match will be set as the returning body. If the AI service's response doesn't match this pattern, a failure is returned to the client." + } + }, + { + "parse_llm_response_json_instructions": { + "required": true, + "type": "boolean", + "description": "Set true to read specific response format from the LLM, and accordingly set the status code / body / headers that proxy back to the client. You need to engineer your LLM prompt to return the correct format, see plugin docs 'Overview' page for usage instructions.", + "default": false + } + }, + { + "http_timeout": { + "required": true, + "description": "Timeout in milliseconds for the AI upstream service.", + "type": "integer", + "default": 60000 + } + }, + { + "https_verify": { + "required": true, + "description": "Verify the TLS certificate of the AI upstream service.", + "type": "boolean", + "default": true + } + }, + { + "http_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "http_proxy_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "https_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "https_proxy_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "llm": { + "fields": [ + { + "route_type": { + "required": true, + "type": "string", + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ] + } + }, + { + "auth": { + "required": false, + "type": "record", + "fields": [ + { + "header_name": { + "required": false, + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "referenceable": true, + "type": "string" + } + }, + { + "header_value": { + "encrypted": true, + "referenceable": true, + "required": false, + "type": "string", + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'." + } + }, + { + "param_name": { + "required": false, + "description": "If AI model requires authentication via query parameter, specify its name here.", + "referenceable": true, + "type": "string" + } + }, + { + "param_value": { + "encrypted": true, + "referenceable": true, + "required": false, + "type": "string", + "description": "Specify the full parameter value for 'param_name'." + } + }, + { + "param_location": { + "required": false, + "type": "string", + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "one_of": [ + "query", + "body" + ] + } + }, + { + "azure_use_managed_identity": { + "required": false, + "type": "boolean", + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "default": false + } + }, + { + "azure_client_id": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "referenceable": true, + "type": "string" + } + }, + { + "azure_client_secret": { + "encrypted": true, + "referenceable": true, + "required": false, + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret." + } + }, + { + "azure_tenant_id": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "referenceable": true, + "type": "string" + } + } + ] + } + }, + { + "model": { + "required": true, + "type": "record", + "fields": [ + { + "provider": { + "required": true, + "type": "string", + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2" + ] + } + }, + { + "name": { + "required": false, + "type": "string", + "description": "Model name to execute." + } + }, + { + "options": { + "required": false, + "type": "record", + "description": "Key/value settings for the model", + "fields": [ + { + "response_streaming": { + "default": "allow", + "required": false, + "type": "string", + "description": "Whether to 'optionally allow', 'deny', or 'always' (force) the streaming of answers via server sent events.", + "one_of": [ + "allow", + "deny", + "always" + ] + } + }, + { + "max_tokens": { + "required": false, + "type": "integer", + "description": "Defines the max_tokens, if using chat or completion models.", + "default": 256 + } + }, + { + "temperature": { + "required": false, + "type": "number", + "description": "Defines the matching temperature, if using chat or completion models.", + "between": [ + 0, + 5 + ] + } + }, + { + "top_p": { + "required": false, + "type": "number", + "description": "Defines the top-p probability mass, if supported.", + "between": [ + 0, + 1 + ] + } + }, + { + "top_k": { + "required": false, + "type": "integer", + "description": "Defines the top-k most likely tokens, if supported.", + "between": [ + 0, + 500 + ] + } + }, + { + "anthropic_version": { + "required": false, + "type": "string", + "description": "Defines the schema/API version, if using Anthropic provider." + } + }, + { + "azure_instance": { + "required": false, + "type": "string", + "description": "Instance name for Azure OpenAI hosted models." + } + }, + { + "azure_api_version": { + "required": false, + "type": "string", + "description": "'api-version' for Azure OpenAI instances.", + "default": "2023-05-15" + } + }, + { + "azure_deployment_id": { + "required": false, + "type": "string", + "description": "Deployment ID for Azure OpenAI instances." + } + }, + { + "llama2_format": { + "required": false, + "type": "string", + "description": "If using llama2 provider, select the upstream message format.", + "one_of": [ + "raw", + "openai", + "ollama" + ] + } + }, + { + "mistral_format": { + "required": false, + "type": "string", + "description": "If using mistral provider, select the upstream message format.", + "one_of": [ + "openai", + "ollama" + ] + } + }, + { + "upstream_url": { + "required": false, + "type": "string", + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint." + } + }, + { + "upstream_path": { + "required": false, + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string" + } + } + ] + } + } + ] + } + }, + { + "logging": { + "required": true, + "type": "record", + "fields": [ + { + "log_statistics": { + "required": true, + "type": "boolean", + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "default": false + } + }, + { + "log_payloads": { + "required": true, + "type": "boolean", + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "default": false + } + } + ] + } + } + ], + "entity_checks": [ + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "auth.header_name", + "auth.param_name" + ], + "if_match": { + "one_of": [ + "openai", + "anthropic", + "cohere" + ] + }, + "then_err": "must set one of %s, and its respective options, when provider is not self-hosted" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "auth.header_name", + "auth.param_name", + "auth.azure_use_managed_identity" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set one of %s, and its respective options, when azure provider is set" + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.llama2_format" + ], + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.mistral_format" + ], + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.anthropic_version" + ], + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_instance" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_api_version" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.upstream_url" + ], + "if_match": { + "one_of": [ + "mistral", + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_field": "config.llm.route_type", + "then_err": "'config.llm.route_type' must be 'llm/v1/chat' for AI transformer plugins", + "if_match": { + "not_one_of": [ + "llm/v1/chat" + ] + }, + "then_field": "config.llm.route_type", + "then_match": { + "eq": "llm/v1/chat" + } + } + }, + { + "mutually_required": [ + "config.http_proxy_host", + "config.http_proxy_port" + ] + }, + { + "mutually_required": [ + "config.https_proxy_host", + "config.https_proxy_port" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/ai-response-transformer/3.8.x.json b/schemas/ai-response-transformer/3.8.x.json new file mode 100644 index 00000000..e7158ea7 --- /dev/null +++ b/schemas/ai-response-transformer/3.8.x.json @@ -0,0 +1,669 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "prompt": { + "description": "Use this prompt to tune the LLM system/assistant message for the returning proxy response (from the upstream), adn what response format you are expecting.", + "required": true, + "type": "string" + } + }, + { + "transformation_extract_pattern": { + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the response phase. The first match will be set as the returning body. If the AI service's response doesn't match this pattern, a failure is returned to the client.", + "required": false, + "type": "string" + } + }, + { + "parse_llm_response_json_instructions": { + "description": "Set true to read specific response format from the LLM, and accordingly set the status code / body / headers that proxy back to the client. You need to engineer your LLM prompt to return the correct format, see plugin docs 'Overview' page for usage instructions.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "http_timeout": { + "description": "Timeout in milliseconds for the AI upstream service.", + "type": "integer", + "required": true, + "default": 60000 + } + }, + { + "https_verify": { + "description": "Verify the TLS certificate of the AI upstream service.", + "type": "boolean", + "required": true, + "default": true + } + }, + { + "max_request_body_size": { + "description": "max allowed body size allowed to be introspected", + "type": "integer", + "gt": 0, + "default": 8192 + } + }, + { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "llm": { + "fields": [ + { + "route_type": { + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "type": "string", + "required": true, + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ] + } + }, + { + "auth": { + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "param_value": { + "description": "Specify the full parameter value for 'param_name'.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string", + "required": false, + "one_of": [ + "query", + "body" + ] + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean", + "required": false, + "default": false + } + } + ], + "required": false, + "type": "record" + } + }, + { + "model": { + "fields": [ + { + "provider": { + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "type": "string", + "required": true, + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock" + ] + } + }, + { + "name": { + "description": "Model name to execute.", + "type": "string", + "required": false + } + }, + { + "options": { + "description": "Key/value settings for the model", + "type": "record", + "required": false, + "fields": [ + { + "max_tokens": { + "description": "Defines the max_tokens, if using chat or completion models.", + "type": "integer", + "required": false, + "default": 256 + } + }, + { + "input_cost": { + "description": "Defines the cost per 1M tokens in your prompt.", + "type": "number", + "gt": 0, + "required": false + } + }, + { + "output_cost": { + "description": "Defines the cost per 1M tokens in the output of the AI.", + "type": "number", + "gt": 0, + "required": false + } + }, + { + "temperature": { + "description": "Defines the matching temperature, if using chat or completion models.", + "type": "number", + "between": [ + 0, + 5 + ], + "required": false + } + }, + { + "top_p": { + "description": "Defines the top-p probability mass, if supported.", + "type": "number", + "between": [ + 0, + 1 + ], + "required": false + } + }, + { + "top_k": { + "description": "Defines the top-k most likely tokens, if supported.", + "type": "integer", + "between": [ + 0, + 500 + ], + "required": false + } + }, + { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "type": "string", + "required": false + } + }, + { + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string", + "required": false + } + }, + { + "azure_api_version": { + "description": "'api-version' for Azure OpenAI instances.", + "type": "string", + "required": false, + "default": "2023-05-15" + } + }, + { + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string", + "required": false + } + }, + { + "llama2_format": { + "description": "If using llama2 provider, select the upstream message format.", + "type": "string", + "required": false, + "one_of": [ + "raw", + "openai", + "ollama" + ] + } + }, + { + "mistral_format": { + "description": "If using mistral provider, select the upstream message format.", + "type": "string", + "required": false, + "one_of": [ + "openai", + "ollama" + ] + } + }, + { + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "required": false, + "type": "string" + } + }, + { + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "type": "string", + "required": false + } + }, + { + "gemini": { + "fields": [ + { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string", + "required": false + } + }, + { + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string", + "required": false + } + }, + { + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string", + "required": false + } + } + ], + "required": false, + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ] + } + }, + { + "bedrock": { + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + } + ], + "required": false, + "type": "record" + } + } + ] + } + } + ], + "required": true, + "type": "record" + } + }, + { + "logging": { + "fields": [ + { + "log_statistics": { + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "log_payloads": { + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "type": "boolean", + "required": true, + "default": false + } + } + ], + "required": true, + "type": "record" + } + } + ], + "type": "record", + "entity_checks": [ + { + "conditional": { + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "if_field": "model.provider", + "then_err": "bedrock and gemini only support auth.allow_override = false", + "then_match": { + "eq": false + }, + "then_field": "auth.allow_override" + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.llama2_format" + ], + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.mistral_format" + ], + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.anthropic_version" + ], + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_instance" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_api_version" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.upstream_url" + ], + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + } + ], + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_field": "config.llm.route_type", + "if_field": "config.llm.route_type", + "then_err": "'config.llm.route_type' must be 'llm/v1/chat' for AI transformer plugins", + "if_match": { + "not_one_of": [ + "llm/v1/chat" + ] + }, + "then_match": { + "eq": "llm/v1/chat" + } + } + }, + { + "mutually_required": [ + "config.http_proxy_host", + "config.http_proxy_port" + ] + }, + { + "mutually_required": [ + "config.https_proxy_host", + "config.https_proxy_port" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/ai-response-transformer/3.9.x.json b/schemas/ai-response-transformer/3.9.x.json new file mode 100644 index 00000000..30d69cd6 --- /dev/null +++ b/schemas/ai-response-transformer/3.9.x.json @@ -0,0 +1,692 @@ +{ + "entity_checks": [ + { + "conditional": { + "then_err": "'config.llm.route_type' must be 'llm/v1/chat' for AI transformer plugins", + "if_match": { + "not_one_of": [ + "llm/v1/chat" + ] + }, + "then_field": "config.llm.route_type", + "if_field": "config.llm.route_type", + "then_match": { + "eq": "llm/v1/chat" + } + } + }, + { + "mutually_required": [ + "config.http_proxy_host", + "config.http_proxy_port" + ] + }, + { + "mutually_required": [ + "config.https_proxy_host", + "config.https_proxy_port" + ] + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "prompt": { + "description": "Use this prompt to tune the LLM system/assistant message for the returning proxy response (from the upstream), adn what response format you are expecting.", + "required": true, + "type": "string" + } + }, + { + "transformation_extract_pattern": { + "description": "Defines the regular expression that must match to indicate a successful AI transformation at the response phase. The first match will be set as the returning body. If the AI service's response doesn't match this pattern, a failure is returned to the client.", + "required": false, + "type": "string" + } + }, + { + "parse_llm_response_json_instructions": { + "default": false, + "description": "Set true to read specific response format from the LLM, and accordingly set the status code / body / headers that proxy back to the client. You need to engineer your LLM prompt to return the correct format, see plugin docs 'Overview' page for usage instructions.", + "required": true, + "type": "boolean" + } + }, + { + "http_timeout": { + "default": 60000, + "description": "Timeout in milliseconds for the AI upstream service.", + "required": true, + "type": "integer" + } + }, + { + "https_verify": { + "default": true, + "description": "Verify the TLS certificate of the AI upstream service.", + "required": true, + "type": "boolean" + } + }, + { + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "gt": 0, + "type": "integer" + } + }, + { + "http_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "http_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "https_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "https_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "llm": { + "entity_checks": [ + { + "conditional": { + "then_err": "bedrock and gemini only support auth.allow_override = false", + "if_match": { + "one_of": [ + "bedrock", + "gemini" + ] + }, + "then_field": "auth.allow_override", + "if_field": "model.provider", + "then_match": { + "eq": false + } + } + }, + { + "mutually_required": [ + "auth.header_name", + "auth.header_value" + ] + }, + { + "mutually_required": [ + "auth.param_name", + "auth.param_value", + "auth.param_location" + ] + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for llama2 provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.llama2_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "mistral" + ] + }, + "then_err": "must set %s for mistral provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.mistral_format" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "anthropic" + ] + }, + "then_err": "must set %s for anthropic provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.anthropic_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure_deployment_id" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "llama2" + ] + }, + "then_err": "must set %s for self-hosted providers/models", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.upstream_url" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "route_type", + "model", + "logging" + ] + } + } + ], + "fields": [ + { + "route_type": { + "type": "string", + "description": "The model's operation implementation, for this provider. Set to `preserve` to pass through without transformation.", + "required": true, + "one_of": [ + "llm/v1/chat", + "llm/v1/completions", + "preserve" + ] + } + }, + { + "auth": { + "type": "record", + "required": false, + "fields": [ + { + "header_name": { + "required": false, + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "referenceable": true, + "type": "string" + } + }, + { + "header_value": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "referenceable": true + } + }, + { + "param_name": { + "required": false, + "description": "If AI model requires authentication via query parameter, specify its name here.", + "referenceable": true, + "type": "string" + } + }, + { + "param_value": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Specify the full parameter value for 'param_name'.", + "referenceable": true + } + }, + { + "param_location": { + "type": "string", + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "required": false, + "one_of": [ + "query", + "body" + ] + } + }, + { + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false, + "type": "boolean" + } + }, + { + "azure_client_id": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "referenceable": true, + "type": "string" + } + }, + { + "azure_client_secret": { + "encrypted": true, + "required": false, + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "referenceable": true + } + }, + { + "azure_tenant_id": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "referenceable": true, + "type": "string" + } + }, + { + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "required": false, + "type": "boolean" + } + }, + { + "gcp_service_account_json": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "referenceable": true + } + }, + { + "aws_access_key_id": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "referenceable": true + } + }, + { + "aws_secret_access_key": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "referenceable": true + } + }, + { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false, + "type": "boolean" + } + } + ] + } + }, + { + "model": { + "type": "record", + "required": true, + "fields": [ + { + "provider": { + "type": "string", + "description": "AI provider request format - Kong translates requests to and from the specified backend compatible formats.", + "required": true, + "one_of": [ + "openai", + "azure", + "anthropic", + "cohere", + "mistral", + "llama2", + "gemini", + "bedrock", + "huggingface" + ] + } + }, + { + "name": { + "description": "Model name to execute.", + "required": false, + "type": "string" + } + }, + { + "options": { + "type": "record", + "description": "Key/value settings for the model", + "required": false, + "fields": [ + { + "max_tokens": { + "default": 256, + "description": "Defines the max_tokens, if using chat or completion models.", + "required": false, + "type": "integer" + } + }, + { + "input_cost": { + "gt": 0, + "description": "Defines the cost per 1M tokens in your prompt.", + "required": false, + "type": "number" + } + }, + { + "output_cost": { + "gt": 0, + "description": "Defines the cost per 1M tokens in the output of the AI.", + "required": false, + "type": "number" + } + }, + { + "temperature": { + "between": [ + 0, + 5 + ], + "description": "Defines the matching temperature, if using chat or completion models.", + "required": false, + "type": "number" + } + }, + { + "top_p": { + "between": [ + 0, + 1 + ], + "description": "Defines the top-p probability mass, if supported.", + "required": false, + "type": "number" + } + }, + { + "top_k": { + "between": [ + 0, + 500 + ], + "description": "Defines the top-k most likely tokens, if supported.", + "required": false, + "type": "integer" + } + }, + { + "anthropic_version": { + "description": "Defines the schema/API version, if using Anthropic provider.", + "required": false, + "type": "string" + } + }, + { + "azure_instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "required": false, + "type": "string" + } + }, + { + "azure_api_version": { + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "required": false, + "type": "string" + } + }, + { + "azure_deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "required": false, + "type": "string" + } + }, + { + "llama2_format": { + "type": "string", + "description": "If using llama2 provider, select the upstream message format.", + "required": false, + "one_of": [ + "raw", + "openai", + "ollama" + ] + } + }, + { + "mistral_format": { + "type": "string", + "description": "If using mistral provider, select the upstream message format.", + "required": false, + "one_of": [ + "openai", + "ollama" + ] + } + }, + { + "upstream_url": { + "description": "Manually specify or override the full URL to the AI operation endpoints, when calling (self-)hosted models, or for running via a private endpoint.", + "required": false, + "type": "string" + } + }, + { + "upstream_path": { + "description": "Manually specify or override the AI operation path, used when e.g. using the 'preserve' route_type.", + "required": false, + "type": "string" + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "type": "record", + "required": false, + "fields": [ + { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "required": false, + "type": "string" + } + }, + { + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "required": false, + "type": "string" + } + }, + { + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "required": false, + "type": "string" + } + } + ] + } + }, + { + "bedrock": { + "type": "record", + "required": false, + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "required": false, + "type": "string" + } + } + ] + } + }, + { + "huggingface": { + "type": "record", + "required": false, + "fields": [ + { + "use_cache": { + "description": "Use the cache layer on the inference API", + "required": false, + "type": "boolean" + } + }, + { + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "required": false, + "type": "boolean" + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "logging": { + "type": "record", + "required": true, + "fields": [ + { + "log_statistics": { + "default": false, + "description": "If enabled and supported by the driver, will add model usage and token metrics into the Kong log plugin(s) output.", + "required": true, + "type": "boolean" + } + }, + { + "log_payloads": { + "default": false, + "description": "If enabled, will log the request and response body into the Kong log plugin(s) output.", + "required": true, + "type": "boolean" + } + } + ] + } + } + ], + "required": true, + "type": "record" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-sanitizer/3.10.x.json b/schemas/ai-sanitizer/3.10.x.json new file mode 100644 index 00000000..e2540b8c --- /dev/null +++ b/schemas/ai-sanitizer/3.10.x.json @@ -0,0 +1,177 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "host": { + "description": "The host of the sanitizer", + "type": "string", + "default": "localhost", + "required": true + } + }, + { + "port": { + "description": "The port of the sanitizer", + "type": "number", + "default": 8080, + "required": true + } + }, + { + "scheme": { + "description": "The protocol can be http and https", + "type": "string", + "default": "http", + "required": true + } + }, + { + "timeout": { + "description": "Connection timeout with the sanitizer", + "default": 10000, + "type": "number" + } + }, + { + "keepalive_timeout": { + "description": "The keepalive timeout for the established http connnection", + "default": 60000, + "type": "number" + } + }, + { + "stop_on_error": { + "description": "Stop processing if an error occurs", + "default": true, + "type": "boolean" + } + }, + { + "anonymize": { + "elements": { + "type": "string", + "one_of": [ + "general", + "phone", + "email", + "creditcard", + "crypto", + "date", + "ssn", + "ip", + "nrp", + "domain", + "credentials", + "url", + "medical", + "driverlicense", + "passport", + "bank", + "nationalid", + "custom", + "all", + "all_and_credentials" + ] + }, + "description": "List of types to be anonymized", + "default": [ + "all_and_credentials" + ], + "type": "array", + "required": true + } + }, + { + "recover_redacted": { + "description": "Whether to recover redacted data", + "default": true, + "type": "boolean" + } + }, + { + "redact_type": { + "description": "What value to be used to redacted to", + "default": "placeholder", + "type": "string", + "one_of": [ + "placeholder", + "synthetic" + ] + } + }, + { + "custom_patterns": { + "type": "array", + "len_min": 1, + "description": "List of custom patterns to be used for anonymization", + "elements": { + "type": "record", + "fields": [ + { + "name": { + "required": true, + "type": "string" + } + }, + { + "regex": { + "required": true, + "type": "string" + } + }, + { + "score": { + "between": [ + 0, + 1 + ], + "type": "number", + "default": 0.5, + "required": true + } + } + ] + }, + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-sanitizer/3.11.x.json b/schemas/ai-sanitizer/3.11.x.json new file mode 100644 index 00000000..ceddc95b --- /dev/null +++ b/schemas/ai-sanitizer/3.11.x.json @@ -0,0 +1,177 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "host": { + "default": "localhost", + "required": true, + "description": "The host of the sanitizer", + "type": "string" + } + }, + { + "port": { + "default": 8080, + "required": true, + "description": "The port of the sanitizer", + "type": "number" + } + }, + { + "scheme": { + "default": "http", + "required": true, + "description": "The protocol can be http and https", + "type": "string" + } + }, + { + "timeout": { + "default": 10000, + "description": "Connection timeout with the sanitizer", + "type": "number" + } + }, + { + "keepalive_timeout": { + "default": 60000, + "description": "The keepalive timeout for the established http connnection", + "type": "number" + } + }, + { + "stop_on_error": { + "default": true, + "description": "Stop processing if an error occurs", + "type": "boolean" + } + }, + { + "anonymize": { + "required": true, + "description": "List of types to be anonymized", + "type": "array", + "default": [ + "all_and_credentials" + ], + "elements": { + "one_of": [ + "general", + "phone", + "email", + "creditcard", + "crypto", + "date", + "ssn", + "ip", + "nrp", + "domain", + "credentials", + "url", + "medical", + "driverlicense", + "passport", + "bank", + "nationalid", + "custom", + "all", + "all_and_credentials" + ], + "type": "string" + } + } + }, + { + "recover_redacted": { + "default": true, + "description": "Whether to recover redacted data", + "type": "boolean" + } + }, + { + "redact_type": { + "one_of": [ + "placeholder", + "synthetic" + ], + "default": "placeholder", + "description": "What value to be used to redacted to", + "type": "string" + } + }, + { + "custom_patterns": { + "required": false, + "description": "List of custom patterns to be used for anonymization", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "name": { + "type": "string", + "required": true + } + }, + { + "regex": { + "type": "string", + "required": true + } + }, + { + "score": { + "between": [ + 0, + 1 + ], + "required": true, + "default": 0.5, + "type": "number" + } + } + ], + "type": "record" + } + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-sanitizer/3.12.x.json b/schemas/ai-sanitizer/3.12.x.json new file mode 100644 index 00000000..1103631b --- /dev/null +++ b/schemas/ai-sanitizer/3.12.x.json @@ -0,0 +1,184 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "localhost", + "description": "The host of the sanitizer", + "required": true + } + }, + { + "port": { + "type": "number", + "default": 8080, + "description": "The port of the sanitizer", + "required": true + } + }, + { + "scheme": { + "type": "string", + "default": "http", + "description": "The protocol can be http and https", + "required": true + } + }, + { + "timeout": { + "type": "number", + "default": 10000, + "description": "Connection timeout with the sanitizer" + } + }, + { + "keepalive_timeout": { + "type": "number", + "default": 60000, + "description": "The keepalive timeout for the established http connnection" + } + }, + { + "stop_on_error": { + "type": "boolean", + "default": true, + "description": "Stop processing if an error occurs" + } + }, + { + "anonymize": { + "type": "array", + "required": true, + "description": "List of types to be anonymized", + "default": [ + "all_and_credentials" + ], + "elements": { + "type": "string", + "one_of": [ + "general", + "phone", + "email", + "creditcard", + "crypto", + "date", + "ssn", + "ip", + "nrp", + "domain", + "credentials", + "url", + "medical", + "driverlicense", + "passport", + "bank", + "nationalid", + "custom", + "all", + "all_and_credentials" + ] + } + } + }, + { + "recover_redacted": { + "type": "boolean", + "default": true, + "description": "Whether to recover redacted data" + } + }, + { + "block_if_detected": { + "type": "boolean", + "default": false, + "description": "Whether to block requests containing PII data" + } + }, + { + "redact_type": { + "type": "string", + "default": "placeholder", + "one_of": [ + "placeholder", + "synthetic" + ], + "description": "What value to be used to redacted to" + } + }, + { + "custom_patterns": { + "type": "array", + "len_min": 1, + "required": false, + "description": "List of custom patterns to be used for anonymization", + "elements": { + "type": "record", + "fields": [ + { + "name": { + "type": "string", + "required": true + } + }, + { + "regex": { + "type": "string", + "required": true + } + }, + { + "score": { + "type": "number", + "default": 0.5, + "between": [ + 0, + 1 + ], + "required": true + } + } + ] + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-semantic-cache/3.10.x.json b/schemas/ai-semantic-cache/3.10.x.json new file mode 100644 index 00000000..78e934df --- /dev/null +++ b/schemas/ai-semantic-cache/3.10.x.json @@ -0,0 +1,980 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "message_countback": { + "description": "Number of messages in the chat history to Vectorize/Cache", + "type": "number", + "default": 1, + "between": [ + 1, + 1000 + ] + } + }, + { + "ignore_system_prompts": { + "description": "Ignore and discard any system prompts when Vectorizing the request", + "type": "boolean", + "default": false + } + }, + { + "ignore_assistant_prompts": { + "description": "Ignore and discard any assistant prompts when Vectorizing the request", + "type": "boolean", + "default": false + } + }, + { + "ignore_tool_prompts": { + "description": "Ignore and discard any tool prompts when Vectorizing the request", + "type": "boolean", + "default": false + } + }, + { + "stop_on_failure": { + "description": "Halt the LLM request process in case of a caching system failure", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "cache_ttl": { + "gt": 0, + "type": "integer", + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "default": 300 + } + }, + { + "cache_control": { + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "exact_caching": { + "description": "When enabled, a first check for exact query will be done. It will impact DB size", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "llm_format": { + "type": "string", + "description": "LLM input and output format and schema to use", + "one_of": [ + "openai", + "bedrock", + "gemini" + ], + "default": "openai", + "required": false + } + }, + { + "embeddings": { + "entity_checks": [ + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.deployment_id" + ] + } + } + ], + "type": "record", + "required": true, + "fields": [ + { + "auth": { + "type": "record", + "required": false, + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "header_value": { + "type": "string", + "referenceable": true, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "encrypted": true, + "required": false + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "param_value": { + "type": "string", + "referenceable": true, + "description": "Specify the full parameter value for 'param_name'.", + "encrypted": true, + "required": false + } + }, + { + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string", + "one_of": [ + "query", + "body" + ], + "required": false + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "azure_client_secret": { + "type": "string", + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "encrypted": true, + "required": false + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "gcp_service_account_json": { + "type": "string", + "referenceable": true, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "encrypted": true, + "required": false + } + }, + { + "aws_access_key_id": { + "type": "string", + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "encrypted": true, + "required": false + } + }, + { + "aws_secret_access_key": { + "type": "string", + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "encrypted": true, + "required": false + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean", + "default": false, + "required": false + } + } + ] + } + }, + { + "model": { + "type": "record", + "required": true, + "fields": [ + { + "provider": { + "description": "AI provider format to use for embeddings API", + "type": "string", + "one_of": [ + "openai", + "mistral", + "huggingface", + "azure", + "bedrock", + "gemini" + ], + "required": true + } + }, + { + "name": { + "description": "Model name to execute.", + "type": "string", + "required": true + } + }, + { + "options": { + "description": "Key/value settings for the model", + "type": "record", + "required": false, + "fields": [ + { + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string", + "required": false + } + }, + { + "azure": { + "type": "record", + "fields": [ + { + "instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string", + "required": false + } + }, + { + "api_version": { + "description": "'api-version' for Azure OpenAI instances.", + "type": "string", + "default": "2023-05-15", + "required": false + } + }, + { + "deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string", + "required": false + } + } + ], + "required": true + } + }, + { + "bedrock": { + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "type": "record", + "required": false, + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + }, + { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string", + "required": false + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + } + ] + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "type": "record", + "required": false, + "fields": [ + { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string", + "required": false + } + }, + { + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string", + "required": false + } + }, + { + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string", + "required": false + } + } + ] + } + }, + { + "huggingface": { + "type": "record", + "required": false, + "fields": [ + { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean", + "required": false + } + }, + { + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean", + "required": false + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "vectordb": { + "type": "record", + "required": true, + "fields": [ + { + "strategy": { + "description": "which vector database driver to use", + "type": "string", + "one_of": [ + "redis", + "pgvector" + ], + "required": true + } + }, + { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer", + "required": true + } + }, + { + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number", + "required": true + } + }, + { + "distance_metric": { + "description": "the distance metric to use for vector searches", + "type": "string", + "one_of": [ + "cosine", + "euclidean" + ], + "required": true + } + }, + { + "redis": { + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "default": 256, + "type": "integer", + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "default": false, + "type": "boolean", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + } + ], + "required": true + } + }, + { + "pgvector": { + "type": "record", + "fields": [ + { + "host": { + "description": "the host of the pgvector database", + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "the port of the pgvector database", + "type": "integer", + "default": 5432 + } + }, + { + "user": { + "description": "the user of the pgvector database", + "type": "string", + "default": "postgres", + "referenceable": true + } + }, + { + "password": { + "description": "the password of the pgvector database", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "database": { + "description": "the database of the pgvector database", + "type": "string", + "default": "kong-pgvector" + } + }, + { + "timeout": { + "description": "the timeout of the pgvector database", + "type": "number", + "default": 5000 + } + }, + { + "ssl": { + "description": "whether to use ssl for the pgvector database", + "type": "boolean", + "default": false + } + }, + { + "ssl_required": { + "description": "whether ssl is required for the pgvector database", + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "description": "whether to verify ssl for the pgvector database", + "type": "boolean", + "default": false + } + }, + { + "ssl_version": { + "description": "the ssl version to use for the pgvector database", + "type": "string", + "default": "tlsv1_2", + "one_of": [ + "tlsv1_2", + "tlsv1_3", + "any" + ] + } + }, + { + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + } + }, + { + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + } + } + ], + "required": true + } + } + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-semantic-cache/3.11.x.json b/schemas/ai-semantic-cache/3.11.x.json new file mode 100644 index 00000000..5e27cec1 --- /dev/null +++ b/schemas/ai-semantic-cache/3.11.x.json @@ -0,0 +1,996 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "message_countback": { + "default": 1, + "between": [ + 1, + 1000 + ], + "description": "Number of messages in the chat history to Vectorize/Cache", + "type": "number" + } + }, + { + "ignore_system_prompts": { + "default": false, + "description": "Ignore and discard any system prompts when Vectorizing the request", + "type": "boolean" + } + }, + { + "ignore_assistant_prompts": { + "default": false, + "description": "Ignore and discard any assistant prompts when Vectorizing the request", + "type": "boolean" + } + }, + { + "ignore_tool_prompts": { + "default": false, + "description": "Ignore and discard any tool prompts when Vectorizing the request", + "type": "boolean" + } + }, + { + "stop_on_failure": { + "default": false, + "required": true, + "description": "Halt the LLM request process in case of a caching system failure", + "type": "boolean" + } + }, + { + "cache_ttl": { + "default": 300, + "gt": 0, + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "type": "integer" + } + }, + { + "cache_control": { + "default": false, + "required": true, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + } + }, + { + "exact_caching": { + "default": false, + "required": true, + "description": "When enabled, a first check for exact query will be done. It will impact DB size", + "type": "boolean" + } + }, + { + "llm_format": { + "required": false, + "description": "LLM input and output format and schema to use", + "one_of": [ + "openai", + "bedrock", + "gemini", + "cohere", + "huggingface" + ], + "default": "openai", + "type": "string" + } + }, + { + "embeddings": { + "entity_checks": [ + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.deployment_id" + ] + } + } + ], + "required": true, + "fields": [ + { + "auth": { + "required": false, + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "header_value": { + "required": false, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "param_value": { + "required": false, + "description": "Specify the full parameter value for 'param_name'.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "param_location": { + "one_of": [ + "query", + "body" + ], + "required": false, + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string" + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "azure_client_secret": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "gcp_service_account_json": { + "required": false, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "aws_access_key_id": { + "required": false, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "aws_secret_access_key": { + "required": false, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false, + "default": false, + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "model": { + "required": true, + "fields": [ + { + "provider": { + "one_of": [ + "openai", + "mistral", + "huggingface", + "azure", + "bedrock", + "gemini" + ], + "required": true, + "description": "AI provider format to use for embeddings API", + "type": "string" + } + }, + { + "name": { + "required": true, + "description": "Model name to execute.", + "type": "string" + } + }, + { + "options": { + "description": "Key/value settings for the model", + "required": false, + "fields": [ + { + "upstream_url": { + "required": false, + "description": "upstream url for the embeddings", + "type": "string" + } + }, + { + "azure": { + "required": true, + "fields": [ + { + "instance": { + "required": false, + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + { + "api_version": { + "description": "'api-version' for Azure OpenAI instances.", + "required": false, + "default": "2023-05-15", + "type": "string" + } + }, + { + "deployment_id": { + "required": false, + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "bedrock": { + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "required": false, + "fields": [ + { + "aws_region": { + "required": false, + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + } + }, + { + "aws_assume_role_arn": { + "required": false, + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + { + "embeddings_normalize": { + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "default": false, + "type": "boolean" + } + }, + { + "performance_config_latency": { + "required": false, + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "required": false, + "fields": [ + { + "api_endpoint": { + "required": false, + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + } + }, + { + "project_id": { + "required": false, + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + { + "location_id": { + "required": false, + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "huggingface": { + "required": false, + "fields": [ + { + "use_cache": { + "required": false, + "description": "Use the cache layer on the inference API", + "type": "boolean" + } + }, + { + "wait_for_model": { + "required": false, + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "vectordb": { + "required": true, + "fields": [ + { + "strategy": { + "one_of": [ + "redis", + "pgvector" + ], + "required": true, + "description": "which vector database driver to use", + "type": "string" + } + }, + { + "dimensions": { + "required": true, + "description": "the desired dimensionality for the vectors", + "type": "integer" + } + }, + { + "threshold": { + "required": true, + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number" + } + }, + { + "distance_metric": { + "one_of": [ + "cosine", + "euclidean" + ], + "required": true, + "description": "the distance metric to use for vector searches", + "type": "string" + } + }, + { + "redis": { + "required": true, + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "cluster_nodes": { + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "default": 5, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "default": false, + "type": "boolean" + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "pgvector": { + "required": true, + "fields": [ + { + "host": { + "description": "the host of the pgvector database", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "description": "the port of the pgvector database", + "default": 5432, + "type": "integer" + } + }, + { + "user": { + "default": "postgres", + "description": "the user of the pgvector database", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "type": "string", + "description": "the password of the pgvector database", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "the database of the pgvector database", + "default": "kong-pgvector", + "type": "string" + } + }, + { + "timeout": { + "description": "the timeout of the pgvector database", + "default": 5000, + "type": "number" + } + }, + { + "ssl": { + "description": "whether to use ssl for the pgvector database", + "default": false, + "type": "boolean" + } + }, + { + "ssl_required": { + "description": "whether ssl is required for the pgvector database", + "default": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "whether to verify ssl for the pgvector database", + "default": false, + "type": "boolean" + } + }, + { + "ssl_version": { + "one_of": [ + "tlsv1_2", + "tlsv1_3", + "any" + ], + "description": "the ssl version to use for the pgvector database", + "default": "tlsv1_2", + "type": "string" + } + }, + { + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + } + }, + { + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/ai-semantic-cache/3.12.x.json b/schemas/ai-semantic-cache/3.12.x.json new file mode 100644 index 00000000..91bd03be --- /dev/null +++ b/schemas/ai-semantic-cache/3.12.x.json @@ -0,0 +1,994 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "message_countback": { + "type": "number", + "default": 1, + "between": [ + 1, + 1000 + ], + "description": "Number of messages in the chat history to Vectorize/Cache" + } + }, + { + "ignore_system_prompts": { + "type": "boolean", + "default": false, + "description": "Ignore and discard any system prompts when Vectorizing the request" + } + }, + { + "ignore_assistant_prompts": { + "type": "boolean", + "default": false, + "description": "Ignore and discard any assistant prompts when Vectorizing the request" + } + }, + { + "ignore_tool_prompts": { + "type": "boolean", + "default": false, + "description": "Ignore and discard any tool prompts when Vectorizing the request" + } + }, + { + "stop_on_failure": { + "type": "boolean", + "default": false, + "description": "Halt the LLM request process in case of a caching system failure", + "required": true + } + }, + { + "cache_ttl": { + "type": "integer", + "default": 300, + "gt": 0, + "description": "TTL in seconds of cache entities. Must be a value greater than 0." + } + }, + { + "cache_control": { + "type": "boolean", + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "required": true + } + }, + { + "exact_caching": { + "type": "boolean", + "default": false, + "description": "When enabled, a first check for exact query will be done. It will impact DB size", + "required": true + } + }, + { + "llm_format": { + "type": "string", + "required": false, + "description": "LLM input and output format and schema to use", + "default": "openai", + "one_of": [ + "openai", + "bedrock", + "gemini", + "cohere", + "huggingface" + ] + } + }, + { + "embeddings": { + "type": "record", + "fields": [ + { + "auth": { + "type": "record", + "fields": [ + { + "header_name": { + "type": "string", + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "referenceable": true, + "required": false + } + }, + { + "header_value": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'." + } + }, + { + "param_name": { + "type": "string", + "description": "If AI model requires authentication via query parameter, specify its name here.", + "referenceable": true, + "required": false + } + }, + { + "param_value": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Specify the full parameter value for 'param_name'." + } + }, + { + "param_location": { + "type": "string", + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "one_of": [ + "query", + "body" + ], + "required": false + } + }, + { + "azure_use_managed_identity": { + "type": "boolean", + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false + } + }, + { + "azure_client_id": { + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "referenceable": true, + "required": false + } + }, + { + "azure_client_secret": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret." + } + }, + { + "azure_tenant_id": { + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "referenceable": true, + "required": false + } + }, + { + "gcp_use_service_account": { + "type": "boolean", + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "required": false + } + }, + { + "gcp_service_account_json": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`." + } + }, + { + "aws_access_key_id": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance." + } + }, + { + "aws_secret_access_key": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance." + } + }, + { + "allow_override": { + "type": "boolean", + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false + } + } + ], + "required": false + } + }, + { + "model": { + "type": "record", + "fields": [ + { + "provider": { + "type": "string", + "description": "AI provider format to use for embeddings API", + "one_of": [ + "openai", + "mistral", + "huggingface", + "azure", + "bedrock", + "gemini" + ], + "required": true + } + }, + { + "name": { + "type": "string", + "description": "Model name to execute.", + "required": true + } + }, + { + "options": { + "description": "Key/value settings for the model", + "fields": [ + { + "upstream_url": { + "type": "string", + "description": "upstream url for the embeddings", + "required": false + } + }, + { + "azure": { + "type": "record", + "fields": [ + { + "instance": { + "type": "string", + "description": "Instance name for Azure OpenAI hosted models.", + "required": false + } + }, + { + "api_version": { + "type": "string", + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "required": false + } + }, + { + "deployment_id": { + "type": "string", + "description": "Deployment ID for Azure OpenAI instances.", + "required": false + } + } + ], + "required": true + } + }, + { + "bedrock": { + "type": "record", + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + }, + { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string", + "required": false + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + { + "embeddings_normalize": { + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "default": false, + "type": "boolean" + } + }, + { + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "required": false + } + }, + { + "gemini": { + "type": "record", + "fields": [ + { + "api_endpoint": { + "type": "string", + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "required": false + } + }, + { + "project_id": { + "type": "string", + "description": "If running Gemini on Vertex, specify the project ID.", + "required": false + } + }, + { + "location_id": { + "type": "string", + "description": "If running Gemini on Vertex, specify the location ID.", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "required": false + } + }, + { + "huggingface": { + "type": "record", + "fields": [ + { + "use_cache": { + "type": "boolean", + "description": "Use the cache layer on the inference API", + "required": false + } + }, + { + "wait_for_model": { + "type": "boolean", + "description": "Wait for the model if it is not ready", + "required": false + } + } + ], + "required": false + } + } + ], + "type": "record", + "required": false + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure.instance" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure.api_version" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure.deployment_id" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + } + ], + "required": true + } + }, + { + "vectordb": { + "type": "record", + "fields": [ + { + "strategy": { + "type": "string", + "description": "which vector database driver to use", + "one_of": [ + "redis", + "pgvector" + ], + "required": true + } + }, + { + "dimensions": { + "type": "integer", + "description": "the desired dimensionality for the vectors", + "required": true + } + }, + { + "threshold": { + "type": "number", + "description": "the default similarity threshold for accepting semantic search results (float)", + "required": true + } + }, + { + "distance_metric": { + "type": "string", + "description": "the distance metric to use for vector searches", + "one_of": [ + "cosine", + "euclidean" + ], + "required": true + } + }, + { + "redis": { + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "database", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + } + ], + "required": true, + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "type": "string", + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "type": "integer", + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy" + } + }, + { + "keepalive_pool_size": { + "type": "integer", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low." + } + }, + { + "keepalive_backlog": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "type": "boolean", + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "cluster_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + } + ] + } + }, + { + "pgvector": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "the host of the pgvector database" + } + }, + { + "port": { + "type": "integer", + "default": 5432, + "description": "the port of the pgvector database" + } + }, + { + "user": { + "type": "string", + "default": "postgres", + "referenceable": true, + "description": "the user of the pgvector database" + } + }, + { + "password": { + "type": "string", + "description": "the password of the pgvector database", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "type": "string", + "default": "kong-pgvector", + "description": "the database of the pgvector database" + } + }, + { + "timeout": { + "type": "number", + "default": 5000, + "description": "the timeout of the pgvector database" + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "whether to use ssl for the pgvector database" + } + }, + { + "ssl_required": { + "type": "boolean", + "default": false, + "description": "whether ssl is required for the pgvector database" + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "whether to verify ssl for the pgvector database" + } + }, + { + "ssl_version": { + "type": "string", + "default": "tlsv1_2", + "one_of": [ + "tlsv1_2", + "tlsv1_3", + "any" + ], + "description": "the ssl version to use for the pgvector database" + } + }, + { + "ssl_cert": { + "type": "string", + "description": "the path of ssl cert to use for the pgvector database" + } + }, + { + "ssl_cert_key": { + "type": "string", + "description": "the path of ssl cert key to use for the pgvector database" + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-semantic-cache/3.8.x.json b/schemas/ai-semantic-cache/3.8.x.json new file mode 100644 index 00000000..92f99f8a --- /dev/null +++ b/schemas/ai-semantic-cache/3.8.x.json @@ -0,0 +1,732 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "message_countback": { + "description": "Number of messages in the chat history to Vectorize/Cache", + "type": "number", + "between": [ + 1, + 1000 + ], + "default": 1 + } + }, + { + "ignore_system_prompts": { + "description": "Ignore and discard any system prompts when Vectorizing the request", + "type": "boolean", + "default": false + } + }, + { + "ignore_assistant_prompts": { + "description": "Ignore and discard any assistant prompts when Vectorizing the request", + "type": "boolean", + "default": false + } + }, + { + "stop_on_failure": { + "description": "Halt the LLM request process in case of a caching system failure", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "cache_ttl": { + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "type": "integer", + "gt": 0, + "default": 300 + } + }, + { + "cache_control": { + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "exact_caching": { + "description": "When enabled, a first check for exact query will be done. It will impact DB size", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "embeddings": { + "fields": [ + { + "auth": { + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "param_value": { + "description": "Specify the full parameter value for 'param_name'.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string", + "required": false, + "one_of": [ + "query", + "body" + ] + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean", + "required": false, + "default": false + } + } + ], + "required": false, + "type": "record" + } + }, + { + "model": { + "fields": [ + { + "provider": { + "description": "AI provider format to use for embeddings API", + "type": "string", + "required": true, + "one_of": [ + "openai", + "mistral" + ] + } + }, + { + "name": { + "description": "Model name to execute.", + "type": "string", + "required": true, + "one_of": [ + "text-embedding-3-large", + "text-embedding-3-small", + "mistral-embed" + ] + } + }, + { + "options": { + "description": "Key/value settings for the model", + "type": "record", + "required": false, + "fields": [ + { + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string", + "required": false + } + } + ] + } + } + ], + "required": true, + "type": "record" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "vectordb": { + "fields": [ + { + "strategy": { + "description": "which vector database driver to use", + "type": "string", + "required": true, + "one_of": [ + "redis" + ] + } + }, + { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer", + "required": true + } + }, + { + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number", + "required": true + } + }, + { + "distance_metric": { + "description": "the distance metric to use for vector searches", + "type": "string", + "required": true, + "one_of": [ + "cosine", + "euclidean" + ] + } + }, + { + "redis": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer", + "between": [ + 1, + 2147483646 + ], + "default": 256 + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer", + "default": 5 + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean", + "default": false + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_nodes" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_nodes" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_field": "connection_is_proxied", + "if_match": { + "eq": true + }, + "then_field": "host", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "translate_backwards": [ + "connect_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + } + ], + "required": true, + "type": "record" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/ai-semantic-cache/3.9.x.json b/schemas/ai-semantic-cache/3.9.x.json new file mode 100644 index 00000000..afa47df0 --- /dev/null +++ b/schemas/ai-semantic-cache/3.9.x.json @@ -0,0 +1,689 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "message_countback": { + "default": 1, + "description": "Number of messages in the chat history to Vectorize/Cache", + "between": [ + 1, + 1000 + ], + "type": "number" + } + }, + { + "ignore_system_prompts": { + "default": false, + "description": "Ignore and discard any system prompts when Vectorizing the request", + "type": "boolean" + } + }, + { + "ignore_assistant_prompts": { + "default": false, + "description": "Ignore and discard any assistant prompts when Vectorizing the request", + "type": "boolean" + } + }, + { + "ignore_tool_prompts": { + "default": false, + "description": "Ignore and discard any tool prompts when Vectorizing the request", + "type": "boolean" + } + }, + { + "stop_on_failure": { + "default": false, + "description": "Halt the LLM request process in case of a caching system failure", + "required": true, + "type": "boolean" + } + }, + { + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "gt": 0, + "type": "integer" + } + }, + { + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "required": true, + "type": "boolean" + } + }, + { + "exact_caching": { + "default": false, + "description": "When enabled, a first check for exact query will be done. It will impact DB size", + "required": true, + "type": "boolean" + } + }, + { + "embeddings": { + "type": "record", + "required": true, + "fields": [ + { + "auth": { + "type": "record", + "required": false, + "fields": [ + { + "header_name": { + "required": false, + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "referenceable": true, + "type": "string" + } + }, + { + "header_value": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "referenceable": true + } + }, + { + "param_name": { + "required": false, + "description": "If AI model requires authentication via query parameter, specify its name here.", + "referenceable": true, + "type": "string" + } + }, + { + "param_value": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Specify the full parameter value for 'param_name'.", + "referenceable": true + } + }, + { + "param_location": { + "type": "string", + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "required": false, + "one_of": [ + "query", + "body" + ] + } + }, + { + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false, + "type": "boolean" + } + }, + { + "azure_client_id": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "referenceable": true, + "type": "string" + } + }, + { + "azure_client_secret": { + "encrypted": true, + "required": false, + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "referenceable": true + } + }, + { + "azure_tenant_id": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "referenceable": true, + "type": "string" + } + }, + { + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "required": false, + "type": "boolean" + } + }, + { + "gcp_service_account_json": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "referenceable": true + } + }, + { + "aws_access_key_id": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "referenceable": true + } + }, + { + "aws_secret_access_key": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "referenceable": true + } + }, + { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false, + "type": "boolean" + } + } + ] + } + }, + { + "model": { + "type": "record", + "required": true, + "fields": [ + { + "provider": { + "type": "string", + "description": "AI provider format to use for embeddings API", + "required": true, + "one_of": [ + "openai", + "mistral" + ] + } + }, + { + "name": { + "description": "Model name to execute.", + "required": true, + "type": "string" + } + }, + { + "options": { + "type": "record", + "description": "Key/value settings for the model", + "required": false, + "fields": [ + { + "upstream_url": { + "description": "upstream url for the embeddings", + "required": false, + "type": "string" + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "vectordb": { + "type": "record", + "required": true, + "fields": [ + { + "strategy": { + "type": "string", + "description": "which vector database driver to use", + "required": true, + "one_of": [ + "redis" + ] + } + }, + { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "required": true, + "type": "integer" + } + }, + { + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "required": true, + "type": "number" + } + }, + { + "distance_metric": { + "type": "string", + "description": "the distance metric to use for vector searches", + "required": true, + "one_of": [ + "cosine", + "euclidean" + ] + } + }, + { + "redis": { + "required": true, + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ] + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ] + }, + "type": "array" + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ] + }, + "type": "array" + } + } + ], + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "type": "string", + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean" + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean" + } + } + ] + } + } + ] + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-semantic-prompt-guard/3.10.x.json b/schemas/ai-semantic-prompt-guard/3.10.x.json new file mode 100644 index 00000000..ed873086 --- /dev/null +++ b/schemas/ai-semantic-prompt-guard/3.10.x.json @@ -0,0 +1,995 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.rules.allow_prompts", + "config.rules.deny_prompts" + ] + } + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "embeddings": { + "entity_checks": [ + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.deployment_id" + ] + } + } + ], + "type": "record", + "required": true, + "fields": [ + { + "auth": { + "type": "record", + "required": false, + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "header_value": { + "type": "string", + "referenceable": true, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "encrypted": true, + "required": false + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "param_value": { + "type": "string", + "referenceable": true, + "description": "Specify the full parameter value for 'param_name'.", + "encrypted": true, + "required": false + } + }, + { + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string", + "one_of": [ + "query", + "body" + ], + "required": false + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "azure_client_secret": { + "type": "string", + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "encrypted": true, + "required": false + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "gcp_service_account_json": { + "type": "string", + "referenceable": true, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "encrypted": true, + "required": false + } + }, + { + "aws_access_key_id": { + "type": "string", + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "encrypted": true, + "required": false + } + }, + { + "aws_secret_access_key": { + "type": "string", + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "encrypted": true, + "required": false + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean", + "default": false, + "required": false + } + } + ] + } + }, + { + "model": { + "type": "record", + "required": true, + "fields": [ + { + "provider": { + "description": "AI provider format to use for embeddings API", + "type": "string", + "one_of": [ + "openai", + "mistral", + "huggingface", + "azure", + "bedrock", + "gemini" + ], + "required": true + } + }, + { + "name": { + "description": "Model name to execute.", + "type": "string", + "required": true + } + }, + { + "options": { + "description": "Key/value settings for the model", + "type": "record", + "required": false, + "fields": [ + { + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string", + "required": false + } + }, + { + "azure": { + "type": "record", + "fields": [ + { + "instance": { + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string", + "required": false + } + }, + { + "api_version": { + "description": "'api-version' for Azure OpenAI instances.", + "type": "string", + "default": "2023-05-15", + "required": false + } + }, + { + "deployment_id": { + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string", + "required": false + } + } + ], + "required": true + } + }, + { + "bedrock": { + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "type": "record", + "required": false, + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + }, + { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string", + "required": false + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + } + ] + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "type": "record", + "required": false, + "fields": [ + { + "api_endpoint": { + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string", + "required": false + } + }, + { + "project_id": { + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string", + "required": false + } + }, + { + "location_id": { + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string", + "required": false + } + } + ] + } + }, + { + "huggingface": { + "type": "record", + "required": false, + "fields": [ + { + "use_cache": { + "description": "Use the cache layer on the inference API", + "type": "boolean", + "required": false + } + }, + { + "wait_for_model": { + "description": "Wait for the model if it is not ready", + "type": "boolean", + "required": false + } + } + ] + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "vectordb": { + "type": "record", + "required": true, + "fields": [ + { + "strategy": { + "description": "which vector database driver to use", + "type": "string", + "one_of": [ + "redis", + "pgvector" + ], + "required": true + } + }, + { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer", + "required": true + } + }, + { + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number", + "required": true + } + }, + { + "distance_metric": { + "description": "the distance metric to use for vector searches", + "type": "string", + "one_of": [ + "cosine", + "euclidean" + ], + "required": true + } + }, + { + "redis": { + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "default": 256, + "type": "integer", + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "default": false, + "type": "boolean", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + } + ], + "required": true + } + }, + { + "pgvector": { + "type": "record", + "fields": [ + { + "host": { + "description": "the host of the pgvector database", + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "the port of the pgvector database", + "type": "integer", + "default": 5432 + } + }, + { + "user": { + "description": "the user of the pgvector database", + "type": "string", + "default": "postgres", + "referenceable": true + } + }, + { + "password": { + "description": "the password of the pgvector database", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "database": { + "description": "the database of the pgvector database", + "type": "string", + "default": "kong-pgvector" + } + }, + { + "timeout": { + "description": "the timeout of the pgvector database", + "type": "number", + "default": 5000 + } + }, + { + "ssl": { + "description": "whether to use ssl for the pgvector database", + "type": "boolean", + "default": false + } + }, + { + "ssl_required": { + "description": "whether ssl is required for the pgvector database", + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "description": "whether to verify ssl for the pgvector database", + "type": "boolean", + "default": false + } + }, + { + "ssl_version": { + "description": "the ssl version to use for the pgvector database", + "type": "string", + "default": "tlsv1_2", + "one_of": [ + "tlsv1_2", + "tlsv1_3", + "any" + ] + } + }, + { + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + } + }, + { + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + } + } + ], + "required": true + } + } + ] + } + }, + { + "search": { + "type": "record", + "required": false, + "fields": [ + { + "threshold": { + "description": "Threshold for the similarity score to be considered a match.", + "default": 0.5, + "type": "number", + "required": false + } + } + ] + } + }, + { + "rules": { + "type": "record", + "required": true, + "fields": [ + { + "match_all_conversation_history": { + "description": "If false, will ignore all previous chat prompts from the conversation history.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "allow_prompts": { + "type": "array", + "description": "List of prompts to allow.", + "len_max": 100, + "elements": { + "len_max": 500, + "type": "string", + "len_min": 1 + }, + "required": false + } + }, + { + "deny_prompts": { + "type": "array", + "description": "List of prompts to deny.", + "len_max": 100, + "elements": { + "len_max": 500, + "type": "string", + "len_min": 1 + }, + "required": false + } + }, + { + "max_request_body_size": { + "description": "max allowed body size allowed to be introspected", + "type": "integer", + "default": 8192, + "gt": 0 + } + }, + { + "match_all_roles": { + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "type": "boolean", + "default": false, + "required": true + } + } + ] + } + }, + { + "llm_format": { + "type": "string", + "description": "LLM input and output format and schema to use", + "one_of": [ + "openai", + "bedrock", + "gemini" + ], + "default": "openai", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-semantic-prompt-guard/3.11.x.json b/schemas/ai-semantic-prompt-guard/3.11.x.json new file mode 100644 index 00000000..fd7fb878 --- /dev/null +++ b/schemas/ai-semantic-prompt-guard/3.11.x.json @@ -0,0 +1,1028 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "embeddings": { + "entity_checks": [ + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.instance" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.api_version" + ] + } + }, + { + "conditional_at_least_one_of": { + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider", + "then_at_least_one_of": [ + "model.options.azure.deployment_id" + ] + } + } + ], + "required": true, + "fields": [ + { + "auth": { + "required": false, + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "header_value": { + "required": false, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "param_value": { + "required": false, + "description": "Specify the full parameter value for 'param_name'.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "param_location": { + "one_of": [ + "query", + "body" + ], + "required": false, + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string" + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "azure_client_secret": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "gcp_service_account_json": { + "required": false, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "aws_access_key_id": { + "required": false, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "aws_secret_access_key": { + "required": false, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false, + "default": false, + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "model": { + "required": true, + "fields": [ + { + "provider": { + "one_of": [ + "openai", + "mistral", + "huggingface", + "azure", + "bedrock", + "gemini" + ], + "required": true, + "description": "AI provider format to use for embeddings API", + "type": "string" + } + }, + { + "name": { + "required": true, + "description": "Model name to execute.", + "type": "string" + } + }, + { + "options": { + "description": "Key/value settings for the model", + "required": false, + "fields": [ + { + "upstream_url": { + "required": false, + "description": "upstream url for the embeddings", + "type": "string" + } + }, + { + "azure": { + "required": true, + "fields": [ + { + "instance": { + "required": false, + "description": "Instance name for Azure OpenAI hosted models.", + "type": "string" + } + }, + { + "api_version": { + "description": "'api-version' for Azure OpenAI instances.", + "required": false, + "default": "2023-05-15", + "type": "string" + } + }, + { + "deployment_id": { + "required": false, + "description": "Deployment ID for Azure OpenAI instances.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "bedrock": { + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "required": false, + "fields": [ + { + "aws_region": { + "required": false, + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string" + } + }, + { + "aws_assume_role_arn": { + "required": false, + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string" + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + { + "embeddings_normalize": { + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "default": false, + "type": "boolean" + } + }, + { + "performance_config_latency": { + "required": false, + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "gemini": { + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "required": false, + "fields": [ + { + "api_endpoint": { + "required": false, + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "type": "string" + } + }, + { + "project_id": { + "required": false, + "description": "If running Gemini on Vertex, specify the project ID.", + "type": "string" + } + }, + { + "location_id": { + "required": false, + "description": "If running Gemini on Vertex, specify the location ID.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "huggingface": { + "required": false, + "fields": [ + { + "use_cache": { + "required": false, + "description": "Use the cache layer on the inference API", + "type": "boolean" + } + }, + { + "wait_for_model": { + "required": false, + "description": "Wait for the model if it is not ready", + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "vectordb": { + "required": true, + "fields": [ + { + "strategy": { + "one_of": [ + "redis", + "pgvector" + ], + "required": true, + "description": "which vector database driver to use", + "type": "string" + } + }, + { + "dimensions": { + "required": true, + "description": "the desired dimensionality for the vectors", + "type": "integer" + } + }, + { + "threshold": { + "required": true, + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number" + } + }, + { + "distance_metric": { + "one_of": [ + "cosine", + "euclidean" + ], + "required": true, + "description": "the distance metric to use for vector searches", + "type": "string" + } + }, + { + "redis": { + "required": true, + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "cluster_nodes": { + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "default": 5, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "default": false, + "type": "boolean" + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "pgvector": { + "required": true, + "fields": [ + { + "host": { + "description": "the host of the pgvector database", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "description": "the port of the pgvector database", + "default": 5432, + "type": "integer" + } + }, + { + "user": { + "default": "postgres", + "description": "the user of the pgvector database", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "type": "string", + "description": "the password of the pgvector database", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "the database of the pgvector database", + "default": "kong-pgvector", + "type": "string" + } + }, + { + "timeout": { + "description": "the timeout of the pgvector database", + "default": 5000, + "type": "number" + } + }, + { + "ssl": { + "description": "whether to use ssl for the pgvector database", + "default": false, + "type": "boolean" + } + }, + { + "ssl_required": { + "description": "whether ssl is required for the pgvector database", + "default": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "whether to verify ssl for the pgvector database", + "default": false, + "type": "boolean" + } + }, + { + "ssl_version": { + "one_of": [ + "tlsv1_2", + "tlsv1_3", + "any" + ], + "description": "the ssl version to use for the pgvector database", + "default": "tlsv1_2", + "type": "string" + } + }, + { + "ssl_cert": { + "description": "the path of ssl cert to use for the pgvector database", + "type": "string" + } + }, + { + "ssl_cert_key": { + "description": "the path of ssl cert key to use for the pgvector database", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "search": { + "required": false, + "fields": [ + { + "threshold": { + "default": 0.5, + "required": false, + "description": "Threshold for the similarity score to be considered a match.", + "type": "number" + } + } + ], + "type": "record" + } + }, + { + "rules": { + "required": true, + "fields": [ + { + "match_all_conversation_history": { + "default": false, + "required": false, + "description": "If false, will ignore all previous chat prompts from the conversation history.", + "type": "boolean" + } + }, + { + "allow_prompts": { + "required": false, + "description": "List of prompts to allow.", + "len_max": 100, + "type": "array", + "elements": { + "len_min": 1, + "len_max": 500, + "type": "string" + } + } + }, + { + "deny_prompts": { + "required": false, + "description": "List of prompts to deny.", + "len_max": 100, + "type": "array", + "elements": { + "len_min": 1, + "len_max": 500, + "type": "string" + } + } + }, + { + "max_request_body_size": { + "default": 8192, + "gt": 0, + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "type": "integer" + } + }, + { + "match_all_roles": { + "default": false, + "required": true, + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "llm_format": { + "required": false, + "description": "LLM input and output format and schema to use", + "one_of": [ + "openai", + "bedrock", + "gemini", + "cohere", + "huggingface" + ], + "default": "openai", + "type": "string" + } + }, + { + "genai_category": { + "required": false, + "description": "Generative AI category of the request", + "one_of": [ + "text/generation", + "text/embeddings", + "audio/transcription", + "audio/speech", + "image/generation", + "video/generation", + "realtime/generation" + ], + "default": "text/generation", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.rules.allow_prompts", + "config.rules.deny_prompts" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/ai-semantic-prompt-guard/3.12.x.json b/schemas/ai-semantic-prompt-guard/3.12.x.json new file mode 100644 index 00000000..5a450db6 --- /dev/null +++ b/schemas/ai-semantic-prompt-guard/3.12.x.json @@ -0,0 +1,1028 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.rules.allow_prompts", + "config.rules.deny_prompts" + ] + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "embeddings": { + "type": "record", + "fields": [ + { + "auth": { + "type": "record", + "fields": [ + { + "header_name": { + "type": "string", + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "referenceable": true, + "required": false + } + }, + { + "header_value": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'." + } + }, + { + "param_name": { + "type": "string", + "description": "If AI model requires authentication via query parameter, specify its name here.", + "referenceable": true, + "required": false + } + }, + { + "param_value": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Specify the full parameter value for 'param_name'." + } + }, + { + "param_location": { + "type": "string", + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "one_of": [ + "query", + "body" + ], + "required": false + } + }, + { + "azure_use_managed_identity": { + "type": "boolean", + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false + } + }, + { + "azure_client_id": { + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "referenceable": true, + "required": false + } + }, + { + "azure_client_secret": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret." + } + }, + { + "azure_tenant_id": { + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "referenceable": true, + "required": false + } + }, + { + "gcp_use_service_account": { + "type": "boolean", + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "required": false + } + }, + { + "gcp_service_account_json": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`." + } + }, + { + "aws_access_key_id": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance." + } + }, + { + "aws_secret_access_key": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance." + } + }, + { + "allow_override": { + "type": "boolean", + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false + } + } + ], + "required": false + } + }, + { + "model": { + "type": "record", + "fields": [ + { + "provider": { + "type": "string", + "description": "AI provider format to use for embeddings API", + "one_of": [ + "openai", + "mistral", + "huggingface", + "azure", + "bedrock", + "gemini" + ], + "required": true + } + }, + { + "name": { + "type": "string", + "description": "Model name to execute.", + "required": true + } + }, + { + "options": { + "description": "Key/value settings for the model", + "fields": [ + { + "upstream_url": { + "type": "string", + "description": "upstream url for the embeddings", + "required": false + } + }, + { + "azure": { + "type": "record", + "fields": [ + { + "instance": { + "type": "string", + "description": "Instance name for Azure OpenAI hosted models.", + "required": false + } + }, + { + "api_version": { + "type": "string", + "default": "2023-05-15", + "description": "'api-version' for Azure OpenAI instances.", + "required": false + } + }, + { + "deployment_id": { + "type": "string", + "description": "Deployment ID for Azure OpenAI instances.", + "required": false + } + } + ], + "required": true + } + }, + { + "bedrock": { + "type": "record", + "fields": [ + { + "aws_region": { + "description": "If using AWS providers (Bedrock) you can override the `AWS_REGION` environment variable by setting this option.", + "type": "string", + "required": false + } + }, + { + "aws_assume_role_arn": { + "description": "If using AWS providers (Bedrock) you can assume a different role after authentication with the current IAM context is successful.", + "type": "string", + "required": false + } + }, + { + "aws_role_session_name": { + "description": "If using AWS providers (Bedrock), set the identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "If using AWS providers (Bedrock), override the STS endpoint URL when assuming a different role.", + "type": "string" + } + }, + { + "embeddings_normalize": { + "description": "If using AWS providers (Bedrock), set to true to normalize the embeddings.", + "default": false, + "type": "boolean" + } + }, + { + "performance_config_latency": { + "description": "Force the client's performance configuration 'latency' for all requests. Leave empty to let the consumer select the performance configuration.", + "type": "string", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "aws_assume_role_arn", + "aws_role_session_name" + ] + } + ], + "required": false + } + }, + { + "gemini": { + "type": "record", + "fields": [ + { + "api_endpoint": { + "type": "string", + "description": "If running Gemini on Vertex, specify the regional API endpoint (hostname only).", + "required": false + } + }, + { + "project_id": { + "type": "string", + "description": "If running Gemini on Vertex, specify the project ID.", + "required": false + } + }, + { + "location_id": { + "type": "string", + "description": "If running Gemini on Vertex, specify the location ID.", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "api_endpoint", + "project_id", + "location_id" + ] + } + ], + "required": false + } + }, + { + "huggingface": { + "type": "record", + "fields": [ + { + "use_cache": { + "type": "boolean", + "description": "Use the cache layer on the inference API", + "required": false + } + }, + { + "wait_for_model": { + "type": "boolean", + "description": "Wait for the model if it is not ready", + "required": false + } + } + ], + "required": false + } + } + ], + "type": "record", + "required": false + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure.instance" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure.api_version" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "model.options.azure.deployment_id" + ], + "if_match": { + "one_of": [ + "azure" + ] + }, + "then_err": "must set %s for azure provider", + "if_field": "model.provider" + } + } + ], + "required": true + } + }, + { + "vectordb": { + "type": "record", + "fields": [ + { + "strategy": { + "type": "string", + "description": "which vector database driver to use", + "one_of": [ + "redis", + "pgvector" + ], + "required": true + } + }, + { + "dimensions": { + "type": "integer", + "description": "the desired dimensionality for the vectors", + "required": true + } + }, + { + "threshold": { + "type": "number", + "description": "the default similarity threshold for accepting semantic search results (float)", + "required": true + } + }, + { + "distance_metric": { + "type": "string", + "description": "the distance metric to use for vector searches", + "one_of": [ + "cosine", + "euclidean" + ], + "required": true + } + }, + { + "redis": { + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "database", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + } + ], + "required": true, + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "type": "string", + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "type": "integer", + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy" + } + }, + { + "keepalive_pool_size": { + "type": "integer", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low." + } + }, + { + "keepalive_backlog": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "type": "boolean", + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "cluster_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + } + ] + } + }, + { + "pgvector": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "the host of the pgvector database" + } + }, + { + "port": { + "type": "integer", + "default": 5432, + "description": "the port of the pgvector database" + } + }, + { + "user": { + "type": "string", + "default": "postgres", + "referenceable": true, + "description": "the user of the pgvector database" + } + }, + { + "password": { + "type": "string", + "description": "the password of the pgvector database", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "type": "string", + "default": "kong-pgvector", + "description": "the database of the pgvector database" + } + }, + { + "timeout": { + "type": "number", + "default": 5000, + "description": "the timeout of the pgvector database" + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "whether to use ssl for the pgvector database" + } + }, + { + "ssl_required": { + "type": "boolean", + "default": false, + "description": "whether ssl is required for the pgvector database" + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "whether to verify ssl for the pgvector database" + } + }, + { + "ssl_version": { + "type": "string", + "default": "tlsv1_2", + "one_of": [ + "tlsv1_2", + "tlsv1_3", + "any" + ], + "description": "the ssl version to use for the pgvector database" + } + }, + { + "ssl_cert": { + "type": "string", + "description": "the path of ssl cert to use for the pgvector database" + } + }, + { + "ssl_cert_key": { + "type": "string", + "description": "the path of ssl cert key to use for the pgvector database" + } + } + ], + "required": true + } + } + ], + "required": true + } + }, + { + "search": { + "type": "record", + "fields": [ + { + "threshold": { + "description": "Threshold for the similarity score to be considered a match.", + "default": 0.5, + "type": "number", + "required": false + } + } + ], + "required": false + } + }, + { + "rules": { + "type": "record", + "fields": [ + { + "match_all_conversation_history": { + "description": "If false, will ignore all previous chat prompts from the conversation history.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "allow_prompts": { + "type": "array", + "len_max": 100, + "required": false, + "description": "List of prompts to allow.", + "elements": { + "type": "string", + "len_min": 1, + "len_max": 500 + } + } + }, + { + "deny_prompts": { + "type": "array", + "len_max": 100, + "required": false, + "description": "List of prompts to deny.", + "elements": { + "type": "string", + "len_min": 1, + "len_max": 500 + } + } + }, + { + "max_request_body_size": { + "description": "max allowed body size allowed to be introspected. 0 means unlimited, but the size of this body will still be limited by Nginx's client_max_body_size.", + "default": 8192, + "gt": 0, + "type": "integer" + } + }, + { + "match_all_roles": { + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "default": false, + "type": "boolean", + "required": true + } + } + ], + "required": true + } + }, + { + "llm_format": { + "type": "string", + "required": false, + "description": "LLM input and output format and schema to use", + "default": "openai", + "one_of": [ + "openai", + "bedrock", + "gemini", + "cohere", + "huggingface" + ] + } + }, + { + "genai_category": { + "type": "string", + "required": false, + "description": "Generative AI category of the request", + "default": "text/generation", + "one_of": [ + "text/generation", + "text/embeddings", + "audio/transcription", + "audio/speech", + "image/generation", + "video/generation", + "realtime/generation" + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ai-semantic-prompt-guard/3.8.x.json b/schemas/ai-semantic-prompt-guard/3.8.x.json new file mode 100644 index 00000000..fe2daeed --- /dev/null +++ b/schemas/ai-semantic-prompt-guard/3.8.x.json @@ -0,0 +1,746 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "embeddings": { + "fields": [ + { + "auth": { + "fields": [ + { + "header_name": { + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "header_value": { + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "param_name": { + "description": "If AI model requires authentication via query parameter, specify its name here.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "param_value": { + "description": "Specify the full parameter value for 'param_name'.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "param_location": { + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "type": "string", + "required": false, + "one_of": [ + "query", + "body" + ] + } + }, + { + "azure_use_managed_identity": { + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "azure_client_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "azure_client_secret": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "azure_tenant_id": { + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "gcp_use_service_account": { + "description": "Use service account auth for GCP-based providers and models.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "gcp_service_account_json": { + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "aws_access_key_id": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "aws_secret_access_key": { + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "allow_override": { + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "type": "boolean", + "required": false, + "default": false + } + } + ], + "required": false, + "type": "record" + } + }, + { + "model": { + "fields": [ + { + "provider": { + "description": "AI provider format to use for embeddings API", + "type": "string", + "required": true, + "one_of": [ + "openai", + "mistral" + ] + } + }, + { + "name": { + "description": "Model name to execute.", + "type": "string", + "required": true, + "one_of": [ + "text-embedding-3-large", + "text-embedding-3-small", + "mistral-embed" + ] + } + }, + { + "options": { + "description": "Key/value settings for the model", + "type": "record", + "required": false, + "fields": [ + { + "upstream_url": { + "description": "upstream url for the embeddings", + "type": "string", + "required": false + } + } + ] + } + } + ], + "required": true, + "type": "record" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "vectordb": { + "fields": [ + { + "strategy": { + "description": "which vector database driver to use", + "type": "string", + "required": true, + "one_of": [ + "redis" + ] + } + }, + { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "type": "integer", + "required": true + } + }, + { + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "type": "number", + "required": true + } + }, + { + "distance_metric": { + "description": "the distance metric to use for vector searches", + "type": "string", + "required": true, + "one_of": [ + "cosine", + "euclidean" + ] + } + }, + { + "redis": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer", + "between": [ + 1, + 2147483646 + ], + "default": 256 + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer", + "default": 5 + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean", + "default": false + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_nodes" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_nodes" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_field": "connection_is_proxied", + "if_match": { + "eq": true + }, + "then_field": "host", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "translate_backwards": [ + "connect_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + } + ], + "required": true, + "type": "record" + } + }, + { + "search": { + "fields": [ + { + "threshold": { + "description": "Threshold for the similarity score to be considered a match.", + "type": "number", + "required": false, + "default": 0.5 + } + } + ], + "required": false, + "type": "record" + } + }, + { + "rules": { + "fields": [ + { + "match_all_conversation_history": { + "description": "If false, will ignore all previous chat prompts from the conversation history.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "allow_prompts": { + "description": "List of prompts to allow.", + "required": false, + "len_max": 100, + "elements": { + "type": "string", + "len_max": 500, + "len_min": 1 + }, + "type": "array" + } + }, + { + "deny_prompts": { + "description": "List of prompts to deny.", + "required": false, + "len_max": 100, + "elements": { + "type": "string", + "len_max": 500, + "len_min": 1 + }, + "type": "array" + } + }, + { + "max_request_body_size": { + "description": "max allowed body size allowed to be introspected", + "type": "integer", + "gt": 0, + "default": 8192 + } + }, + { + "match_all_roles": { + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "type": "boolean", + "required": true, + "default": false + } + } + ], + "required": true, + "type": "record" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.rules.allow_prompts", + "config.rules.deny_prompts" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/ai-semantic-prompt-guard/3.9.x.json b/schemas/ai-semantic-prompt-guard/3.9.x.json new file mode 100644 index 00000000..c1fac108 --- /dev/null +++ b/schemas/ai-semantic-prompt-guard/3.9.x.json @@ -0,0 +1,704 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.rules.allow_prompts", + "config.rules.deny_prompts" + ] + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "embeddings": { + "type": "record", + "required": true, + "fields": [ + { + "auth": { + "type": "record", + "required": false, + "fields": [ + { + "header_name": { + "required": false, + "description": "If AI model requires authentication via Authorization or API key header, specify its name here.", + "referenceable": true, + "type": "string" + } + }, + { + "header_value": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Specify the full auth header value for 'header_name', for example 'Bearer key' or just 'key'.", + "referenceable": true + } + }, + { + "param_name": { + "required": false, + "description": "If AI model requires authentication via query parameter, specify its name here.", + "referenceable": true, + "type": "string" + } + }, + { + "param_value": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Specify the full parameter value for 'param_name'.", + "referenceable": true + } + }, + { + "param_location": { + "type": "string", + "description": "Specify whether the 'param_name' and 'param_value' options go in a query string, or the POST form/JSON body.", + "required": false, + "one_of": [ + "query", + "body" + ] + } + }, + { + "azure_use_managed_identity": { + "default": false, + "description": "Set true to use the Azure Cloud Managed Identity (or user-assigned identity) to authenticate with Azure-provider models.", + "required": false, + "type": "boolean" + } + }, + { + "azure_client_id": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client ID.", + "referenceable": true, + "type": "string" + } + }, + { + "azure_client_secret": { + "encrypted": true, + "required": false, + "type": "string", + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the client secret.", + "referenceable": true + } + }, + { + "azure_tenant_id": { + "required": false, + "description": "If azure_use_managed_identity is set to true, and you need to use a different user-assigned identity for this LLM instance, set the tenant ID.", + "referenceable": true, + "type": "string" + } + }, + { + "gcp_use_service_account": { + "default": false, + "description": "Use service account auth for GCP-based providers and models.", + "required": false, + "type": "boolean" + } + }, + { + "gcp_service_account_json": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this field to the full JSON of the GCP service account to authenticate, if required. If null (and gcp_use_service_account is true), Kong will attempt to read from environment variable `GCP_SERVICE_ACCOUNT`.", + "referenceable": true + } + }, + { + "aws_access_key_id": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_ACCESS_KEY_ID environment variable for this plugin instance.", + "referenceable": true + } + }, + { + "aws_secret_access_key": { + "encrypted": true, + "required": false, + "type": "string", + "description": "Set this if you are using an AWS provider (Bedrock) and you are authenticating using static IAM User credentials. Setting this will override the AWS_SECRET_ACCESS_KEY environment variable for this plugin instance.", + "referenceable": true + } + }, + { + "allow_override": { + "default": false, + "description": "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.", + "required": false, + "type": "boolean" + } + } + ] + } + }, + { + "model": { + "type": "record", + "required": true, + "fields": [ + { + "provider": { + "type": "string", + "description": "AI provider format to use for embeddings API", + "required": true, + "one_of": [ + "openai", + "mistral" + ] + } + }, + { + "name": { + "description": "Model name to execute.", + "required": true, + "type": "string" + } + }, + { + "options": { + "type": "record", + "description": "Key/value settings for the model", + "required": false, + "fields": [ + { + "upstream_url": { + "description": "upstream url for the embeddings", + "required": false, + "type": "string" + } + } + ] + } + } + ] + } + } + ] + } + }, + { + "vectordb": { + "type": "record", + "required": true, + "fields": [ + { + "strategy": { + "type": "string", + "description": "which vector database driver to use", + "required": true, + "one_of": [ + "redis" + ] + } + }, + { + "dimensions": { + "description": "the desired dimensionality for the vectors", + "required": true, + "type": "integer" + } + }, + { + "threshold": { + "description": "the default similarity threshold for accepting semantic search results (float)", + "required": true, + "type": "number" + } + }, + { + "distance_metric": { + "type": "string", + "description": "the distance metric to use for vector searches", + "required": true, + "one_of": [ + "cosine", + "euclidean" + ] + } + }, + { + "redis": { + "required": true, + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ] + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ] + }, + "type": "array" + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ] + }, + "type": "array" + } + } + ], + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "type": "string", + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean" + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean" + } + } + ] + } + } + ] + } + }, + { + "search": { + "type": "record", + "required": false, + "fields": [ + { + "threshold": { + "default": 0.5, + "description": "Threshold for the similarity score to be considered a match.", + "required": false, + "type": "number" + } + } + ] + } + }, + { + "rules": { + "type": "record", + "required": true, + "fields": [ + { + "match_all_conversation_history": { + "default": false, + "description": "If false, will ignore all previous chat prompts from the conversation history.", + "required": false, + "type": "boolean" + } + }, + { + "allow_prompts": { + "len_max": 100, + "required": false, + "type": "array", + "elements": { + "len_max": 500, + "len_min": 1, + "type": "string" + }, + "description": "List of prompts to allow." + } + }, + { + "deny_prompts": { + "len_max": 100, + "required": false, + "type": "array", + "elements": { + "len_max": 500, + "len_min": 1, + "type": "string" + }, + "description": "List of prompts to deny." + } + }, + { + "max_request_body_size": { + "default": 8192, + "description": "max allowed body size allowed to be introspected", + "gt": 0, + "type": "integer" + } + }, + { + "match_all_roles": { + "default": false, + "description": "If true, will match all roles in addition to 'user' role in conversation history.", + "required": true, + "type": "boolean" + } + } + ] + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/app-dynamics/3.10.x.json b/schemas/app-dynamics/3.10.x.json new file mode 100644 index 00000000..792a48cc --- /dev/null +++ b/schemas/app-dynamics/3.10.x.json @@ -0,0 +1,46 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/app-dynamics/3.11.x.json b/schemas/app-dynamics/3.11.x.json new file mode 100644 index 00000000..5acbfbb4 --- /dev/null +++ b/schemas/app-dynamics/3.11.x.json @@ -0,0 +1,46 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/app-dynamics/3.12.x.json b/schemas/app-dynamics/3.12.x.json new file mode 100644 index 00000000..22046fd9 --- /dev/null +++ b/schemas/app-dynamics/3.12.x.json @@ -0,0 +1,42 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/app-dynamics/3.5.x.json b/schemas/app-dynamics/3.5.x.json new file mode 100644 index 00000000..db9ee9af --- /dev/null +++ b/schemas/app-dynamics/3.5.x.json @@ -0,0 +1,34 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + + ], + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/app-dynamics/3.6.x.json b/schemas/app-dynamics/3.6.x.json new file mode 100644 index 00000000..db9ee9af --- /dev/null +++ b/schemas/app-dynamics/3.6.x.json @@ -0,0 +1,34 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + + ], + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/app-dynamics/3.7.x.json b/schemas/app-dynamics/3.7.x.json new file mode 100644 index 00000000..380e6ec2 --- /dev/null +++ b/schemas/app-dynamics/3.7.x.json @@ -0,0 +1,46 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/app-dynamics/3.8.x.json b/schemas/app-dynamics/3.8.x.json new file mode 100644 index 00000000..63233636 --- /dev/null +++ b/schemas/app-dynamics/3.8.x.json @@ -0,0 +1,46 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/app-dynamics/3.9.x.json b/schemas/app-dynamics/3.9.x.json new file mode 100644 index 00000000..8e65202b --- /dev/null +++ b/schemas/app-dynamics/3.9.x.json @@ -0,0 +1,46 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/application-registration/3.10.x.json b/schemas/application-registration/3.10.x.json new file mode 100644 index 00000000..604ffb5c --- /dev/null +++ b/schemas/application-registration/3.10.x.json @@ -0,0 +1,108 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "service": { + "reference": "services", + "on_delete": "cascade", + "type": "foreign", + "ne": null + } + }, + { + "route": { + "reference": "routes", + "type": "foreign", + "description": "A reference to the 'routes' table with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "display_name": { + "required": true, + "description": "Unique display name used for a Service in the Developer Portal.", + "type": "string", + "unique": true + } + }, + { + "description": { + "description": "Unique description displayed in information about a Service in the Developer Portal.", + "type": "string", + "unique": true + } + }, + { + "auto_approve": { + "required": true, + "description": "If enabled, all new Service Contracts requests are automatically approved.", + "type": "boolean", + "default": false + } + }, + { + "show_issuer": { + "required": true, + "description": "Displays the **Issuer URL** in the **Service Details** dialog.", + "type": "boolean", + "default": false + } + }, + { + "enable_proxy_with_consumer_credential": { + "required": true, + "description": "If enabled, the Route of the Service can be accessed using the Consumer's credential", + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/application-registration/3.11.x.json b/schemas/application-registration/3.11.x.json new file mode 100644 index 00000000..604ffb5c --- /dev/null +++ b/schemas/application-registration/3.11.x.json @@ -0,0 +1,108 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "service": { + "reference": "services", + "on_delete": "cascade", + "type": "foreign", + "ne": null + } + }, + { + "route": { + "reference": "routes", + "type": "foreign", + "description": "A reference to the 'routes' table with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "display_name": { + "required": true, + "description": "Unique display name used for a Service in the Developer Portal.", + "type": "string", + "unique": true + } + }, + { + "description": { + "description": "Unique description displayed in information about a Service in the Developer Portal.", + "type": "string", + "unique": true + } + }, + { + "auto_approve": { + "required": true, + "description": "If enabled, all new Service Contracts requests are automatically approved.", + "type": "boolean", + "default": false + } + }, + { + "show_issuer": { + "required": true, + "description": "Displays the **Issuer URL** in the **Service Details** dialog.", + "type": "boolean", + "default": false + } + }, + { + "enable_proxy_with_consumer_credential": { + "required": true, + "description": "If enabled, the Route of the Service can be accessed using the Consumer's credential", + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/application-registration/3.4.x.json b/schemas/application-registration/3.4.x.json index c9b1ab9b..792651be 100644 --- a/schemas/application-registration/3.4.x.json +++ b/schemas/application-registration/3.4.x.json @@ -2,23 +2,25 @@ "fields": [ { "consumer": { - "eq": null, "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, { "service": { "on_delete": "cascade", - "ne": null, "reference": "services", - "type": "foreign" + "type": "foreign", + "ne": null } }, { "route": { - "eq": null, "reference": "routes", + "description": "A reference to the 'routes' table with a null value allowed.", + "eq": null, "type": "foreign" } }, @@ -30,53 +32,69 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "display_name": { "type": "string", + "required": true, "unique": true, - "required": true + "description": "Unique display name used for a Service in the Developer Portal." } }, { "description": { + "type": "string", "unique": true, - "type": "string" + "description": "Unique description displayed in information about a Service in the Developer Portal." } }, { "auto_approve": { - "required": true, + "default": false, "type": "boolean", - "default": false + "description": "If enabled, all new Service Contracts requests are automatically approved.", + "required": true } }, { "show_issuer": { - "required": true, + "default": false, "type": "boolean", - "default": false + "description": "Displays the **Issuer URL** in the **Service Details** dialog.", + "required": true } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/application-registration/3.5.x.json b/schemas/application-registration/3.5.x.json new file mode 100644 index 00000000..2416ffe5 --- /dev/null +++ b/schemas/application-registration/3.5.x.json @@ -0,0 +1,108 @@ +{ + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "service": { + "ne": null, + "type": "foreign", + "on_delete": "cascade", + "reference": "services" + } + }, + { + "route": { + "type": "foreign", + "eq": null, + "reference": "routes", + "description": "A reference to the 'routes' table with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "display_name": { + "required": true, + "description": "Unique display name used for a Service in the Developer Portal.", + "type": "string", + "unique": true + } + }, + { + "description": { + "description": "Unique description displayed in information about a Service in the Developer Portal.", + "type": "string", + "unique": true + } + }, + { + "auto_approve": { + "required": true, + "default": false, + "type": "boolean", + "description": "If enabled, all new Service Contracts requests are automatically approved." + } + }, + { + "show_issuer": { + "required": true, + "default": false, + "type": "boolean", + "description": "Displays the **Issuer URL** in the **Service Details** dialog." + } + }, + { + "enable_proxy_with_consumer_credential": { + "required": true, + "description": "If enabled, the Route of the Service can be accessed using the Consumer's credential", + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/application-registration/3.6.x.json b/schemas/application-registration/3.6.x.json new file mode 100644 index 00000000..6ea24c2e --- /dev/null +++ b/schemas/application-registration/3.6.x.json @@ -0,0 +1,108 @@ +{ + "fields": [ + { + "consumer": { + "eq": null, + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "service": { + "reference": "services", + "ne": null, + "type": "foreign", + "on_delete": "cascade" + } + }, + { + "route": { + "eq": null, + "reference": "routes", + "type": "foreign", + "description": "A reference to the 'routes' table with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "eq": null, + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "display_name": { + "required": true, + "unique": true, + "type": "string", + "description": "Unique display name used for a Service in the Developer Portal." + } + }, + { + "description": { + "type": "string", + "unique": true, + "description": "Unique description displayed in information about a Service in the Developer Portal." + } + }, + { + "auto_approve": { + "required": true, + "default": false, + "type": "boolean", + "description": "If enabled, all new Service Contracts requests are automatically approved." + } + }, + { + "show_issuer": { + "required": true, + "default": false, + "type": "boolean", + "description": "Displays the **Issuer URL** in the **Service Details** dialog." + } + }, + { + "enable_proxy_with_consumer_credential": { + "required": true, + "default": false, + "type": "boolean", + "description": "If enabled, the Route of the Service can be accessed using the Consumer's credential" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/application-registration/3.7.x.json b/schemas/application-registration/3.7.x.json new file mode 100644 index 00000000..604ffb5c --- /dev/null +++ b/schemas/application-registration/3.7.x.json @@ -0,0 +1,108 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "service": { + "reference": "services", + "on_delete": "cascade", + "type": "foreign", + "ne": null + } + }, + { + "route": { + "reference": "routes", + "type": "foreign", + "description": "A reference to the 'routes' table with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "display_name": { + "required": true, + "description": "Unique display name used for a Service in the Developer Portal.", + "type": "string", + "unique": true + } + }, + { + "description": { + "description": "Unique description displayed in information about a Service in the Developer Portal.", + "type": "string", + "unique": true + } + }, + { + "auto_approve": { + "required": true, + "description": "If enabled, all new Service Contracts requests are automatically approved.", + "type": "boolean", + "default": false + } + }, + { + "show_issuer": { + "required": true, + "description": "Displays the **Issuer URL** in the **Service Details** dialog.", + "type": "boolean", + "default": false + } + }, + { + "enable_proxy_with_consumer_credential": { + "required": true, + "description": "If enabled, the Route of the Service can be accessed using the Consumer's credential", + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/application-registration/3.8.x.json b/schemas/application-registration/3.8.x.json new file mode 100644 index 00000000..604ffb5c --- /dev/null +++ b/schemas/application-registration/3.8.x.json @@ -0,0 +1,108 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "service": { + "reference": "services", + "on_delete": "cascade", + "type": "foreign", + "ne": null + } + }, + { + "route": { + "reference": "routes", + "type": "foreign", + "description": "A reference to the 'routes' table with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "display_name": { + "required": true, + "description": "Unique display name used for a Service in the Developer Portal.", + "type": "string", + "unique": true + } + }, + { + "description": { + "description": "Unique description displayed in information about a Service in the Developer Portal.", + "type": "string", + "unique": true + } + }, + { + "auto_approve": { + "required": true, + "description": "If enabled, all new Service Contracts requests are automatically approved.", + "type": "boolean", + "default": false + } + }, + { + "show_issuer": { + "required": true, + "description": "Displays the **Issuer URL** in the **Service Details** dialog.", + "type": "boolean", + "default": false + } + }, + { + "enable_proxy_with_consumer_credential": { + "required": true, + "description": "If enabled, the Route of the Service can be accessed using the Consumer's credential", + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/application-registration/3.9.x.json b/schemas/application-registration/3.9.x.json new file mode 100644 index 00000000..604ffb5c --- /dev/null +++ b/schemas/application-registration/3.9.x.json @@ -0,0 +1,108 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "service": { + "reference": "services", + "on_delete": "cascade", + "type": "foreign", + "ne": null + } + }, + { + "route": { + "reference": "routes", + "type": "foreign", + "description": "A reference to the 'routes' table with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "display_name": { + "required": true, + "description": "Unique display name used for a Service in the Developer Portal.", + "type": "string", + "unique": true + } + }, + { + "description": { + "description": "Unique description displayed in information about a Service in the Developer Portal.", + "type": "string", + "unique": true + } + }, + { + "auto_approve": { + "required": true, + "description": "If enabled, all new Service Contracts requests are automatically approved.", + "type": "boolean", + "default": false + } + }, + { + "show_issuer": { + "required": true, + "description": "Displays the **Issuer URL** in the **Service Details** dialog.", + "type": "boolean", + "default": false + } + }, + { + "enable_proxy_with_consumer_credential": { + "required": true, + "description": "If enabled, the Route of the Service can be accessed using the Consumer's credential", + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/aws-lambda/3.10.x.json b/schemas/aws-lambda/3.10.x.json new file mode 100644 index 00000000..e1d581fa --- /dev/null +++ b/schemas/aws-lambda/3.10.x.json @@ -0,0 +1,273 @@ +{ + "entity_checks": [ + { + "mutually_required": [ + "config.aws_key", + "config.aws_secret" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "config.proxy_url" + ] + } + } + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "timeout": { + "description": "An optional timeout in milliseconds when invoking the function.", + "type": "number", + "default": 60000, + "required": true + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number", + "default": 60000, + "required": true + } + }, + { + "aws_key": { + "description": "The AWS key credential to be used when invoking the function.", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "aws_secret": { + "description": "The AWS secret credential to be used when invoking the function. ", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "aws_assume_role_arn": { + "description": "The target AWS IAM role ARN used to invoke the Lambda function.", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "aws_role_session_name": { + "description": "The identifier of the assumed role session.", + "type": "string", + "default": "kong" + } + }, + { + "aws_sts_endpoint_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "aws_region": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "function_name": { + "description": "The AWS Lambda function to invoke. Both function name and function ARN (including partial) are supported.", + "type": "string", + "required": false + } + }, + { + "qualifier": { + "description": "The qualifier to use when invoking the function.", + "type": "string" + } + }, + { + "invocation_type": { + "type": "string", + "description": "The InvocationType to use when invoking the function. Available types are RequestResponse, Event, DryRun.", + "one_of": [ + "RequestResponse", + "Event", + "DryRun" + ], + "default": "RequestResponse", + "required": true + } + }, + { + "log_type": { + "type": "string", + "description": "The LogType to use when invoking the function. By default, None and Tail are supported.", + "one_of": [ + "Tail", + "None" + ], + "default": "Tail", + "required": true + } + }, + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 443, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "disable_https": { + "type": "boolean", + "default": false + } + }, + { + "unhandled_status": { + "description": "The response status code to use (instead of the default 200, 202, or 204) in the case of an Unhandled Function Error.", + "type": "integer", + "between": [ + 100, + 999 + ] + } + }, + { + "forward_request_method": { + "description": "An optional value that defines whether the original HTTP request method verb is sent in the request_method field of the JSON-encoded request.", + "type": "boolean", + "default": false + } + }, + { + "forward_request_uri": { + "description": "An optional value that defines whether the original HTTP request URI is sent in the request_uri field of the JSON-encoded request.", + "type": "boolean", + "default": false + } + }, + { + "forward_request_headers": { + "description": "An optional value that defines whether the original HTTP request headers are sent as a map in the request_headers field of the JSON-encoded request.", + "type": "boolean", + "default": false + } + }, + { + "forward_request_body": { + "description": "An optional value that defines whether the request body is sent in the request_body field of the JSON-encoded request. If the body arguments can be parsed, they are sent in the separate request_body_args field of the request. ", + "type": "boolean", + "default": false + } + }, + { + "is_proxy_integration": { + "description": "An optional value that defines whether the response format to receive from the Lambda to this format.", + "type": "boolean", + "default": false + } + }, + { + "awsgateway_compatible": { + "description": "An optional value that defines whether the plugin should wrap requests into the Amazon API gateway.", + "type": "boolean", + "default": false + } + }, + { + "proxy_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "skip_large_bodies": { + "description": "An optional value that defines whether Kong should send large bodies that are buffered to disk", + "type": "boolean", + "default": true + } + }, + { + "base64_encode_body": { + "description": "An optional value that Base64-encodes the request body.", + "type": "boolean", + "default": true + } + }, + { + "aws_imds_protocol_version": { + "type": "string", + "description": "Identifier to select the IMDS protocol version to use: `v1` or `v2`.", + "one_of": [ + "v1", + "v2" + ], + "default": "v1", + "required": true + } + }, + { + "empty_arrays_mode": { + "type": "string", + "description": "An optional value that defines whether Kong should send empty arrays (returned by Lambda function) as `[]` arrays or `{}` objects in JSON responses. The value `legacy` means Kong will send empty arrays as `{}` objects in response", + "one_of": [ + "legacy", + "correct" + ], + "default": "legacy", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/aws-lambda/3.11.x.json b/schemas/aws-lambda/3.11.x.json new file mode 100644 index 00000000..3613d495 --- /dev/null +++ b/schemas/aws-lambda/3.11.x.json @@ -0,0 +1,273 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "timeout": { + "description": "An optional timeout in milliseconds when invoking the function.", + "required": true, + "default": 60000, + "type": "number" + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "required": true, + "default": 60000, + "type": "number" + } + }, + { + "aws_key": { + "encrypted": true, + "description": "The AWS key credential to be used when invoking the function.", + "referenceable": true, + "type": "string" + } + }, + { + "aws_secret": { + "encrypted": true, + "description": "The AWS secret credential to be used when invoking the function. ", + "referenceable": true, + "type": "string" + } + }, + { + "aws_assume_role_arn": { + "encrypted": true, + "description": "The target AWS IAM role ARN used to invoke the Lambda function.", + "referenceable": true, + "type": "string" + } + }, + { + "aws_role_session_name": { + "description": "The identifier of the assumed role session.", + "default": "kong", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "aws_region": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "function_name": { + "required": false, + "description": "The AWS Lambda function to invoke. Both function name and function ARN (including partial) are supported.", + "type": "string" + } + }, + { + "qualifier": { + "description": "The qualifier to use when invoking the function.", + "type": "string" + } + }, + { + "invocation_type": { + "required": true, + "description": "The InvocationType to use when invoking the function. Available types are RequestResponse, Event, DryRun.", + "one_of": [ + "RequestResponse", + "Event", + "DryRun" + ], + "default": "RequestResponse", + "type": "string" + } + }, + { + "log_type": { + "required": true, + "description": "The LogType to use when invoking the function. By default, None and Tail are supported.", + "one_of": [ + "Tail", + "None" + ], + "default": "Tail", + "type": "string" + } + }, + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 443, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "disable_https": { + "default": false, + "type": "boolean" + } + }, + { + "unhandled_status": { + "between": [ + 100, + 999 + ], + "description": "The response status code to use (instead of the default 200, 202, or 204) in the case of an Unhandled Function Error.", + "type": "integer" + } + }, + { + "forward_request_method": { + "description": "An optional value that defines whether the original HTTP request method verb is sent in the request_method field of the JSON-encoded request.", + "default": false, + "type": "boolean" + } + }, + { + "forward_request_uri": { + "description": "An optional value that defines whether the original HTTP request URI is sent in the request_uri field of the JSON-encoded request.", + "default": false, + "type": "boolean" + } + }, + { + "forward_request_headers": { + "description": "An optional value that defines whether the original HTTP request headers are sent as a map in the request_headers field of the JSON-encoded request.", + "default": false, + "type": "boolean" + } + }, + { + "forward_request_body": { + "description": "An optional value that defines whether the request body is sent in the request_body field of the JSON-encoded request. If the body arguments can be parsed, they are sent in the separate request_body_args field of the request. ", + "default": false, + "type": "boolean" + } + }, + { + "is_proxy_integration": { + "description": "An optional value that defines whether the response format to receive from the Lambda to this format.", + "default": false, + "type": "boolean" + } + }, + { + "awsgateway_compatible": { + "description": "An optional value that defines whether the plugin should wrap requests into the Amazon API gateway.", + "default": false, + "type": "boolean" + } + }, + { + "proxy_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "skip_large_bodies": { + "description": "An optional value that defines whether Kong should send large bodies that are buffered to disk", + "default": true, + "type": "boolean" + } + }, + { + "base64_encode_body": { + "description": "An optional value that Base64-encodes the request body.", + "default": true, + "type": "boolean" + } + }, + { + "aws_imds_protocol_version": { + "required": true, + "description": "Identifier to select the IMDS protocol version to use: `v1` or `v2`.", + "one_of": [ + "v1", + "v2" + ], + "default": "v1", + "type": "string" + } + }, + { + "empty_arrays_mode": { + "required": true, + "description": "An optional value that defines whether Kong should send empty arrays (returned by Lambda function) as `[]` arrays or `{}` objects in JSON responses. The value `legacy` means Kong will send empty arrays as `{}` objects in response", + "one_of": [ + "legacy", + "correct" + ], + "default": "legacy", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "config.aws_key", + "config.aws_secret" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "config.proxy_url" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/aws-lambda/3.12.x.json b/schemas/aws-lambda/3.12.x.json new file mode 100644 index 00000000..f2e46ade --- /dev/null +++ b/schemas/aws-lambda/3.12.x.json @@ -0,0 +1,273 @@ +{ + "entity_checks": [ + { + "mutually_required": [ + "config.aws_key", + "config.aws_secret" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "config.proxy_url" + ] + } + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "timeout": { + "type": "number", + "default": 60000, + "description": "An optional timeout in milliseconds when invoking the function.", + "required": true + } + }, + { + "keepalive": { + "type": "number", + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "required": true + } + }, + { + "aws_key": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "The AWS key credential to be used when invoking the function." + } + }, + { + "aws_secret": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "The AWS secret credential to be used when invoking the function. " + } + }, + { + "aws_assume_role_arn": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "The target AWS IAM role ARN used to invoke the Lambda function." + } + }, + { + "aws_role_session_name": { + "type": "string", + "default": "kong", + "description": "The identifier of the assumed role session." + } + }, + { + "aws_sts_endpoint_url": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "aws_region": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "function_name": { + "type": "string", + "description": "The AWS Lambda function to invoke. Both function name and function ARN (including partial) are supported.", + "required": false + } + }, + { + "qualifier": { + "type": "string", + "description": "The qualifier to use when invoking the function." + } + }, + { + "invocation_type": { + "type": "string", + "required": true, + "description": "The InvocationType to use when invoking the function. Available types are RequestResponse, Event, DryRun.", + "default": "RequestResponse", + "one_of": [ + "RequestResponse", + "Event", + "DryRun" + ] + } + }, + { + "log_type": { + "type": "string", + "required": true, + "description": "The LogType to use when invoking the function. By default, None and Tail are supported.", + "default": "Tail", + "one_of": [ + "Tail", + "None" + ] + } + }, + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 443, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "disable_https": { + "type": "boolean", + "default": false + } + }, + { + "unhandled_status": { + "type": "integer", + "between": [ + 100, + 999 + ], + "description": "The response status code to use (instead of the default 200, 202, or 204) in the case of an Unhandled Function Error." + } + }, + { + "forward_request_method": { + "type": "boolean", + "default": false, + "description": "An optional value that defines whether the original HTTP request method verb is sent in the request_method field of the JSON-encoded request." + } + }, + { + "forward_request_uri": { + "type": "boolean", + "default": false, + "description": "An optional value that defines whether the original HTTP request URI is sent in the request_uri field of the JSON-encoded request." + } + }, + { + "forward_request_headers": { + "type": "boolean", + "default": false, + "description": "An optional value that defines whether the original HTTP request headers are sent as a map in the request_headers field of the JSON-encoded request." + } + }, + { + "forward_request_body": { + "type": "boolean", + "default": false, + "description": "An optional value that defines whether the request body is sent in the request_body field of the JSON-encoded request. If the body arguments can be parsed, they are sent in the separate request_body_args field of the request. " + } + }, + { + "is_proxy_integration": { + "type": "boolean", + "default": false, + "description": "An optional value that defines whether the response format to receive from the Lambda to this format." + } + }, + { + "awsgateway_compatible": { + "type": "boolean", + "default": false, + "description": "An optional value that defines whether the plugin should wrap requests into the Amazon API gateway." + } + }, + { + "proxy_url": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "skip_large_bodies": { + "type": "boolean", + "default": true, + "description": "An optional value that defines whether Kong should send large bodies that are buffered to disk" + } + }, + { + "base64_encode_body": { + "type": "boolean", + "default": true, + "description": "An optional value that Base64-encodes the request body." + } + }, + { + "aws_imds_protocol_version": { + "type": "string", + "required": true, + "description": "Identifier to select the IMDS protocol version to use: `v1` or `v2`.", + "default": "v1", + "one_of": [ + "v1", + "v2" + ] + } + }, + { + "empty_arrays_mode": { + "type": "string", + "required": true, + "description": "An optional value that defines whether Kong should send empty arrays (returned by Lambda function) as `[]` arrays or `{}` objects in JSON responses. The value `legacy` means Kong will send empty arrays as `{}` objects in response", + "default": "legacy", + "one_of": [ + "legacy", + "correct" + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/aws-lambda/3.4.x.json b/schemas/aws-lambda/3.4.x.json index c97dbde1..4d9cd95f 100644 --- a/schemas/aws-lambda/3.4.x.json +++ b/schemas/aws-lambda/3.4.x.json @@ -8,116 +8,143 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "timeout": { "default": 60000, - "type": "number", - "required": true + "required": true, + "description": "An optional timeout in milliseconds when invoking the function.", + "type": "number" } }, { "keepalive": { "default": 60000, - "type": "number", - "required": true + "required": true, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number" } }, { "aws_key": { + "encrypted": true, "referenceable": true, - "type": "string", - "encrypted": true + "description": "The AWS key credential to be used when invoking the function.", + "type": "string" } }, { "aws_secret": { + "encrypted": true, "referenceable": true, - "type": "string", - "encrypted": true + "description": "The AWS secret credential to be used when invoking the function. ", + "type": "string" } }, { "aws_assume_role_arn": { + "encrypted": true, "referenceable": true, - "type": "string", - "encrypted": true + "description": "The target AWS IAM role ARN used to invoke the Lambda function.", + "type": "string" } }, { "aws_role_session_name": { "default": "kong", + "description": "The identifier of the assumed role session.", "type": "string" } }, { - "aws_region": { + "aws_sts_endpoint_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", "type": "string" } }, + { + "aws_region": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, { "function_name": { "required": false, - "type": "string" + "type": "string", + "description": "The AWS Lambda function name to invoke." } }, { "qualifier": { + "description": "The qualifier to use when invoking the function.", "type": "string" } }, { "invocation_type": { - "required": true, + "default": "RequestResponse", + "description": "The InvocationType to use when invoking the function. Available types are RequestResponse, Event, DryRun.", "one_of": [ "RequestResponse", "Event", "DryRun" ], - "type": "string", - "default": "RequestResponse" + "required": true, + "type": "string" } }, { "log_type": { - "required": true, + "default": "Tail", + "description": "The LogType to use when invoking the function. By default, None and Tail are supported.", "one_of": [ "Tail", "None" ], - "type": "string", - "default": "Tail" + "required": true, + "type": "string" } }, { "host": { - "type": "string" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { "port": { + "default": 443, + "description": "An integer representing a port number between 0 and 65535, inclusive.", "between": [ 0, 65535 ], - "type": "integer", - "default": 443 + "type": "integer" } }, { @@ -132,76 +159,103 @@ 100, 999 ], - "type": "integer" + "type": "integer", + "description": "The response status code to use (instead of the default 200, 202, or 204) in the case of an Unhandled Function Error." } }, { "forward_request_method": { "default": false, + "description": "An optional value that defines whether the original HTTP request method verb is sent in the request_method field of the JSON-encoded request.", "type": "boolean" } }, { "forward_request_uri": { "default": false, + "description": "An optional value that defines whether the original HTTP request URI is sent in the request_uri field of the JSON-encoded request.", "type": "boolean" } }, { "forward_request_headers": { "default": false, + "description": "An optional value that defines whether the original HTTP request headers are sent as a map in the request_headers field of the JSON-encoded request.", "type": "boolean" } }, { "forward_request_body": { "default": false, + "description": "An optional value that defines whether the request body is sent in the request_body field of the JSON-encoded request. If the body arguments can be parsed, they are sent in the separate request_body_args field of the request. ", "type": "boolean" } }, { "is_proxy_integration": { "default": false, + "description": "An optional value that defines whether the response format to receive from the Lambda to this format.", "type": "boolean" } }, { "awsgateway_compatible": { "default": false, + "description": "An optional value that defines whether the plugin should wrap requests into the Amazon API gateway.", "type": "boolean" } }, { "proxy_url": { - "type": "string" + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." } }, { "skip_large_bodies": { "default": true, + "description": "An optional value that defines whether Kong should send large bodies that are buffered to disk", "type": "boolean" } }, { "base64_encode_body": { "default": true, + "description": "An optional value that Base64-encodes the request body.", "type": "boolean" } }, { "aws_imds_protocol_version": { - "required": true, + "default": "v1", + "description": "Identifier to select the IMDS protocol version to use: `v1` or `v2`.", "one_of": [ "v1", "v2" ], - "type": "string", - "default": "v1" + "required": true, + "type": "string" } } ], - "type": "record" + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "config.aws_key", + "config.aws_secret" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "config.proxy_url" + ] } } ] -} \ No newline at end of file +} diff --git a/schemas/aws-lambda/3.5.x.json b/schemas/aws-lambda/3.5.x.json new file mode 100644 index 00000000..da326b61 --- /dev/null +++ b/schemas/aws-lambda/3.5.x.json @@ -0,0 +1,255 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "timeout": { + "required": true, + "default": 60000, + "type": "number", + "description": "An optional timeout in milliseconds when invoking the function." + } + }, + { + "keepalive": { + "required": true, + "default": 60000, + "type": "number", + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed." + } + }, + { + "aws_key": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "The AWS key credential to be used when invoking the function." + } + }, + { + "aws_secret": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "The AWS secret credential to be used when invoking the function. " + } + }, + { + "aws_assume_role_arn": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "The target AWS IAM role ARN used to invoke the Lambda function." + } + }, + { + "aws_role_session_name": { + "default": "kong", + "type": "string", + "description": "The identifier of the assumed role session." + } + }, + { + "aws_region": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "function_name": { + "required": false, + "type": "string", + "description": "The AWS Lambda function name to invoke." + } + }, + { + "qualifier": { + "type": "string", + "description": "The qualifier to use when invoking the function." + } + }, + { + "invocation_type": { + "type": "string", + "required": true, + "one_of": [ + "RequestResponse", + "Event", + "DryRun" + ], + "default": "RequestResponse", + "description": "The InvocationType to use when invoking the function. Available types are RequestResponse, Event, DryRun." + } + }, + { + "log_type": { + "type": "string", + "required": true, + "one_of": [ + "Tail", + "None" + ], + "default": "Tail", + "description": "The LogType to use when invoking the function. By default, None and Tail are supported." + } + }, + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 443, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "disable_https": { + "type": "boolean", + "default": false + } + }, + { + "unhandled_status": { + "between": [ + 100, + 999 + ], + "type": "integer", + "description": "The response status code to use (instead of the default 200, 202, or 204) in the case of an Unhandled Function Error." + } + }, + { + "forward_request_method": { + "default": false, + "type": "boolean", + "description": "An optional value that defines whether the original HTTP request method verb is sent in the request_method field of the JSON-encoded request." + } + }, + { + "forward_request_uri": { + "default": false, + "type": "boolean", + "description": "An optional value that defines whether the original HTTP request URI is sent in the request_uri field of the JSON-encoded request." + } + }, + { + "forward_request_headers": { + "default": false, + "type": "boolean", + "description": "An optional value that defines whether the original HTTP request headers are sent as a map in the request_headers field of the JSON-encoded request." + } + }, + { + "forward_request_body": { + "default": false, + "type": "boolean", + "description": "An optional value that defines whether the request body is sent in the request_body field of the JSON-encoded request. If the body arguments can be parsed, they are sent in the separate request_body_args field of the request. " + } + }, + { + "is_proxy_integration": { + "default": false, + "type": "boolean", + "description": "An optional value that defines whether the response format to receive from the Lambda to this format." + } + }, + { + "awsgateway_compatible": { + "default": false, + "type": "boolean", + "description": "An optional value that defines whether the plugin should wrap requests into the Amazon API gateway." + } + }, + { + "proxy_url": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "skip_large_bodies": { + "default": true, + "type": "boolean", + "description": "An optional value that defines whether Kong should send large bodies that are buffered to disk" + } + }, + { + "base64_encode_body": { + "default": true, + "type": "boolean", + "description": "An optional value that Base64-encodes the request body." + } + }, + { + "aws_imds_protocol_version": { + "type": "string", + "required": true, + "one_of": [ + "v1", + "v2" + ], + "default": "v1", + "description": "Identifier to select the IMDS protocol version to use: `v1` or `v2`." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "config.aws_key", + "config.aws_secret" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "config.proxy_url" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/aws-lambda/3.6.x.json b/schemas/aws-lambda/3.6.x.json new file mode 100644 index 00000000..9e161eab --- /dev/null +++ b/schemas/aws-lambda/3.6.x.json @@ -0,0 +1,255 @@ +{ + "entity_checks": [ + { + "mutually_required": [ + "config.aws_key", + "config.aws_secret" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "config.proxy_url" + ] + } + } + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "timeout": { + "required": true, + "type": "number", + "description": "An optional timeout in milliseconds when invoking the function.", + "default": 60000 + } + }, + { + "keepalive": { + "required": true, + "type": "number", + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "default": 60000 + } + }, + { + "aws_key": { + "referenceable": true, + "type": "string", + "description": "The AWS key credential to be used when invoking the function.", + "encrypted": true + } + }, + { + "aws_secret": { + "referenceable": true, + "type": "string", + "description": "The AWS secret credential to be used when invoking the function. ", + "encrypted": true + } + }, + { + "aws_assume_role_arn": { + "referenceable": true, + "type": "string", + "description": "The target AWS IAM role ARN used to invoke the Lambda function.", + "encrypted": true + } + }, + { + "aws_role_session_name": { + "type": "string", + "description": "The identifier of the assumed role session.", + "default": "kong" + } + }, + { + "aws_region": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "function_name": { + "required": false, + "type": "string", + "description": "The AWS Lambda function name to invoke." + } + }, + { + "qualifier": { + "description": "The qualifier to use when invoking the function.", + "type": "string" + } + }, + { + "invocation_type": { + "type": "string", + "default": "RequestResponse", + "required": true, + "description": "The InvocationType to use when invoking the function. Available types are RequestResponse, Event, DryRun.", + "one_of": [ + "RequestResponse", + "Event", + "DryRun" + ] + } + }, + { + "log_type": { + "type": "string", + "default": "Tail", + "required": true, + "description": "The LogType to use when invoking the function. By default, None and Tail are supported.", + "one_of": [ + "Tail", + "None" + ] + } + }, + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 443, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "disable_https": { + "default": false, + "type": "boolean" + } + }, + { + "unhandled_status": { + "type": "integer", + "description": "The response status code to use (instead of the default 200, 202, or 204) in the case of an Unhandled Function Error.", + "between": [ + 100, + 999 + ] + } + }, + { + "forward_request_method": { + "type": "boolean", + "description": "An optional value that defines whether the original HTTP request method verb is sent in the request_method field of the JSON-encoded request.", + "default": false + } + }, + { + "forward_request_uri": { + "type": "boolean", + "description": "An optional value that defines whether the original HTTP request URI is sent in the request_uri field of the JSON-encoded request.", + "default": false + } + }, + { + "forward_request_headers": { + "type": "boolean", + "description": "An optional value that defines whether the original HTTP request headers are sent as a map in the request_headers field of the JSON-encoded request.", + "default": false + } + }, + { + "forward_request_body": { + "type": "boolean", + "description": "An optional value that defines whether the request body is sent in the request_body field of the JSON-encoded request. If the body arguments can be parsed, they are sent in the separate request_body_args field of the request. ", + "default": false + } + }, + { + "is_proxy_integration": { + "type": "boolean", + "description": "An optional value that defines whether the response format to receive from the Lambda to this format.", + "default": false + } + }, + { + "awsgateway_compatible": { + "type": "boolean", + "description": "An optional value that defines whether the plugin should wrap requests into the Amazon API gateway.", + "default": false + } + }, + { + "proxy_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "skip_large_bodies": { + "type": "boolean", + "description": "An optional value that defines whether Kong should send large bodies that are buffered to disk", + "default": true + } + }, + { + "base64_encode_body": { + "type": "boolean", + "description": "An optional value that Base64-encodes the request body.", + "default": true + } + }, + { + "aws_imds_protocol_version": { + "type": "string", + "default": "v1", + "required": true, + "description": "Identifier to select the IMDS protocol version to use: `v1` or `v2`.", + "one_of": [ + "v1", + "v2" + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/aws-lambda/3.7.x.json b/schemas/aws-lambda/3.7.x.json new file mode 100644 index 00000000..d470790c --- /dev/null +++ b/schemas/aws-lambda/3.7.x.json @@ -0,0 +1,261 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "timeout": { + "required": true, + "description": "An optional timeout in milliseconds when invoking the function.", + "type": "number", + "default": 60000 + } + }, + { + "keepalive": { + "required": true, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number", + "default": 60000 + } + }, + { + "aws_key": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "The AWS key credential to be used when invoking the function." + } + }, + { + "aws_secret": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "The AWS secret credential to be used when invoking the function. " + } + }, + { + "aws_assume_role_arn": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "The target AWS IAM role ARN used to invoke the Lambda function." + } + }, + { + "aws_role_session_name": { + "description": "The identifier of the assumed role session.", + "type": "string", + "default": "kong" + } + }, + { + "aws_sts_endpoint_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "aws_region": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "function_name": { + "required": false, + "description": "The AWS Lambda function to invoke. Both function name and function ARN (including partial) are supported.", + "type": "string" + } + }, + { + "qualifier": { + "type": "string", + "description": "The qualifier to use when invoking the function." + } + }, + { + "invocation_type": { + "default": "RequestResponse", + "required": true, + "description": "The InvocationType to use when invoking the function. Available types are RequestResponse, Event, DryRun.", + "type": "string", + "one_of": [ + "RequestResponse", + "Event", + "DryRun" + ] + } + }, + { + "log_type": { + "default": "Tail", + "required": true, + "description": "The LogType to use when invoking the function. By default, None and Tail are supported.", + "type": "string", + "one_of": [ + "Tail", + "None" + ] + } + }, + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "default": 443, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "disable_https": { + "type": "boolean", + "default": false + } + }, + { + "unhandled_status": { + "description": "The response status code to use (instead of the default 200, 202, or 204) in the case of an Unhandled Function Error.", + "type": "integer", + "between": [ + 100, + 999 + ] + } + }, + { + "forward_request_method": { + "description": "An optional value that defines whether the original HTTP request method verb is sent in the request_method field of the JSON-encoded request.", + "type": "boolean", + "default": false + } + }, + { + "forward_request_uri": { + "description": "An optional value that defines whether the original HTTP request URI is sent in the request_uri field of the JSON-encoded request.", + "type": "boolean", + "default": false + } + }, + { + "forward_request_headers": { + "description": "An optional value that defines whether the original HTTP request headers are sent as a map in the request_headers field of the JSON-encoded request.", + "type": "boolean", + "default": false + } + }, + { + "forward_request_body": { + "description": "An optional value that defines whether the request body is sent in the request_body field of the JSON-encoded request. If the body arguments can be parsed, they are sent in the separate request_body_args field of the request. ", + "type": "boolean", + "default": false + } + }, + { + "is_proxy_integration": { + "description": "An optional value that defines whether the response format to receive from the Lambda to this format.", + "type": "boolean", + "default": false + } + }, + { + "awsgateway_compatible": { + "description": "An optional value that defines whether the plugin should wrap requests into the Amazon API gateway.", + "type": "boolean", + "default": false + } + }, + { + "proxy_url": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "skip_large_bodies": { + "description": "An optional value that defines whether Kong should send large bodies that are buffered to disk", + "type": "boolean", + "default": true + } + }, + { + "base64_encode_body": { + "description": "An optional value that Base64-encodes the request body.", + "type": "boolean", + "default": true + } + }, + { + "aws_imds_protocol_version": { + "default": "v1", + "required": true, + "description": "Identifier to select the IMDS protocol version to use: `v1` or `v2`.", + "type": "string", + "one_of": [ + "v1", + "v2" + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "config.aws_key", + "config.aws_secret" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "config.proxy_url" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/aws-lambda/3.8.x.json b/schemas/aws-lambda/3.8.x.json new file mode 100644 index 00000000..94f57420 --- /dev/null +++ b/schemas/aws-lambda/3.8.x.json @@ -0,0 +1,273 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "timeout": { + "description": "An optional timeout in milliseconds when invoking the function.", + "required": true, + "type": "number", + "default": 60000 + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "required": true, + "type": "number", + "default": 60000 + } + }, + { + "aws_key": { + "description": "The AWS key credential to be used when invoking the function.", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "aws_secret": { + "description": "The AWS secret credential to be used when invoking the function. ", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "aws_assume_role_arn": { + "description": "The target AWS IAM role ARN used to invoke the Lambda function.", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "aws_role_session_name": { + "description": "The identifier of the assumed role session.", + "type": "string", + "default": "kong" + } + }, + { + "aws_sts_endpoint_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "aws_region": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "function_name": { + "description": "The AWS Lambda function to invoke. Both function name and function ARN (including partial) are supported.", + "required": false, + "type": "string" + } + }, + { + "qualifier": { + "description": "The qualifier to use when invoking the function.", + "type": "string" + } + }, + { + "invocation_type": { + "description": "The InvocationType to use when invoking the function. Available types are RequestResponse, Event, DryRun.", + "required": true, + "one_of": [ + "RequestResponse", + "Event", + "DryRun" + ], + "type": "string", + "default": "RequestResponse" + } + }, + { + "log_type": { + "description": "The LogType to use when invoking the function. By default, None and Tail are supported.", + "required": true, + "one_of": [ + "Tail", + "None" + ], + "type": "string", + "default": "Tail" + } + }, + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 443 + } + }, + { + "disable_https": { + "default": false, + "type": "boolean" + } + }, + { + "unhandled_status": { + "description": "The response status code to use (instead of the default 200, 202, or 204) in the case of an Unhandled Function Error.", + "type": "integer", + "between": [ + 100, + 999 + ] + } + }, + { + "forward_request_method": { + "description": "An optional value that defines whether the original HTTP request method verb is sent in the request_method field of the JSON-encoded request.", + "type": "boolean", + "default": false + } + }, + { + "forward_request_uri": { + "description": "An optional value that defines whether the original HTTP request URI is sent in the request_uri field of the JSON-encoded request.", + "type": "boolean", + "default": false + } + }, + { + "forward_request_headers": { + "description": "An optional value that defines whether the original HTTP request headers are sent as a map in the request_headers field of the JSON-encoded request.", + "type": "boolean", + "default": false + } + }, + { + "forward_request_body": { + "description": "An optional value that defines whether the request body is sent in the request_body field of the JSON-encoded request. If the body arguments can be parsed, they are sent in the separate request_body_args field of the request. ", + "type": "boolean", + "default": false + } + }, + { + "is_proxy_integration": { + "description": "An optional value that defines whether the response format to receive from the Lambda to this format.", + "type": "boolean", + "default": false + } + }, + { + "awsgateway_compatible": { + "description": "An optional value that defines whether the plugin should wrap requests into the Amazon API gateway.", + "type": "boolean", + "default": false + } + }, + { + "proxy_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "skip_large_bodies": { + "description": "An optional value that defines whether Kong should send large bodies that are buffered to disk", + "type": "boolean", + "default": true + } + }, + { + "base64_encode_body": { + "description": "An optional value that Base64-encodes the request body.", + "type": "boolean", + "default": true + } + }, + { + "aws_imds_protocol_version": { + "description": "Identifier to select the IMDS protocol version to use: `v1` or `v2`.", + "required": true, + "one_of": [ + "v1", + "v2" + ], + "type": "string", + "default": "v1" + } + }, + { + "empty_arrays_mode": { + "description": "An optional value that defines whether Kong should send empty arrays (returned by Lambda function) as `[]` arrays or `{}` objects in JSON responses. The value `legacy` means Kong will send empty arrays as `{}` objects in response", + "required": true, + "one_of": [ + "legacy", + "correct" + ], + "type": "string", + "default": "legacy" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "config.aws_key", + "config.aws_secret" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "config.proxy_url" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/aws-lambda/3.9.x.json b/schemas/aws-lambda/3.9.x.json new file mode 100644 index 00000000..583a9b6a --- /dev/null +++ b/schemas/aws-lambda/3.9.x.json @@ -0,0 +1,273 @@ +{ + "entity_checks": [ + { + "mutually_required": [ + "config.aws_key", + "config.aws_secret" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "config.proxy_url" + ] + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "timeout": { + "default": 60000, + "description": "An optional timeout in milliseconds when invoking the function.", + "required": true, + "type": "number" + } + }, + { + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "required": true, + "type": "number" + } + }, + { + "aws_key": { + "encrypted": true, + "description": "The AWS key credential to be used when invoking the function.", + "referenceable": true, + "type": "string" + } + }, + { + "aws_secret": { + "encrypted": true, + "description": "The AWS secret credential to be used when invoking the function. ", + "referenceable": true, + "type": "string" + } + }, + { + "aws_assume_role_arn": { + "encrypted": true, + "description": "The target AWS IAM role ARN used to invoke the Lambda function.", + "referenceable": true, + "type": "string" + } + }, + { + "aws_role_session_name": { + "default": "kong", + "description": "The identifier of the assumed role session.", + "type": "string" + } + }, + { + "aws_sts_endpoint_url": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "aws_region": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "function_name": { + "description": "The AWS Lambda function to invoke. Both function name and function ARN (including partial) are supported.", + "required": false, + "type": "string" + } + }, + { + "qualifier": { + "description": "The qualifier to use when invoking the function.", + "type": "string" + } + }, + { + "invocation_type": { + "required": true, + "type": "string", + "default": "RequestResponse", + "description": "The InvocationType to use when invoking the function. Available types are RequestResponse, Event, DryRun.", + "one_of": [ + "RequestResponse", + "Event", + "DryRun" + ] + } + }, + { + "log_type": { + "required": true, + "type": "string", + "default": "Tail", + "description": "The LogType to use when invoking the function. By default, None and Tail are supported.", + "one_of": [ + "Tail", + "None" + ] + } + }, + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "default": 443, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "disable_https": { + "default": false, + "type": "boolean" + } + }, + { + "unhandled_status": { + "between": [ + 100, + 999 + ], + "description": "The response status code to use (instead of the default 200, 202, or 204) in the case of an Unhandled Function Error.", + "type": "integer" + } + }, + { + "forward_request_method": { + "default": false, + "description": "An optional value that defines whether the original HTTP request method verb is sent in the request_method field of the JSON-encoded request.", + "type": "boolean" + } + }, + { + "forward_request_uri": { + "default": false, + "description": "An optional value that defines whether the original HTTP request URI is sent in the request_uri field of the JSON-encoded request.", + "type": "boolean" + } + }, + { + "forward_request_headers": { + "default": false, + "description": "An optional value that defines whether the original HTTP request headers are sent as a map in the request_headers field of the JSON-encoded request.", + "type": "boolean" + } + }, + { + "forward_request_body": { + "default": false, + "description": "An optional value that defines whether the request body is sent in the request_body field of the JSON-encoded request. If the body arguments can be parsed, they are sent in the separate request_body_args field of the request. ", + "type": "boolean" + } + }, + { + "is_proxy_integration": { + "default": false, + "description": "An optional value that defines whether the response format to receive from the Lambda to this format.", + "type": "boolean" + } + }, + { + "awsgateway_compatible": { + "default": false, + "description": "An optional value that defines whether the plugin should wrap requests into the Amazon API gateway.", + "type": "boolean" + } + }, + { + "proxy_url": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "skip_large_bodies": { + "default": true, + "description": "An optional value that defines whether Kong should send large bodies that are buffered to disk", + "type": "boolean" + } + }, + { + "base64_encode_body": { + "default": true, + "description": "An optional value that Base64-encodes the request body.", + "type": "boolean" + } + }, + { + "aws_imds_protocol_version": { + "required": true, + "type": "string", + "default": "v1", + "description": "Identifier to select the IMDS protocol version to use: `v1` or `v2`.", + "one_of": [ + "v1", + "v2" + ] + } + }, + { + "empty_arrays_mode": { + "required": true, + "type": "string", + "default": "legacy", + "description": "An optional value that defines whether Kong should send empty arrays (returned by Lambda function) as `[]` arrays or `{}` objects in JSON responses. The value `legacy` means Kong will send empty arrays as `{}` objects in response", + "one_of": [ + "legacy", + "correct" + ] + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/azure-functions/3.10.x.json b/schemas/azure-functions/3.10.x.json new file mode 100644 index 00000000..a8594f04 --- /dev/null +++ b/schemas/azure-functions/3.10.x.json @@ -0,0 +1,125 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "timeout": { + "description": "Timeout in milliseconds before closing a connection to the Azure Functions server.", + "type": "number", + "default": 600000 + } + }, + { + "keepalive": { + "description": "Time in milliseconds during which an idle connection to the Azure Functions server lives before being closed.", + "type": "number", + "default": 60000 + } + }, + { + "https": { + "description": "Use of HTTPS to connect with the Azure Functions server.", + "type": "boolean", + "default": true + } + }, + { + "https_verify": { + "description": "Set to `true` to authenticate the Azure Functions server.", + "type": "boolean", + "default": false + } + }, + { + "apikey": { + "description": "The apikey to access the Azure resources. If provided, it is injected as the `x-functions-key` header.", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "clientid": { + "description": "The `clientid` to access the Azure resources. If provided, it is injected as the `x-functions-clientid` header.", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "appname": { + "description": "The Azure app name.", + "type": "string", + "required": true + } + }, + { + "hostdomain": { + "description": "The domain where the function resides.", + "type": "string", + "default": "azurewebsites.net", + "required": true + } + }, + { + "routeprefix": { + "description": "Route prefix to use.", + "type": "string", + "default": "api" + } + }, + { + "functionname": { + "description": "Name of the Azure function to invoke.", + "type": "string", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/azure-functions/3.11.x.json b/schemas/azure-functions/3.11.x.json new file mode 100644 index 00000000..ec2ba743 --- /dev/null +++ b/schemas/azure-functions/3.11.x.json @@ -0,0 +1,125 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "timeout": { + "description": "Timeout in milliseconds before closing a connection to the Azure Functions server.", + "default": 600000, + "type": "number" + } + }, + { + "keepalive": { + "description": "Time in milliseconds during which an idle connection to the Azure Functions server lives before being closed.", + "default": 60000, + "type": "number" + } + }, + { + "https": { + "description": "Use of HTTPS to connect with the Azure Functions server.", + "default": true, + "type": "boolean" + } + }, + { + "https_verify": { + "description": "Set to `true` to authenticate the Azure Functions server.", + "default": false, + "type": "boolean" + } + }, + { + "apikey": { + "type": "string", + "description": "The apikey to access the Azure resources. If provided, it is injected as the `x-functions-key` header.", + "referenceable": true, + "encrypted": true + } + }, + { + "clientid": { + "type": "string", + "description": "The `clientid` to access the Azure resources. If provided, it is injected as the `x-functions-clientid` header.", + "referenceable": true, + "encrypted": true + } + }, + { + "appname": { + "required": true, + "description": "The Azure app name.", + "type": "string" + } + }, + { + "hostdomain": { + "description": "The domain where the function resides.", + "required": true, + "default": "azurewebsites.net", + "type": "string" + } + }, + { + "routeprefix": { + "description": "Route prefix to use.", + "default": "api", + "type": "string" + } + }, + { + "functionname": { + "required": true, + "description": "Name of the Azure function to invoke.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/azure-functions/3.12.x.json b/schemas/azure-functions/3.12.x.json new file mode 100644 index 00000000..5f7523bb --- /dev/null +++ b/schemas/azure-functions/3.12.x.json @@ -0,0 +1,123 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "timeout": { + "type": "number", + "default": 600000, + "description": "Timeout in milliseconds before closing a connection to the Azure Functions server." + } + }, + { + "keepalive": { + "type": "number", + "default": 60000, + "description": "Time in milliseconds during which an idle connection to the Azure Functions server lives before being closed." + } + }, + { + "https": { + "type": "boolean", + "default": true, + "description": "Use of HTTPS to connect with the Azure Functions server." + } + }, + { + "https_verify": { + "type": "boolean", + "default": false, + "description": "Set to `true` to authenticate the Azure Functions server." + } + }, + { + "apikey": { + "type": "string", + "description": "The apikey to access the Azure resources. If provided, it is injected as the `x-functions-key` header.", + "referenceable": true, + "encrypted": true + } + }, + { + "clientid": { + "type": "string", + "description": "The `clientid` to access the Azure resources. If provided, it is injected as the `x-functions-clientid` header.", + "referenceable": true, + "encrypted": true + } + }, + { + "appname": { + "type": "string", + "description": "The Azure app name.", + "required": true + } + }, + { + "hostdomain": { + "type": "string", + "default": "azurewebsites.net", + "description": "The domain where the function resides.", + "required": true + } + }, + { + "routeprefix": { + "type": "string", + "default": "api", + "description": "Route prefix to use." + } + }, + { + "functionname": { + "type": "string", + "description": "Name of the Azure function to invoke.", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/azure-functions/3.4.x.json b/schemas/azure-functions/3.4.x.json index 12e39094..2a721dda 100644 --- a/schemas/azure-functions/3.4.x.json +++ b/schemas/azure-functions/3.4.x.json @@ -8,6 +8,9 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", "elements": { "one_of": [ "grpc", @@ -21,44 +24,55 @@ "ws", "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "timeout": { + "default": 600000, "type": "number", - "default": 600000 + "description": "Timeout in milliseconds before closing a connection to the Azure Functions server." } }, { "keepalive": { + "default": 60000, "type": "number", - "default": 60000 + "description": "Time in milliseconds during which an idle connection to the Azure Functions server lives before being closed." } }, { "https": { + "default": true, "type": "boolean", - "default": true + "description": "Use of HTTPS to connect with the Azure Functions server." } }, { "https_verify": { + "default": false, "type": "boolean", - "default": false + "description": "Set to `true` to authenticate the Azure Functions server." } }, { "apikey": { "type": "string", "referenceable": true, + "description": "The apikey to access the Azure resources. If provided, it is injected as the `x-functions-key` header.", "encrypted": true } }, @@ -66,37 +80,46 @@ "clientid": { "type": "string", "referenceable": true, + "description": "The `clientid` to access the Azure resources. If provided, it is injected as the `x-functions-clientid` header.", "encrypted": true } }, { "appname": { "type": "string", - "required": true + "required": true, + "description": "The Azure app name." } }, { "hostdomain": { + "default": "azurewebsites.net", "type": "string", - "required": true, - "default": "azurewebsites.net" + "description": "The domain where the function resides.", + "required": true } }, { "routeprefix": { + "default": "api", "type": "string", - "default": "api" + "description": "Route prefix to use." } }, { "functionname": { "type": "string", - "required": true + "required": true, + "description": "Name of the Azure function to invoke." } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/azure-functions/3.5.x.json b/schemas/azure-functions/3.5.x.json new file mode 100644 index 00000000..d6d7dc46 --- /dev/null +++ b/schemas/azure-functions/3.5.x.json @@ -0,0 +1,125 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "timeout": { + "default": 600000, + "type": "number", + "description": "Timeout in milliseconds before closing a connection to the Azure Functions server." + } + }, + { + "keepalive": { + "default": 60000, + "type": "number", + "description": "Time in milliseconds during which an idle connection to the Azure Functions server lives before being closed." + } + }, + { + "https": { + "default": true, + "type": "boolean", + "description": "Use of HTTPS to connect with the Azure Functions server." + } + }, + { + "https_verify": { + "default": false, + "type": "boolean", + "description": "Set to `true` to authenticate the Azure Functions server." + } + }, + { + "apikey": { + "description": "The apikey to access the Azure resources. If provided, it is injected as the `x-functions-key` header.", + "referenceable": true, + "type": "string", + "encrypted": true + } + }, + { + "clientid": { + "description": "The `clientid` to access the Azure resources. If provided, it is injected as the `x-functions-clientid` header.", + "referenceable": true, + "type": "string", + "encrypted": true + } + }, + { + "appname": { + "description": "The Azure app name.", + "type": "string", + "required": true + } + }, + { + "hostdomain": { + "description": "The domain where the function resides.", + "default": "azurewebsites.net", + "type": "string", + "required": true + } + }, + { + "routeprefix": { + "default": "api", + "type": "string", + "description": "Route prefix to use." + } + }, + { + "functionname": { + "description": "Name of the Azure function to invoke.", + "type": "string", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/azure-functions/3.6.x.json b/schemas/azure-functions/3.6.x.json new file mode 100644 index 00000000..278e9f48 --- /dev/null +++ b/schemas/azure-functions/3.6.x.json @@ -0,0 +1,125 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "timeout": { + "type": "number", + "default": 600000, + "description": "Timeout in milliseconds before closing a connection to the Azure Functions server." + } + }, + { + "keepalive": { + "type": "number", + "default": 60000, + "description": "Time in milliseconds during which an idle connection to the Azure Functions server lives before being closed." + } + }, + { + "https": { + "type": "boolean", + "default": true, + "description": "Use of HTTPS to connect with the Azure Functions server." + } + }, + { + "https_verify": { + "type": "boolean", + "default": false, + "description": "Set to `true` to authenticate the Azure Functions server." + } + }, + { + "apikey": { + "encrypted": true, + "type": "string", + "description": "The apikey to access the Azure resources. If provided, it is injected as the `x-functions-key` header.", + "referenceable": true + } + }, + { + "clientid": { + "encrypted": true, + "type": "string", + "description": "The `clientid` to access the Azure resources. If provided, it is injected as the `x-functions-clientid` header.", + "referenceable": true + } + }, + { + "appname": { + "required": true, + "type": "string", + "description": "The Azure app name." + } + }, + { + "hostdomain": { + "required": true, + "type": "string", + "default": "azurewebsites.net", + "description": "The domain where the function resides." + } + }, + { + "routeprefix": { + "type": "string", + "default": "api", + "description": "Route prefix to use." + } + }, + { + "functionname": { + "required": true, + "type": "string", + "description": "Name of the Azure function to invoke." + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/azure-functions/3.7.x.json b/schemas/azure-functions/3.7.x.json new file mode 100644 index 00000000..351a20c8 --- /dev/null +++ b/schemas/azure-functions/3.7.x.json @@ -0,0 +1,125 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "timeout": { + "description": "Timeout in milliseconds before closing a connection to the Azure Functions server.", + "type": "number", + "default": 600000 + } + }, + { + "keepalive": { + "description": "Time in milliseconds during which an idle connection to the Azure Functions server lives before being closed.", + "type": "number", + "default": 60000 + } + }, + { + "https": { + "description": "Use of HTTPS to connect with the Azure Functions server.", + "type": "boolean", + "default": true + } + }, + { + "https_verify": { + "description": "Set to `true` to authenticate the Azure Functions server.", + "type": "boolean", + "default": false + } + }, + { + "apikey": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "The apikey to access the Azure resources. If provided, it is injected as the `x-functions-key` header." + } + }, + { + "clientid": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "The `clientid` to access the Azure resources. If provided, it is injected as the `x-functions-clientid` header." + } + }, + { + "appname": { + "required": true, + "description": "The Azure app name.", + "type": "string" + } + }, + { + "hostdomain": { + "required": true, + "description": "The domain where the function resides.", + "type": "string", + "default": "azurewebsites.net" + } + }, + { + "routeprefix": { + "description": "Route prefix to use.", + "type": "string", + "default": "api" + } + }, + { + "functionname": { + "required": true, + "description": "Name of the Azure function to invoke.", + "type": "string" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/azure-functions/3.8.x.json b/schemas/azure-functions/3.8.x.json new file mode 100644 index 00000000..5299c53a --- /dev/null +++ b/schemas/azure-functions/3.8.x.json @@ -0,0 +1,125 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "timeout": { + "description": "Timeout in milliseconds before closing a connection to the Azure Functions server.", + "type": "number", + "default": 600000 + } + }, + { + "keepalive": { + "description": "Time in milliseconds during which an idle connection to the Azure Functions server lives before being closed.", + "type": "number", + "default": 60000 + } + }, + { + "https": { + "description": "Use of HTTPS to connect with the Azure Functions server.", + "type": "boolean", + "default": true + } + }, + { + "https_verify": { + "description": "Set to `true` to authenticate the Azure Functions server.", + "type": "boolean", + "default": false + } + }, + { + "apikey": { + "description": "The apikey to access the Azure resources. If provided, it is injected as the `x-functions-key` header.", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "clientid": { + "description": "The `clientid` to access the Azure resources. If provided, it is injected as the `x-functions-clientid` header.", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "appname": { + "description": "The Azure app name.", + "type": "string", + "required": true + } + }, + { + "hostdomain": { + "description": "The domain where the function resides.", + "type": "string", + "required": true, + "default": "azurewebsites.net" + } + }, + { + "routeprefix": { + "description": "Route prefix to use.", + "type": "string", + "default": "api" + } + }, + { + "functionname": { + "description": "Name of the Azure function to invoke.", + "type": "string", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/azure-functions/3.9.x.json b/schemas/azure-functions/3.9.x.json new file mode 100644 index 00000000..19e89278 --- /dev/null +++ b/schemas/azure-functions/3.9.x.json @@ -0,0 +1,125 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "timeout": { + "default": 600000, + "description": "Timeout in milliseconds before closing a connection to the Azure Functions server.", + "type": "number" + } + }, + { + "keepalive": { + "default": 60000, + "description": "Time in milliseconds during which an idle connection to the Azure Functions server lives before being closed.", + "type": "number" + } + }, + { + "https": { + "default": true, + "description": "Use of HTTPS to connect with the Azure Functions server.", + "type": "boolean" + } + }, + { + "https_verify": { + "default": false, + "description": "Set to `true` to authenticate the Azure Functions server.", + "type": "boolean" + } + }, + { + "apikey": { + "encrypted": true, + "description": "The apikey to access the Azure resources. If provided, it is injected as the `x-functions-key` header.", + "referenceable": true, + "type": "string" + } + }, + { + "clientid": { + "encrypted": true, + "description": "The `clientid` to access the Azure resources. If provided, it is injected as the `x-functions-clientid` header.", + "referenceable": true, + "type": "string" + } + }, + { + "appname": { + "description": "The Azure app name.", + "required": true, + "type": "string" + } + }, + { + "hostdomain": { + "default": "azurewebsites.net", + "description": "The domain where the function resides.", + "required": true, + "type": "string" + } + }, + { + "routeprefix": { + "default": "api", + "description": "Route prefix to use.", + "type": "string" + } + }, + { + "functionname": { + "description": "Name of the Azure function to invoke.", + "required": true, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/basic-auth/3.10.x.json b/schemas/basic-auth/3.10.x.json new file mode 100644 index 00000000..faa469e5 --- /dev/null +++ b/schemas/basic-auth/3.10.x.json @@ -0,0 +1,78 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Please note that this value must refer to the Consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the `Authorization` header) before proxying it.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string", + "default": "service", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/basic-auth/3.11.x.json b/schemas/basic-auth/3.11.x.json new file mode 100644 index 00000000..0640b037 --- /dev/null +++ b/schemas/basic-auth/3.11.x.json @@ -0,0 +1,78 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Please note that this value must refer to the Consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "hide_credentials": { + "default": false, + "required": true, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the `Authorization` header) before proxying it.", + "type": "boolean" + } + }, + { + "realm": { + "default": "service", + "required": true, + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/basic-auth/3.12.x.json b/schemas/basic-auth/3.12.x.json new file mode 100644 index 00000000..ea97cf21 --- /dev/null +++ b/schemas/basic-auth/3.12.x.json @@ -0,0 +1,76 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Please note that this value must refer to the Consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "hide_credentials": { + "type": "boolean", + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the `Authorization` header) before proxying it.", + "required": true + } + }, + { + "realm": { + "type": "string", + "default": "service", + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/basic-auth/3.4.x.json b/schemas/basic-auth/3.4.x.json index 5764aedf..861d88d9 100644 --- a/schemas/basic-auth/3.4.x.json +++ b/schemas/basic-auth/3.4.x.json @@ -2,8 +2,9 @@ "fields": [ { "consumer": { - "eq": null, "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, @@ -17,7 +18,10 @@ "ws", "wss" ], + "required": true, + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", @@ -25,32 +29,42 @@ "https", "ws", "wss" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Please note that this value must refer to the Consumer `id` or `username` attribute, and **not** its `custom_id`.", "type": "string" } }, { "hide_credentials": { - "required": true, "default": false, - "type": "boolean" + "type": "boolean", + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the `Authorization` header) before proxying it.", + "required": true } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/basic-auth/3.5.x.json b/schemas/basic-auth/3.5.x.json new file mode 100644 index 00000000..d3ad618f --- /dev/null +++ b/schemas/basic-auth/3.5.x.json @@ -0,0 +1,70 @@ +{ + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "anonymous": { + "type": "string", + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Please note that this value must refer to the Consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "hide_credentials": { + "required": true, + "default": false, + "type": "boolean", + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the `Authorization` header) before proxying it." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/basic-auth/3.6.x.json b/schemas/basic-auth/3.6.x.json new file mode 100644 index 00000000..73299c81 --- /dev/null +++ b/schemas/basic-auth/3.6.x.json @@ -0,0 +1,78 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Please note that this value must refer to the Consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "hide_credentials": { + "required": true, + "type": "boolean", + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the `Authorization` header) before proxying it." + } + }, + { + "realm": { + "required": true, + "type": "string", + "default": "service", + "description": "When authentication or authorization fails, or there is an unexpected error, the plugin sends an `WWW-Authenticate` header with the `realm` attribute value." + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/basic-auth/3.7.x.json b/schemas/basic-auth/3.7.x.json new file mode 100644 index 00000000..d08c9fbb --- /dev/null +++ b/schemas/basic-auth/3.7.x.json @@ -0,0 +1,78 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Please note that this value must refer to the Consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "hide_credentials": { + "required": true, + "type": "boolean", + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the `Authorization` header) before proxying it.", + "default": false + } + }, + { + "realm": { + "required": true, + "type": "string", + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "default": "service" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/basic-auth/3.8.x.json b/schemas/basic-auth/3.8.x.json new file mode 100644 index 00000000..fb634743 --- /dev/null +++ b/schemas/basic-auth/3.8.x.json @@ -0,0 +1,78 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": true, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Please note that this value must refer to the Consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the `Authorization` header) before proxying it.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "required": true, + "type": "string", + "default": "service" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/basic-auth/3.9.x.json b/schemas/basic-auth/3.9.x.json new file mode 100644 index 00000000..0a5c8b49 --- /dev/null +++ b/schemas/basic-auth/3.9.x.json @@ -0,0 +1,78 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": true, + "type": "set" + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "anonymous": { + "type": "string", + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Please note that this value must refer to the Consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the `Authorization` header) before proxying it.", + "required": true, + "type": "boolean" + } + }, + { + "realm": { + "default": "service", + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "required": true, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/bot-detection/3.10.x.json b/schemas/bot-detection/3.10.x.json new file mode 100644 index 00000000..757d71a3 --- /dev/null +++ b/schemas/bot-detection/3.10.x.json @@ -0,0 +1,79 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "allow": { + "description": "An array of regular expressions that should be allowed. The regular expressions will be checked against the `User-Agent` header.", + "type": "array", + "default": [ + + ], + "elements": { + "type": "string", + "is_regex": true + } + } + }, + { + "deny": { + "description": "An array of regular expressions that should be denied. The regular expressions will be checked against the `User-Agent` header.", + "type": "array", + "default": [ + + ], + "elements": { + "type": "string", + "is_regex": true + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/bot-detection/3.11.x.json b/schemas/bot-detection/3.11.x.json new file mode 100644 index 00000000..05727b88 --- /dev/null +++ b/schemas/bot-detection/3.11.x.json @@ -0,0 +1,79 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "allow": { + "type": "array", + "description": "An array of regular expressions that should be allowed. The regular expressions will be checked against the `User-Agent` header.", + "default": [ + + ], + "elements": { + "is_regex": true, + "type": "string" + } + } + }, + { + "deny": { + "type": "array", + "description": "An array of regular expressions that should be denied. The regular expressions will be checked against the `User-Agent` header.", + "default": [ + + ], + "elements": { + "is_regex": true, + "type": "string" + } + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/bot-detection/3.12.x.json b/schemas/bot-detection/3.12.x.json new file mode 100644 index 00000000..e45697a9 --- /dev/null +++ b/schemas/bot-detection/3.12.x.json @@ -0,0 +1,73 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "allow": { + "description": "An array of regular expressions that should be allowed. The regular expressions will be checked against the `User-Agent` header.", + "default": [], + "type": "array", + "elements": { + "type": "string", + "is_regex": true + } + } + }, + { + "deny": { + "description": "An array of regular expressions that should be denied. The regular expressions will be checked against the `User-Agent` header.", + "default": [], + "type": "array", + "elements": { + "type": "string", + "is_regex": true + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/bot-detection/3.4.x.json b/schemas/bot-detection/3.4.x.json index 1aa68467..31ebd820 100644 --- a/schemas/bot-detection/3.4.x.json +++ b/schemas/bot-detection/3.4.x.json @@ -2,8 +2,9 @@ "fields": [ { "consumer": { - "eq": null, "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, @@ -15,50 +16,64 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "allow": { - "type": "array", - "elements": { - "type": "string", - "is_regex": true - }, "default": [ - ] + ], + "description": "An array of regular expressions that should be allowed. The regular expressions will be checked against the `User-Agent` header.", + "type": "array", + "elements": { + "is_regex": true, + "type": "string" + } } }, { "deny": { - "type": "array", - "elements": { - "type": "string", - "is_regex": true - }, "default": [ - ] + ], + "description": "An array of regular expressions that should be denied. The regular expressions will be checked against the `User-Agent` header.", + "type": "array", + "elements": { + "is_regex": true, + "type": "string" + } } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/bot-detection/3.5.x.json b/schemas/bot-detection/3.5.x.json new file mode 100644 index 00000000..bdb35f4c --- /dev/null +++ b/schemas/bot-detection/3.5.x.json @@ -0,0 +1,79 @@ +{ + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "allow": { + "description": "An array of regular expressions that should be allowed. The regular expressions will be checked against the `User-Agent` header.", + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "is_regex": true + } + } + }, + { + "deny": { + "description": "An array of regular expressions that should be denied. The regular expressions will be checked against the `User-Agent` header.", + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "is_regex": true + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/bot-detection/3.6.x.json b/schemas/bot-detection/3.6.x.json new file mode 100644 index 00000000..7f32a9c4 --- /dev/null +++ b/schemas/bot-detection/3.6.x.json @@ -0,0 +1,79 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "allow": { + "elements": { + "is_regex": true, + "type": "string" + }, + "type": "array", + "description": "An array of regular expressions that should be allowed. The regular expressions will be checked against the `User-Agent` header.", + "default": [ + + ] + } + }, + { + "deny": { + "elements": { + "is_regex": true, + "type": "string" + }, + "type": "array", + "description": "An array of regular expressions that should be denied. The regular expressions will be checked against the `User-Agent` header.", + "default": [ + + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/bot-detection/3.7.x.json b/schemas/bot-detection/3.7.x.json new file mode 100644 index 00000000..f5f0fd1b --- /dev/null +++ b/schemas/bot-detection/3.7.x.json @@ -0,0 +1,79 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "allow": { + "type": "array", + "elements": { + "type": "string", + "is_regex": true + }, + "description": "An array of regular expressions that should be allowed. The regular expressions will be checked against the `User-Agent` header.", + "default": [ + + ] + } + }, + { + "deny": { + "type": "array", + "elements": { + "type": "string", + "is_regex": true + }, + "description": "An array of regular expressions that should be denied. The regular expressions will be checked against the `User-Agent` header.", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/bot-detection/3.8.x.json b/schemas/bot-detection/3.8.x.json new file mode 100644 index 00000000..3f7aa01d --- /dev/null +++ b/schemas/bot-detection/3.8.x.json @@ -0,0 +1,79 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "allow": { + "description": "An array of regular expressions that should be allowed. The regular expressions will be checked against the `User-Agent` header.", + "type": "array", + "elements": { + "type": "string", + "is_regex": true + }, + "default": [ + + ] + } + }, + { + "deny": { + "description": "An array of regular expressions that should be denied. The regular expressions will be checked against the `User-Agent` header.", + "type": "array", + "elements": { + "type": "string", + "is_regex": true + }, + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/bot-detection/3.9.x.json b/schemas/bot-detection/3.9.x.json new file mode 100644 index 00000000..d48d260c --- /dev/null +++ b/schemas/bot-detection/3.9.x.json @@ -0,0 +1,79 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "allow": { + "elements": { + "type": "string", + "is_regex": true + }, + "description": "An array of regular expressions that should be allowed. The regular expressions will be checked against the `User-Agent` header.", + "default": [ + + ], + "type": "array" + } + }, + { + "deny": { + "elements": { + "type": "string", + "is_regex": true + }, + "description": "An array of regular expressions that should be denied. The regular expressions will be checked against the `User-Agent` header.", + "default": [ + + ], + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/canary/3.10.x.json b/schemas/canary/3.10.x.json new file mode 100644 index 00000000..0ec422ea --- /dev/null +++ b/schemas/canary/3.10.x.json @@ -0,0 +1,190 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.upstream_uri", + "config.upstream_host", + "config.upstream_port" + ] + }, + { + "conditional": { + "if_match": { + "eq": "header" + }, + "then_field": "config.hash_header", + "if_field": "config.hash", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "config.upstream_host", + "if_field": "config.upstream_fallback", + "then_match": { + "required": true + } + } + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "required": true, + "type": "record", + "shorthand_fields": [ + { + "hash": { + "description": "Hash algorithm to be used for canary release. `whitelist` is deprecated. Use `allow` instead `blacklist` is deprecated. Use `deny` instead.", + "type": "string" + } + } + ], + "fields": [ + { + "start": { + "description": "Future time in seconds since epoch, when the canary release will start. Ignored when `percentage` is set, or when using `allow` or `deny` in `hash`.", + "type": "number" + } + }, + { + "hash": { + "description": "Hash algorithm to be used for canary release.\n\n* `consumer`: The hash will be based on the consumer.\n* `ip`: The hash will be based on the client IP address.\n* `none`: No hash will be applied.\n* `allow`: Allows the specified groups to access the canary release.\n* `deny`: Denies the specified groups from accessing the canary release.\n* `header`: The hash will be based on the specified header value.", + "default": "consumer", + "type": "string", + "one_of": [ + "consumer", + "ip", + "none", + "allow", + "deny", + "header" + ] + } + }, + { + "hash_header": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + { + "duration": { + "gt": 0, + "default": 3600, + "description": "The duration of the canary release in seconds.", + "type": "number" + } + }, + { + "steps": { + "gt": 1, + "default": 1000, + "description": "The number of steps for the canary release.", + "type": "number" + } + }, + { + "percentage": { + "description": "The percentage of traffic to be routed to the canary release.", + "type": "number", + "between": [ + 0, + 100 + ] + } + }, + { + "upstream_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "upstream_port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "upstream_uri": { + "description": "The URI of the upstream server to be used for the canary release.", + "type": "string", + "len_min": 1 + } + }, + { + "upstream_fallback": { + "description": "Specifies whether to fallback to the upstream server if the canary release fails.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "groups": { + "description": "The groups allowed to access the canary release.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "canary_by_header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/canary/3.11.x.json b/schemas/canary/3.11.x.json new file mode 100644 index 00000000..0f17e42a --- /dev/null +++ b/schemas/canary/3.11.x.json @@ -0,0 +1,190 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "fields": [ + { + "start": { + "description": "Future time in seconds since epoch, when the canary release will start. Ignored when `percentage` is set, or when using `allow` or `deny` in `hash`.", + "type": "number" + } + }, + { + "hash": { + "one_of": [ + "consumer", + "ip", + "none", + "allow", + "deny", + "header" + ], + "description": "Hash algorithm to be used for canary release.\n\n* `consumer`: The hash will be based on the consumer.\n* `ip`: The hash will be based on the client IP address.\n* `none`: No hash will be applied.\n* `allow`: Allows the specified groups to access the canary release.\n* `deny`: Denies the specified groups from accessing the canary release.\n* `header`: The hash will be based on the specified header value.", + "default": "consumer", + "type": "string" + } + }, + { + "hash_header": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + { + "duration": { + "description": "The duration of the canary release in seconds.", + "gt": 0, + "default": 3600, + "type": "number" + } + }, + { + "steps": { + "description": "The number of steps for the canary release.", + "gt": 1, + "default": 1000, + "type": "number" + } + }, + { + "percentage": { + "between": [ + 0, + 100 + ], + "description": "The percentage of traffic to be routed to the canary release.", + "type": "number" + } + }, + { + "upstream_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "upstream_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "upstream_uri": { + "len_min": 1, + "description": "The URI of the upstream server to be used for the canary release.", + "type": "string" + } + }, + { + "upstream_fallback": { + "description": "Specifies whether to fallback to the upstream server if the canary release fails.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "groups": { + "type": "array", + "description": "The groups allowed to access the canary release.", + "elements": { + "type": "string" + } + } + }, + { + "canary_by_header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + } + ], + "required": true, + "shorthand_fields": [ + { + "hash": { + "description": "Hash algorithm to be used for canary release. `whitelist` is deprecated. Use `allow` instead `blacklist` is deprecated. Use `deny` instead.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.upstream_uri", + "config.upstream_host", + "config.upstream_port" + ] + }, + { + "conditional": { + "if_match": { + "eq": "header" + }, + "then_field": "config.hash_header", + "if_field": "config.hash", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "config.upstream_host", + "if_field": "config.upstream_fallback", + "then_match": { + "required": true + } + } + } + ] +} \ No newline at end of file diff --git a/schemas/canary/3.12.x.json b/schemas/canary/3.12.x.json new file mode 100644 index 00000000..a4baf88f --- /dev/null +++ b/schemas/canary/3.12.x.json @@ -0,0 +1,190 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.upstream_uri", + "config.upstream_host", + "config.upstream_port" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "header" + }, + "then_field": "config.hash_header", + "if_field": "config.hash" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "config.upstream_host", + "if_field": "config.upstream_fallback" + } + } + ], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "shorthand_fields": [ + { + "hash": { + "description": "Hash algorithm to be used for canary release. `whitelist` is deprecated. Use `allow` instead `blacklist` is deprecated. Use `deny` instead.", + "type": "string" + } + } + ], + "fields": [ + { + "start": { + "type": "number", + "description": "Future time in seconds since epoch, when the canary release will start. Ignored when `percentage` is set, or when using `allow` or `deny` in `hash`." + } + }, + { + "hash": { + "type": "string", + "default": "consumer", + "one_of": [ + "consumer", + "ip", + "none", + "allow", + "deny", + "header" + ], + "description": "Hash algorithm to be used for canary release.\n\n* `consumer`: The hash will be based on the consumer.\n* `ip`: The hash will be based on the client IP address.\n* `none`: No hash will be applied.\n* `allow`: Allows the specified groups to access the canary release.\n* `deny`: Denies the specified groups from accessing the canary release.\n* `header`: The hash will be based on the specified header value." + } + }, + { + "hash_header": { + "type": "string", + "description": "A string representing an HTTP header name." + } + }, + { + "duration": { + "type": "number", + "default": 3600, + "gt": 0, + "description": "The duration of the canary release in seconds." + } + }, + { + "steps": { + "type": "number", + "default": 1000, + "gt": 1, + "description": "The number of steps for the canary release." + } + }, + { + "percentage": { + "type": "number", + "between": [ + 0, + 100 + ], + "description": "The percentage of traffic to be routed to the canary release." + } + }, + { + "upstream_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "upstream_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "upstream_uri": { + "type": "string", + "len_min": 1, + "description": "The URI of the upstream server to be used for the canary release." + } + }, + { + "upstream_fallback": { + "type": "boolean", + "default": false, + "description": "Specifies whether to fallback to the upstream server if the canary release fails.", + "required": true + } + }, + { + "groups": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "The groups allowed to access the canary release." + } + }, + { + "canary_by_header_name": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/canary/3.4.x.json b/schemas/canary/3.4.x.json index 49a4a71e..fc9653bd 100644 --- a/schemas/canary/3.4.x.json +++ b/schemas/canary/3.4.x.json @@ -2,8 +2,17 @@ "fields": [ { "consumer": { - "eq": null, "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, @@ -15,17 +24,18 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } } }, { @@ -33,20 +43,20 @@ "shorthand_fields": [ { "hash": { - "type": "string" + "type": "string", + "description": "Hash algorithm to be used for canary release. `whitelist` is deprecated. Use `allow` instead `blacklist` is deprecated. Use `deny` instead." } } ], - "required": true, "fields": [ { "start": { + "description": "Future time in seconds since epoch, when the canary release will start. Ignored when `percentage` is set, or when using `allow` or `deny` in `hash`.", "type": "number" } }, { "hash": { - "type": "string", "default": "consumer", "one_of": [ "consumer", @@ -55,26 +65,31 @@ "allow", "deny", "header" - ] + ], + "type": "string", + "description": "Hash algorithm to be used for canary release.\n\n* `consumer`: The hash will be based on the consumer.\n* `ip`: The hash will be based on the client IP address.\n* `none`: No hash will be applied.\n* `allow`: Allows the specified groups to access the canary release.\n* `deny`: Denies the specified groups from accessing the canary release.\n* `header`: The hash will be based on the specified header value." } }, { "hash_header": { - "type": "string" + "type": "string", + "description": "A string representing an HTTP header name." } }, { "duration": { "default": 3600, "gt": 0, - "type": "number" + "type": "number", + "description": "The duration of the canary release in seconds." } }, { "steps": { "default": 1000, "gt": 1, - "type": "number" + "type": "number", + "description": "The number of steps for the canary release." } }, { @@ -83,12 +98,14 @@ 0, 100 ], + "description": "The percentage of traffic to be routed to the canary release.", "type": "number" } }, { "upstream_host": { - "type": "string" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { @@ -97,24 +114,28 @@ 0, 65535 ], - "type": "integer" + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." } }, { "upstream_uri": { "len_min": 1, - "type": "string" + "type": "string", + "description": "The URI of the upstream server to be used for the canary release." } }, { "upstream_fallback": { + "default": false, "type": "boolean", "required": true, - "default": false + "description": "Specifies whether to fallback to the upstream server if the canary release fails." } }, { "groups": { + "description": "The groups allowed to access the canary release.", "elements": { "type": "string" }, @@ -123,12 +144,47 @@ }, { "canary_by_header_name": { - "type": "string" + "type": "string", + "description": "A string representing an HTTP header name." } } ], + "required": true, "type": "record" } } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.upstream_uri", + "config.upstream_host", + "config.upstream_port" + ] + }, + { + "conditional": { + "then_field": "config.hash_header", + "if_match": { + "eq": "header" + }, + "then_match": { + "required": true + }, + "if_field": "config.hash" + } + }, + { + "conditional": { + "then_field": "config.upstream_host", + "if_match": { + "eq": true + }, + "then_match": { + "required": true + }, + "if_field": "config.upstream_fallback" + } + } ] } \ No newline at end of file diff --git a/schemas/canary/3.5.x.json b/schemas/canary/3.5.x.json new file mode 100644 index 00000000..157a29c4 --- /dev/null +++ b/schemas/canary/3.5.x.json @@ -0,0 +1,190 @@ +{ + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "shorthand_fields": [ + { + "hash": { + "type": "string", + "description": "Hash algorithm to be used for canary release. `whitelist` is deprecated. Use `allow` instead `blacklist` is deprecated. Use `deny` instead." + } + } + ], + "fields": [ + { + "start": { + "type": "number", + "description": "Future time in seconds since epoch, when the canary release will start. Ignored when `percentage` is set, or when using `allow` or `deny` in `hash`." + } + }, + { + "hash": { + "one_of": [ + "consumer", + "ip", + "none", + "allow", + "deny", + "header" + ], + "default": "consumer", + "type": "string", + "description": "Hash algorithm to be used for canary release.\n\n* `consumer`: The hash will be based on the consumer.\n* `ip`: The hash will be based on the client IP address.\n* `none`: No hash will be applied.\n* `allow`: Allows the specified groups to access the canary release.\n* `deny`: Denies the specified groups from accessing the canary release.\n* `header`: The hash will be based on the specified header value." + } + }, + { + "hash_header": { + "type": "string", + "description": "A string representing an HTTP header name." + } + }, + { + "duration": { + "gt": 0, + "default": 3600, + "type": "number", + "description": "The duration of the canary release in seconds." + } + }, + { + "steps": { + "gt": 1, + "default": 1000, + "type": "number", + "description": "The number of steps for the canary release." + } + }, + { + "percentage": { + "between": [ + 0, + 100 + ], + "type": "number", + "description": "The percentage of traffic to be routed to the canary release." + } + }, + { + "upstream_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "upstream_port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "upstream_uri": { + "len_min": 1, + "type": "string", + "description": "The URI of the upstream server to be used for the canary release." + } + }, + { + "upstream_fallback": { + "description": "Specifies whether to fallback to the upstream server if the canary release fails.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "groups": { + "description": "The groups allowed to access the canary release.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "canary_by_header_name": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.upstream_uri", + "config.upstream_host", + "config.upstream_port" + ] + }, + { + "conditional": { + "then_field": "config.hash_header", + "if_match": { + "eq": "header" + }, + "then_match": { + "required": true + }, + "if_field": "config.hash" + } + }, + { + "conditional": { + "then_field": "config.upstream_host", + "if_match": { + "eq": true + }, + "then_match": { + "required": true + }, + "if_field": "config.upstream_fallback" + } + } + ] +} \ No newline at end of file diff --git a/schemas/canary/3.6.x.json b/schemas/canary/3.6.x.json new file mode 100644 index 00000000..74cb7bad --- /dev/null +++ b/schemas/canary/3.6.x.json @@ -0,0 +1,190 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.upstream_uri", + "config.upstream_host", + "config.upstream_port" + ] + }, + { + "conditional": { + "then_field": "config.hash_header", + "if_field": "config.hash", + "then_match": { + "required": true + }, + "if_match": { + "eq": "header" + } + } + }, + { + "conditional": { + "then_field": "config.upstream_host", + "if_field": "config.upstream_fallback", + "then_match": { + "required": true + }, + "if_match": { + "eq": true + } + } + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "start": { + "description": "Future time in seconds since epoch, when the canary release will start. Ignored when `percentage` is set, or when using `allow` or `deny` in `hash`.", + "type": "number" + } + }, + { + "hash": { + "one_of": [ + "consumer", + "ip", + "none", + "allow", + "deny", + "header" + ], + "type": "string", + "description": "Hash algorithm to be used for canary release.\n\n* `consumer`: The hash will be based on the consumer.\n* `ip`: The hash will be based on the client IP address.\n* `none`: No hash will be applied.\n* `allow`: Allows the specified groups to access the canary release.\n* `deny`: Denies the specified groups from accessing the canary release.\n* `header`: The hash will be based on the specified header value.", + "default": "consumer" + } + }, + { + "hash_header": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + { + "duration": { + "gt": 0, + "type": "number", + "description": "The duration of the canary release in seconds.", + "default": 3600 + } + }, + { + "steps": { + "gt": 1, + "type": "number", + "description": "The number of steps for the canary release.", + "default": 1000 + } + }, + { + "percentage": { + "type": "number", + "description": "The percentage of traffic to be routed to the canary release.", + "between": [ + 0, + 100 + ] + } + }, + { + "upstream_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "upstream_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "upstream_uri": { + "type": "string", + "description": "The URI of the upstream server to be used for the canary release.", + "len_min": 1 + } + }, + { + "upstream_fallback": { + "required": true, + "type": "boolean", + "default": false, + "description": "Specifies whether to fallback to the upstream server if the canary release fails." + } + }, + { + "groups": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "The groups allowed to access the canary release." + } + }, + { + "canary_by_header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + } + ], + "shorthand_fields": [ + { + "hash": { + "description": "Hash algorithm to be used for canary release. `whitelist` is deprecated. Use `allow` instead `blacklist` is deprecated. Use `deny` instead.", + "type": "string" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/canary/3.7.x.json b/schemas/canary/3.7.x.json new file mode 100644 index 00000000..29995723 --- /dev/null +++ b/schemas/canary/3.7.x.json @@ -0,0 +1,190 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "start": { + "type": "number", + "description": "Future time in seconds since epoch, when the canary release will start. Ignored when `percentage` is set, or when using `allow` or `deny` in `hash`." + } + }, + { + "hash": { + "default": "consumer", + "type": "string", + "description": "Hash algorithm to be used for canary release.\n\n* `consumer`: The hash will be based on the consumer.\n* `ip`: The hash will be based on the client IP address.\n* `none`: No hash will be applied.\n* `allow`: Allows the specified groups to access the canary release.\n* `deny`: Denies the specified groups from accessing the canary release.\n* `header`: The hash will be based on the specified header value.", + "one_of": [ + "consumer", + "ip", + "none", + "allow", + "deny", + "header" + ] + } + }, + { + "hash_header": { + "type": "string", + "description": "A string representing an HTTP header name." + } + }, + { + "duration": { + "default": 3600, + "type": "number", + "description": "The duration of the canary release in seconds.", + "gt": 0 + } + }, + { + "steps": { + "default": 1000, + "type": "number", + "description": "The number of steps for the canary release.", + "gt": 1 + } + }, + { + "percentage": { + "type": "number", + "description": "The percentage of traffic to be routed to the canary release.", + "between": [ + 0, + 100 + ] + } + }, + { + "upstream_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "upstream_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "upstream_uri": { + "type": "string", + "description": "The URI of the upstream server to be used for the canary release.", + "len_min": 1 + } + }, + { + "upstream_fallback": { + "required": true, + "type": "boolean", + "description": "Specifies whether to fallback to the upstream server if the canary release fails.", + "default": false + } + }, + { + "groups": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "The groups allowed to access the canary release." + } + }, + { + "canary_by_header_name": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + ], + "required": true, + "shorthand_fields": [ + { + "hash": { + "type": "string", + "description": "Hash algorithm to be used for canary release. `whitelist` is deprecated. Use `allow` instead `blacklist` is deprecated. Use `deny` instead." + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.upstream_uri", + "config.upstream_host", + "config.upstream_port" + ] + }, + { + "conditional": { + "if_field": "config.hash", + "if_match": { + "eq": "header" + }, + "then_field": "config.hash_header", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "config.upstream_fallback", + "if_match": { + "eq": true + }, + "then_field": "config.upstream_host", + "then_match": { + "required": true + } + } + } + ] +} \ No newline at end of file diff --git a/schemas/canary/3.8.x.json b/schemas/canary/3.8.x.json new file mode 100644 index 00000000..11ed4236 --- /dev/null +++ b/schemas/canary/3.8.x.json @@ -0,0 +1,190 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "start": { + "description": "Future time in seconds since epoch, when the canary release will start. Ignored when `percentage` is set, or when using `allow` or `deny` in `hash`.", + "type": "number" + } + }, + { + "hash": { + "description": "Hash algorithm to be used for canary release.\n\n* `consumer`: The hash will be based on the consumer.\n* `ip`: The hash will be based on the client IP address.\n* `none`: No hash will be applied.\n* `allow`: Allows the specified groups to access the canary release.\n* `deny`: Denies the specified groups from accessing the canary release.\n* `header`: The hash will be based on the specified header value.", + "type": "string", + "default": "consumer", + "one_of": [ + "consumer", + "ip", + "none", + "allow", + "deny", + "header" + ] + } + }, + { + "hash_header": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + { + "duration": { + "description": "The duration of the canary release in seconds.", + "type": "number", + "gt": 0, + "default": 3600 + } + }, + { + "steps": { + "description": "The number of steps for the canary release.", + "type": "number", + "gt": 1, + "default": 1000 + } + }, + { + "percentage": { + "description": "The percentage of traffic to be routed to the canary release.", + "type": "number", + "between": [ + 0, + 100 + ] + } + }, + { + "upstream_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "upstream_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "upstream_uri": { + "description": "The URI of the upstream server to be used for the canary release.", + "len_min": 1, + "type": "string" + } + }, + { + "upstream_fallback": { + "description": "Specifies whether to fallback to the upstream server if the canary release fails.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "groups": { + "description": "The groups allowed to access the canary release.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "canary_by_header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + } + ], + "required": true, + "type": "record", + "shorthand_fields": [ + { + "hash": { + "description": "Hash algorithm to be used for canary release. `whitelist` is deprecated. Use `allow` instead `blacklist` is deprecated. Use `deny` instead.", + "type": "string" + } + } + ] + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.upstream_uri", + "config.upstream_host", + "config.upstream_port" + ] + }, + { + "conditional": { + "if_field": "config.hash", + "if_match": { + "eq": "header" + }, + "then_field": "config.hash_header", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "config.upstream_fallback", + "if_match": { + "eq": true + }, + "then_field": "config.upstream_host", + "then_match": { + "required": true + } + } + } + ] +} \ No newline at end of file diff --git a/schemas/canary/3.9.x.json b/schemas/canary/3.9.x.json new file mode 100644 index 00000000..a020f33c --- /dev/null +++ b/schemas/canary/3.9.x.json @@ -0,0 +1,190 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.upstream_uri", + "config.upstream_host", + "config.upstream_port" + ] + }, + { + "conditional": { + "if_match": { + "eq": "header" + }, + "then_field": "config.hash_header", + "if_field": "config.hash", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "config.upstream_host", + "if_field": "config.upstream_fallback", + "then_match": { + "required": true + } + } + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "shorthand_fields": [ + { + "hash": { + "type": "string", + "description": "Hash algorithm to be used for canary release. `whitelist` is deprecated. Use `allow` instead `blacklist` is deprecated. Use `deny` instead." + } + } + ], + "required": true, + "fields": [ + { + "start": { + "description": "Future time in seconds since epoch, when the canary release will start. Ignored when `percentage` is set, or when using `allow` or `deny` in `hash`.", + "type": "number" + } + }, + { + "hash": { + "default": "consumer", + "description": "Hash algorithm to be used for canary release.\n\n* `consumer`: The hash will be based on the consumer.\n* `ip`: The hash will be based on the client IP address.\n* `none`: No hash will be applied.\n* `allow`: Allows the specified groups to access the canary release.\n* `deny`: Denies the specified groups from accessing the canary release.\n* `header`: The hash will be based on the specified header value.", + "type": "string", + "one_of": [ + "consumer", + "ip", + "none", + "allow", + "deny", + "header" + ] + } + }, + { + "hash_header": { + "type": "string", + "description": "A string representing an HTTP header name." + } + }, + { + "duration": { + "default": 3600, + "description": "The duration of the canary release in seconds.", + "gt": 0, + "type": "number" + } + }, + { + "steps": { + "default": 1000, + "description": "The number of steps for the canary release.", + "gt": 1, + "type": "number" + } + }, + { + "percentage": { + "between": [ + 0, + 100 + ], + "description": "The percentage of traffic to be routed to the canary release.", + "type": "number" + } + }, + { + "upstream_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "upstream_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "upstream_uri": { + "description": "The URI of the upstream server to be used for the canary release.", + "type": "string", + "len_min": 1 + } + }, + { + "upstream_fallback": { + "default": false, + "description": "Specifies whether to fallback to the upstream server if the canary release fails.", + "required": true, + "type": "boolean" + } + }, + { + "groups": { + "elements": { + "type": "string" + }, + "description": "The groups allowed to access the canary release.", + "type": "array" + } + }, + { + "canary_by_header_name": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/confluent-consume/3.10.x.json b/schemas/confluent-consume/3.10.x.json new file mode 100644 index 00000000..4539a378 --- /dev/null +++ b/schemas/confluent-consume/3.10.x.json @@ -0,0 +1,208 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + + ], + "type": "record", + "fields": [ + { + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "type": "set", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true + } + } + ] + } + } + }, + { + "topics": { + "type": "array", + "len_min": 1, + "description": "The Kafka topics and their configuration you want to consume from.", + "elements": { + "type": "record", + "fields": [ + { + "name": { + "type": "string", + "required": true + } + } + ] + }, + "required": true + } + }, + { + "mode": { + "type": "string", + "description": "The mode of operation for the plugin.", + "one_of": [ + "server-sent-events", + "http-get" + ], + "default": "http-get", + "required": true + } + }, + { + "message_deserializer": { + "type": "string", + "description": "The deserializer to use for the consumed messages.", + "one_of": [ + "json", + "noop" + ], + "default": "noop", + "required": true + } + }, + { + "auto_offset_reset": { + "type": "string", + "description": "The offset to start from when there is no initial offset in the consumer group.", + "one_of": [ + "earliest", + "latest" + ], + "default": "latest", + "required": true + } + }, + { + "commit_strategy": { + "type": "string", + "description": "The strategy to use for committing offsets.", + "one_of": [ + "auto", + "off" + ], + "default": "auto", + "required": true + } + }, + { + "timeout": { + "description": "Socket timeout in milliseconds.", + "type": "integer", + "default": 10000 + } + }, + { + "keepalive": { + "description": "Keepalive timeout in milliseconds.", + "type": "integer", + "default": 60000 + } + }, + { + "keepalive_enabled": { + "type": "boolean", + "default": false + } + }, + { + "cluster_api_key": { + "type": "string", + "referenceable": true, + "description": "Username/Apikey for SASL authentication.", + "encrypted": true, + "required": true + } + }, + { + "cluster_api_secret": { + "type": "string", + "referenceable": true, + "description": "Password/ApiSecret for SASL authentication.", + "encrypted": true, + "required": true + } + }, + { + "confluent_cloud_api_key": { + "type": "string", + "referenceable": true, + "description": "Apikey for authentication with Confluent Cloud. This allows for management tasks such as creating topics, ACLs, etc.", + "encrypted": true, + "required": false + } + }, + { + "confluent_cloud_api_secret": { + "type": "string", + "referenceable": true, + "description": "The corresponding secret for the Confluent Cloud API key.", + "encrypted": true, + "required": false + } + }, + { + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string", + "auto": true, + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/confluent-consume/3.11.x.json b/schemas/confluent-consume/3.11.x.json new file mode 100644 index 00000000..aa442dba --- /dev/null +++ b/schemas/confluent-consume/3.11.x.json @@ -0,0 +1,404 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "entity_checks": [ + + ], + "fields": [ + { + "bootstrap_servers": { + "type": "set", + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "elements": { + "fields": [ + { + "host": { + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "required": true, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "topics": { + "required": true, + "description": "The Kafka topics and their configuration you want to consume from.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "name": { + "type": "string", + "required": true + } + }, + { + "schema_registry": { + "description": "The plugin-global schema registry configuration.", + "required": true, + "fields": [ + { + "confluent": { + "required": false, + "fields": [ + { + "url": { + "required": false, + "description": "The URL of the schema registry.", + "type": "string" + } + }, + { + "ttl": { + "between": [ + 0, + 3600 + ], + "description": "The TTL in seconds for the schema registry cache.", + "type": "number" + } + }, + { + "ssl_verify": { + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "default": true, + "type": "boolean" + } + }, + { + "authentication": { + "required": true, + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "mode", + "basic" + ] + } + } + ], + "fields": [ + { + "mode": { + "required": true, + "description": "Authentication mode to use with the schema registry.", + "one_of": [ + "none", + "basic" + ], + "default": "none", + "type": "string" + } + }, + { + "basic": { + "required": false, + "fields": [ + { + "username": { + "type": "string", + "required": true, + "referenceable": true, + "encrypted": true + } + }, + { + "password": { + "type": "string", + "required": true, + "referenceable": true, + "encrypted": true + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + }, + { + "schema_registry": { + "description": "The plugin-global schema registry configuration.", + "required": true, + "fields": [ + { + "confluent": { + "required": false, + "fields": [ + { + "url": { + "required": false, + "description": "The URL of the schema registry.", + "type": "string" + } + }, + { + "ttl": { + "between": [ + 0, + 3600 + ], + "description": "The TTL in seconds for the schema registry cache.", + "type": "number" + } + }, + { + "ssl_verify": { + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "default": true, + "type": "boolean" + } + }, + { + "authentication": { + "required": true, + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "mode", + "basic" + ] + } + } + ], + "fields": [ + { + "mode": { + "required": true, + "description": "Authentication mode to use with the schema registry.", + "one_of": [ + "none", + "basic" + ], + "default": "none", + "type": "string" + } + }, + { + "basic": { + "required": false, + "fields": [ + { + "username": { + "type": "string", + "required": true, + "referenceable": true, + "encrypted": true + } + }, + { + "password": { + "type": "string", + "required": true, + "referenceable": true, + "encrypted": true + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "mode": { + "required": true, + "description": "The mode of operation for the plugin.", + "one_of": [ + "server-sent-events", + "http-get" + ], + "default": "http-get", + "type": "string" + } + }, + { + "message_deserializer": { + "required": true, + "description": "The deserializer to use for the consumed messages.", + "one_of": [ + "json", + "noop" + ], + "default": "noop", + "type": "string" + } + }, + { + "auto_offset_reset": { + "required": true, + "description": "The offset to start from when there is no initial offset in the consumer group.", + "one_of": [ + "earliest", + "latest" + ], + "default": "latest", + "type": "string" + } + }, + { + "commit_strategy": { + "required": true, + "description": "The strategy to use for committing offsets.", + "one_of": [ + "auto", + "off" + ], + "default": "auto", + "type": "string" + } + }, + { + "timeout": { + "description": "Socket timeout in milliseconds.", + "default": 10000, + "type": "integer" + } + }, + { + "keepalive": { + "description": "Keepalive timeout in milliseconds.", + "default": 60000, + "type": "integer" + } + }, + { + "keepalive_enabled": { + "default": false, + "type": "boolean" + } + }, + { + "cluster_api_key": { + "required": true, + "description": "Username/Apikey for SASL authentication.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "cluster_api_secret": { + "required": true, + "description": "Password/ApiSecret for SASL authentication.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "confluent_cloud_api_key": { + "required": false, + "description": "Apikey for authentication with Confluent Cloud. This allows for management tasks such as creating topics, ACLs, etc.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "confluent_cloud_api_secret": { + "required": false, + "description": "The corresponding secret for the Confluent Cloud API key.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "cluster_name": { + "auto": true, + "required": false, + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/confluent-consume/3.12.x.json b/schemas/confluent-consume/3.12.x.json new file mode 100644 index 00000000..5708ea84 --- /dev/null +++ b/schemas/confluent-consume/3.12.x.json @@ -0,0 +1,402 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "bootstrap_servers": { + "type": "set", + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "required": true + } + } + ] + } + } + }, + { + "topics": { + "type": "array", + "len_min": 1, + "required": true, + "description": "The Kafka topics and their configuration you want to consume from.", + "elements": { + "type": "record", + "fields": [ + { + "name": { + "type": "string", + "required": true + } + }, + { + "schema_registry": { + "description": "The plugin-global schema registry configuration.", + "fields": [ + { + "confluent": { + "type": "record", + "fields": [ + { + "url": { + "description": "The URL of the schema registry.", + "type": "string", + "required": false + } + }, + { + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "between": [ + 0, + 3600 + ], + "type": "number" + } + }, + { + "ssl_verify": { + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "default": true, + "type": "boolean" + } + }, + { + "authentication": { + "type": "record", + "fields": [ + { + "mode": { + "type": "string", + "required": true, + "description": "Authentication mode to use with the schema registry.", + "default": "none", + "one_of": [ + "none", + "basic" + ] + } + }, + { + "basic": { + "type": "record", + "fields": [ + { + "username": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": true + } + }, + { + "password": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": true + } + } + ], + "required": false + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "mode", + "basic" + ] + } + } + ], + "required": true + } + } + ], + "required": false + } + } + ], + "type": "record", + "required": true + } + } + ] + } + } + }, + { + "schema_registry": { + "description": "The plugin-global schema registry configuration.", + "fields": [ + { + "confluent": { + "type": "record", + "fields": [ + { + "url": { + "description": "The URL of the schema registry.", + "type": "string", + "required": false + } + }, + { + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "between": [ + 0, + 3600 + ], + "type": "number" + } + }, + { + "ssl_verify": { + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "default": true, + "type": "boolean" + } + }, + { + "authentication": { + "type": "record", + "fields": [ + { + "mode": { + "type": "string", + "required": true, + "description": "Authentication mode to use with the schema registry.", + "default": "none", + "one_of": [ + "none", + "basic" + ] + } + }, + { + "basic": { + "type": "record", + "fields": [ + { + "username": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": true + } + }, + { + "password": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": true + } + } + ], + "required": false + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "mode", + "basic" + ] + } + } + ], + "required": true + } + } + ], + "required": false + } + } + ], + "type": "record", + "required": true + } + }, + { + "mode": { + "type": "string", + "required": true, + "description": "The mode of operation for the plugin.", + "default": "http-get", + "one_of": [ + "server-sent-events", + "http-get" + ] + } + }, + { + "message_deserializer": { + "type": "string", + "required": true, + "description": "The deserializer to use for the consumed messages.", + "default": "noop", + "one_of": [ + "json", + "noop" + ] + } + }, + { + "auto_offset_reset": { + "type": "string", + "required": true, + "description": "The offset to start from when there is no initial offset in the consumer group.", + "default": "latest", + "one_of": [ + "earliest", + "latest" + ] + } + }, + { + "commit_strategy": { + "type": "string", + "required": true, + "description": "The strategy to use for committing offsets.", + "default": "auto", + "one_of": [ + "auto", + "off" + ] + } + }, + { + "timeout": { + "type": "integer", + "default": 10000, + "description": "Socket timeout in milliseconds." + } + }, + { + "keepalive": { + "type": "integer", + "default": 60000, + "description": "Keepalive timeout in milliseconds." + } + }, + { + "keepalive_enabled": { + "type": "boolean", + "default": false + } + }, + { + "cluster_api_key": { + "type": "string", + "required": true, + "encrypted": true, + "referenceable": true, + "description": "Username/Apikey for SASL authentication." + } + }, + { + "cluster_api_secret": { + "type": "string", + "required": true, + "encrypted": true, + "referenceable": true, + "description": "Password/ApiSecret for SASL authentication." + } + }, + { + "confluent_cloud_api_key": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Apikey for authentication with Confluent Cloud. This allows for management tasks such as creating topics, ACLs, etc." + } + }, + { + "confluent_cloud_api_secret": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "The corresponding secret for the Confluent Cloud API key." + } + }, + { + "cluster_name": { + "type": "string", + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "auto": true, + "required": false + } + } + ], + "entity_checks": [], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/confluent/3.10.x.json b/schemas/confluent/3.10.x.json new file mode 100644 index 00000000..e57cb780 --- /dev/null +++ b/schemas/confluent/3.10.x.json @@ -0,0 +1,280 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "forward_method", + "forward_uri", + "forward_headers", + "forward_body" + ] + } + } + ], + "type": "record", + "fields": [ + { + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "type": "set", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true + } + } + ] + } + } + }, + { + "topics_query_arg": { + "description": "The request query parameter name that contains the topics to publish to", + "type": "string", + "required": false + } + }, + { + "allowed_topics": { + "description": "The list of allowed topic names to which messages can be sent. The default topic configured in the `topic` field is always allowed, regardless of its inclusion in `allowed_topics`.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "topic": { + "description": "The default Kafka topic to publish to if the query parameter defined in the `topics_query_arg` does not exist in the request", + "type": "string", + "required": true + } + }, + { + "timeout": { + "description": "Socket timeout in milliseconds.", + "type": "integer", + "default": 10000 + } + }, + { + "keepalive": { + "description": "Keepalive timeout in milliseconds.", + "type": "integer", + "default": 60000 + } + }, + { + "keepalive_enabled": { + "default": false, + "type": "boolean" + } + }, + { + "cluster_api_key": { + "type": "string", + "referenceable": true, + "description": "Username/Apikey for SASL authentication.", + "encrypted": true, + "required": true + } + }, + { + "cluster_api_secret": { + "type": "string", + "referenceable": true, + "description": "Password/ApiSecret for SASL authentication.", + "encrypted": true, + "required": true + } + }, + { + "confluent_cloud_api_key": { + "type": "string", + "referenceable": true, + "description": "Apikey for authentication with Confluent Cloud. This allows for management tasks such as creating topics, ACLs, etc.", + "encrypted": true, + "required": false + } + }, + { + "confluent_cloud_api_secret": { + "type": "string", + "referenceable": true, + "description": "The corresponding secret for the Confluent Cloud API key.", + "encrypted": true, + "required": false + } + }, + { + "forward_method": { + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean", + "default": false + } + }, + { + "forward_uri": { + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean", + "default": false + } + }, + { + "forward_headers": { + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean", + "default": false + } + }, + { + "forward_body": { + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean", + "default": true + } + }, + { + "message_by_lua_functions": { + "description": "The Lua functions that manipulates the message being sent to the Kafka topic.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string", + "required": false, + "auto": true + } + }, + { + "producer_request_acks": { + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "type": "integer", + "one_of": [ + -1, + 0, + 1 + ], + "default": 1 + } + }, + { + "producer_request_timeout": { + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer", + "default": 2000 + } + }, + { + "producer_request_limits_messages_per_request": { + "description": "Maximum number of messages to include into a single producer request.", + "type": "integer", + "default": 200 + } + }, + { + "producer_request_limits_bytes_per_request": { + "description": "Maximum size of a Produce request in bytes.", + "type": "integer", + "default": 1048576 + } + }, + { + "producer_request_retries_max_attempts": { + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer", + "default": 10 + } + }, + { + "producer_request_retries_backoff_timeout": { + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer", + "default": 100 + } + }, + { + "producer_async": { + "description": "Flag to enable asynchronous mode.", + "type": "boolean", + "default": true + } + }, + { + "producer_async_flush_timeout": { + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer", + "default": 1000 + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer", + "default": 50000 + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/confluent/3.11.x.json b/schemas/confluent/3.11.x.json new file mode 100644 index 00000000..bea2837b --- /dev/null +++ b/schemas/confluent/3.11.x.json @@ -0,0 +1,446 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "forward_method", + "forward_uri", + "forward_headers", + "forward_body" + ] + } + } + ], + "fields": [ + { + "bootstrap_servers": { + "type": "set", + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "elements": { + "fields": [ + { + "host": { + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "required": true, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "schema_registry": { + "description": "The plugin-global schema registry configuration. This can be overwritten by the topic configuration.", + "required": true, + "fields": [ + { + "confluent": { + "required": false, + "fields": [ + { + "url": { + "required": false, + "description": "The URL of the schema registry.", + "type": "string" + } + }, + { + "ttl": { + "between": [ + 0, + 3600 + ], + "description": "The TTL in seconds for the schema registry cache.", + "type": "number" + } + }, + { + "ssl_verify": { + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "default": true, + "type": "boolean" + } + }, + { + "authentication": { + "required": true, + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "mode", + "basic" + ] + } + } + ], + "fields": [ + { + "mode": { + "required": true, + "description": "Authentication mode to use with the schema registry.", + "one_of": [ + "none", + "basic" + ], + "default": "none", + "type": "string" + } + }, + { + "basic": { + "required": false, + "fields": [ + { + "username": { + "type": "string", + "required": true, + "referenceable": true, + "encrypted": true + } + }, + { + "password": { + "type": "string", + "required": true, + "referenceable": true, + "encrypted": true + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "value_schema": { + "required": false, + "fields": [ + { + "subject_name": { + "required": false, + "description": "The name of the subject", + "type": "string" + } + }, + { + "schema_version": { + "match_any": { + "err": "must be either 'latest' or a positive integer", + "patterns": [ + "^latest$", + "^[0-9]+$" + ] + }, + "required": false, + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "key_schema": { + "required": false, + "fields": [ + { + "subject_name": { + "required": false, + "description": "The name of the subject", + "type": "string" + } + }, + { + "schema_version": { + "match_any": { + "err": "must be either 'latest' or a positive integer", + "patterns": [ + "^latest$", + "^[0-9]+$" + ] + }, + "required": false, + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "topics_query_arg": { + "required": false, + "description": "The request query parameter name that contains the topics to publish to", + "type": "string" + } + }, + { + "allowed_topics": { + "type": "array", + "required": false, + "description": "The list of allowed topic names to which messages can be sent. The default topic configured in the `topic` field is always allowed, regardless of its inclusion in `allowed_topics`.", + "elements": { + "type": "string" + } + } + }, + { + "topic": { + "required": true, + "description": "The default Kafka topic to publish to if the query parameter defined in the `topics_query_arg` does not exist in the request", + "type": "string" + } + }, + { + "key_query_arg": { + "required": false, + "description": "The request query parameter name that contains the Kafka message key. If specified, messages with the same key will be sent to the same Kafka partition, ensuring consistent ordering.", + "type": "string" + } + }, + { + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + } + }, + { + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + } + }, + { + "keepalive_enabled": { + "default": false, + "type": "boolean" + } + }, + { + "cluster_api_key": { + "required": true, + "description": "Username/Apikey for SASL authentication.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "cluster_api_secret": { + "required": true, + "description": "Password/ApiSecret for SASL authentication.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "confluent_cloud_api_key": { + "required": false, + "description": "Apikey for authentication with Confluent Cloud. This allows for management tasks such as creating topics, ACLs, etc.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "confluent_cloud_api_secret": { + "required": false, + "description": "The corresponding secret for the Confluent Cloud API key.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "forward_method": { + "default": false, + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + } + }, + { + "forward_uri": { + "default": false, + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + } + }, + { + "forward_headers": { + "default": false, + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + } + }, + { + "forward_body": { + "default": true, + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + } + }, + { + "message_by_lua_functions": { + "type": "array", + "required": false, + "description": "The Lua functions that manipulates the message being sent to the Kafka topic.", + "elements": { + "type": "string" + } + } + }, + { + "cluster_name": { + "auto": true, + "required": false, + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + } + }, + { + "producer_request_acks": { + "one_of": [ + -1, + 0, + 1 + ], + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "type": "integer" + } + }, + { + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer" + } + }, + { + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single producer request.", + "type": "integer" + } + }, + { + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + } + }, + { + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + } + }, + { + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + } + }, + { + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + } + }, + { + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/confluent/3.12.x.json b/schemas/confluent/3.12.x.json new file mode 100644 index 00000000..5557e687 --- /dev/null +++ b/schemas/confluent/3.12.x.json @@ -0,0 +1,446 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "bootstrap_servers": { + "type": "set", + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "required": true + } + } + ] + } + } + }, + { + "schema_registry": { + "description": "The plugin-global schema registry configuration. This can be overwritten by the topic configuration.", + "fields": [ + { + "confluent": { + "type": "record", + "fields": [ + { + "url": { + "description": "The URL of the schema registry.", + "type": "string", + "required": false + } + }, + { + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "between": [ + 0, + 3600 + ], + "type": "number" + } + }, + { + "ssl_verify": { + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "default": true, + "type": "boolean" + } + }, + { + "authentication": { + "type": "record", + "fields": [ + { + "mode": { + "type": "string", + "required": true, + "description": "Authentication mode to use with the schema registry.", + "default": "none", + "one_of": [ + "none", + "basic" + ] + } + }, + { + "basic": { + "type": "record", + "fields": [ + { + "username": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": true + } + }, + { + "password": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": true + } + } + ], + "required": false + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "mode", + "basic" + ] + } + } + ], + "required": true + } + }, + { + "value_schema": { + "type": "record", + "fields": [ + { + "subject_name": { + "type": "string", + "description": "The name of the subject", + "required": false + } + }, + { + "schema_version": { + "type": "string", + "match_any": { + "patterns": [ + "^latest$", + "^[0-9]+$" + ], + "err": "must be either 'latest' or a positive integer" + }, + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "required": false + } + } + ], + "required": false + } + }, + { + "key_schema": { + "type": "record", + "fields": [ + { + "subject_name": { + "type": "string", + "description": "The name of the subject", + "required": false + } + }, + { + "schema_version": { + "type": "string", + "match_any": { + "patterns": [ + "^latest$", + "^[0-9]+$" + ], + "err": "must be either 'latest' or a positive integer" + }, + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "required": false + } + } + ], + "required": false + } + } + ], + "required": false + } + } + ], + "type": "record", + "required": true + } + }, + { + "topics_query_arg": { + "type": "string", + "description": "The request query parameter name that contains the topics to publish to", + "required": false + } + }, + { + "allowed_topics": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "The list of allowed topic names to which messages can be sent. The default topic configured in the `topic` field is always allowed, regardless of its inclusion in `allowed_topics`.", + "required": false + } + }, + { + "topic": { + "type": "string", + "description": "The default Kafka topic to publish to if the query parameter defined in the `topics_query_arg` does not exist in the request", + "required": true + } + }, + { + "key_query_arg": { + "type": "string", + "description": "The request query parameter name that contains the Kafka message key. If specified, messages with the same key will be sent to the same Kafka partition, ensuring consistent ordering.", + "required": false + } + }, + { + "timeout": { + "type": "integer", + "default": 10000, + "description": "Socket timeout in milliseconds." + } + }, + { + "keepalive": { + "type": "integer", + "default": 60000, + "description": "Keepalive timeout in milliseconds." + } + }, + { + "keepalive_enabled": { + "type": "boolean", + "default": false + } + }, + { + "cluster_api_key": { + "type": "string", + "required": true, + "encrypted": true, + "referenceable": true, + "description": "Username/Apikey for SASL authentication." + } + }, + { + "cluster_api_secret": { + "type": "string", + "required": true, + "encrypted": true, + "referenceable": true, + "description": "Password/ApiSecret for SASL authentication." + } + }, + { + "confluent_cloud_api_key": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Apikey for authentication with Confluent Cloud. This allows for management tasks such as creating topics, ACLs, etc." + } + }, + { + "confluent_cloud_api_secret": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "The corresponding secret for the Confluent Cloud API key." + } + }, + { + "forward_method": { + "type": "boolean", + "default": false, + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`." + } + }, + { + "forward_uri": { + "type": "boolean", + "default": false, + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`." + } + }, + { + "forward_headers": { + "type": "boolean", + "default": false, + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`." + } + }, + { + "forward_body": { + "type": "boolean", + "default": true, + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`." + } + }, + { + "message_by_lua_functions": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "The Lua functions that manipulates the message being sent to the Kafka topic.", + "required": false + } + }, + { + "cluster_name": { + "type": "string", + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "auto": true, + "required": false + } + }, + { + "producer_request_acks": { + "type": "integer", + "default": 1, + "one_of": [ + -1, + 0, + 1 + ], + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set)." + } + }, + { + "producer_request_timeout": { + "type": "integer", + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds." + } + }, + { + "producer_request_limits_messages_per_request": { + "type": "integer", + "default": 200, + "description": "Maximum number of messages to include into a single producer request." + } + }, + { + "producer_request_limits_bytes_per_request": { + "type": "integer", + "default": 1048576, + "description": "Maximum size of a Produce request in bytes." + } + }, + { + "producer_request_retries_max_attempts": { + "type": "integer", + "default": 10, + "description": "Maximum number of retry attempts per single Produce request." + } + }, + { + "producer_request_retries_backoff_timeout": { + "type": "integer", + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds." + } + }, + { + "producer_async": { + "type": "boolean", + "default": true, + "description": "Flag to enable asynchronous mode." + } + }, + { + "producer_async_flush_timeout": { + "type": "integer", + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode." + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "type": "integer", + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode." + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "forward_method", + "forward_uri", + "forward_headers", + "forward_body" + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/confluent/3.8.x.json b/schemas/confluent/3.8.x.json new file mode 100644 index 00000000..7a953883 --- /dev/null +++ b/schemas/confluent/3.8.x.json @@ -0,0 +1,253 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "type": "set", + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true, + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "topic": { + "description": "The Kafka topic to publish to.", + "type": "string", + "required": true + } + }, + { + "timeout": { + "description": "Socket timeout in milliseconds.", + "type": "integer", + "default": 10000 + } + }, + { + "keepalive": { + "description": "Keepalive timeout in milliseconds.", + "type": "integer", + "default": 60000 + } + }, + { + "keepalive_enabled": { + "type": "boolean", + "default": false + } + }, + { + "cluster_api_key": { + "description": "Username/Apikey for SASL authentication.", + "required": true, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "cluster_api_secret": { + "description": "Password/ApiSecret for SASL authentication.", + "required": true, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "confluent_cloud_api_key": { + "description": "Apikey for authentication with Confluent Cloud. This allows for management tasks such as creating topics, ACLs, etc.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "confluent_cloud_api_secret": { + "description": "The corresponding secret for the Confluent Cloud API key.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "forward_method": { + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean", + "default": false + } + }, + { + "forward_uri": { + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean", + "default": false + } + }, + { + "forward_headers": { + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean", + "default": false + } + }, + { + "forward_body": { + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean", + "default": true + } + }, + { + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string", + "auto": true, + "required": false + } + }, + { + "producer_request_acks": { + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "type": "integer", + "default": 1, + "one_of": [ + -1, + 0, + 1 + ] + } + }, + { + "producer_request_timeout": { + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer", + "default": 2000 + } + }, + { + "producer_request_limits_messages_per_request": { + "description": "Maximum number of messages to include into a single producer request.", + "type": "integer", + "default": 200 + } + }, + { + "producer_request_limits_bytes_per_request": { + "description": "Maximum size of a Produce request in bytes.", + "type": "integer", + "default": 1048576 + } + }, + { + "producer_request_retries_max_attempts": { + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer", + "default": 10 + } + }, + { + "producer_request_retries_backoff_timeout": { + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer", + "default": 100 + } + }, + { + "producer_async": { + "description": "Flag to enable asynchronous mode.", + "type": "boolean", + "default": true + } + }, + { + "producer_async_flush_timeout": { + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer", + "default": 1000 + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer", + "default": 50000 + } + } + ], + "type": "record", + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "forward_method", + "forward_uri", + "forward_headers", + "forward_body" + ] + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/confluent/3.9.x.json b/schemas/confluent/3.9.x.json new file mode 100644 index 00000000..534933d8 --- /dev/null +++ b/schemas/confluent/3.9.x.json @@ -0,0 +1,253 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "forward_method", + "forward_uri", + "forward_headers", + "forward_body" + ] + } + } + ], + "fields": [ + { + "bootstrap_servers": { + "elements": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true, + "type": "integer" + } + } + ] + }, + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "type": "set" + } + }, + { + "topic": { + "description": "The Kafka topic to publish to.", + "required": true, + "type": "string" + } + }, + { + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + } + }, + { + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + } + }, + { + "keepalive_enabled": { + "default": false, + "type": "boolean" + } + }, + { + "cluster_api_key": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "Username/Apikey for SASL authentication.", + "required": true + } + }, + { + "cluster_api_secret": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "Password/ApiSecret for SASL authentication.", + "required": true + } + }, + { + "confluent_cloud_api_key": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "Apikey for authentication with Confluent Cloud. This allows for management tasks such as creating topics, ACLs, etc.", + "required": false + } + }, + { + "confluent_cloud_api_secret": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "The corresponding secret for the Confluent Cloud API key.", + "required": false + } + }, + { + "forward_method": { + "default": false, + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + } + }, + { + "forward_uri": { + "default": false, + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + } + }, + { + "forward_headers": { + "default": false, + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + } + }, + { + "forward_body": { + "default": true, + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + } + }, + { + "cluster_name": { + "auto": true, + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "required": false, + "type": "string" + } + }, + { + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "type": "integer", + "one_of": [ + -1, + 0, + 1 + ] + } + }, + { + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer" + } + }, + { + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single producer request.", + "type": "integer" + } + }, + { + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + } + }, + { + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + } + }, + { + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + } + }, + { + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + } + }, + { + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/correlation-id/3.10.x.json b/schemas/correlation-id/3.10.x.json new file mode 100644 index 00000000..61008053 --- /dev/null +++ b/schemas/correlation-id/3.10.x.json @@ -0,0 +1,73 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "header_name": { + "description": "The HTTP header name to use for the correlation ID.", + "default": "Kong-Request-ID", + "type": "string" + } + }, + { + "generator": { + "type": "string", + "description": "The generator to use for the correlation ID. Accepted values are `uuid`, `uuid#counter`, and `tracker`. See [Generators](#generators).", + "one_of": [ + "uuid", + "uuid#counter", + "tracker" + ], + "default": "uuid#counter", + "required": true + } + }, + { + "echo_downstream": { + "description": "Whether to echo the header back to downstream (the client).", + "default": false, + "type": "boolean", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/correlation-id/3.11.x.json b/schemas/correlation-id/3.11.x.json new file mode 100644 index 00000000..25fda359 --- /dev/null +++ b/schemas/correlation-id/3.11.x.json @@ -0,0 +1,73 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "header_name": { + "default": "Kong-Request-ID", + "description": "The HTTP header name to use for the correlation ID.", + "type": "string" + } + }, + { + "generator": { + "required": true, + "description": "The generator to use for the correlation ID. Accepted values are `uuid`, `uuid#counter`, and `tracker`. See [Generators](#generators).", + "one_of": [ + "uuid", + "uuid#counter", + "tracker" + ], + "default": "uuid#counter", + "type": "string" + } + }, + { + "echo_downstream": { + "default": false, + "required": true, + "description": "Whether to echo the header back to downstream (the client).", + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/correlation-id/3.12.x.json b/schemas/correlation-id/3.12.x.json new file mode 100644 index 00000000..58222045 --- /dev/null +++ b/schemas/correlation-id/3.12.x.json @@ -0,0 +1,71 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "header_name": { + "type": "string", + "default": "Kong-Request-ID", + "description": "The HTTP header name to use for the correlation ID." + } + }, + { + "generator": { + "type": "string", + "required": true, + "description": "The generator to use for the correlation ID. Accepted values are `uuid`, `uuid#counter`, and `tracker`. See [Generators](#generators).", + "default": "uuid#counter", + "one_of": [ + "uuid", + "uuid#counter", + "tracker" + ] + } + }, + { + "echo_downstream": { + "type": "boolean", + "default": false, + "description": "Whether to echo the header back to downstream (the client).", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/correlation-id/3.4.x.json b/schemas/correlation-id/3.4.x.json index 6a46c126..bf053d34 100644 --- a/schemas/correlation-id/3.4.x.json +++ b/schemas/correlation-id/3.4.x.json @@ -8,50 +8,65 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "header_name": { + "default": "Kong-Request-ID", "type": "string", - "default": "Kong-Request-ID" + "description": "The HTTP header name to use for the correlation ID." } }, { "generator": { "default": "uuid#counter", - "type": "string", "one_of": [ "uuid", "uuid#counter", "tracker" - ] + ], + "type": "string", + "description": "The generator to use for the correlation ID. Accepted values are `uuid`, `uuid#counter`, and `tracker`. See [Generators](#generators)." } }, { "echo_downstream": { + "default": false, "type": "boolean", - "required": true, - "default": false + "description": "Whether to echo the header back to downstream (the client).", + "required": true } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/correlation-id/3.5.x.json b/schemas/correlation-id/3.5.x.json new file mode 100644 index 00000000..0508475f --- /dev/null +++ b/schemas/correlation-id/3.5.x.json @@ -0,0 +1,72 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "header_name": { + "default": "Kong-Request-ID", + "type": "string", + "description": "The HTTP header name to use for the correlation ID." + } + }, + { + "generator": { + "one_of": [ + "uuid", + "uuid#counter", + "tracker" + ], + "default": "uuid#counter", + "type": "string", + "description": "The generator to use for the correlation ID. Accepted values are `uuid`, `uuid#counter`, and `tracker`. See [Generators](#generators)." + } + }, + { + "echo_downstream": { + "required": true, + "default": false, + "type": "boolean", + "description": "Whether to echo the header back to downstream (the client)." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/correlation-id/3.6.x.json b/schemas/correlation-id/3.6.x.json new file mode 100644 index 00000000..6acd0dcf --- /dev/null +++ b/schemas/correlation-id/3.6.x.json @@ -0,0 +1,72 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "header_name": { + "type": "string", + "default": "Kong-Request-ID", + "description": "The HTTP header name to use for the correlation ID." + } + }, + { + "generator": { + "one_of": [ + "uuid", + "uuid#counter", + "tracker" + ], + "type": "string", + "default": "uuid#counter", + "description": "The generator to use for the correlation ID. Accepted values are `uuid`, `uuid#counter`, and `tracker`. See [Generators](#generators)." + } + }, + { + "echo_downstream": { + "required": true, + "type": "boolean", + "default": false, + "description": "Whether to echo the header back to downstream (the client)." + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/correlation-id/3.7.x.json b/schemas/correlation-id/3.7.x.json new file mode 100644 index 00000000..359e7014 --- /dev/null +++ b/schemas/correlation-id/3.7.x.json @@ -0,0 +1,72 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "header_name": { + "description": "The HTTP header name to use for the correlation ID.", + "type": "string", + "default": "Kong-Request-ID" + } + }, + { + "generator": { + "default": "uuid#counter", + "description": "The generator to use for the correlation ID. Accepted values are `uuid`, `uuid#counter`, and `tracker`. See [Generators](#generators).", + "type": "string", + "one_of": [ + "uuid", + "uuid#counter", + "tracker" + ] + } + }, + { + "echo_downstream": { + "required": true, + "description": "Whether to echo the header back to downstream (the client).", + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/correlation-id/3.8.x.json b/schemas/correlation-id/3.8.x.json new file mode 100644 index 00000000..47945b3e --- /dev/null +++ b/schemas/correlation-id/3.8.x.json @@ -0,0 +1,73 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "header_name": { + "description": "The HTTP header name to use for the correlation ID.", + "type": "string", + "default": "Kong-Request-ID" + } + }, + { + "generator": { + "description": "The generator to use for the correlation ID. Accepted values are `uuid`, `uuid#counter`, and `tracker`. See [Generators](#generators).", + "required": true, + "one_of": [ + "uuid", + "uuid#counter", + "tracker" + ], + "type": "string", + "default": "uuid#counter" + } + }, + { + "echo_downstream": { + "description": "Whether to echo the header back to downstream (the client).", + "required": true, + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/correlation-id/3.9.x.json b/schemas/correlation-id/3.9.x.json new file mode 100644 index 00000000..46723bf0 --- /dev/null +++ b/schemas/correlation-id/3.9.x.json @@ -0,0 +1,73 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "header_name": { + "default": "Kong-Request-ID", + "description": "The HTTP header name to use for the correlation ID.", + "type": "string" + } + }, + { + "generator": { + "required": true, + "type": "string", + "default": "uuid#counter", + "description": "The generator to use for the correlation ID. Accepted values are `uuid`, `uuid#counter`, and `tracker`. See [Generators](#generators).", + "one_of": [ + "uuid", + "uuid#counter", + "tracker" + ] + } + }, + { + "echo_downstream": { + "default": false, + "description": "Whether to echo the header back to downstream (the client).", + "required": true, + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/cors/3.10.x.json b/schemas/cors/3.10.x.json new file mode 100644 index 00000000..b47cf1dd --- /dev/null +++ b/schemas/cors/3.10.x.json @@ -0,0 +1,151 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "required": true, + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string", + "len_min": 1 + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "origins": { + "description": "List of allowed domains for the `Access-Control-Allow-Origin` header. If you want to allow all origins, add `*` as a single value to this configuration field. The accepted values can either be flat strings or PCRE regexes.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "description": "Value for the `Access-Control-Allow-Headers` header.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "exposed_headers": { + "description": "Value for the `Access-Control-Expose-Headers` header. If not specified, no custom headers are exposed.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "methods": { + "description": "'Value for the `Access-Control-Allow-Methods` header. Available options include `GET`, `HEAD`, `PUT`, `PATCH`, `POST`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT`. By default, all options are allowed.'", + "type": "array", + "default": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "POST", + "DELETE", + "OPTIONS", + "TRACE", + "CONNECT" + ], + "elements": { + "type": "string", + "one_of": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "POST", + "DELETE", + "OPTIONS", + "TRACE", + "CONNECT" + ] + } + } + }, + { + "max_age": { + "description": "Indicates how long the results of the preflight request can be cached, in `seconds`.", + "type": "number" + } + }, + { + "credentials": { + "description": "Flag to determine whether the `Access-Control-Allow-Credentials` header should be sent with `true` as the value.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "private_network": { + "description": "Flag to determine whether the `Access-Control-Allow-Private-Network` header should be sent with `true` as the value.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "preflight_continue": { + "description": "A boolean value that instructs the plugin to proxy the `OPTIONS` preflight request to the Upstream service.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "allow_origin_absent": { + "description": "A boolean value that skip cors response headers when origin header of request is empty", + "type": "boolean", + "default": true, + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/cors/3.11.x.json b/schemas/cors/3.11.x.json new file mode 100644 index 00000000..fe6147ce --- /dev/null +++ b/schemas/cors/3.11.x.json @@ -0,0 +1,151 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "len_min": 1, + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "origins": { + "type": "array", + "description": "List of allowed domains for the `Access-Control-Allow-Origin` header. If you want to allow all origins, add `*` as a single value to this configuration field. The accepted values can either be flat strings or PCRE regexes.", + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "description": "Value for the `Access-Control-Allow-Headers` header.", + "elements": { + "type": "string" + } + } + }, + { + "exposed_headers": { + "type": "array", + "description": "Value for the `Access-Control-Expose-Headers` header. If not specified, no custom headers are exposed.", + "elements": { + "type": "string" + } + } + }, + { + "methods": { + "type": "array", + "description": "'Value for the `Access-Control-Allow-Methods` header. Available options include `GET`, `HEAD`, `PUT`, `PATCH`, `POST`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT`. By default, all options are allowed.'", + "default": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "POST", + "DELETE", + "OPTIONS", + "TRACE", + "CONNECT" + ], + "elements": { + "one_of": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "POST", + "DELETE", + "OPTIONS", + "TRACE", + "CONNECT" + ], + "type": "string" + } + } + }, + { + "max_age": { + "description": "Indicates how long the results of the preflight request can be cached, in `seconds`.", + "type": "number" + } + }, + { + "credentials": { + "default": false, + "required": true, + "description": "Flag to determine whether the `Access-Control-Allow-Credentials` header should be sent with `true` as the value.", + "type": "boolean" + } + }, + { + "private_network": { + "default": false, + "required": true, + "description": "Flag to determine whether the `Access-Control-Allow-Private-Network` header should be sent with `true` as the value.", + "type": "boolean" + } + }, + { + "preflight_continue": { + "default": false, + "required": true, + "description": "A boolean value that instructs the plugin to proxy the `OPTIONS` preflight request to the Upstream service.", + "type": "boolean" + } + }, + { + "allow_origin_absent": { + "default": true, + "required": true, + "description": "A boolean value that skip cors response headers when origin header of request is empty", + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/cors/3.12.x.json b/schemas/cors/3.12.x.json new file mode 100644 index 00000000..cb2729fa --- /dev/null +++ b/schemas/cors/3.12.x.json @@ -0,0 +1,149 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "len_min": 1, + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "origins": { + "type": "array", + "description": "List of allowed domains for the `Access-Control-Allow-Origin` header. If you want to allow all origins, add `*` as a single value to this configuration field. The accepted values can either be flat strings or PCRE regexes. NOTE: If you don't specify any allowed domains, all origins are allowed.", + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "description": "Value for the `Access-Control-Allow-Headers` header.", + "elements": { + "type": "string" + } + } + }, + { + "exposed_headers": { + "type": "array", + "description": "Value for the `Access-Control-Expose-Headers` header. If not specified, no custom headers are exposed.", + "elements": { + "type": "string" + } + } + }, + { + "methods": { + "type": "array", + "default": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "POST", + "DELETE", + "OPTIONS", + "TRACE", + "CONNECT" + ], + "description": "'Value for the `Access-Control-Allow-Methods` header. Available options include `GET`, `HEAD`, `PUT`, `PATCH`, `POST`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT`. By default, all options are allowed.'", + "elements": { + "type": "string", + "one_of": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "POST", + "DELETE", + "OPTIONS", + "TRACE", + "CONNECT" + ] + } + } + }, + { + "max_age": { + "type": "number", + "description": "Indicates how long the results of the preflight request can be cached, in `seconds`." + } + }, + { + "credentials": { + "type": "boolean", + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Credentials` header should be sent with `true` as the value.", + "required": true + } + }, + { + "private_network": { + "type": "boolean", + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Private-Network` header should be sent with `true` as the value.", + "required": true + } + }, + { + "preflight_continue": { + "type": "boolean", + "default": false, + "description": "A boolean value that instructs the plugin to proxy the `OPTIONS` preflight request to the Upstream service.", + "required": true + } + }, + { + "allow_origin_absent": { + "type": "boolean", + "default": true, + "description": "A boolean value that skip cors response headers when origin header of request is empty", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/cors/3.4.x.json b/schemas/cors/3.4.x.json index 8f3e05ea..ea233689 100644 --- a/schemas/cors/3.4.x.json +++ b/schemas/cors/3.4.x.json @@ -2,6 +2,7 @@ "fields": [ { "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, "reference": "consumers", "type": "foreign" @@ -9,14 +10,8 @@ }, { "protocols": { - "default": [ - "grpc", - "grpcs", - "http", - "https" - ], + "description": "A set of strings representing HTTP protocols.", "elements": { - "type": "string", "len_min": 1, "one_of": [ "grpc", @@ -24,18 +19,33 @@ "http", "https" ], + "type": "string", "required": true }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], "required": true, "type": "set" } }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, { "config": { - "required": true, "fields": [ { "origins": { + "description": "List of allowed domains for the `Access-Control-Allow-Origin` header. If you want to allow all origins, add `*` as a single value to this configuration field. The accepted values can either be flat strings or PCRE regexes.", "elements": { "type": "string" }, @@ -44,6 +54,7 @@ }, { "headers": { + "description": "Value for the `Access-Control-Allow-Headers` header.", "elements": { "type": "string" }, @@ -52,6 +63,7 @@ }, { "exposed_headers": { + "description": "Value for the `Access-Control-Expose-Headers` header. If not specified, no custom headers are exposed.", "elements": { "type": "string" }, @@ -60,19 +72,9 @@ }, { "methods": { - "type": "array", - "default": [ - "GET", - "HEAD", - "PUT", - "PATCH", - "POST", - "DELETE", - "OPTIONS", - "TRACE", - "CONNECT" - ], + "description": "'Value for the `Access-Control-Allow-Methods` header. Available options include `GET`, `HEAD`, `PUT`, `PATCH`, `POST`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT`. By default, all options are allowed.'", "elements": { + "type": "string", "one_of": [ "GET", "HEAD", @@ -83,33 +85,59 @@ "OPTIONS", "TRACE", "CONNECT" - ], - "type": "string" - } + ] + }, + "type": "array", + "default": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "POST", + "DELETE", + "OPTIONS", + "TRACE", + "CONNECT" + ] } }, { "max_age": { + "description": "Indicates how long the results of the preflight request can be cached, in `seconds`.", "type": "number" } }, { "credentials": { + "description": "Flag to determine whether the `Access-Control-Allow-Credentials` header should be sent with `true` as the value.", + "required": true, "type": "boolean", + "default": false + } + }, + { + "private_network": { + "description": "Flag to determine whether the `Access-Control-Allow-Private-Network` header should be sent with `true` as the value.", "required": true, + "type": "boolean", "default": false } }, { "preflight_continue": { - "type": "boolean", + "description": "A boolean value that instructs the plugin to proxy the `OPTIONS` preflight request to the Upstream service.", "required": true, + "type": "boolean", "default": false } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/cors/3.5.x.json b/schemas/cors/3.5.x.json new file mode 100644 index 00000000..030c5bcf --- /dev/null +++ b/schemas/cors/3.5.x.json @@ -0,0 +1,143 @@ +{ + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "len_min": 1, + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string", + "required": true + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "origins": { + "description": "List of allowed domains for the `Access-Control-Allow-Origin` header. If you want to allow all origins, add `*` as a single value to this configuration field. The accepted values can either be flat strings or PCRE regexes.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "description": "Value for the `Access-Control-Allow-Headers` header.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "exposed_headers": { + "description": "Value for the `Access-Control-Expose-Headers` header. If not specified, no custom headers are exposed.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "methods": { + "description": "'Value for the `Access-Control-Allow-Methods` header. Available options include `GET`, `HEAD`, `PUT`, `PATCH`, `POST`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT`. By default, all options are allowed.'", + "default": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "POST", + "DELETE", + "OPTIONS", + "TRACE", + "CONNECT" + ], + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "POST", + "DELETE", + "OPTIONS", + "TRACE", + "CONNECT" + ] + } + } + }, + { + "max_age": { + "type": "number", + "description": "Indicates how long the results of the preflight request can be cached, in `seconds`." + } + }, + { + "credentials": { + "required": true, + "default": false, + "type": "boolean", + "description": "Flag to determine whether the `Access-Control-Allow-Credentials` header should be sent with `true` as the value." + } + }, + { + "private_network": { + "required": true, + "default": false, + "type": "boolean", + "description": "Flag to determine whether the `Access-Control-Allow-Private-Network` header should be sent with `true` as the value." + } + }, + { + "preflight_continue": { + "required": true, + "default": false, + "type": "boolean", + "description": "A boolean value that instructs the plugin to proxy the `OPTIONS` preflight request to the Upstream service." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/cors/3.6.x.json b/schemas/cors/3.6.x.json new file mode 100644 index 00000000..2d8f7878 --- /dev/null +++ b/schemas/cors/3.6.x.json @@ -0,0 +1,143 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string", + "required": true, + "len_min": 1 + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "origins": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "List of allowed domains for the `Access-Control-Allow-Origin` header. If you want to allow all origins, add `*` as a single value to this configuration field. The accepted values can either be flat strings or PCRE regexes." + } + }, + { + "headers": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Value for the `Access-Control-Allow-Headers` header." + } + }, + { + "exposed_headers": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Value for the `Access-Control-Expose-Headers` header. If not specified, no custom headers are exposed." + } + }, + { + "methods": { + "elements": { + "one_of": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "POST", + "DELETE", + "OPTIONS", + "TRACE", + "CONNECT" + ], + "type": "string" + }, + "type": "array", + "description": "'Value for the `Access-Control-Allow-Methods` header. Available options include `GET`, `HEAD`, `PUT`, `PATCH`, `POST`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT`. By default, all options are allowed.'", + "default": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "POST", + "DELETE", + "OPTIONS", + "TRACE", + "CONNECT" + ] + } + }, + { + "max_age": { + "description": "Indicates how long the results of the preflight request can be cached, in `seconds`.", + "type": "number" + } + }, + { + "credentials": { + "required": true, + "type": "boolean", + "description": "Flag to determine whether the `Access-Control-Allow-Credentials` header should be sent with `true` as the value.", + "default": false + } + }, + { + "private_network": { + "required": true, + "type": "boolean", + "description": "Flag to determine whether the `Access-Control-Allow-Private-Network` header should be sent with `true` as the value.", + "default": false + } + }, + { + "preflight_continue": { + "required": true, + "type": "boolean", + "description": "A boolean value that instructs the plugin to proxy the `OPTIONS` preflight request to the Upstream service.", + "default": false + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/cors/3.7.x.json b/schemas/cors/3.7.x.json new file mode 100644 index 00000000..a9ff5f6b --- /dev/null +++ b/schemas/cors/3.7.x.json @@ -0,0 +1,143 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "required": true, + "type": "string", + "len_min": 1, + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "origins": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "List of allowed domains for the `Access-Control-Allow-Origin` header. If you want to allow all origins, add `*` as a single value to this configuration field. The accepted values can either be flat strings or PCRE regexes." + } + }, + { + "headers": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Value for the `Access-Control-Allow-Headers` header." + } + }, + { + "exposed_headers": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Value for the `Access-Control-Expose-Headers` header. If not specified, no custom headers are exposed." + } + }, + { + "methods": { + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "POST", + "DELETE", + "OPTIONS", + "TRACE", + "CONNECT" + ] + }, + "description": "'Value for the `Access-Control-Allow-Methods` header. Available options include `GET`, `HEAD`, `PUT`, `PATCH`, `POST`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT`. By default, all options are allowed.'", + "default": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "POST", + "DELETE", + "OPTIONS", + "TRACE", + "CONNECT" + ] + } + }, + { + "max_age": { + "type": "number", + "description": "Indicates how long the results of the preflight request can be cached, in `seconds`." + } + }, + { + "credentials": { + "required": true, + "type": "boolean", + "description": "Flag to determine whether the `Access-Control-Allow-Credentials` header should be sent with `true` as the value.", + "default": false + } + }, + { + "private_network": { + "required": true, + "type": "boolean", + "description": "Flag to determine whether the `Access-Control-Allow-Private-Network` header should be sent with `true` as the value.", + "default": false + } + }, + { + "preflight_continue": { + "required": true, + "type": "boolean", + "description": "A boolean value that instructs the plugin to proxy the `OPTIONS` preflight request to the Upstream service.", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/cors/3.8.x.json b/schemas/cors/3.8.x.json new file mode 100644 index 00000000..85e723f0 --- /dev/null +++ b/schemas/cors/3.8.x.json @@ -0,0 +1,143 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "len_min": 1, + "type": "string", + "required": true, + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "origins": { + "description": "List of allowed domains for the `Access-Control-Allow-Origin` header. If you want to allow all origins, add `*` as a single value to this configuration field. The accepted values can either be flat strings or PCRE regexes.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "description": "Value for the `Access-Control-Allow-Headers` header.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "exposed_headers": { + "description": "Value for the `Access-Control-Expose-Headers` header. If not specified, no custom headers are exposed.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "methods": { + "description": "'Value for the `Access-Control-Allow-Methods` header. Available options include `GET`, `HEAD`, `PUT`, `PATCH`, `POST`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT`. By default, all options are allowed.'", + "type": "array", + "default": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "POST", + "DELETE", + "OPTIONS", + "TRACE", + "CONNECT" + ], + "elements": { + "type": "string", + "one_of": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "POST", + "DELETE", + "OPTIONS", + "TRACE", + "CONNECT" + ] + } + } + }, + { + "max_age": { + "description": "Indicates how long the results of the preflight request can be cached, in `seconds`.", + "type": "number" + } + }, + { + "credentials": { + "description": "Flag to determine whether the `Access-Control-Allow-Credentials` header should be sent with `true` as the value.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "private_network": { + "description": "Flag to determine whether the `Access-Control-Allow-Private-Network` header should be sent with `true` as the value.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "preflight_continue": { + "description": "A boolean value that instructs the plugin to proxy the `OPTIONS` preflight request to the Upstream service.", + "required": true, + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/cors/3.9.x.json b/schemas/cors/3.9.x.json new file mode 100644 index 00000000..87f52a0e --- /dev/null +++ b/schemas/cors/3.9.x.json @@ -0,0 +1,143 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "len_min": 1, + "required": true, + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "origins": { + "elements": { + "type": "string" + }, + "description": "List of allowed domains for the `Access-Control-Allow-Origin` header. If you want to allow all origins, add `*` as a single value to this configuration field. The accepted values can either be flat strings or PCRE regexes.", + "type": "array" + } + }, + { + "headers": { + "elements": { + "type": "string" + }, + "description": "Value for the `Access-Control-Allow-Headers` header.", + "type": "array" + } + }, + { + "exposed_headers": { + "elements": { + "type": "string" + }, + "description": "Value for the `Access-Control-Expose-Headers` header. If not specified, no custom headers are exposed.", + "type": "array" + } + }, + { + "methods": { + "default": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "POST", + "DELETE", + "OPTIONS", + "TRACE", + "CONNECT" + ], + "description": "'Value for the `Access-Control-Allow-Methods` header. Available options include `GET`, `HEAD`, `PUT`, `PATCH`, `POST`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT`. By default, all options are allowed.'", + "elements": { + "type": "string", + "one_of": [ + "GET", + "HEAD", + "PUT", + "PATCH", + "POST", + "DELETE", + "OPTIONS", + "TRACE", + "CONNECT" + ] + }, + "type": "array" + } + }, + { + "max_age": { + "description": "Indicates how long the results of the preflight request can be cached, in `seconds`.", + "type": "number" + } + }, + { + "credentials": { + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Credentials` header should be sent with `true` as the value.", + "required": true, + "type": "boolean" + } + }, + { + "private_network": { + "default": false, + "description": "Flag to determine whether the `Access-Control-Allow-Private-Network` header should be sent with `true` as the value.", + "required": true, + "type": "boolean" + } + }, + { + "preflight_continue": { + "default": false, + "description": "A boolean value that instructs the plugin to proxy the `OPTIONS` preflight request to the Upstream service.", + "required": true, + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/datadog-tracing/3.10.x.json b/schemas/datadog-tracing/3.10.x.json new file mode 100644 index 00000000..450d1bc3 --- /dev/null +++ b/schemas/datadog-tracing/3.10.x.json @@ -0,0 +1,103 @@ +{ + "fields": [ + { + "consumer": { + "eq": null, + "type": "foreign", + "reference": "consumers" + } + }, + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "endpoint": { + "type": "string", + "referenceable": true + } + }, + { + "service_name": { + "required": true, + "type": "string", + "default": "kong" + } + }, + { + "environment": { + "type": "string", + "default": "none" + } + }, + { + "batch_span_count": { + "required": true, + "type": "integer", + "default": 200 + } + }, + { + "batch_flush_delay": { + "required": true, + "type": "integer", + "default": 3 + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "default": 1000 + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "default": 5000 + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "default": 5000 + } + } + ], + "type": "record", + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/datadog-tracing/3.11.x.json b/schemas/datadog-tracing/3.11.x.json new file mode 100644 index 00000000..450d1bc3 --- /dev/null +++ b/schemas/datadog-tracing/3.11.x.json @@ -0,0 +1,103 @@ +{ + "fields": [ + { + "consumer": { + "eq": null, + "type": "foreign", + "reference": "consumers" + } + }, + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "endpoint": { + "type": "string", + "referenceable": true + } + }, + { + "service_name": { + "required": true, + "type": "string", + "default": "kong" + } + }, + { + "environment": { + "type": "string", + "default": "none" + } + }, + { + "batch_span_count": { + "required": true, + "type": "integer", + "default": 200 + } + }, + { + "batch_flush_delay": { + "required": true, + "type": "integer", + "default": 3 + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "default": 1000 + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "default": 5000 + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "default": 5000 + } + } + ], + "type": "record", + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/datadog-tracing/3.8.x.json b/schemas/datadog-tracing/3.8.x.json new file mode 100644 index 00000000..450d1bc3 --- /dev/null +++ b/schemas/datadog-tracing/3.8.x.json @@ -0,0 +1,103 @@ +{ + "fields": [ + { + "consumer": { + "eq": null, + "type": "foreign", + "reference": "consumers" + } + }, + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "endpoint": { + "type": "string", + "referenceable": true + } + }, + { + "service_name": { + "required": true, + "type": "string", + "default": "kong" + } + }, + { + "environment": { + "type": "string", + "default": "none" + } + }, + { + "batch_span_count": { + "required": true, + "type": "integer", + "default": 200 + } + }, + { + "batch_flush_delay": { + "required": true, + "type": "integer", + "default": 3 + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "default": 1000 + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "default": 5000 + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "default": 5000 + } + } + ], + "type": "record", + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/datadog-tracing/3.9.x.json b/schemas/datadog-tracing/3.9.x.json new file mode 100644 index 00000000..450d1bc3 --- /dev/null +++ b/schemas/datadog-tracing/3.9.x.json @@ -0,0 +1,103 @@ +{ + "fields": [ + { + "consumer": { + "eq": null, + "type": "foreign", + "reference": "consumers" + } + }, + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "endpoint": { + "type": "string", + "referenceable": true + } + }, + { + "service_name": { + "required": true, + "type": "string", + "default": "kong" + } + }, + { + "environment": { + "type": "string", + "default": "none" + } + }, + { + "batch_span_count": { + "required": true, + "type": "integer", + "default": 200 + } + }, + { + "batch_flush_delay": { + "required": true, + "type": "integer", + "default": 3 + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "default": 1000 + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "default": 5000 + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "default": 5000 + } + } + ], + "type": "record", + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/datadog/3.10.x.json b/schemas/datadog/3.10.x.json new file mode 100644 index 00000000..30802ecb --- /dev/null +++ b/schemas/datadog/3.10.x.json @@ -0,0 +1,361 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "localhost", + "referenceable": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 8125, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "prefix": { + "description": "String to be attached as a prefix to a metric's name.", + "type": "string", + "default": "kong" + } + }, + { + "service_name_tag": { + "description": "String to be attached as the name of the service.", + "type": "string", + "default": "name" + } + }, + { + "status_tag": { + "description": "String to be attached as the tag of the HTTP status.", + "type": "string", + "default": "status" + } + }, + { + "consumer_tag": { + "description": "String to be attached as tag of the consumer.", + "type": "string", + "default": "consumer" + } + }, + { + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer", + "deprecation": { + "message": "datadog: config.retry_count no longer works, please use config.queue.max_retry_time instead", + "old_default": 10, + "removal_in_version": "4.0" + } + } + }, + { + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer", + "deprecation": { + "message": "datadog: config.queue_size is deprecated, please use config.queue.max_batch_size instead", + "old_default": 1, + "removal_in_version": "4.0" + } + } + }, + { + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number", + "deprecation": { + "message": "datadog: config.flush_timeout is deprecated, please use config.queue.max_coalescing_delay instead", + "old_default": 2, + "removal_in_version": "4.0" + } + } + }, + { + "queue": { + "type": "record", + "fields": [ + { + "max_batch_size": { + "between": [ + 1, + 1000000 + ], + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time." + } + }, + { + "max_coalescing_delay": { + "between": [ + 0, + 3600 + ], + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." + } + }, + { + "max_entries": { + "between": [ + 1, + 1000000 + ], + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue." + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "default": 60, + "type": "number" + } + }, + { + "initial_retry_delay": { + "between": [ + 0.001, + 1000000 + ], + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch." + } + }, + { + "max_retry_delay": { + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "default": 60, + "type": "number", + "between": [ + 0.001, + 1000000 + ] + } + }, + { + "concurrency_limit": { + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "default": 1, + "type": "integer", + "one_of": [ + -1, + 1 + ] + } + } + ], + "required": true + } + }, + { + "metrics": { + "type": "array", + "description": "List of metrics to be logged.", + "default": [ + { + "name": "request_count", + "consumer_identifier": "custom_id", + "sample_rate": 1, + "stat_type": "counter", + "tags": [ + "app:kong" + ] + }, + { + "stat_type": "timer", + "name": "latency", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id" + }, + { + "stat_type": "timer", + "name": "request_size", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id" + }, + { + "stat_type": "timer", + "name": "response_size", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id" + }, + { + "stat_type": "timer", + "name": "upstream_latency", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id" + }, + { + "stat_type": "timer", + "name": "kong_latency", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id" + } + ], + "elements": { + "entity_checks": [ + { + "conditional": { + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "if_field": "stat_type", + "then_match": { + "required": true + } + } + } + ], + "type": "record", + "fields": [ + { + "name": { + "description": "Datadog metric’s name", + "type": "string", + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_size", + "response_size", + "upstream_latency" + ], + "required": true + } + }, + { + "stat_type": { + "description": "Determines what sort of event the metric represents", + "type": "string", + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer", + "distribution" + ], + "required": true + } + }, + { + "tags": { + "description": "List of tags", + "type": "array", + "elements": { + "match": "^.*[^:]$", + "type": "string" + } + } + }, + { + "sample_rate": { + "description": "Sampling rate", + "type": "number", + "between": [ + 0, + 1 + ] + } + }, + { + "consumer_identifier": { + "description": "Authenticated user detail", + "type": "string", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + } + ] + }, + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/datadog/3.11.x.json b/schemas/datadog/3.11.x.json new file mode 100644 index 00000000..85feeb40 --- /dev/null +++ b/schemas/datadog/3.11.x.json @@ -0,0 +1,361 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "host": { + "default": "localhost", + "referenceable": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 8125, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "prefix": { + "description": "String to be attached as a prefix to a metric's name.", + "default": "kong", + "type": "string" + } + }, + { + "service_name_tag": { + "description": "String to be attached as the name of the service.", + "default": "name", + "type": "string" + } + }, + { + "status_tag": { + "description": "String to be attached as the tag of the HTTP status.", + "default": "status", + "type": "string" + } + }, + { + "consumer_tag": { + "description": "String to be attached as tag of the consumer.", + "default": "consumer", + "type": "string" + } + }, + { + "retry_count": { + "deprecation": { + "old_default": 10, + "removal_in_version": "4.0", + "message": "datadog: config.retry_count no longer works, please use config.queue.max_retry_time instead" + }, + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer" + } + }, + { + "queue_size": { + "deprecation": { + "old_default": 1, + "removal_in_version": "4.0", + "message": "datadog: config.queue_size is deprecated, please use config.queue.max_batch_size instead" + }, + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + } + }, + { + "flush_timeout": { + "deprecation": { + "old_default": 2, + "removal_in_version": "4.0", + "message": "datadog: config.flush_timeout is deprecated, please use config.queue.max_coalescing_delay instead" + }, + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number" + } + }, + { + "queue": { + "required": true, + "fields": [ + { + "max_batch_size": { + "default": 1, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be processed at a time.", + "type": "integer" + } + }, + { + "max_coalescing_delay": { + "default": 1, + "between": [ + 0, + 3600 + ], + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "type": "number" + } + }, + { + "max_entries": { + "default": 10000, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be waiting on the queue.", + "type": "integer" + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "between": [ + 0.001, + 1000000 + ], + "description": "Time in seconds before the initial retry is made for a failing batch.", + "type": "number" + } + }, + { + "max_retry_delay": { + "default": 60, + "between": [ + 0.001, + 1000000 + ], + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "type": "number" + } + }, + { + "concurrency_limit": { + "one_of": [ + -1, + 1 + ], + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "type": "integer" + } + } + ], + "type": "record" + } + }, + { + "metrics": { + "required": true, + "description": "List of metrics to be logged.", + "type": "array", + "default": [ + { + "stat_type": "counter", + "consumer_identifier": "custom_id", + "name": "request_count", + "sample_rate": 1, + "tags": [ + "app:kong" + ] + }, + { + "stat_type": "timer", + "name": "latency", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ] + }, + { + "stat_type": "timer", + "name": "request_size", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ] + }, + { + "stat_type": "timer", + "name": "response_size", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ] + }, + { + "stat_type": "timer", + "name": "upstream_latency", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ] + }, + { + "stat_type": "timer", + "name": "kong_latency", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ] + } + ], + "elements": { + "entity_checks": [ + { + "conditional": { + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "if_field": "stat_type", + "then_match": { + "required": true + } + } + } + ], + "fields": [ + { + "name": { + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_size", + "response_size", + "upstream_latency" + ], + "required": true, + "description": "Datadog metric’s name", + "type": "string" + } + }, + { + "stat_type": { + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer", + "distribution" + ], + "required": true, + "description": "Determines what sort of event the metric represents", + "type": "string" + } + }, + { + "tags": { + "type": "array", + "description": "List of tags", + "elements": { + "match": "^.*[^:]$", + "type": "string" + } + } + }, + { + "sample_rate": { + "between": [ + 0, + 1 + ], + "description": "Sampling rate", + "type": "number" + } + }, + { + "consumer_identifier": { + "one_of": [ + "consumer_id", + "custom_id", + "username" + ], + "description": "Authenticated user detail", + "type": "string" + } + } + ], + "type": "record" + } + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/datadog/3.12.x.json b/schemas/datadog/3.12.x.json new file mode 100644 index 00000000..3f2288b1 --- /dev/null +++ b/schemas/datadog/3.12.x.json @@ -0,0 +1,359 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "localhost", + "referenceable": true, + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 8125, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "prefix": { + "description": "String to be attached as a prefix to a metric's name.", + "default": "kong", + "type": "string" + } + }, + { + "service_name_tag": { + "description": "String to be attached as the name of the service.", + "default": "name", + "type": "string" + } + }, + { + "status_tag": { + "description": "String to be attached as the tag of the HTTP status.", + "default": "status", + "type": "string" + } + }, + { + "consumer_tag": { + "description": "String to be attached as tag of the consumer.", + "default": "consumer", + "type": "string" + } + }, + { + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "deprecation": { + "old_default": 10, + "message": "datadog: config.retry_count no longer works, please use config.queue.max_retry_time instead", + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "deprecation": { + "old_default": 1, + "message": "datadog: config.queue_size is deprecated, please use config.queue.max_batch_size instead", + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "deprecation": { + "old_default": 2, + "message": "datadog: config.flush_timeout is deprecated, please use config.queue.max_coalescing_delay instead", + "removal_in_version": "4.0" + }, + "type": "number" + } + }, + { + "queue": { + "type": "record", + "fields": [ + { + "max_batch_size": { + "type": "integer", + "default": 1, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be processed at a time." + } + }, + { + "max_coalescing_delay": { + "type": "number", + "default": 1, + "between": [ + 0, + 3600 + ], + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." + } + }, + { + "max_entries": { + "type": "integer", + "default": 10000, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be waiting on the queue." + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "type": "number", + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." + } + }, + { + "initial_retry_delay": { + "type": "number", + "default": 0.01, + "between": [ + 0.001, + 1000000 + ], + "description": "Time in seconds before the initial retry is made for a failing batch." + } + }, + { + "max_retry_delay": { + "type": "number", + "default": 60, + "between": [ + 0.001, + 1000000 + ], + "description": "Maximum time in seconds between retries, caps exponential backoff." + } + }, + { + "concurrency_limit": { + "type": "integer", + "default": 1, + "one_of": [ + -1, + 1 + ], + "description": "The number of of queue delivery timers. -1 indicates unlimited." + } + } + ], + "required": true + } + }, + { + "metrics": { + "type": "array", + "required": true, + "description": "List of metrics to be logged.", + "default": [ + { + "consumer_identifier": "custom_id", + "name": "request_count", + "tags": [ + "app:kong" + ], + "sample_rate": 1, + "stat_type": "counter" + }, + { + "stat_type": "timer", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ], + "name": "latency" + }, + { + "stat_type": "timer", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ], + "name": "request_size" + }, + { + "stat_type": "timer", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ], + "name": "response_size" + }, + { + "stat_type": "timer", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ], + "name": "upstream_latency" + }, + { + "stat_type": "timer", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ], + "name": "kong_latency" + } + ], + "elements": { + "type": "record", + "fields": [ + { + "name": { + "description": "Datadog metric’s name", + "type": "string", + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_size", + "response_size", + "upstream_latency" + ], + "required": true + } + }, + { + "stat_type": { + "description": "Determines what sort of event the metric represents", + "type": "string", + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer", + "distribution" + ], + "required": true + } + }, + { + "tags": { + "description": "List of tags", + "type": "array", + "elements": { + "type": "string", + "match": "^.*[^:]$" + } + } + }, + { + "sample_rate": { + "description": "Sampling rate", + "between": [ + 0, + 1 + ], + "type": "number" + } + }, + { + "consumer_identifier": { + "description": "Authenticated user detail", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "if_field": "stat_type" + } + } + ] + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/datadog/3.4.x.json b/schemas/datadog/3.4.x.json index d8251ec0..9df5af4c 100644 --- a/schemas/datadog/3.4.x.json +++ b/schemas/datadog/3.4.x.json @@ -8,6 +8,9 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", "elements": { "one_of": [ "grpc", @@ -21,220 +24,224 @@ "ws", "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, - "entity_checks": [ - { - "custom_entity_check": { - "field_sources": [ - "retry_count", - "queue_size", - "flush_timeout" - ] - } - } - ], "fields": [ { "host": { - "type": "string", + "default": "localhost", "referenceable": true, - "default": "localhost" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", "between": [ 0, 65535 ], - "type": "integer", - "default": 8125 + "type": "integer" } }, { "prefix": { "default": "kong", + "description": "String to be attached as a prefix to a metric's name.", "type": "string" } }, { "service_name_tag": { "default": "name", + "description": "String to be attached as the name of the service.", "type": "string" } }, { "status_tag": { "default": "status", + "description": "String to be attached as the tag of the HTTP status.", "type": "string" } }, { "consumer_tag": { "default": "consumer", + "description": "String to be attached as tag of the consumer.", "type": "string" } }, { "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", "type": "integer" } }, { "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", "type": "integer" } }, { "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", "type": "number" } }, { "queue": { - "required": true, "fields": [ { "max_batch_size": { + "default": 1, + "type": "integer", "between": [ 1, 1000000 ], - "type": "number", - "default": 1 + "description": "Maximum number of entries that can be processed at a time." } }, { "max_coalescing_delay": { + "default": 1, + "type": "number", "between": [ 0, 3600 ], - "type": "number", - "default": 1 + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." } }, { "max_entries": { + "default": 10000, + "type": "integer", "between": [ 1, 1000000 ], - "type": "number", - "default": 10000 + "description": "Maximum number of entries that can be waiting on the queue." } }, { "max_bytes": { - "type": "number" + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." } }, { "max_retry_time": { "default": 60, - "type": "number" + "type": "number", + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." } }, { "initial_retry_delay": { "default": 0.01, - "type": "number" + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "description": "Time in seconds before the initial retry is made for a failing batch." } }, { "max_retry_delay": { "default": 60, - "type": "number" + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "description": "Maximum time in seconds between retries, caps exponential backoff." } } ], - "type": "record" + "type": "record", + "required": true } }, { "metrics": { "default": [ { + "name": "request_count", "stat_type": "counter", "tags": [ "app:kong" ], "consumer_identifier": "custom_id", - "name": "request_count", "sample_rate": 1 }, { - "stat_type": "timer", - "consumer_identifier": "custom_id", - "name": "latency", "tags": [ "app:kong" - ] + ], + "consumer_identifier": "custom_id", + "name": "latency", + "stat_type": "timer" }, { - "stat_type": "timer", - "consumer_identifier": "custom_id", - "name": "request_size", "tags": [ "app:kong" - ] + ], + "consumer_identifier": "custom_id", + "name": "request_size", + "stat_type": "timer" }, { - "stat_type": "timer", - "consumer_identifier": "custom_id", - "name": "response_size", "tags": [ "app:kong" - ] + ], + "consumer_identifier": "custom_id", + "name": "response_size", + "stat_type": "timer" }, { - "stat_type": "timer", - "consumer_identifier": "custom_id", - "name": "upstream_latency", "tags": [ "app:kong" - ] + ], + "consumer_identifier": "custom_id", + "name": "upstream_latency", + "stat_type": "timer" }, { - "stat_type": "timer", - "consumer_identifier": "custom_id", - "name": "kong_latency", "tags": [ "app:kong" - ] + ], + "consumer_identifier": "custom_id", + "name": "kong_latency", + "stat_type": "timer" } ], + "required": true, + "type": "array", + "description": "List of metrics to be logged.", "elements": { - "entity_checks": [ - { - "conditional": { - "if_match": { - "one_of": [ - "counter", - "gauge" - ] - }, - "then_field": "sample_rate", - "if_field": "stat_type", - "then_match": { - "required": true - } - } - } - ], "fields": [ { "name": { - "type": "string", - "required": true, + "description": "Datadog metric’s name", "one_of": [ "kong_latency", "latency", @@ -242,13 +249,14 @@ "request_size", "response_size", "upstream_latency" - ] + ], + "required": true, + "type": "string" } }, { "stat_type": { - "type": "string", - "required": true, + "description": "Determines what sort of event the metric represents", "one_of": [ "counter", "gauge", @@ -257,16 +265,19 @@ "set", "timer", "distribution" - ] + ], + "required": true, + "type": "string" } }, { "tags": { + "type": "array", "elements": { - "match": "^.*[^:]$", - "type": "string" + "type": "string", + "match": "^.*[^:]$" }, - "type": "array" + "description": "List of tags" } }, { @@ -275,7 +286,8 @@ 0, 1 ], - "type": "number" + "type": "number", + "description": "Sampling rate" } }, { @@ -285,19 +297,50 @@ "custom_id", "username" ], - "type": "string" + "type": "string", + "description": "Authenticated user detail" + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_field": "sample_rate", + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_match": { + "required": true + }, + "if_field": "stat_type" } } ], "type": "record" - }, - "required": true, - "type": "array" + } + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "retry_count", + "queue_size", + "flush_timeout" + ] } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/datadog/3.5.x.json b/schemas/datadog/3.5.x.json new file mode 100644 index 00000000..14aa7757 --- /dev/null +++ b/schemas/datadog/3.5.x.json @@ -0,0 +1,346 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "retry_count", + "queue_size", + "flush_timeout" + ] + } + } + ], + "fields": [ + { + "host": { + "default": "localhost", + "referenceable": true, + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 8125, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "prefix": { + "default": "kong", + "type": "string", + "description": "String to be attached as a prefix to a metric's name." + } + }, + { + "service_name_tag": { + "default": "name", + "type": "string", + "description": "String to be attached as the name of the service." + } + }, + { + "status_tag": { + "default": "status", + "type": "string", + "description": "String to be attached as the tag of the HTTP status." + } + }, + { + "consumer_tag": { + "default": "consumer", + "type": "string", + "description": "String to be attached as tag of the consumer." + } + }, + { + "retry_count": { + "type": "integer", + "description": "Number of times to retry when sending data to the upstream server." + } + }, + { + "queue_size": { + "type": "integer", + "description": "Maximum number of log entries to be sent on each message to the upstream server." + } + }, + { + "flush_timeout": { + "type": "number", + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records." + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "between": [ + 1, + 1000000 + ], + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time." + } + }, + { + "max_coalescing_delay": { + "between": [ + 0, + 3600 + ], + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." + } + }, + { + "max_entries": { + "between": [ + 1, + 1000000 + ], + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue." + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "default": 60, + "type": "number", + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." + } + }, + { + "initial_retry_delay": { + "between": [ + 0.001, + 1000000 + ], + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch." + } + }, + { + "max_retry_delay": { + "between": [ + 0.001, + 1000000 + ], + "default": 60, + "type": "number", + "description": "Maximum time in seconds between retries, caps exponential backoff." + } + } + ], + "type": "record", + "required": true + } + }, + { + "metrics": { + "type": "array", + "required": true, + "default": [ + { + "sample_rate": 1, + "stat_type": "counter", + "name": "request_count", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ] + }, + { + "name": "latency", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ], + "stat_type": "timer" + }, + { + "name": "request_size", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ], + "stat_type": "timer" + }, + { + "name": "response_size", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ], + "stat_type": "timer" + }, + { + "name": "upstream_latency", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ], + "stat_type": "timer" + }, + { + "name": "kong_latency", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ], + "stat_type": "timer" + } + ], + "description": "List of metrics to be logged.", + "elements": { + "fields": [ + { + "name": { + "required": true, + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_size", + "response_size", + "upstream_latency" + ], + "type": "string", + "description": "Datadog metric’s name" + } + }, + { + "stat_type": { + "required": true, + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer", + "distribution" + ], + "type": "string", + "description": "Determines what sort of event the metric represents" + } + }, + { + "tags": { + "description": "List of tags", + "type": "array", + "elements": { + "match": "^.*[^:]$", + "type": "string" + } + } + }, + { + "sample_rate": { + "between": [ + 0, + 1 + ], + "type": "number", + "description": "Sampling rate" + } + }, + { + "consumer_identifier": { + "one_of": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string", + "description": "Authenticated user detail" + } + } + ], + "type": "record", + "entity_checks": [ + { + "conditional": { + "then_field": "sample_rate", + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_match": { + "required": true + }, + "if_field": "stat_type" + } + } + ] + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/datadog/3.6.x.json b/schemas/datadog/3.6.x.json new file mode 100644 index 00000000..3860562d --- /dev/null +++ b/schemas/datadog/3.6.x.json @@ -0,0 +1,346 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "retry_count", + "queue_size", + "flush_timeout" + ] + } + } + ], + "type": "record", + "fields": [ + { + "host": { + "referenceable": true, + "type": "string", + "default": "localhost", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "default": 8125, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "prefix": { + "type": "string", + "default": "kong", + "description": "String to be attached as a prefix to a metric's name." + } + }, + { + "service_name_tag": { + "type": "string", + "default": "name", + "description": "String to be attached as the name of the service." + } + }, + { + "status_tag": { + "type": "string", + "default": "status", + "description": "String to be attached as the tag of the HTTP status." + } + }, + { + "consumer_tag": { + "type": "string", + "default": "consumer", + "description": "String to be attached as tag of the consumer." + } + }, + { + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer" + } + }, + { + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + } + }, + { + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number" + } + }, + { + "queue": { + "required": true, + "type": "record", + "fields": [ + { + "max_batch_size": { + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_coalescing_delay": { + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "between": [ + 0, + 3600 + ] + } + }, + { + "max_entries": { + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "type": "number", + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch.", + "between": [ + 0.001, + 1000000 + ] + } + }, + { + "max_retry_delay": { + "default": 60, + "type": "number", + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "between": [ + 0.001, + 1000000 + ] + } + } + ] + } + }, + { + "metrics": { + "elements": { + "entity_checks": [ + { + "conditional": { + "then_field": "sample_rate", + "if_field": "stat_type", + "then_match": { + "required": true + }, + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + } + } + } + ], + "type": "record", + "fields": [ + { + "name": { + "required": true, + "type": "string", + "description": "Datadog metric’s name", + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_size", + "response_size", + "upstream_latency" + ] + } + }, + { + "stat_type": { + "required": true, + "type": "string", + "description": "Determines what sort of event the metric represents", + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer", + "distribution" + ] + } + }, + { + "tags": { + "elements": { + "type": "string", + "match": "^.*[^:]$" + }, + "type": "array", + "description": "List of tags" + } + }, + { + "sample_rate": { + "type": "number", + "description": "Sampling rate", + "between": [ + 0, + 1 + ] + } + }, + { + "consumer_identifier": { + "one_of": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string", + "description": "Authenticated user detail" + } + } + ] + }, + "type": "array", + "default": [ + { + "stat_type": "counter", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ], + "name": "request_count", + "sample_rate": 1 + }, + { + "stat_type": "timer", + "name": "latency", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ] + }, + { + "stat_type": "timer", + "name": "request_size", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ] + }, + { + "stat_type": "timer", + "name": "response_size", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ] + }, + { + "stat_type": "timer", + "name": "upstream_latency", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ] + }, + { + "stat_type": "timer", + "name": "kong_latency", + "consumer_identifier": "custom_id", + "tags": [ + "app:kong" + ] + } + ], + "required": true, + "description": "List of metrics to be logged." + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/datadog/3.7.x.json b/schemas/datadog/3.7.x.json new file mode 100644 index 00000000..58c1186f --- /dev/null +++ b/schemas/datadog/3.7.x.json @@ -0,0 +1,350 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "referenceable": true, + "default": "localhost" + } + }, + { + "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "prefix": { + "description": "String to be attached as a prefix to a metric's name.", + "type": "string", + "default": "kong" + } + }, + { + "service_name_tag": { + "description": "String to be attached as the name of the service.", + "type": "string", + "default": "name" + } + }, + { + "status_tag": { + "description": "String to be attached as the tag of the HTTP status.", + "type": "string", + "default": "status" + } + }, + { + "consumer_tag": { + "description": "String to be attached as tag of the consumer.", + "type": "string", + "default": "consumer" + } + }, + { + "retry_count": { + "deprecation": { + "old_default": 10, + "removal_in_version": "4.0", + "message": "datadog: config.retry_count no longer works, please use config.queue.max_retry_time instead" + }, + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer" + } + }, + { + "queue_size": { + "deprecation": { + "old_default": 1, + "removal_in_version": "4.0", + "message": "datadog: config.queue_size is deprecated, please use config.queue.max_batch_size instead" + }, + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + } + }, + { + "flush_timeout": { + "deprecation": { + "old_default": 2, + "removal_in_version": "4.0", + "message": "datadog: config.flush_timeout is deprecated, please use config.queue.max_coalescing_delay instead" + }, + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number" + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_coalescing_delay": { + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "between": [ + 0, + 3600 + ] + } + }, + { + "max_entries": { + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "type": "number", + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "default": 60 + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch.", + "between": [ + 0.001, + 1000000 + ] + } + }, + { + "max_retry_delay": { + "default": 60, + "type": "number", + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "between": [ + 0.001, + 1000000 + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "metrics": { + "type": "array", + "required": true, + "elements": { + "fields": [ + { + "name": { + "required": true, + "description": "Datadog metric’s name", + "type": "string", + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_size", + "response_size", + "upstream_latency" + ] + } + }, + { + "stat_type": { + "required": true, + "description": "Determines what sort of event the metric represents", + "type": "string", + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer", + "distribution" + ] + } + }, + { + "tags": { + "elements": { + "type": "string", + "match": "^.*[^:]$" + }, + "description": "List of tags", + "type": "array" + } + }, + { + "sample_rate": { + "description": "Sampling rate", + "type": "number", + "between": [ + 0, + 1 + ] + } + }, + { + "consumer_identifier": { + "description": "Authenticated user detail", + "type": "string", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_field": "stat_type", + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "then_match": { + "required": true + } + } + } + ], + "type": "record" + }, + "description": "List of metrics to be logged.", + "default": [ + { + "stat_type": "counter", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id", + "name": "request_count", + "sample_rate": 1 + }, + { + "stat_type": "timer", + "name": "latency", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id" + }, + { + "stat_type": "timer", + "name": "request_size", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id" + }, + { + "stat_type": "timer", + "name": "response_size", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id" + }, + { + "stat_type": "timer", + "name": "upstream_latency", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id" + }, + { + "stat_type": "timer", + "name": "kong_latency", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id" + } + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/datadog/3.8.x.json b/schemas/datadog/3.8.x.json new file mode 100644 index 00000000..9c8a1c3c --- /dev/null +++ b/schemas/datadog/3.8.x.json @@ -0,0 +1,361 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "referenceable": true, + "default": "localhost" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 8125 + } + }, + { + "prefix": { + "description": "String to be attached as a prefix to a metric's name.", + "type": "string", + "default": "kong" + } + }, + { + "service_name_tag": { + "description": "String to be attached as the name of the service.", + "type": "string", + "default": "name" + } + }, + { + "status_tag": { + "description": "String to be attached as the tag of the HTTP status.", + "type": "string", + "default": "status" + } + }, + { + "consumer_tag": { + "description": "String to be attached as tag of the consumer.", + "type": "string", + "default": "consumer" + } + }, + { + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer", + "deprecation": { + "old_default": 10, + "message": "datadog: config.retry_count no longer works, please use config.queue.max_retry_time instead", + "removal_in_version": "4.0" + } + } + }, + { + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer", + "deprecation": { + "old_default": 1, + "message": "datadog: config.queue_size is deprecated, please use config.queue.max_batch_size instead", + "removal_in_version": "4.0" + } + } + }, + { + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number", + "deprecation": { + "old_default": 2, + "message": "datadog: config.flush_timeout is deprecated, please use config.queue.max_coalescing_delay instead", + "removal_in_version": "4.0" + } + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "description": "Maximum number of entries that can be processed at a time.", + "type": "integer", + "between": [ + 1, + 1000000 + ], + "default": 1 + } + }, + { + "max_coalescing_delay": { + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "type": "number", + "between": [ + 0, + 3600 + ], + "default": 1 + } + }, + { + "max_entries": { + "description": "Maximum number of entries that can be waiting on the queue.", + "type": "integer", + "between": [ + 1, + 1000000 + ], + "default": 10000 + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number", + "default": 60 + } + }, + { + "initial_retry_delay": { + "description": "Time in seconds before the initial retry is made for a failing batch.", + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "default": 0.01 + } + }, + { + "max_retry_delay": { + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "default": 60 + } + }, + { + "concurrency_limit": { + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "type": "integer", + "default": 1, + "one_of": [ + -1, + 1 + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "metrics": { + "description": "List of metrics to be logged.", + "required": true, + "elements": { + "fields": [ + { + "name": { + "description": "Datadog metric’s name", + "required": true, + "type": "string", + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_size", + "response_size", + "upstream_latency" + ] + } + }, + { + "stat_type": { + "description": "Determines what sort of event the metric represents", + "required": true, + "type": "string", + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer", + "distribution" + ] + } + }, + { + "tags": { + "description": "List of tags", + "type": "array", + "elements": { + "type": "string", + "match": "^.*[^:]$" + } + } + }, + { + "sample_rate": { + "description": "Sampling rate", + "type": "number", + "between": [ + 0, + 1 + ] + } + }, + { + "consumer_identifier": { + "description": "Authenticated user detail", + "type": "string", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + } + ], + "type": "record", + "entity_checks": [ + { + "conditional": { + "if_field": "stat_type", + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "then_match": { + "required": true + } + } + } + ] + }, + "type": "array", + "default": [ + { + "stat_type": "counter", + "name": "request_count", + "consumer_identifier": "custom_id", + "sample_rate": 1, + "tags": [ + "app:kong" + ] + }, + { + "stat_type": "timer", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id", + "name": "latency" + }, + { + "stat_type": "timer", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id", + "name": "request_size" + }, + { + "stat_type": "timer", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id", + "name": "response_size" + }, + { + "stat_type": "timer", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id", + "name": "upstream_latency" + }, + { + "stat_type": "timer", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id", + "name": "kong_latency" + } + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/datadog/3.9.x.json b/schemas/datadog/3.9.x.json new file mode 100644 index 00000000..7157cc3d --- /dev/null +++ b/schemas/datadog/3.9.x.json @@ -0,0 +1,361 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "referenceable": true, + "type": "string" + } + }, + { + "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "prefix": { + "default": "kong", + "description": "String to be attached as a prefix to a metric's name.", + "type": "string" + } + }, + { + "service_name_tag": { + "default": "name", + "description": "String to be attached as the name of the service.", + "type": "string" + } + }, + { + "status_tag": { + "default": "status", + "description": "String to be attached as the tag of the HTTP status.", + "type": "string" + } + }, + { + "consumer_tag": { + "default": "consumer", + "description": "String to be attached as tag of the consumer.", + "type": "string" + } + }, + { + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer", + "deprecation": { + "old_default": 10, + "message": "datadog: config.retry_count no longer works, please use config.queue.max_retry_time instead", + "removal_in_version": "4.0" + } + } + }, + { + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer", + "deprecation": { + "old_default": 1, + "message": "datadog: config.queue_size is deprecated, please use config.queue.max_batch_size instead", + "removal_in_version": "4.0" + } + } + }, + { + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number", + "deprecation": { + "old_default": 2, + "message": "datadog: config.flush_timeout is deprecated, please use config.queue.max_coalescing_delay instead", + "removal_in_version": "4.0" + } + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "between": [ + 1, + 1000000 + ], + "type": "integer" + } + }, + { + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "between": [ + 0, + 3600 + ], + "type": "number" + } + }, + { + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "between": [ + 1, + 1000000 + ], + "type": "integer" + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "between": [ + 0.001, + 1000000 + ], + "type": "number" + } + }, + { + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "between": [ + 0.001, + 1000000 + ], + "type": "number" + } + }, + { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "type": "integer", + "one_of": [ + -1, + 1 + ] + } + } + ], + "required": true, + "type": "record" + } + }, + { + "metrics": { + "required": true, + "type": "array", + "default": [ + { + "name": "request_count", + "stat_type": "counter", + "tags": [ + "app:kong" + ], + "sample_rate": 1, + "consumer_identifier": "custom_id" + }, + { + "stat_type": "timer", + "name": "latency", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id" + }, + { + "stat_type": "timer", + "name": "request_size", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id" + }, + { + "stat_type": "timer", + "name": "response_size", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id" + }, + { + "stat_type": "timer", + "name": "upstream_latency", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id" + }, + { + "stat_type": "timer", + "name": "kong_latency", + "tags": [ + "app:kong" + ], + "consumer_identifier": "custom_id" + } + ], + "description": "List of metrics to be logged.", + "elements": { + "entity_checks": [ + { + "conditional": { + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "if_field": "stat_type", + "then_match": { + "required": true + } + } + } + ], + "fields": [ + { + "name": { + "type": "string", + "description": "Datadog metric’s name", + "required": true, + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_size", + "response_size", + "upstream_latency" + ] + } + }, + { + "stat_type": { + "type": "string", + "description": "Determines what sort of event the metric represents", + "required": true, + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer", + "distribution" + ] + } + }, + { + "tags": { + "elements": { + "match": "^.*[^:]$", + "type": "string" + }, + "description": "List of tags", + "type": "array" + } + }, + { + "sample_rate": { + "between": [ + 0, + 1 + ], + "description": "Sampling rate", + "type": "number" + } + }, + { + "consumer_identifier": { + "description": "Authenticated user detail", + "type": "string", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + } + ], + "type": "record" + } + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/datakit/3.11.x.json b/schemas/datakit/3.11.x.json new file mode 100644 index 00000000..e58ec149 --- /dev/null +++ b/schemas/datakit/3.11.x.json @@ -0,0 +1,697 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "nodes": { + "required": true, + "type": "array", + "elements": { + "subschema_error": "unknown node type: %q, expected one of: call, exit, jq, property, static", + "description": "datakit nodes", + "fields": [ + { + "name": { + "match_all": [ + { + "err": "must be a valid identifier", + "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$" + } + ], + "match_none": [ + { + "err": "reserved node name", + "pattern": "^_$" + }, + { + "err": "reserved node name", + "pattern": "^context$" + }, + { + "err": "reserved node name", + "pattern": "^ctx$" + }, + { + "err": "reserved node name", + "pattern": "^globals$" + }, + { + "err": "reserved node name", + "pattern": "^kong$" + }, + { + "err": "reserved node name", + "pattern": "^ngx$" + }, + { + "err": "reserved node name", + "pattern": "^node$" + }, + { + "err": "reserved node name", + "pattern": "^plan$" + }, + { + "err": "reserved node name", + "pattern": "^plugin$" + }, + { + "err": "reserved node name", + "pattern": "^property$" + }, + { + "err": "reserved node name", + "pattern": "^self$" + }, + { + "err": "reserved node name", + "pattern": "^static$" + }, + { + "err": "reserved node name", + "pattern": "^vars$" + } + ], + "required": true, + "type": "string", + "len_min": 1, + "len_max": 255, + "examples": [ + { + "value": "snake_case" + }, + { + "value": "SCREAMING_SNAKE_CASE" + }, + { + "value": "kebab-case" + }, + { + "value": "KEBAB-CASE" + }, + { + "value": "set-property" + }, + { + "value": "get-property" + }, + { + "value": "send_api_request" + }, + { + "value": "filter_01" + }, + { + "value": "filter_02" + } + ], + "not_one_of": [ + "request", + "response", + "service_request", + "service_response" + ], + "description": "A label that uniquely identifies the node within the plugin configuration so that it can be used for input/output connections. Must be valid `snake_case` or `kebab-case`." + } + }, + { + "type": { + "required": true, + "type": "string", + "one_of": [ + "call", + "exit", + "jq", + "property", + "static" + ] + } + } + ], + "subschema_override_parent": true, + "subschema_definitions": { + "static": { + "description": "Produce reusable outputs from statically-configured values", + "type": "record", + "fields": [ + { + "values": { + "required": true, + "description": "An object with string keys and freeform values", + "len_min": 1, + "keys": { + "len_max": 255, + "type": "string", + "len_min": 1 + }, + "values": { + "required": false, + "description": "Any JSON-serializable type", + "json_schema": { + "inline": { + "type": [ + "array", + "boolean", + "null", + "number", + "object", + "string" + ] + } + }, + "type": "json" + }, + "type": "map" + } + }, + { + "output": { + "required": false, + "description": "The entire `.values` map", + "len_min": 1, + "len_max": 255, + "match_any": { + "err": "must be one of NODE_NAME or NODE_NAME.FIELD", + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "type": "string" + } + }, + { + "outputs": { + "required": false, + "description": "Individual items from `.values`, referenced by key", + "keys": { + "len_max": 255, + "type": "string", + "len_min": 1 + }, + "values": { + "len_max": 255, + "type": "string", + "match_any": { + "err": "must be one of NODE_NAME or NODE_NAME.FIELD", + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "len_min": 1 + }, + "type": "map" + } + } + ], + "entity_checks": [ + { + "mutually_exclusive": [ + "output", + "outputs" + ] + } + ] + }, + "jq": { + "description": "Process data using `jq` syntax", + "type": "record", + "fields": [ + { + "jq": { + "required": true, + "type": "string", + "len_min": 1, + "len_max": 10240, + "description": "The jq filter text. Refer to https://jqlang.org/manual/ for full documentation." + } + }, + { + "input": { + "required": false, + "description": "filter input(s)", + "len_min": 1, + "len_max": 255, + "match_any": { + "err": "must be one of NODE_NAME or NODE_NAME.FIELD", + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "type": "string" + } + }, + { + "inputs": { + "required": false, + "description": "filter input(s)", + "keys": { + "len_max": 255, + "type": "string", + "len_min": 1 + }, + "values": { + "len_max": 255, + "type": "string", + "match_any": { + "err": "must be one of NODE_NAME or NODE_NAME.FIELD", + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "len_min": 1 + }, + "type": "map" + } + }, + { + "output": { + "required": false, + "description": "filter output(s)", + "len_min": 1, + "len_max": 255, + "match_any": { + "err": "must be one of NODE_NAME or NODE_NAME.FIELD", + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "type": "string" + } + } + ], + "entity_checks": [ + { + "mutually_exclusive": [ + "input", + "inputs" + ] + } + ] + }, + "exit": { + "description": "Terminate the request and send a response to the client", + "type": "record", + "fields": [ + { + "status": { + "required": false, + "type": "integer", + "default": 200, + "between": [ + 200, + 599 + ], + "description": "HTTP status code" + } + }, + { + "warn_headers_sent": { + "required": false, + "type": "boolean" + } + }, + { + "input": { + "required": false, + "description": "exit node input", + "len_min": 1, + "len_max": 255, + "match_any": { + "err": "must be one of NODE_NAME or NODE_NAME.FIELD", + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "type": "string" + } + }, + { + "inputs": { + "required": false, + "type": "record", + "fields": [ + { + "body": { + "required": false, + "description": "HTTP response body", + "len_min": 1, + "len_max": 255, + "match_any": { + "err": "must be one of NODE_NAME or NODE_NAME.FIELD", + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "type": "string" + } + }, + { + "headers": { + "required": false, + "description": "HTTP response headers", + "len_min": 1, + "len_max": 255, + "match_any": { + "err": "must be one of NODE_NAME or NODE_NAME.FIELD", + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "type": "string" + } + } + ], + "description": "exit node inputs" + } + } + ], + "entity_checks": [ + { + "mutually_exclusive": [ + "input", + "inputs" + ] + } + ] + }, + "call": { + "description": "Make an external HTTP request", + "type": "record", + "fields": [ + { + "method": { + "type": "string", + "match": "^%u+$", + "default": "GET", + "len_max": 32, + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "len_min": 1 + } + }, + { + "ssl_server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "url": { + "required": true, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "input": { + "required": false, + "description": "call node input", + "len_min": 1, + "len_max": 255, + "match_any": { + "err": "must be one of NODE_NAME or NODE_NAME.FIELD", + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "type": "string" + } + }, + { + "inputs": { + "required": false, + "type": "record", + "fields": [ + { + "body": { + "required": false, + "description": "HTTP request body", + "len_min": 1, + "len_max": 255, + "match_any": { + "err": "must be one of NODE_NAME or NODE_NAME.FIELD", + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "type": "string" + } + }, + { + "headers": { + "required": false, + "description": "HTTP request headers", + "len_min": 1, + "len_max": 255, + "match_any": { + "err": "must be one of NODE_NAME or NODE_NAME.FIELD", + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "type": "string" + } + }, + { + "query": { + "required": false, + "description": "HTTP request query", + "len_min": 1, + "len_max": 255, + "match_any": { + "err": "must be one of NODE_NAME or NODE_NAME.FIELD", + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "type": "string" + } + } + ], + "description": "call node inputs" + } + }, + { + "output": { + "required": false, + "description": "call node output", + "len_min": 1, + "len_max": 255, + "match_any": { + "err": "must be one of NODE_NAME or NODE_NAME.FIELD", + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "type": "string" + } + }, + { + "outputs": { + "required": false, + "type": "record", + "fields": [ + { + "body": { + "required": false, + "description": "HTTP response body", + "len_min": 1, + "len_max": 255, + "match_any": { + "err": "must be one of NODE_NAME or NODE_NAME.FIELD", + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "type": "string" + } + }, + { + "headers": { + "required": false, + "description": "HTTP response headers", + "len_min": 1, + "len_max": 255, + "match_any": { + "err": "must be one of NODE_NAME or NODE_NAME.FIELD", + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "type": "string" + } + }, + { + "status": { + "required": false, + "description": "HTTP response status code", + "len_min": 1, + "len_max": 255, + "match_any": { + "err": "must be one of NODE_NAME or NODE_NAME.FIELD", + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "type": "string" + } + } + ], + "description": "call node outputs" + } + } + ], + "entity_checks": [ + { + "mutually_exclusive": [ + "input", + "inputs" + ] + }, + { + "mutually_exclusive": [ + "output", + "outputs" + ] + } + ] + }, + "property": { + "type": "record", + "fields": [ + { + "content_type": { + "required": false, + "description": "The expected mime type of the property value. When set to `application/json`, SET operations will JSON-encode input data before writing it, and GET operations will JSON-decode output data after reading it. Otherwise, this setting has no effect.", + "type": "string", + "one_of": [ + "application/json", + "text/plain", + "application/octet-stream" + ] + } + }, + { + "property": { + "required": true, + "description": "The property name to get/set", + "len_min": 1, + "len_max": 255, + "type": "string" + } + }, + { + "input": { + "required": false, + "description": "Property input source. When connected, this node operates in SET mode and writes input data to the property. Otherwise, the node operates in GET mode and reads the property.", + "len_min": 1, + "len_max": 255, + "match_any": { + "err": "must be one of NODE_NAME or NODE_NAME.FIELD", + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "type": "string" + } + }, + { + "output": { + "required": false, + "description": "Property output. This can be connected regardless of whether the node is operating in GET mode or SET mode.", + "len_min": 1, + "len_max": 255, + "match_any": { + "err": "must be one of NODE_NAME or NODE_NAME.FIELD", + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ] + }, + "type": "string" + } + } + ], + "description": "Get or set a property" + } + }, + "type": "record", + "subschema_key": "type" + }, + "len_min": 1, + "len_max": 64 + } + }, + { + "debug": { + "required": false, + "type": "boolean", + "default": false + } + } + ] + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "pass_errors_to_checker": true, + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/datakit/3.12.x.json b/schemas/datakit/3.12.x.json new file mode 100644 index 00000000..84d7042e --- /dev/null +++ b/schemas/datakit/3.12.x.json @@ -0,0 +1,716 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ], + "pass_errors_to_checker": true + } + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "nodes": { + "type": "array", + "len_min": 1, + "len_max": 64, + "required": true, + "elements": { + "type": "record", + "subschema_override_parent": true, + "subschema_error": "unknown node type: %q, expected one of: call, exit, jq, property, static", + "description": "datakit nodes", + "subschema_key": "type", + "subschema_definitions": { + "call": { + "type": "record", + "fields": [ + { + "method": { + "type": "string", + "len_min": 1, + "len_max": 32, + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "default": "GET", + "match": "^%u+$" + } + }, + { + "ssl_server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS." + } + }, + { + "timeout": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "url": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": true + } + }, + { + "input": { + "type": "string", + "len_min": 1, + "len_max": 255, + "required": false, + "description": "call node input", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ], + "err": "must be one of NODE_NAME or NODE_NAME.FIELD" + } + } + }, + { + "inputs": { + "type": "record", + "fields": [ + { + "body": { + "type": "string", + "len_min": 1, + "len_max": 255, + "required": false, + "description": "HTTP request body", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ], + "err": "must be one of NODE_NAME or NODE_NAME.FIELD" + } + } + }, + { + "headers": { + "type": "string", + "len_min": 1, + "len_max": 255, + "required": false, + "description": "HTTP request headers", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ], + "err": "must be one of NODE_NAME or NODE_NAME.FIELD" + } + } + }, + { + "query": { + "type": "string", + "len_min": 1, + "len_max": 255, + "required": false, + "description": "HTTP request query", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ], + "err": "must be one of NODE_NAME or NODE_NAME.FIELD" + } + } + } + ], + "description": "call node inputs", + "required": false + } + }, + { + "output": { + "type": "string", + "len_min": 1, + "len_max": 255, + "required": false, + "description": "call node output", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ], + "err": "must be one of NODE_NAME or NODE_NAME.FIELD" + } + } + }, + { + "outputs": { + "type": "record", + "fields": [ + { + "body": { + "type": "string", + "len_min": 1, + "len_max": 255, + "required": false, + "description": "HTTP response body", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ], + "err": "must be one of NODE_NAME or NODE_NAME.FIELD" + } + } + }, + { + "headers": { + "type": "string", + "len_min": 1, + "len_max": 255, + "required": false, + "description": "HTTP response headers", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ], + "err": "must be one of NODE_NAME or NODE_NAME.FIELD" + } + } + }, + { + "status": { + "type": "string", + "len_min": 1, + "len_max": 255, + "required": false, + "description": "HTTP response status code", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ], + "err": "must be one of NODE_NAME or NODE_NAME.FIELD" + } + } + } + ], + "description": "call node outputs", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_exclusive": [ + "input", + "inputs" + ] + }, + { + "mutually_exclusive": [ + "output", + "outputs" + ] + } + ], + "description": "Make an external HTTP request" + }, + "property": { + "type": "record", + "fields": [ + { + "content_type": { + "description": "The expected mime type of the property value. When set to `application/json`, SET operations will JSON-encode input data before writing it, and GET operations will JSON-decode output data after reading it. Otherwise, this setting has no effect.", + "type": "string", + "one_of": [ + "application/json", + "text/plain", + "application/octet-stream" + ], + "required": false + } + }, + { + "property": { + "type": "string", + "len_min": 1, + "len_max": 255, + "required": true, + "description": "The property name to get/set" + } + }, + { + "input": { + "type": "string", + "len_min": 1, + "len_max": 255, + "required": false, + "description": "Property input source. When connected, this node operates in SET mode and writes input data to the property. Otherwise, the node operates in GET mode and reads the property.", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ], + "err": "must be one of NODE_NAME or NODE_NAME.FIELD" + } + } + }, + { + "output": { + "type": "string", + "len_min": 1, + "len_max": 255, + "required": false, + "description": "Property output. This can be connected regardless of whether the node is operating in GET mode or SET mode.", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ], + "err": "must be one of NODE_NAME or NODE_NAME.FIELD" + } + } + } + ], + "description": "Get or set a property" + }, + "static": { + "type": "record", + "fields": [ + { + "values": { + "description": "An object with string keys and freeform values", + "json_schema": { + "inline": { + "type": "object" + } + }, + "type": "json", + "required": true + } + }, + { + "output": { + "type": "string", + "len_min": 1, + "len_max": 255, + "required": false, + "description": "The entire `.values` map", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ], + "err": "must be one of NODE_NAME or NODE_NAME.FIELD" + } + } + }, + { + "outputs": { + "type": "map", + "required": false, + "description": "Individual items from `.values`, referenced by key", + "values": { + "type": "string", + "len_min": 1, + "len_max": 255, + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ], + "err": "must be one of NODE_NAME or NODE_NAME.FIELD" + } + }, + "keys": { + "type": "string", + "len_min": 1, + "len_max": 255 + } + } + } + ], + "entity_checks": [ + { + "mutually_exclusive": [ + "output", + "outputs" + ] + } + ], + "description": "Produce reusable outputs from statically-configured values" + }, + "jq": { + "type": "record", + "fields": [ + { + "jq": { + "type": "string", + "len_min": 1, + "len_max": 10240, + "required": true, + "description": "The jq filter text. Refer to https://jqlang.org/manual/ for full documentation." + } + }, + { + "input": { + "type": "string", + "len_min": 1, + "len_max": 255, + "required": false, + "description": "filter input(s)", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ], + "err": "must be one of NODE_NAME or NODE_NAME.FIELD" + } + } + }, + { + "inputs": { + "type": "map", + "required": false, + "description": "filter input(s)", + "values": { + "type": "string", + "len_min": 1, + "len_max": 255, + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ], + "err": "must be one of NODE_NAME or NODE_NAME.FIELD" + } + }, + "keys": { + "type": "string", + "len_min": 1, + "len_max": 255 + } + } + }, + { + "output": { + "type": "string", + "len_min": 1, + "len_max": 255, + "required": false, + "description": "filter output(s)", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ], + "err": "must be one of NODE_NAME or NODE_NAME.FIELD" + } + } + } + ], + "entity_checks": [ + { + "mutually_exclusive": [ + "input", + "inputs" + ] + } + ], + "description": "Process data using `jq` syntax" + }, + "exit": { + "type": "record", + "fields": [ + { + "status": { + "type": "integer", + "between": [ + 200, + 599 + ], + "required": false, + "description": "HTTP status code", + "default": 200 + } + }, + { + "warn_headers_sent": { + "type": "boolean", + "required": false + } + }, + { + "input": { + "type": "string", + "len_min": 1, + "len_max": 255, + "required": false, + "description": "exit node input", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ], + "err": "must be one of NODE_NAME or NODE_NAME.FIELD" + } + } + }, + { + "inputs": { + "type": "record", + "fields": [ + { + "body": { + "type": "string", + "len_min": 1, + "len_max": 255, + "required": false, + "description": "HTTP response body", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ], + "err": "must be one of NODE_NAME or NODE_NAME.FIELD" + } + } + }, + { + "headers": { + "type": "string", + "len_min": 1, + "len_max": 255, + "required": false, + "description": "HTTP response headers", + "match_any": { + "patterns": [ + "^[A-Za-z_][A-Za-z0-9_-]*$", + "^[A-Za-z_][A-Za-z0-9_-]*%..+$" + ], + "err": "must be one of NODE_NAME or NODE_NAME.FIELD" + } + } + } + ], + "description": "exit node inputs", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_exclusive": [ + "input", + "inputs" + ] + } + ], + "description": "Terminate the request and send a response to the client" + } + }, + "fields": [ + { + "name": { + "type": "string", + "required": true, + "description": "A label that uniquely identifies the node within the plugin configuration so that it can be used for input/output connections. Must be valid `snake_case` or `kebab-case`.", + "len_min": 1, + "len_max": 255, + "examples": [ + { + "value": "snake_case" + }, + { + "value": "SCREAMING_SNAKE_CASE" + }, + { + "value": "kebab-case" + }, + { + "value": "KEBAB-CASE" + }, + { + "value": "set-property" + }, + { + "value": "get-property" + }, + { + "value": "send_api_request" + }, + { + "value": "filter_01" + }, + { + "value": "filter_02" + } + ], + "not_one_of": [ + "request", + "response", + "service_request", + "service_response", + "vault" + ], + "match_all": [ + { + "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$", + "err": "must be a valid identifier" + } + ], + "match_none": [ + { + "pattern": "^_$", + "err": "reserved node name" + }, + { + "pattern": "^context$", + "err": "reserved node name" + }, + { + "pattern": "^ctx$", + "err": "reserved node name" + }, + { + "pattern": "^error$", + "err": "reserved node name" + }, + { + "pattern": "^globals$", + "err": "reserved node name" + }, + { + "pattern": "^kong$", + "err": "reserved node name" + }, + { + "pattern": "^ngx$", + "err": "reserved node name" + }, + { + "pattern": "^node$", + "err": "reserved node name" + }, + { + "pattern": "^plan$", + "err": "reserved node name" + }, + { + "pattern": "^plugin$", + "err": "reserved node name" + }, + { + "pattern": "^property$", + "err": "reserved node name" + }, + { + "pattern": "^self$", + "err": "reserved node name" + }, + { + "pattern": "^static$", + "err": "reserved node name" + }, + { + "pattern": "^vars$", + "err": "reserved node name" + } + ] + } + }, + { + "type": { + "type": "string", + "one_of": [ + "call", + "exit", + "jq", + "property", + "static" + ], + "required": true + } + } + ] + } + } + }, + { + "resources": { + "type": "record", + "fields": [ + { + "vault": { + "type": "map", + "len_min": 1, + "len_max": 64, + "required": false, + "values": { + "type": "string", + "referenceable": true, + "required": true + }, + "keys": { + "type": "string", + "len_min": 1, + "len_max": 255, + "match_all": [ + { + "pattern": "^[A-Za-z_][A-Za-z0-9_-]*$", + "err": "must be a valid identifier" + } + ] + } + } + } + ], + "required": false + } + }, + { + "debug": { + "type": "boolean", + "default": false, + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/degraphql/3.10.x.json b/schemas/degraphql/3.10.x.json new file mode 100644 index 00000000..156c4fb5 --- /dev/null +++ b/schemas/degraphql/3.10.x.json @@ -0,0 +1,68 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "graphql_server_path": { + "type": "string", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "default": "/graphql", + "starts_with": "/", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/degraphql/3.11.x.json b/schemas/degraphql/3.11.x.json new file mode 100644 index 00000000..d4662ad4 --- /dev/null +++ b/schemas/degraphql/3.11.x.json @@ -0,0 +1,68 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "graphql_server_path": { + "required": true, + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "starts_with": "/", + "default": "/graphql", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/degraphql/3.12.x.json b/schemas/degraphql/3.12.x.json new file mode 100644 index 00000000..d1e8d7b8 --- /dev/null +++ b/schemas/degraphql/3.12.x.json @@ -0,0 +1,66 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "graphql_server_path": { + "type": "string", + "starts_with": "/", + "required": true, + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "default": "/graphql", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/degraphql/3.4.x.json b/schemas/degraphql/3.4.x.json index 53c9616a..3b0e32f6 100644 --- a/schemas/degraphql/3.4.x.json +++ b/schemas/degraphql/3.4.x.json @@ -2,6 +2,7 @@ "fields": [ { "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, "reference": "consumers", "type": "foreign" @@ -9,46 +10,59 @@ }, { "protocols": { - "default": [ - "grpc", - "grpcs", - "http", - "https" - ], + "description": "A set of strings representing HTTP protocols.", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" + ] }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], "required": true, "type": "set" } }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, { "config": { - "required": true, "fields": [ { "graphql_server_path": { + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "default": "/graphql", + "required": true, "match_none": [ { "err": "must not have empty segments", "pattern": "//" } ], - "starts_with": "/", - "required": true, - "default": "/graphql", "type": "string" } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/degraphql/3.5.x.json b/schemas/degraphql/3.5.x.json new file mode 100644 index 00000000..1fbc8904 --- /dev/null +++ b/schemas/degraphql/3.5.x.json @@ -0,0 +1,68 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumers" + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumer_groups" + } + }, + { + "config": { + "fields": [ + { + "graphql_server_path": { + "required": true, + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "type": "string", + "default": "/graphql", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "starts_with": "/" + } + } + ], + "type": "record", + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/degraphql/3.6.x.json b/schemas/degraphql/3.6.x.json new file mode 100644 index 00000000..1a00b027 --- /dev/null +++ b/schemas/degraphql/3.6.x.json @@ -0,0 +1,68 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" + } + }, + { + "config": { + "type": "record", + "required": true, + "fields": [ + { + "graphql_server_path": { + "required": true, + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "default": "/graphql", + "type": "string" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/degraphql/3.7.x.json b/schemas/degraphql/3.7.x.json new file mode 100644 index 00000000..cd491eea --- /dev/null +++ b/schemas/degraphql/3.7.x.json @@ -0,0 +1,68 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "graphql_server_path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "required": true, + "type": "string", + "starts_with": "/", + "default": "/graphql" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/degraphql/3.8.x.json b/schemas/degraphql/3.8.x.json new file mode 100644 index 00000000..80461c1c --- /dev/null +++ b/schemas/degraphql/3.8.x.json @@ -0,0 +1,68 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "graphql_server_path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "required": true, + "starts_with": "/", + "type": "string", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "default": "/graphql" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/degraphql/3.9.x.json b/schemas/degraphql/3.9.x.json new file mode 100644 index 00000000..36cd73d3 --- /dev/null +++ b/schemas/degraphql/3.9.x.json @@ -0,0 +1,68 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "graphql_server_path": { + "required": true, + "type": "string", + "default": "/graphql", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "starts_with": "/" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/exit-transformer/3.10.x.json b/schemas/exit-transformer/3.10.x.json new file mode 100644 index 00000000..56603b78 --- /dev/null +++ b/schemas/exit-transformer/3.10.x.json @@ -0,0 +1,68 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "functions": { + "elements": { + "type": "string" + }, + "type": "array", + "required": true + } + }, + { + "handle_unknown": { + "description": "Determines whether to handle unknown status codes by transforming their responses.", + "default": false, + "type": "boolean" + } + }, + { + "handle_unexpected": { + "description": "Determines whether to handle unexpected errors by transforming their responses.", + "default": false, + "type": "boolean" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/exit-transformer/3.11.x.json b/schemas/exit-transformer/3.11.x.json new file mode 100644 index 00000000..cb620ecf --- /dev/null +++ b/schemas/exit-transformer/3.11.x.json @@ -0,0 +1,68 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "functions": { + "required": true, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "handle_unknown": { + "default": false, + "description": "Determines whether to handle unknown status codes by transforming their responses.", + "type": "boolean" + } + }, + { + "handle_unexpected": { + "default": false, + "description": "Determines whether to handle unexpected errors by transforming their responses.", + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/exit-transformer/3.12.x.json b/schemas/exit-transformer/3.12.x.json new file mode 100644 index 00000000..421cdc63 --- /dev/null +++ b/schemas/exit-transformer/3.12.x.json @@ -0,0 +1,66 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "functions": { + "type": "array", + "elements": { + "type": "string" + }, + "required": true + } + }, + { + "handle_unknown": { + "type": "boolean", + "default": false, + "description": "Determines whether to handle unknown status codes by transforming their responses." + } + }, + { + "handle_unexpected": { + "type": "boolean", + "default": false, + "description": "Determines whether to handle unexpected errors by transforming their responses." + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/exit-transformer/3.4.x.json b/schemas/exit-transformer/3.4.x.json index eb0f4934..626dc3ad 100644 --- a/schemas/exit-transformer/3.4.x.json +++ b/schemas/exit-transformer/3.4.x.json @@ -8,47 +8,61 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "functions": { - "required": true, "type": "array", "elements": { "type": "string" - } + }, + "required": true } }, { "handle_unknown": { "default": false, + "description": "Determines whether to handle unknown status codes by transforming their responses.", "type": "boolean" } }, { "handle_unexpected": { "default": false, + "description": "Determines whether to handle unexpected errors by transforming their responses.", "type": "boolean" } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/exit-transformer/3.5.x.json b/schemas/exit-transformer/3.5.x.json new file mode 100644 index 00000000..9ae7db93 --- /dev/null +++ b/schemas/exit-transformer/3.5.x.json @@ -0,0 +1,68 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "functions": { + "required": true, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "handle_unknown": { + "default": false, + "type": "boolean", + "description": "Determines whether to handle unknown status codes by transforming their responses." + } + }, + { + "handle_unexpected": { + "default": false, + "type": "boolean", + "description": "Determines whether to handle unexpected errors by transforming their responses." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/exit-transformer/3.6.x.json b/schemas/exit-transformer/3.6.x.json new file mode 100644 index 00000000..2b1e9513 --- /dev/null +++ b/schemas/exit-transformer/3.6.x.json @@ -0,0 +1,68 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "functions": { + "required": true, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "handle_unknown": { + "type": "boolean", + "default": false, + "description": "Determines whether to handle unknown status codes by transforming their responses." + } + }, + { + "handle_unexpected": { + "type": "boolean", + "default": false, + "description": "Determines whether to handle unexpected errors by transforming their responses." + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/exit-transformer/3.7.x.json b/schemas/exit-transformer/3.7.x.json new file mode 100644 index 00000000..793e86c4 --- /dev/null +++ b/schemas/exit-transformer/3.7.x.json @@ -0,0 +1,68 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "functions": { + "required": true, + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "handle_unknown": { + "description": "Determines whether to handle unknown status codes by transforming their responses.", + "type": "boolean", + "default": false + } + }, + { + "handle_unexpected": { + "description": "Determines whether to handle unexpected errors by transforming their responses.", + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/exit-transformer/3.8.x.json b/schemas/exit-transformer/3.8.x.json new file mode 100644 index 00000000..9ba8d46d --- /dev/null +++ b/schemas/exit-transformer/3.8.x.json @@ -0,0 +1,68 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "functions": { + "required": true, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "handle_unknown": { + "description": "Determines whether to handle unknown status codes by transforming their responses.", + "type": "boolean", + "default": false + } + }, + { + "handle_unexpected": { + "description": "Determines whether to handle unexpected errors by transforming their responses.", + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/exit-transformer/3.9.x.json b/schemas/exit-transformer/3.9.x.json new file mode 100644 index 00000000..11f94588 --- /dev/null +++ b/schemas/exit-transformer/3.9.x.json @@ -0,0 +1,68 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "functions": { + "elements": { + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "handle_unknown": { + "default": false, + "description": "Determines whether to handle unknown status codes by transforming their responses.", + "type": "boolean" + } + }, + { + "handle_unexpected": { + "default": false, + "description": "Determines whether to handle unexpected errors by transforming their responses.", + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/file-log/3.10.x.json b/schemas/file-log/3.10.x.json new file mode 100644 index 00000000..1d7cb32b --- /dev/null +++ b/schemas/file-log/3.10.x.json @@ -0,0 +1,83 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "path": { + "type": "string", + "match": "^[^%s*&%%\\`][^*&%%\\`]*[^%s*&%%\\`]$", + "description": "The file path of the output log file. The plugin creates the log file if it doesn't exist yet.", + "err": "not a valid filename", + "required": true + } + }, + { + "reopen": { + "description": "Determines whether the log file is closed and reopened on every request.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "custom_fields_by_lua": { + "description": "Lua code as a key-value map", + "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "type": "string", + "len_min": 1 + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/file-log/3.11.x.json b/schemas/file-log/3.11.x.json new file mode 100644 index 00000000..6a274927 --- /dev/null +++ b/schemas/file-log/3.11.x.json @@ -0,0 +1,83 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "path": { + "match": "^[^%s*&%%\\`][^*&%%\\`]*[^%s*&%%\\`]$", + "required": true, + "err": "not a valid filename", + "description": "The file path of the output log file. The plugin creates the log file if it doesn't exist yet.", + "type": "string" + } + }, + { + "reopen": { + "description": "Determines whether the log file is closed and reopened on every request.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "custom_fields_by_lua": { + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "len_min": 1, + "type": "string" + }, + "description": "Lua code as a key-value map", + "type": "map" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/file-log/3.12.x.json b/schemas/file-log/3.12.x.json new file mode 100644 index 00000000..7e28eb90 --- /dev/null +++ b/schemas/file-log/3.12.x.json @@ -0,0 +1,81 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "path": { + "type": "string", + "err": "not a valid filename", + "required": true, + "description": "The file path of the output log file. The plugin creates the log file if it doesn't exist yet.", + "match": "^[^%s*&%%\\`][^*&%%\\`]*[^%s*&%%\\`]$" + } + }, + { + "reopen": { + "type": "boolean", + "default": false, + "description": "Determines whether the log file is closed and reopened on every request.", + "required": true + } + }, + { + "custom_fields_by_lua": { + "type": "map", + "description": "Lua code as a key-value map", + "values": { + "type": "string", + "len_min": 1 + }, + "keys": { + "type": "string", + "len_min": 1 + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/file-log/3.4.x.json b/schemas/file-log/3.4.x.json index 785e02e3..7e930751 100644 --- a/schemas/file-log/3.4.x.json +++ b/schemas/file-log/3.4.x.json @@ -8,6 +8,9 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", "elements": { "one_of": [ "grpc", @@ -21,47 +24,60 @@ "ws", "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "path": { "match": "^[^*&%%\\`]+$", + "type": "string", "required": true, "err": "not a valid filename", - "type": "string" + "description": "The file path of the output log file. The plugin creates the log file if it doesn't exist yet." } }, { "reopen": { "default": false, + "description": "Determines whether the log file is closed and reopened on every request.", "type": "boolean", "required": true } }, { "custom_fields_by_lua": { - "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, "keys": { "len_min": 1, "type": "string" }, - "values": { - "type": "string", - "len_min": 1 - } + "type": "map", + "description": "Lua code as a key-value map" } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/file-log/3.5.x.json b/schemas/file-log/3.5.x.json new file mode 100644 index 00000000..7f7b04c2 --- /dev/null +++ b/schemas/file-log/3.5.x.json @@ -0,0 +1,83 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "path": { + "type": "string", + "required": true, + "err": "not a valid filename", + "match": "^[^*&%%\\`]+$", + "description": "The file path of the output log file. The plugin creates the log file if it doesn't exist yet." + } + }, + { + "reopen": { + "required": true, + "default": false, + "type": "boolean", + "description": "Determines whether the log file is closed and reopened on every request." + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, + "description": "Lua code as a key-value map" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/file-log/3.6.x.json b/schemas/file-log/3.6.x.json new file mode 100644 index 00000000..0838b4dc --- /dev/null +++ b/schemas/file-log/3.6.x.json @@ -0,0 +1,83 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "path": { + "type": "string", + "required": true, + "match": "^[^*&%%\\`]+$", + "description": "The file path of the output log file. The plugin creates the log file if it doesn't exist yet.", + "err": "not a valid filename" + } + }, + { + "reopen": { + "required": true, + "type": "boolean", + "description": "Determines whether the log file is closed and reopened on every request.", + "default": false + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "description": "Lua code as a key-value map", + "values": { + "len_min": 1, + "type": "string" + } + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/file-log/3.7.x.json b/schemas/file-log/3.7.x.json new file mode 100644 index 00000000..0439ef6d --- /dev/null +++ b/schemas/file-log/3.7.x.json @@ -0,0 +1,83 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "path": { + "description": "The file path of the output log file. The plugin creates the log file if it doesn't exist yet.", + "required": true, + "match": "^[^*&%%\\`]+$", + "type": "string", + "err": "not a valid filename" + } + }, + { + "reopen": { + "required": true, + "type": "boolean", + "description": "Determines whether the log file is closed and reopened on every request.", + "default": false + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "description": "Lua code as a key-value map", + "values": { + "type": "string", + "len_min": 1 + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/file-log/3.8.x.json b/schemas/file-log/3.8.x.json new file mode 100644 index 00000000..8c59160b --- /dev/null +++ b/schemas/file-log/3.8.x.json @@ -0,0 +1,83 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "path": { + "description": "The file path of the output log file. The plugin creates the log file if it doesn't exist yet.", + "err": "not a valid filename", + "match": "^[^*&%%\\`]+$", + "type": "string", + "required": true + } + }, + { + "reopen": { + "description": "Determines whether the log file is closed and reopened on every request.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "values": { + "type": "string", + "len_min": 1 + }, + "description": "Lua code as a key-value map" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/file-log/3.9.x.json b/schemas/file-log/3.9.x.json new file mode 100644 index 00000000..6532d553 --- /dev/null +++ b/schemas/file-log/3.9.x.json @@ -0,0 +1,83 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "path": { + "match": "^[^*&%%\\`]+$", + "required": true, + "type": "string", + "err": "not a valid filename", + "description": "The file path of the output log file. The plugin creates the log file if it doesn't exist yet." + } + }, + { + "reopen": { + "default": false, + "description": "Determines whether the log file is closed and reopened on every request.", + "required": true, + "type": "boolean" + } + }, + { + "custom_fields_by_lua": { + "description": "Lua code as a key-value map", + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/forward-proxy/3.10.x.json b/schemas/forward-proxy/3.10.x.json new file mode 100644 index 00000000..ed10c8af --- /dev/null +++ b/schemas/forward-proxy/3.10.x.json @@ -0,0 +1,171 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "http_proxy_host", + "https_proxy_host" + ] + }, + { + "at_least_one_of": [ + "http_proxy_port", + "https_proxy_port" + ] + }, + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "type": "record", + "fields": [ + { + "x_headers": { + "type": "string", + "description": "Determines how to handle headers when forwarding the request.", + "one_of": [ + "append", + "transparent", + "delete" + ], + "default": "append", + "required": true + } + }, + { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "http_proxy_port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "https_proxy_port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "proxy_scheme": { + "type": "string", + "description": "The proxy scheme to use when connecting. Only `http` is supported.", + "one_of": [ + "http" + ], + "default": "http", + "required": true + } + }, + { + "auth_username": { + "description": "The username to authenticate with, if the forward proxy is protected\nby basic authentication.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "auth_password": { + "description": "The password to authenticate with, if the forward proxy is protected\nby basic authentication.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "https_verify": { + "description": "Whether the server certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "default": false, + "type": "boolean", + "required": true + } + } + ], + "shorthand_fields": [ + { + "proxy_host": { + "deprecation": { + "message": "forward-proxy: config.proxy_host is deprecated, please use config.http_proxy_host instead", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "proxy_port": { + "deprecation": { + "message": "forward-proxy: config.proxy_port is deprecated, please use config.http_proxy_port instead", + "removal_in_version": "4.0" + }, + "type": "integer" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/forward-proxy/3.11.x.json b/schemas/forward-proxy/3.11.x.json new file mode 100644 index 00000000..c8e69aa8 --- /dev/null +++ b/schemas/forward-proxy/3.11.x.json @@ -0,0 +1,172 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "x_headers": { + "required": true, + "description": "Determines how to handle headers when forwarding the request.", + "one_of": [ + "append", + "transparent", + "delete" + ], + "default": "append", + "type": "string" + } + }, + { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "http_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "https_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "proxy_scheme": { + "required": true, + "description": "The proxy scheme to use when connecting. Only `http` is supported.", + "one_of": [ + "http" + ], + "default": "http", + "type": "string" + } + }, + { + "auth_username": { + "description": "The username to authenticate with, if the forward proxy is protected\nby basic authentication.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "auth_password": { + "required": false, + "description": "The password to authenticate with, if the forward proxy is protected\nby basic authentication.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "https_verify": { + "description": "Whether the server certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "required": true, + "default": false, + "type": "boolean" + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "http_proxy_host", + "https_proxy_host" + ] + }, + { + "at_least_one_of": [ + "http_proxy_port", + "https_proxy_port" + ] + }, + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "shorthand_fields": [ + { + "proxy_host": { + "deprecation": { + "message": "forward-proxy: config.proxy_host is deprecated, please use config.http_proxy_host instead", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "proxy_port": { + "deprecation": { + "message": "forward-proxy: config.proxy_port is deprecated, please use config.http_proxy_port instead", + "removal_in_version": "4.0" + }, + "type": "integer" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/forward-proxy/3.12.x.json b/schemas/forward-proxy/3.12.x.json new file mode 100644 index 00000000..c88e75c4 --- /dev/null +++ b/schemas/forward-proxy/3.12.x.json @@ -0,0 +1,170 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "entity_checks": [ + { + "at_least_one_of": [ + "http_proxy_host", + "https_proxy_host" + ] + }, + { + "at_least_one_of": [ + "http_proxy_port", + "https_proxy_port" + ] + }, + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "required": true, + "fields": [ + { + "x_headers": { + "type": "string", + "required": true, + "description": "Determines how to handle headers when forwarding the request.", + "default": "append", + "one_of": [ + "append", + "transparent", + "delete" + ] + } + }, + { + "http_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "http_proxy_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "https_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "https_proxy_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "proxy_scheme": { + "type": "string", + "required": true, + "description": "The proxy scheme to use when connecting. Only `http` is supported.", + "default": "http", + "one_of": [ + "http" + ] + } + }, + { + "auth_username": { + "type": "string", + "description": "The username to authenticate with, if the forward proxy is protected\nby basic authentication.", + "referenceable": true, + "required": false + } + }, + { + "auth_password": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "The password to authenticate with, if the forward proxy is protected\nby basic authentication." + } + }, + { + "https_verify": { + "type": "boolean", + "default": false, + "description": "Whether the server certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "required": true + } + } + ], + "shorthand_fields": [ + { + "proxy_host": { + "type": "string", + "deprecation": { + "message": "forward-proxy: config.proxy_host is deprecated, please use config.http_proxy_host instead", + "removal_in_version": "4.0" + } + } + }, + { + "proxy_port": { + "type": "integer", + "deprecation": { + "message": "forward-proxy: config.proxy_port is deprecated, please use config.http_proxy_port instead", + "removal_in_version": "4.0" + } + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/forward-proxy/3.4.x.json b/schemas/forward-proxy/3.4.x.json index 54692ed8..e08e2178 100644 --- a/schemas/forward-proxy/3.4.x.json +++ b/schemas/forward-proxy/3.4.x.json @@ -2,25 +2,34 @@ "fields": [ { "protocols": { - "default": [ - "grpc", - "grpcs", - "http", - "https" - ], + "description": "A set of strings representing HTTP protocols.", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" + ] }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], "required": true, "type": "set" } }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, { "config": { "shorthand_fields": [ @@ -35,47 +44,23 @@ } } ], - "entity_checks": [ - { - "at_least_one_of": [ - "http_proxy_host", - "https_proxy_host" - ] - }, - { - "at_least_one_of": [ - "http_proxy_port", - "https_proxy_port" - ] - }, - { - "mutually_required": [ - "http_proxy_host", - "http_proxy_port" - ] - }, - { - "mutually_required": [ - "https_proxy_host", - "https_proxy_port" - ] - } - ], "fields": [ { "x_headers": { - "type": "string", + "description": "Determines how to handle headers when forwarding the request.", "one_of": [ "append", "transparent", "delete" ], + "default": "append", "required": true, - "default": "append" + "type": "string" } }, { "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", "type": "string" } }, @@ -85,11 +70,13 @@ 0, 65535 ], - "type": "integer" + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." } }, { "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", "type": "string" } }, @@ -99,44 +86,78 @@ 0, 65535 ], - "type": "integer" + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." } }, { "proxy_scheme": { - "type": "string", + "description": "The proxy scheme to use when connecting. Only `http` is supported.", "one_of": [ "http" ], + "default": "http", "required": true, - "default": "http" + "type": "string" } }, { "auth_username": { + "description": "The username to authenticate with, if the forward proxy is protected\nby basic authentication.", + "required": false, "type": "string", - "referenceable": true, - "required": false + "referenceable": true } }, { "auth_password": { + "description": "The password to authenticate with, if the forward proxy is protected\nby basic authentication.", + "required": false, "type": "string", - "referenceable": true, - "required": false + "referenceable": true } }, { "https_verify": { + "description": "Whether the server certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "required": true, "type": "boolean", - "default": false, - "required": true + "default": false } } ], "required": true, - "type": "record" + "type": "record", + "entity_checks": [ + { + "at_least_one_of": [ + "http_proxy_host", + "https_proxy_host" + ] + }, + { + "at_least_one_of": [ + "http_proxy_port", + "https_proxy_port" + ] + }, + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ] } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/forward-proxy/3.5.x.json b/schemas/forward-proxy/3.5.x.json new file mode 100644 index 00000000..cc2a251e --- /dev/null +++ b/schemas/forward-proxy/3.5.x.json @@ -0,0 +1,163 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumer_groups" + } + }, + { + "config": { + "required": true, + "type": "record", + "shorthand_fields": [ + { + "proxy_host": { + "type": "string" + } + }, + { + "proxy_port": { + "type": "integer" + } + } + ], + "fields": [ + { + "x_headers": { + "required": true, + "type": "string", + "default": "append", + "one_of": [ + "append", + "transparent", + "delete" + ], + "description": "Determines how to handle headers when forwarding the request." + } + }, + { + "http_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "http_proxy_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "https_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "https_proxy_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "proxy_scheme": { + "required": true, + "type": "string", + "default": "http", + "one_of": [ + "http" + ], + "description": "The proxy scheme to use when connecting. Only `http` is supported." + } + }, + { + "auth_username": { + "referenceable": true, + "required": false, + "description": "The username to authenticate with, if the forward proxy is protected\nby basic authentication.", + "type": "string" + } + }, + { + "auth_password": { + "referenceable": true, + "required": false, + "description": "The password to authenticate with, if the forward proxy is protected\nby basic authentication.", + "type": "string" + } + }, + { + "https_verify": { + "required": true, + "type": "boolean", + "description": "Whether the server certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "default": false + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "http_proxy_host", + "https_proxy_host" + ] + }, + { + "at_least_one_of": [ + "http_proxy_port", + "https_proxy_port" + ] + }, + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/forward-proxy/3.6.x.json b/schemas/forward-proxy/3.6.x.json new file mode 100644 index 00000000..a2aefc56 --- /dev/null +++ b/schemas/forward-proxy/3.6.x.json @@ -0,0 +1,163 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "http_proxy_host", + "https_proxy_host" + ] + }, + { + "at_least_one_of": [ + "http_proxy_port", + "https_proxy_port" + ] + }, + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "type": "record", + "required": true, + "fields": [ + { + "x_headers": { + "type": "string", + "default": "append", + "required": true, + "description": "Determines how to handle headers when forwarding the request.", + "one_of": [ + "append", + "transparent", + "delete" + ] + } + }, + { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "http_proxy_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "https_proxy_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "proxy_scheme": { + "type": "string", + "default": "http", + "required": true, + "description": "The proxy scheme to use when connecting. Only `http` is supported.", + "one_of": [ + "http" + ] + } + }, + { + "auth_username": { + "referenceable": true, + "type": "string", + "description": "The username to authenticate with, if the forward proxy is protected\nby basic authentication.", + "required": false + } + }, + { + "auth_password": { + "referenceable": true, + "type": "string", + "description": "The password to authenticate with, if the forward proxy is protected\nby basic authentication.", + "required": false + } + }, + { + "https_verify": { + "required": true, + "type": "boolean", + "default": false, + "description": "Whether the server certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate." + } + } + ], + "shorthand_fields": [ + { + "proxy_host": { + "type": "string" + } + }, + { + "proxy_port": { + "type": "integer" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/forward-proxy/3.7.x.json b/schemas/forward-proxy/3.7.x.json new file mode 100644 index 00000000..1e52a284 --- /dev/null +++ b/schemas/forward-proxy/3.7.x.json @@ -0,0 +1,171 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "http_proxy_host", + "https_proxy_host" + ] + }, + { + "at_least_one_of": [ + "http_proxy_port", + "https_proxy_port" + ] + }, + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "shorthand_fields": [ + { + "proxy_host": { + "type": "string", + "deprecation": { + "removal_in_version": "4.0", + "message": "forward-proxy: config.proxy_host is deprecated, please use config.http_proxy_host instead" + } + } + }, + { + "proxy_port": { + "type": "integer", + "deprecation": { + "removal_in_version": "4.0", + "message": "forward-proxy: config.proxy_port is deprecated, please use config.http_proxy_port instead" + } + } + } + ], + "fields": [ + { + "x_headers": { + "default": "append", + "required": true, + "type": "string", + "description": "Determines how to handle headers when forwarding the request.", + "one_of": [ + "append", + "transparent", + "delete" + ] + } + }, + { + "http_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "http_proxy_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "https_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "https_proxy_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "proxy_scheme": { + "default": "http", + "required": true, + "type": "string", + "description": "The proxy scheme to use when connecting. Only `http` is supported.", + "one_of": [ + "http" + ] + } + }, + { + "auth_username": { + "required": false, + "description": "The username to authenticate with, if the forward proxy is protected\nby basic authentication.", + "referenceable": true, + "type": "string" + } + }, + { + "auth_password": { + "required": false, + "description": "The password to authenticate with, if the forward proxy is protected\nby basic authentication.", + "referenceable": true, + "type": "string" + } + }, + { + "https_verify": { + "required": true, + "type": "boolean", + "description": "Whether the server certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/forward-proxy/3.8.x.json b/schemas/forward-proxy/3.8.x.json new file mode 100644 index 00000000..236f0a94 --- /dev/null +++ b/schemas/forward-proxy/3.8.x.json @@ -0,0 +1,171 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "x_headers": { + "description": "Determines how to handle headers when forwarding the request.", + "required": true, + "one_of": [ + "append", + "transparent", + "delete" + ], + "type": "string", + "default": "append" + } + }, + { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "proxy_scheme": { + "description": "The proxy scheme to use when connecting. Only `http` is supported.", + "required": true, + "one_of": [ + "http" + ], + "type": "string", + "default": "http" + } + }, + { + "auth_username": { + "description": "The username to authenticate with, if the forward proxy is protected\nby basic authentication.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "auth_password": { + "description": "The password to authenticate with, if the forward proxy is protected\nby basic authentication.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "https_verify": { + "description": "Whether the server certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "type": "boolean", + "required": true, + "default": false + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "http_proxy_host", + "https_proxy_host" + ] + }, + { + "at_least_one_of": [ + "http_proxy_port", + "https_proxy_port" + ] + }, + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "type": "record", + "shorthand_fields": [ + { + "proxy_host": { + "deprecation": { + "message": "forward-proxy: config.proxy_host is deprecated, please use config.http_proxy_host instead", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "proxy_port": { + "deprecation": { + "message": "forward-proxy: config.proxy_port is deprecated, please use config.http_proxy_port instead", + "removal_in_version": "4.0" + }, + "type": "integer" + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/forward-proxy/3.9.x.json b/schemas/forward-proxy/3.9.x.json new file mode 100644 index 00000000..260aadee --- /dev/null +++ b/schemas/forward-proxy/3.9.x.json @@ -0,0 +1,171 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "entity_checks": [ + { + "at_least_one_of": [ + "http_proxy_host", + "https_proxy_host" + ] + }, + { + "at_least_one_of": [ + "http_proxy_port", + "https_proxy_port" + ] + }, + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "shorthand_fields": [ + { + "proxy_host": { + "deprecation": { + "removal_in_version": "4.0", + "message": "forward-proxy: config.proxy_host is deprecated, please use config.http_proxy_host instead" + }, + "type": "string" + } + }, + { + "proxy_port": { + "deprecation": { + "removal_in_version": "4.0", + "message": "forward-proxy: config.proxy_port is deprecated, please use config.http_proxy_port instead" + }, + "type": "integer" + } + } + ], + "fields": [ + { + "x_headers": { + "required": true, + "type": "string", + "default": "append", + "description": "Determines how to handle headers when forwarding the request.", + "one_of": [ + "append", + "transparent", + "delete" + ] + } + }, + { + "http_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "http_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "https_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "https_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "proxy_scheme": { + "required": true, + "type": "string", + "default": "http", + "description": "The proxy scheme to use when connecting. Only `http` is supported.", + "one_of": [ + "http" + ] + } + }, + { + "auth_username": { + "referenceable": true, + "description": "The username to authenticate with, if the forward proxy is protected\nby basic authentication.", + "required": false, + "type": "string" + } + }, + { + "auth_password": { + "referenceable": true, + "description": "The password to authenticate with, if the forward proxy is protected\nby basic authentication.", + "required": false, + "type": "string" + } + }, + { + "https_verify": { + "default": false, + "description": "Whether the server certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "required": true, + "type": "boolean" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/graphql-proxy-cache-advanced/3.10.x.json b/schemas/graphql-proxy-cache-advanced/3.10.x.json new file mode 100644 index 00000000..6d4ab6e4 --- /dev/null +++ b/schemas/graphql-proxy-cache-advanced/3.10.x.json @@ -0,0 +1,468 @@ +{ + "entity_checks": [ + + ], + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + }, + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "strategy": { + "type": "string", + "description": "The backing data store in which to hold cached entities. Accepted value is `memory`.", + "one_of": [ + "memory", + "redis" + ], + "default": "memory", + "required": true + } + }, + { + "cache_ttl": { + "gt": 0, + "type": "integer", + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "default": 300 + } + }, + { + "memory": { + "type": "record", + "fields": [ + { + "dictionary_name": { + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. This dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string", + "default": "kong_db_cache", + "required": true + } + } + ], + "required": true + } + }, + { + "redis": { + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "default": 256, + "type": "integer", + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "default": false, + "type": "boolean", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + } + ], + "required": true + } + }, + { + "bypass_on_err": { + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "default": false, + "type": "boolean" + } + }, + { + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/graphql-proxy-cache-advanced/3.11.x.json b/schemas/graphql-proxy-cache-advanced/3.11.x.json new file mode 100644 index 00000000..457f9b0f --- /dev/null +++ b/schemas/graphql-proxy-cache-advanced/3.11.x.json @@ -0,0 +1,468 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "strategy": { + "required": true, + "description": "The backing data store in which to hold cached entities. Accepted value is `memory`.", + "one_of": [ + "memory", + "redis" + ], + "default": "memory", + "type": "string" + } + }, + { + "cache_ttl": { + "default": 300, + "gt": 0, + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "type": "integer" + } + }, + { + "memory": { + "required": true, + "fields": [ + { + "dictionary_name": { + "default": "kong_db_cache", + "required": true, + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. This dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "redis": { + "required": true, + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "cluster_nodes": { + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "default": 5, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "default": false, + "type": "boolean" + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "bypass_on_err": { + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean" + } + }, + { + "vary_headers": { + "type": "array", + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + } + ], + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + } +} \ No newline at end of file diff --git a/schemas/graphql-proxy-cache-advanced/3.12.x.json b/schemas/graphql-proxy-cache-advanced/3.12.x.json new file mode 100644 index 00000000..2c6847bf --- /dev/null +++ b/schemas/graphql-proxy-cache-advanced/3.12.x.json @@ -0,0 +1,466 @@ +{ + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + }, + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "strategy": { + "type": "string", + "required": true, + "description": "The backing data store in which to hold cached entities. Accepted value is `memory`.", + "default": "memory", + "one_of": [ + "memory", + "redis" + ] + } + }, + { + "cache_ttl": { + "type": "integer", + "default": 300, + "gt": 0, + "description": "TTL in seconds of cache entities. Must be a value greater than 0." + } + }, + { + "memory": { + "type": "record", + "fields": [ + { + "dictionary_name": { + "type": "string", + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. This dictionary currently must be defined manually in the Kong Nginx template.", + "required": true + } + } + ], + "required": true + } + }, + { + "redis": { + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "database", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + } + ], + "required": true, + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "type": "string", + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "type": "integer", + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy" + } + }, + { + "keepalive_pool_size": { + "type": "integer", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low." + } + }, + { + "keepalive_backlog": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "type": "boolean", + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "cluster_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + } + ] + } + }, + { + "bypass_on_err": { + "type": "boolean", + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream." + } + }, + { + "vary_headers": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration." + } + } + ], + "required": true + } + } + ], + "entity_checks": [] +} \ No newline at end of file diff --git a/schemas/graphql-proxy-cache-advanced/3.4.x.json b/schemas/graphql-proxy-cache-advanced/3.4.x.json index e0c56352..82c49948 100644 --- a/schemas/graphql-proxy-cache-advanced/3.4.x.json +++ b/schemas/graphql-proxy-cache-advanced/3.4.x.json @@ -8,57 +8,69 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "strategy": { + "default": "memory", "required": true, "one_of": [ "memory" ], - "type": "string", - "default": "memory" + "description": "The backing data store in which to hold cached entities. Accepted value is `memory`.", + "type": "string" } }, { "cache_ttl": { "default": 300, "gt": 0, - "type": "integer" + "type": "integer", + "description": "TTL in seconds of cache entities. Must be a value greater than 0." } }, { "memory": { - "required": true, "fields": [ { "dictionary_name": { "default": "kong_db_cache", + "required": true, "type": "string", - "required": true + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. This dictionary currently must be defined manually in the Kong Nginx template." } } ], - "type": "record" + "type": "record", + "required": true } }, { "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", "elements": { "type": "string" }, @@ -66,8 +78,12 @@ } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/graphql-proxy-cache-advanced/3.5.x.json b/schemas/graphql-proxy-cache-advanced/3.5.x.json new file mode 100644 index 00000000..1371b3c2 --- /dev/null +++ b/schemas/graphql-proxy-cache-advanced/3.5.x.json @@ -0,0 +1,89 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "strategy": { + "type": "string", + "required": true, + "one_of": [ + "memory" + ], + "default": "memory", + "description": "The backing data store in which to hold cached entities. Accepted value is `memory`." + } + }, + { + "cache_ttl": { + "gt": 0, + "default": 300, + "type": "integer", + "description": "TTL in seconds of cache entities. Must be a value greater than 0." + } + }, + { + "memory": { + "fields": [ + { + "dictionary_name": { + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. This dictionary currently must be defined manually in the Kong Nginx template.", + "default": "kong_db_cache", + "type": "string", + "required": true + } + } + ], + "type": "record", + "required": true + } + }, + { + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/graphql-proxy-cache-advanced/3.6.x.json b/schemas/graphql-proxy-cache-advanced/3.6.x.json new file mode 100644 index 00000000..0ba91ea2 --- /dev/null +++ b/schemas/graphql-proxy-cache-advanced/3.6.x.json @@ -0,0 +1,89 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "strategy": { + "type": "string", + "default": "memory", + "required": true, + "description": "The backing data store in which to hold cached entities. Accepted value is `memory`.", + "one_of": [ + "memory" + ] + } + }, + { + "cache_ttl": { + "gt": 0, + "type": "integer", + "default": 300, + "description": "TTL in seconds of cache entities. Must be a value greater than 0." + } + }, + { + "memory": { + "required": true, + "type": "record", + "fields": [ + { + "dictionary_name": { + "required": true, + "type": "string", + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. This dictionary currently must be defined manually in the Kong Nginx template." + } + } + ] + } + }, + { + "vary_headers": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration." + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/graphql-proxy-cache-advanced/3.7.x.json b/schemas/graphql-proxy-cache-advanced/3.7.x.json new file mode 100644 index 00000000..b2d602c8 --- /dev/null +++ b/schemas/graphql-proxy-cache-advanced/3.7.x.json @@ -0,0 +1,338 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "strategy": { + "default": "memory", + "required": true, + "description": "The backing data store in which to hold cached entities. Accepted value is `memory`.", + "type": "string", + "one_of": [ + "memory", + "redis" + ] + } + }, + { + "cache_ttl": { + "gt": 0, + "type": "integer", + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "default": 300 + } + }, + { + "memory": { + "fields": [ + { + "dictionary_name": { + "required": true, + "type": "string", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. This dictionary currently must be defined manually in the Kong Nginx template.", + "default": "kong_db_cache" + } + } + ], + "type": "record", + "required": true + } + }, + { + "redis": { + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "connect_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "send_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "read_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "type": "integer", + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "default": 256, + "type": "integer", + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "type": "integer", + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "type": "string", + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_addresses": { + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", + "elements": { + "type": "string" + }, + "type": "array", + "len_min": 1 + } + }, + { + "cluster_addresses": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", + "elements": { + "type": "string" + }, + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "required": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "required": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_addresses" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_addresses" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + } + ], + "type": "record", + "required": true + } + }, + { + "bypass_on_err": { + "type": "boolean", + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "default": false + } + }, + { + "vary_headers": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/graphql-proxy-cache-advanced/3.8.x.json b/schemas/graphql-proxy-cache-advanced/3.8.x.json new file mode 100644 index 00000000..641b0e27 --- /dev/null +++ b/schemas/graphql-proxy-cache-advanced/3.8.x.json @@ -0,0 +1,500 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "strategy": { + "description": "The backing data store in which to hold cached entities. Accepted value is `memory`.", + "required": true, + "one_of": [ + "memory", + "redis" + ], + "type": "string", + "default": "memory" + } + }, + { + "cache_ttl": { + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "type": "integer", + "gt": 0, + "default": 300 + } + }, + { + "memory": { + "fields": [ + { + "dictionary_name": { + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. This dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string", + "required": true, + "default": "kong_db_cache" + } + } + ], + "type": "record", + "required": true + } + }, + { + "redis": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer", + "between": [ + 1, + 2147483646 + ], + "default": 256 + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer", + "default": 5 + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean", + "default": false + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_nodes" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_nodes" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_field": "connection_is_proxied", + "if_match": { + "eq": true + }, + "then_field": "host", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "translate_backwards": [ + "connect_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + }, + { + "bypass_on_err": { + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean", + "default": false + } + }, + { + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/graphql-proxy-cache-advanced/3.9.x.json b/schemas/graphql-proxy-cache-advanced/3.9.x.json new file mode 100644 index 00000000..e805038f --- /dev/null +++ b/schemas/graphql-proxy-cache-advanced/3.9.x.json @@ -0,0 +1,463 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "strategy": { + "required": true, + "type": "string", + "default": "memory", + "description": "The backing data store in which to hold cached entities. Accepted value is `memory`.", + "one_of": [ + "memory", + "redis" + ] + } + }, + { + "cache_ttl": { + "gt": 0, + "description": "TTL in seconds of cache entities. Must be a value greater than 0.", + "default": 300, + "type": "integer" + } + }, + { + "memory": { + "fields": [ + { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. This dictionary currently must be defined manually in the Kong Nginx template.", + "required": true, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "redis": { + "required": true, + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ] + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ] + }, + "type": "array" + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ] + }, + "type": "array" + } + } + ], + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "type": "string", + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean" + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean" + } + } + ] + } + }, + { + "bypass_on_err": { + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean" + } + }, + { + "vary_headers": { + "elements": { + "type": "string" + }, + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/graphql-rate-limiting-advanced/3.10.x.json b/schemas/graphql-rate-limiting-advanced/3.10.x.json new file mode 100644 index 00000000..a14be4b8 --- /dev/null +++ b/schemas/graphql-rate-limiting-advanced/3.10.x.json @@ -0,0 +1,535 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + }, + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "identifier": { + "type": "string", + "description": "How to define the rate limit key. Can be `ip`, `credential`, `consumer`.", + "one_of": [ + "ip", + "credential", + "consumer" + ], + "default": "consumer", + "required": true + } + }, + { + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds).", + "type": "array", + "elements": { + "type": "number" + }, + "required": true + } + }, + { + "window_type": { + "description": "Sets the time window to either `sliding` or `fixed`.", + "type": "string", + "one_of": [ + "fixed", + "sliding" + ], + "default": "sliding" + } + }, + { + "limit": { + "description": "One or more requests-per-window limits to apply.", + "type": "array", + "elements": { + "type": "number" + }, + "required": true + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 syncs the counters in that many number of seconds.", + "type": "number", + "required": true + } + }, + { + "namespace": { + "description": "The rate limiting namespace to use for this plugin instance. This namespace is used to share rate limiting counters across different instances. If it is not provided, a random UUID is generated. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same.", + "type": "string", + "auto": true + } + }, + { + "strategy": { + "type": "string", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits.", + "one_of": [ + "cluster", + "redis" + ], + "default": "cluster", + "required": true + } + }, + { + "dictionary_name": { + "description": "The shared dictionary where counters will be stored until the next sync cycle.", + "default": "kong_rate_limiting_counters", + "type": "string", + "required": true + } + }, + { + "hide_client_headers": { + "description": "Optionally hide informative response headers. Available options: `true` or `false`.", + "type": "boolean", + "default": false + } + }, + { + "cost_strategy": { + "description": "Strategy to use to evaluate query costs. Either `default` or `node_quantifier`.", + "type": "string", + "one_of": [ + "default", + "node_quantifier" + ], + "default": "default" + } + }, + { + "score_factor": { + "gt": 0, + "type": "number", + "description": "A scoring factor to multiply (or divide) the cost. The `score_factor` must always be greater than 0.", + "default": 1, + "required": false + } + }, + { + "max_cost": { + "description": "A defined maximum cost per query. 0 means unlimited.", + "default": 0, + "type": "number", + "required": false + } + }, + { + "redis": { + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "default": 256, + "type": "integer", + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "default": false, + "type": "boolean", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/graphql-rate-limiting-advanced/3.11.x.json b/schemas/graphql-rate-limiting-advanced/3.11.x.json new file mode 100644 index 00000000..ed1ececa --- /dev/null +++ b/schemas/graphql-rate-limiting-advanced/3.11.x.json @@ -0,0 +1,543 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "identifier": { + "required": true, + "description": "How to define the rate limit key. Can be `ip`, `credential`, `consumer`.", + "one_of": [ + "ip", + "credential", + "consumer" + ], + "default": "consumer", + "type": "string" + } + }, + { + "window_size": { + "type": "array", + "required": true, + "description": "One or more window sizes to apply a limit to (defined in seconds).", + "elements": { + "type": "number" + } + } + }, + { + "window_type": { + "one_of": [ + "fixed", + "sliding" + ], + "description": "Sets the time window to either `sliding` or `fixed`.", + "default": "sliding", + "type": "string" + } + }, + { + "limit": { + "type": "array", + "required": true, + "description": "One or more requests-per-window limits to apply.", + "elements": { + "type": "number" + } + } + }, + { + "sync_rate": { + "required": true, + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 syncs the counters in that many number of seconds.", + "type": "number" + } + }, + { + "namespace": { + "type": "string", + "description": "The rate limiting namespace to use for this plugin instance. This namespace is used to share rate limiting counters across different instances. If it is not provided, a random UUID is generated. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same.", + "auto": true + } + }, + { + "strategy": { + "required": true, + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits.", + "one_of": [ + "cluster", + "redis" + ], + "default": "cluster", + "type": "string" + } + }, + { + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "required": true, + "description": "The shared dictionary where counters will be stored until the next sync cycle.", + "type": "string" + } + }, + { + "hide_client_headers": { + "description": "Optionally hide informative response headers. Available options: `true` or `false`.", + "default": false, + "type": "boolean" + } + }, + { + "cost_strategy": { + "one_of": [ + "default", + "node_quantifier" + ], + "description": "Strategy to use to evaluate query costs. Either `default` or `node_quantifier`.", + "default": "default", + "type": "string" + } + }, + { + "score_factor": { + "gt": 0, + "description": "A scoring factor to multiply (or divide) the cost. The `score_factor` must always be greater than 0.", + "required": false, + "default": 1, + "type": "number" + } + }, + { + "max_cost": { + "default": 0, + "required": false, + "description": "A defined maximum cost per query. 0 means unlimited.", + "type": "number" + } + }, + { + "redis": { + "required": true, + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "cluster_nodes": { + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "default": 5, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "default": false, + "type": "boolean" + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "pass_all_downstream_headers": { + "default": false, + "required": true, + "description": "pass all downstream headers to the upstream graphql server in introspection request", + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + } +} \ No newline at end of file diff --git a/schemas/graphql-rate-limiting-advanced/3.12.x.json b/schemas/graphql-rate-limiting-advanced/3.12.x.json new file mode 100644 index 00000000..fdd5a535 --- /dev/null +++ b/schemas/graphql-rate-limiting-advanced/3.12.x.json @@ -0,0 +1,543 @@ +{ + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + }, + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "identifier": { + "type": "string", + "required": true, + "description": "How to define the rate limit key. Can be `ip`, `credential`, `consumer`.", + "default": "consumer", + "one_of": [ + "ip", + "credential", + "consumer" + ] + } + }, + { + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds).", + "elements": { + "type": "number" + }, + "type": "array", + "required": true + } + }, + { + "window_type": { + "description": "Sets the time window to either `sliding` or `fixed`.", + "default": "sliding", + "one_of": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + { + "limit": { + "description": "One or more requests-per-window limits to apply.", + "elements": { + "type": "number" + }, + "type": "array", + "required": true + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 syncs the counters in that many number of seconds.", + "type": "number", + "required": true + } + }, + { + "namespace": { + "description": "The rate limiting namespace to use for this plugin instance. This namespace is used to share rate limiting counters across different instances. If it is not provided, a random UUID is generated. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same.", + "auto": true, + "type": "string" + } + }, + { + "strategy": { + "type": "string", + "required": true, + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits.", + "default": "cluster", + "one_of": [ + "cluster", + "redis" + ] + } + }, + { + "dictionary_name": { + "description": "The shared dictionary where counters will be stored until the next sync cycle.", + "default": "kong_rate_limiting_counters", + "type": "string", + "required": true + } + }, + { + "hide_client_headers": { + "description": "Optionally hide informative response headers. Available options: `true` or `false`.", + "default": false, + "type": "boolean" + } + }, + { + "cost_strategy": { + "description": "Strategy to use to evaluate query costs. Either `default` or `node_quantifier`.", + "default": "default", + "one_of": [ + "default", + "node_quantifier" + ], + "type": "string" + } + }, + { + "score_factor": { + "type": "number", + "required": false, + "description": "A scoring factor to multiply (or divide) the cost. The `score_factor` must always be greater than 0.", + "default": 1, + "gt": 0 + } + }, + { + "max_cost": { + "description": "A defined maximum cost per query. 0 means unlimited.", + "default": 0, + "type": "number", + "required": false + } + }, + { + "redis": { + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "database", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + } + ], + "required": true, + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "type": "string", + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "type": "integer", + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy" + } + }, + { + "keepalive_pool_size": { + "type": "integer", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low." + } + }, + { + "keepalive_backlog": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "type": "boolean", + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "cluster_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + } + ] + } + }, + { + "pass_all_downstream_headers": { + "description": "pass all downstream headers to the upstream graphql server in introspection request", + "default": false, + "type": "boolean", + "required": true + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/graphql-rate-limiting-advanced/3.4.x.json b/schemas/graphql-rate-limiting-advanced/3.4.x.json index 26020240..ce7402a1 100644 --- a/schemas/graphql-rate-limiting-advanced/3.4.x.json +++ b/schemas/graphql-rate-limiting-advanced/3.4.x.json @@ -8,33 +8,42 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "identifier": { - "required": true, + "default": "consumer", + "type": "string", "one_of": [ "ip", "credential", "consumer" ], - "type": "string", - "default": "consumer" + "description": "How to define the rate limit key. Can be `ip`, `credential`, `consumer`.", + "required": true } }, { @@ -43,17 +52,19 @@ "required": true, "elements": { "type": "number" - } + }, + "description": "One or more window sizes to apply a limit to (defined in seconds)." } }, { "window_type": { - "type": "string", "default": "sliding", "one_of": [ "fixed", "sliding" - ] + ], + "type": "string", + "description": "Sets the time window to either `sliding` or `fixed`." } }, { @@ -62,135 +73,86 @@ "required": true, "elements": { "type": "number" - } + }, + "description": "One or more requests-per-window limits to apply." } }, { "sync_rate": { "required": true, + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 syncs the counters in that many number of seconds.", "type": "number" } }, { "namespace": { "auto": true, - "type": "string" + "type": "string", + "description": "The rate limiting library namespace to use for this plugin instance. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same." } }, { "strategy": { - "required": true, + "default": "cluster", + "type": "string", "one_of": [ "cluster", "redis" ], - "type": "string", - "default": "cluster" + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits.", + "required": true } }, { "dictionary_name": { + "default": "kong_rate_limiting_counters", "required": true, "type": "string", - "default": "kong_rate_limiting_counters" + "description": "The shared dictionary where counters will be stored until the next sync cycle." } }, { "hide_client_headers": { "default": false, - "type": "boolean" + "type": "boolean", + "description": "Optionally hide informative response headers. Available options: `true` or `false`." } }, { "cost_strategy": { - "type": "string", "default": "default", "one_of": [ "default", "node_quantifier" - ] + ], + "type": "string", + "description": "Strategy to use to evaluate query costs. Either `default` or `node_quantifier`." } }, { "score_factor": { - "required": false, - "type": "number", + "default": 1, "gt": 0, - "default": 1 + "required": false, + "description": "A scoring factor to multiply (or divide) the cost. The `score_factor` must always be greater than 0.", + "type": "number" } }, { "max_cost": { + "default": 0, "required": false, "type": "number", - "default": 0 + "description": "A defined maximum cost per query. 0 means unlimited." } }, { "redis": { - "required": true, - "entity_checks": [ - { - "mutually_exclusive_sets": { - "set1": [ - "sentinel_master", - "sentinel_role", - "sentinel_addresses" - ], - "set2": [ - "host", - "port" - ] - } - }, - { - "mutually_exclusive_sets": { - "set1": [ - "sentinel_master", - "sentinel_role", - "sentinel_addresses" - ], - "set2": [ - "cluster_addresses" - ] - } - }, - { - "mutually_exclusive_sets": { - "set1": [ - "cluster_addresses" - ], - "set2": [ - "host", - "port" - ] - } - }, - { - "mutually_required": [ - "sentinel_master", - "sentinel_role", - "sentinel_addresses" - ] - }, - { - "mutually_required": [ - "host", - "port" - ] - }, - { - "mutually_required": [ - "connect_timeout", - "send_timeout", - "read_timeout" - ] - } - ], "fields": [ { "host": { - "type": "string" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { @@ -199,17 +161,19 @@ 0, 65535 ], - "type": "integer" + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." } }, { "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "between": [ 0, 2147483646 ], - "type": "integer", - "default": 2000 + "type": "integer" } }, { @@ -218,7 +182,8 @@ 0, 2147483646 ], - "type": "integer" + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." } }, { @@ -227,7 +192,8 @@ 0, 2147483646 ], - "type": "integer" + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." } }, { @@ -236,48 +202,55 @@ 0, 2147483646 ], - "type": "integer" + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." } }, { "username": { - "type": "string", - "referenceable": true + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`.", + "type": "string" } }, { "password": { - "referenceable": true, "encrypted": true, - "type": "string" + "referenceable": true, + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis." } }, { "sentinel_username": { - "type": "string", - "referenceable": true + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string" } }, { "sentinel_password": { - "referenceable": true, "encrypted": true, - "type": "string" + "referenceable": true, + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels." } }, { "database": { - "type": "integer", - "default": 0 + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" } }, { "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", "between": [ 1, 2147483646 ], - "default": 30, "type": "integer" } }, @@ -287,11 +260,13 @@ 0, 2147483646 ], - "type": "integer" + "type": "integer", + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." } }, { "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", "type": "string" } }, @@ -302,7 +277,8 @@ "slave", "any" ], - "type": "string" + "type": "string", + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." } }, { @@ -311,6 +287,7 @@ "elements": { "type": "string" }, + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", "type": "array" } }, @@ -320,12 +297,14 @@ "elements": { "type": "string" }, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", "type": "array" } }, { "ssl": { "default": false, + "description": "If set to true, uses SSL to connect to Redis.", "required": false, "type": "boolean" } @@ -333,22 +312,93 @@ { "ssl_verify": { "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", "required": false, "type": "boolean" } }, { "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", "type": "string", "required": false } } ], - "type": "record" + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_addresses" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_addresses" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + } + ], + "type": "record", + "required": true } } ], - "type": "record" + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] } } ] diff --git a/schemas/graphql-rate-limiting-advanced/3.5.x.json b/schemas/graphql-rate-limiting-advanced/3.5.x.json new file mode 100644 index 00000000..7d61f1fb --- /dev/null +++ b/schemas/graphql-rate-limiting-advanced/3.5.x.json @@ -0,0 +1,405 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumer_groups" + } + }, + { + "config": { + "fields": [ + { + "identifier": { + "required": true, + "type": "string", + "default": "consumer", + "one_of": [ + "ip", + "credential", + "consumer" + ], + "description": "How to define the rate limit key. Can be `ip`, `credential`, `consumer`." + } + }, + { + "window_size": { + "required": true, + "description": "One or more window sizes to apply a limit to (defined in seconds).", + "type": "array", + "elements": { + "type": "number" + } + } + }, + { + "window_type": { + "one_of": [ + "fixed", + "sliding" + ], + "type": "string", + "description": "Sets the time window to either `sliding` or `fixed`.", + "default": "sliding" + } + }, + { + "limit": { + "required": true, + "description": "One or more requests-per-window limits to apply.", + "type": "array", + "elements": { + "type": "number" + } + } + }, + { + "sync_rate": { + "required": true, + "type": "number", + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 syncs the counters in that many number of seconds." + } + }, + { + "namespace": { + "auto": true, + "type": "string", + "description": "The rate limiting library namespace to use for this plugin instance. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same." + } + }, + { + "strategy": { + "required": true, + "type": "string", + "default": "cluster", + "one_of": [ + "cluster", + "redis" + ], + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits." + } + }, + { + "dictionary_name": { + "required": true, + "type": "string", + "description": "The shared dictionary where counters will be stored until the next sync cycle.", + "default": "kong_rate_limiting_counters" + } + }, + { + "hide_client_headers": { + "type": "boolean", + "description": "Optionally hide informative response headers. Available options: `true` or `false`.", + "default": false + } + }, + { + "cost_strategy": { + "one_of": [ + "default", + "node_quantifier" + ], + "type": "string", + "description": "Strategy to use to evaluate query costs. Either `default` or `node_quantifier`.", + "default": "default" + } + }, + { + "score_factor": { + "required": false, + "type": "number", + "default": 1, + "description": "A scoring factor to multiply (or divide) the cost. The `score_factor` must always be greater than 0.", + "gt": 0 + } + }, + { + "max_cost": { + "required": false, + "type": "number", + "description": "A defined maximum cost per query. 0 means unlimited.", + "default": 0 + } + }, + { + "redis": { + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "connect_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "send_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "read_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "username": { + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`.", + "type": "string" + } + }, + { + "password": { + "referenceable": true, + "encrypted": true, + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis." + } + }, + { + "sentinel_username": { + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string" + } + }, + { + "sentinel_password": { + "referenceable": true, + "encrypted": true, + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels." + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer", + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", + "type": "array", + "len_min": 1 + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "required": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "required": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "required": false, + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS." + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ], + "set2": [ + "host", + "port" + ] + } + }, + { + "mutually_exclusive_sets": { + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ], + "set2": [ + "cluster_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set1": [ + "cluster_addresses" + ], + "set2": [ + "host", + "port" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/graphql-rate-limiting-advanced/3.6.x.json b/schemas/graphql-rate-limiting-advanced/3.6.x.json new file mode 100644 index 00000000..83be4422 --- /dev/null +++ b/schemas/graphql-rate-limiting-advanced/3.6.x.json @@ -0,0 +1,405 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "identifier": { + "type": "string", + "default": "consumer", + "required": true, + "description": "How to define the rate limit key. Can be `ip`, `credential`, `consumer`.", + "one_of": [ + "ip", + "credential", + "consumer" + ] + } + }, + { + "window_size": { + "required": true, + "type": "array", + "description": "One or more window sizes to apply a limit to (defined in seconds).", + "elements": { + "type": "number" + } + } + }, + { + "window_type": { + "one_of": [ + "fixed", + "sliding" + ], + "type": "string", + "description": "Sets the time window to either `sliding` or `fixed`.", + "default": "sliding" + } + }, + { + "limit": { + "required": true, + "type": "array", + "description": "One or more requests-per-window limits to apply.", + "elements": { + "type": "number" + } + } + }, + { + "sync_rate": { + "required": true, + "type": "number", + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 syncs the counters in that many number of seconds." + } + }, + { + "namespace": { + "auto": true, + "type": "string", + "description": "The rate limiting library namespace to use for this plugin instance. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same." + } + }, + { + "strategy": { + "type": "string", + "default": "cluster", + "required": true, + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits.", + "one_of": [ + "cluster", + "redis" + ] + } + }, + { + "dictionary_name": { + "required": true, + "type": "string", + "description": "The shared dictionary where counters will be stored until the next sync cycle.", + "default": "kong_rate_limiting_counters" + } + }, + { + "hide_client_headers": { + "type": "boolean", + "description": "Optionally hide informative response headers. Available options: `true` or `false`.", + "default": false + } + }, + { + "cost_strategy": { + "one_of": [ + "default", + "node_quantifier" + ], + "type": "string", + "description": "Strategy to use to evaluate query costs. Either `default` or `node_quantifier`.", + "default": "default" + } + }, + { + "score_factor": { + "gt": 0, + "type": "number", + "default": 1, + "required": false, + "description": "A scoring factor to multiply (or divide) the cost. The `score_factor` must always be greater than 0." + } + }, + { + "max_cost": { + "required": false, + "type": "number", + "description": "A defined maximum cost per query. 0 means unlimited.", + "default": 0 + } + }, + { + "redis": { + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ], + "set2": [ + "host", + "port" + ] + } + }, + { + "mutually_exclusive_sets": { + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ], + "set2": [ + "cluster_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set1": [ + "cluster_addresses" + ], + "set2": [ + "host", + "port" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + } + ], + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "timeout": { + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "connect_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "send_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "read_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "username": { + "referenceable": true, + "type": "string", + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "encrypted": true, + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true + } + }, + { + "sentinel_username": { + "referenceable": true, + "type": "string", + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "encrypted": true, + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true + } + }, + { + "database": { + "type": "integer", + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer", + "default": 256, + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "type": "integer", + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "type": "string", + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "ssl": { + "required": false, + "type": "boolean", + "description": "If set to true, uses SSL to connect to Redis.", + "default": false + } + }, + { + "ssl_verify": { + "required": false, + "type": "boolean", + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false + } + }, + { + "server_name": { + "required": false, + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS." + } + } + ], + "required": true + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/graphql-rate-limiting-advanced/3.7.x.json b/schemas/graphql-rate-limiting-advanced/3.7.x.json new file mode 100644 index 00000000..80e4f015 --- /dev/null +++ b/schemas/graphql-rate-limiting-advanced/3.7.x.json @@ -0,0 +1,405 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "identifier": { + "default": "consumer", + "required": true, + "type": "string", + "description": "How to define the rate limit key. Can be `ip`, `credential`, `consumer`.", + "one_of": [ + "ip", + "credential", + "consumer" + ] + } + }, + { + "window_size": { + "required": true, + "elements": { + "type": "number" + }, + "type": "array", + "description": "One or more window sizes to apply a limit to (defined in seconds)." + } + }, + { + "window_type": { + "default": "sliding", + "type": "string", + "description": "Sets the time window to either `sliding` or `fixed`.", + "one_of": [ + "fixed", + "sliding" + ] + } + }, + { + "limit": { + "required": true, + "elements": { + "type": "number" + }, + "type": "array", + "description": "One or more requests-per-window limits to apply." + } + }, + { + "sync_rate": { + "required": true, + "type": "number", + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 syncs the counters in that many number of seconds." + } + }, + { + "namespace": { + "auto": true, + "type": "string", + "description": "The rate limiting library namespace to use for this plugin instance. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same." + } + }, + { + "strategy": { + "default": "cluster", + "required": true, + "type": "string", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits.", + "one_of": [ + "cluster", + "redis" + ] + } + }, + { + "dictionary_name": { + "required": true, + "type": "string", + "description": "The shared dictionary where counters will be stored until the next sync cycle.", + "default": "kong_rate_limiting_counters" + } + }, + { + "hide_client_headers": { + "type": "boolean", + "description": "Optionally hide informative response headers. Available options: `true` or `false`.", + "default": false + } + }, + { + "cost_strategy": { + "default": "default", + "type": "string", + "description": "Strategy to use to evaluate query costs. Either `default` or `node_quantifier`.", + "one_of": [ + "default", + "node_quantifier" + ] + } + }, + { + "score_factor": { + "gt": 0, + "required": false, + "description": "A scoring factor to multiply (or divide) the cost. The `score_factor` must always be greater than 0.", + "type": "number", + "default": 1 + } + }, + { + "max_cost": { + "required": false, + "type": "number", + "description": "A defined maximum cost per query. 0 means unlimited.", + "default": 0 + } + }, + { + "redis": { + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "connect_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "send_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "read_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "type": "integer", + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "default": 256, + "type": "integer", + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "type": "integer", + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "type": "string", + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_addresses": { + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", + "elements": { + "type": "string" + }, + "type": "array", + "len_min": 1 + } + }, + { + "cluster_addresses": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", + "elements": { + "type": "string" + }, + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "required": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "required": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_addresses" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_addresses" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/graphql-rate-limiting-advanced/3.8.x.json b/schemas/graphql-rate-limiting-advanced/3.8.x.json new file mode 100644 index 00000000..6274df88 --- /dev/null +++ b/schemas/graphql-rate-limiting-advanced/3.8.x.json @@ -0,0 +1,567 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "identifier": { + "description": "How to define the rate limit key. Can be `ip`, `credential`, `consumer`.", + "required": true, + "one_of": [ + "ip", + "credential", + "consumer" + ], + "type": "string", + "default": "consumer" + } + }, + { + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds).", + "type": "array", + "required": true, + "elements": { + "type": "number" + } + } + }, + { + "window_type": { + "description": "Sets the time window to either `sliding` or `fixed`.", + "type": "string", + "default": "sliding", + "one_of": [ + "fixed", + "sliding" + ] + } + }, + { + "limit": { + "description": "One or more requests-per-window limits to apply.", + "type": "array", + "required": true, + "elements": { + "type": "number" + } + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 syncs the counters in that many number of seconds.", + "type": "number", + "required": true + } + }, + { + "namespace": { + "description": "The rate limiting namespace to use for this plugin instance. This namespace is used to share rate limiting counters across different instances. If it is not provided, a random UUID is generated. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same.", + "type": "string", + "auto": true + } + }, + { + "strategy": { + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits.", + "required": true, + "one_of": [ + "cluster", + "redis" + ], + "type": "string", + "default": "cluster" + } + }, + { + "dictionary_name": { + "description": "The shared dictionary where counters will be stored until the next sync cycle.", + "type": "string", + "required": true, + "default": "kong_rate_limiting_counters" + } + }, + { + "hide_client_headers": { + "description": "Optionally hide informative response headers. Available options: `true` or `false`.", + "type": "boolean", + "default": false + } + }, + { + "cost_strategy": { + "description": "Strategy to use to evaluate query costs. Either `default` or `node_quantifier`.", + "type": "string", + "default": "default", + "one_of": [ + "default", + "node_quantifier" + ] + } + }, + { + "score_factor": { + "description": "A scoring factor to multiply (or divide) the cost. The `score_factor` must always be greater than 0.", + "required": false, + "type": "number", + "gt": 0, + "default": 1 + } + }, + { + "max_cost": { + "description": "A defined maximum cost per query. 0 means unlimited.", + "type": "number", + "required": false, + "default": 0 + } + }, + { + "redis": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer", + "between": [ + 1, + 2147483646 + ], + "default": 256 + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer", + "default": 5 + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean", + "default": false + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_nodes" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_nodes" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_field": "connection_is_proxied", + "if_match": { + "eq": true + }, + "then_field": "host", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "translate_backwards": [ + "connect_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/graphql-rate-limiting-advanced/3.9.x.json b/schemas/graphql-rate-limiting-advanced/3.9.x.json new file mode 100644 index 00000000..55336ec3 --- /dev/null +++ b/schemas/graphql-rate-limiting-advanced/3.9.x.json @@ -0,0 +1,530 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "identifier": { + "required": true, + "type": "string", + "default": "consumer", + "description": "How to define the rate limit key. Can be `ip`, `credential`, `consumer`.", + "one_of": [ + "ip", + "credential", + "consumer" + ] + } + }, + { + "window_size": { + "elements": { + "type": "number" + }, + "description": "One or more window sizes to apply a limit to (defined in seconds).", + "required": true, + "type": "array" + } + }, + { + "window_type": { + "default": "sliding", + "description": "Sets the time window to either `sliding` or `fixed`.", + "type": "string", + "one_of": [ + "fixed", + "sliding" + ] + } + }, + { + "limit": { + "elements": { + "type": "number" + }, + "description": "One or more requests-per-window limits to apply.", + "required": true, + "type": "array" + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 syncs the counters in that many number of seconds.", + "required": true, + "type": "number" + } + }, + { + "namespace": { + "auto": true, + "description": "The rate limiting namespace to use for this plugin instance. This namespace is used to share rate limiting counters across different instances. If it is not provided, a random UUID is generated. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same.", + "type": "string" + } + }, + { + "strategy": { + "required": true, + "type": "string", + "default": "cluster", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits.", + "one_of": [ + "cluster", + "redis" + ] + } + }, + { + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters will be stored until the next sync cycle.", + "required": true, + "type": "string" + } + }, + { + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers. Available options: `true` or `false`.", + "type": "boolean" + } + }, + { + "cost_strategy": { + "default": "default", + "description": "Strategy to use to evaluate query costs. Either `default` or `node_quantifier`.", + "type": "string", + "one_of": [ + "default", + "node_quantifier" + ] + } + }, + { + "score_factor": { + "required": false, + "type": "number", + "gt": 0, + "description": "A scoring factor to multiply (or divide) the cost. The `score_factor` must always be greater than 0.", + "default": 1 + } + }, + { + "max_cost": { + "default": 0, + "description": "A defined maximum cost per query. 0 means unlimited.", + "required": false, + "type": "number" + } + }, + { + "redis": { + "required": true, + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ] + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ] + }, + "type": "array" + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ] + }, + "type": "array" + } + } + ], + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "type": "string", + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean" + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean" + } + } + ] + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/grpc-gateway/3.10.x.json b/schemas/grpc-gateway/3.10.x.json new file mode 100644 index 00000000..ac6f957e --- /dev/null +++ b/schemas/grpc-gateway/3.10.x.json @@ -0,0 +1,59 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "proto": { + "description": "Describes the gRPC types and methods.", + "type": "string", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/grpc-gateway/3.11.x.json b/schemas/grpc-gateway/3.11.x.json new file mode 100644 index 00000000..5f5bd376 --- /dev/null +++ b/schemas/grpc-gateway/3.11.x.json @@ -0,0 +1,59 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "proto": { + "required": false, + "description": "Describes the gRPC types and methods.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/grpc-gateway/3.12.x.json b/schemas/grpc-gateway/3.12.x.json new file mode 100644 index 00000000..16d4804a --- /dev/null +++ b/schemas/grpc-gateway/3.12.x.json @@ -0,0 +1,57 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "proto": { + "type": "string", + "description": "Describes the gRPC types and methods.", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/grpc-gateway/3.4.x.json b/schemas/grpc-gateway/3.4.x.json index 37de613e..0401fb91 100644 --- a/schemas/grpc-gateway/3.4.x.json +++ b/schemas/grpc-gateway/3.4.x.json @@ -8,6 +8,9 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", "elements": { "one_of": [ "grpc", @@ -21,25 +24,36 @@ "ws", "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "proto": { - "type": "string", - "required": false + "description": "Describes the gRPC types and methods.", + "required": false, + "type": "string" } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/grpc-gateway/3.5.x.json b/schemas/grpc-gateway/3.5.x.json new file mode 100644 index 00000000..4739d952 --- /dev/null +++ b/schemas/grpc-gateway/3.5.x.json @@ -0,0 +1,59 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "proto": { + "description": "Describes the gRPC types and methods.", + "type": "string", + "required": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/grpc-gateway/3.6.x.json b/schemas/grpc-gateway/3.6.x.json new file mode 100644 index 00000000..0e1beb41 --- /dev/null +++ b/schemas/grpc-gateway/3.6.x.json @@ -0,0 +1,59 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "proto": { + "required": false, + "type": "string", + "description": "Describes the gRPC types and methods." + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/grpc-gateway/3.7.x.json b/schemas/grpc-gateway/3.7.x.json new file mode 100644 index 00000000..28a35684 --- /dev/null +++ b/schemas/grpc-gateway/3.7.x.json @@ -0,0 +1,59 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "proto": { + "required": false, + "type": "string", + "description": "Describes the gRPC types and methods." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/grpc-gateway/3.8.x.json b/schemas/grpc-gateway/3.8.x.json new file mode 100644 index 00000000..70622fdd --- /dev/null +++ b/schemas/grpc-gateway/3.8.x.json @@ -0,0 +1,59 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "proto": { + "description": "Describes the gRPC types and methods.", + "type": "string", + "required": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/grpc-gateway/3.9.x.json b/schemas/grpc-gateway/3.9.x.json new file mode 100644 index 00000000..cb4aab19 --- /dev/null +++ b/schemas/grpc-gateway/3.9.x.json @@ -0,0 +1,59 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "proto": { + "description": "Describes the gRPC types and methods.", + "required": false, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/grpc-web/3.10.x.json b/schemas/grpc-web/3.10.x.json new file mode 100644 index 00000000..0b80221d --- /dev/null +++ b/schemas/grpc-web/3.10.x.json @@ -0,0 +1,74 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "proto": { + "description": "If present, describes the gRPC types and methods. Required to support payload transcoding. When absent, the web client must use application/grpw-web+proto content.", + "type": "string", + "required": false + } + }, + { + "pass_stripped_path": { + "description": "If set to `true` causes the plugin to pass the stripped request path to the upstream gRPC service.", + "type": "boolean", + "required": false + } + }, + { + "allow_origin_header": { + "description": "The value of the `Access-Control-Allow-Origin` header in the response to the gRPC-Web client.", + "default": "*", + "type": "string", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/grpc-web/3.11.x.json b/schemas/grpc-web/3.11.x.json new file mode 100644 index 00000000..e97f820c --- /dev/null +++ b/schemas/grpc-web/3.11.x.json @@ -0,0 +1,74 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "proto": { + "required": false, + "description": "If present, describes the gRPC types and methods. Required to support payload transcoding. When absent, the web client must use application/grpw-web+proto content.", + "type": "string" + } + }, + { + "pass_stripped_path": { + "required": false, + "description": "If set to `true` causes the plugin to pass the stripped request path to the upstream gRPC service.", + "type": "boolean" + } + }, + { + "allow_origin_header": { + "default": "*", + "required": false, + "description": "The value of the `Access-Control-Allow-Origin` header in the response to the gRPC-Web client.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/grpc-web/3.12.x.json b/schemas/grpc-web/3.12.x.json new file mode 100644 index 00000000..3f18411f --- /dev/null +++ b/schemas/grpc-web/3.12.x.json @@ -0,0 +1,72 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "proto": { + "type": "string", + "description": "If present, describes the gRPC types and methods. Required to support payload transcoding. When absent, the web client must use application/grpw-web+proto content.", + "required": false + } + }, + { + "pass_stripped_path": { + "type": "boolean", + "description": "If set to `true` causes the plugin to pass the stripped request path to the upstream gRPC service.", + "required": false + } + }, + { + "allow_origin_header": { + "type": "string", + "default": "*", + "description": "The value of the `Access-Control-Allow-Origin` header in the response to the gRPC-Web client.", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/grpc-web/3.4.x.json b/schemas/grpc-web/3.4.x.json index 0f63fb40..67e83227 100644 --- a/schemas/grpc-web/3.4.x.json +++ b/schemas/grpc-web/3.4.x.json @@ -8,6 +8,9 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", "elements": { "one_of": [ "grpc", @@ -21,38 +24,51 @@ "ws", "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "proto": { - "required": false, - "type": "string" + "description": "If present, describes the gRPC types and methods. Required to support payload transcoding. When absent, the web client must use application/grpw-web+proto content.", + "type": "string", + "required": false } }, { "pass_stripped_path": { + "description": "If set to `true` causes the plugin to pass the stripped request path to the upstream gRPC service.", "type": "boolean", "required": false } }, { "allow_origin_header": { - "type": "string", "default": "*", - "required": false + "description": "The value of the `Access-Control-Allow-Origin` header in the response to the gRPC-Web client.", + "required": false, + "type": "string" } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/grpc-web/3.5.x.json b/schemas/grpc-web/3.5.x.json new file mode 100644 index 00000000..94790924 --- /dev/null +++ b/schemas/grpc-web/3.5.x.json @@ -0,0 +1,74 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "proto": { + "required": false, + "type": "string", + "description": "If present, describes the gRPC types and methods. Required to support payload transcoding. When absent, the web client must use application/grpw-web+proto content." + } + }, + { + "pass_stripped_path": { + "required": false, + "type": "boolean", + "description": "If set to `true` causes the plugin to pass the stripped request path to the upstream gRPC service." + } + }, + { + "allow_origin_header": { + "required": false, + "default": "*", + "type": "string", + "description": "The value of the `Access-Control-Allow-Origin` header in the response to the gRPC-Web client." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/grpc-web/3.6.x.json b/schemas/grpc-web/3.6.x.json new file mode 100644 index 00000000..e9b434c6 --- /dev/null +++ b/schemas/grpc-web/3.6.x.json @@ -0,0 +1,74 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "proto": { + "required": false, + "type": "string", + "description": "If present, describes the gRPC types and methods. Required to support payload transcoding. When absent, the web client must use application/grpw-web+proto content." + } + }, + { + "pass_stripped_path": { + "required": false, + "type": "boolean", + "description": "If set to `true` causes the plugin to pass the stripped request path to the upstream gRPC service." + } + }, + { + "allow_origin_header": { + "required": false, + "type": "string", + "description": "The value of the `Access-Control-Allow-Origin` header in the response to the gRPC-Web client.", + "default": "*" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/grpc-web/3.7.x.json b/schemas/grpc-web/3.7.x.json new file mode 100644 index 00000000..ea23b872 --- /dev/null +++ b/schemas/grpc-web/3.7.x.json @@ -0,0 +1,74 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "proto": { + "required": false, + "type": "string", + "description": "If present, describes the gRPC types and methods. Required to support payload transcoding. When absent, the web client must use application/grpw-web+proto content." + } + }, + { + "pass_stripped_path": { + "required": false, + "type": "boolean", + "description": "If set to `true` causes the plugin to pass the stripped request path to the upstream gRPC service." + } + }, + { + "allow_origin_header": { + "required": false, + "type": "string", + "description": "The value of the `Access-Control-Allow-Origin` header in the response to the gRPC-Web client.", + "default": "*" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/grpc-web/3.8.x.json b/schemas/grpc-web/3.8.x.json new file mode 100644 index 00000000..7c096f17 --- /dev/null +++ b/schemas/grpc-web/3.8.x.json @@ -0,0 +1,74 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "proto": { + "description": "If present, describes the gRPC types and methods. Required to support payload transcoding. When absent, the web client must use application/grpw-web+proto content.", + "type": "string", + "required": false + } + }, + { + "pass_stripped_path": { + "description": "If set to `true` causes the plugin to pass the stripped request path to the upstream gRPC service.", + "type": "boolean", + "required": false + } + }, + { + "allow_origin_header": { + "description": "The value of the `Access-Control-Allow-Origin` header in the response to the gRPC-Web client.", + "type": "string", + "required": false, + "default": "*" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/grpc-web/3.9.x.json b/schemas/grpc-web/3.9.x.json new file mode 100644 index 00000000..95633634 --- /dev/null +++ b/schemas/grpc-web/3.9.x.json @@ -0,0 +1,74 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "proto": { + "description": "If present, describes the gRPC types and methods. Required to support payload transcoding. When absent, the web client must use application/grpw-web+proto content.", + "required": false, + "type": "string" + } + }, + { + "pass_stripped_path": { + "description": "If set to `true` causes the plugin to pass the stripped request path to the upstream gRPC service.", + "required": false, + "type": "boolean" + } + }, + { + "allow_origin_header": { + "default": "*", + "description": "The value of the `Access-Control-Allow-Origin` header in the response to the gRPC-Web client.", + "required": false, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/header-cert-auth/3.10.x.json b/schemas/header-cert-auth/3.10.x.json new file mode 100644 index 00000000..bb7ec605 --- /dev/null +++ b/schemas/header-cert-auth/3.10.x.json @@ -0,0 +1,229 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "type": "record", + "fields": [ + { + "certificate_header_name": { + "description": "Name of the header that contains the certificate, received from the WAF or other L7 downstream proxy.", + "type": "string", + "required": true + } + }, + { + "certificate_header_format": { + "description": "Format of the certificate header. Supported formats: `base64_encoded`, `url_encoded`.", + "type": "string", + "one_of": [ + "base64_encoded", + "url_encoded" + ], + "required": true + } + }, + { + "secure_source": { + "description": "Whether to secure the source of the request. If set to `true`, the plugin will only allow requests from trusted IPs (configured by the `trusted_ips` config option).", + "default": true, + "type": "boolean", + "required": true + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "consumer_by": { + "type": "array", + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "username", + "custom_id" + ] + }, + "required": false + } + }, + { + "ca_certificates": { + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "type": "array", + "elements": { + "uuid": true, + "type": "string" + }, + "required": true + } + }, + { + "cache_ttl": { + "description": "Cache expiry time in seconds.", + "default": 60, + "type": "number", + "required": true + } + }, + { + "skip_consumer_lookup": { + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "allow_partial_chain": { + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "authenticated_group_by": { + "type": "string", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "one_of": [ + "CN", + "DN" + ], + "default": "CN", + "required": false + } + }, + { + "revocation_check_mode": { + "type": "string", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "one_of": [ + "SKIP", + "IGNORE_CA_ERROR", + "STRICT" + ], + "default": "IGNORE_CA_ERROR", + "required": false + } + }, + { + "http_timeout": { + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "default": 30000, + "type": "number" + } + }, + { + "cert_cache_ttl": { + "description": "The length of time in milliseconds between refreshes of the revocation check status cache.", + "default": 60000, + "type": "number" + } + }, + { + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "http_proxy_port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "https_proxy_port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/header-cert-auth/3.11.x.json b/schemas/header-cert-auth/3.11.x.json new file mode 100644 index 00000000..6c2da7c8 --- /dev/null +++ b/schemas/header-cert-auth/3.11.x.json @@ -0,0 +1,229 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "entity_checks": [ + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "fields": [ + { + "certificate_header_name": { + "required": true, + "description": "Name of the header that contains the certificate, received from the WAF or other L7 downstream proxy.", + "type": "string" + } + }, + { + "certificate_header_format": { + "one_of": [ + "base64_encoded", + "url_encoded" + ], + "required": true, + "description": "Format of the certificate header. Supported formats: `base64_encoded`, `url_encoded`.", + "type": "string" + } + }, + { + "secure_source": { + "default": true, + "required": true, + "description": "Whether to secure the source of the request. If set to `true`, the plugin will only allow requests from trusted IPs (configured by the `trusted_ips` config option).", + "type": "boolean" + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "consumer_by": { + "required": false, + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "type": "array", + "default": [ + "username", + "custom_id" + ], + "elements": { + "one_of": [ + "username", + "custom_id" + ], + "type": "string" + } + } + }, + { + "ca_certificates": { + "type": "array", + "required": true, + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "elements": { + "type": "string", + "uuid": true + } + } + }, + { + "cache_ttl": { + "default": 60, + "required": true, + "description": "Cache expiry time in seconds.", + "type": "number" + } + }, + { + "skip_consumer_lookup": { + "default": false, + "required": true, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "type": "boolean" + } + }, + { + "allow_partial_chain": { + "default": false, + "required": true, + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "type": "boolean" + } + }, + { + "authenticated_group_by": { + "required": false, + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "one_of": [ + "CN", + "DN" + ], + "default": "CN", + "type": "string" + } + }, + { + "revocation_check_mode": { + "required": false, + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "one_of": [ + "SKIP", + "IGNORE_CA_ERROR", + "STRICT" + ], + "default": "IGNORE_CA_ERROR", + "type": "string" + } + }, + { + "http_timeout": { + "default": 30000, + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number" + } + }, + { + "cert_cache_ttl": { + "default": 60000, + "description": "The length of time in milliseconds between refreshes of the revocation check status cache.", + "type": "number" + } + }, + { + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "http_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "https_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/header-cert-auth/3.12.x.json b/schemas/header-cert-auth/3.12.x.json new file mode 100644 index 00000000..8d46ab01 --- /dev/null +++ b/schemas/header-cert-auth/3.12.x.json @@ -0,0 +1,227 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "certificate_header_name": { + "type": "string", + "description": "Name of the header that contains the certificate, received from the WAF or other L7 downstream proxy.", + "required": true + } + }, + { + "certificate_header_format": { + "type": "string", + "description": "Format of the certificate header. Supported formats: `base64_encoded`, `url_encoded`.", + "one_of": [ + "base64_encoded", + "url_encoded" + ], + "required": true + } + }, + { + "secure_source": { + "type": "boolean", + "default": true, + "description": "Whether to secure the source of the request. If set to `true`, the plugin will only allow requests from trusted IPs (configured by the `trusted_ips` config option).", + "required": true + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "consumer_by": { + "type": "array", + "required": false, + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "username", + "custom_id" + ] + } + } + }, + { + "ca_certificates": { + "type": "array", + "elements": { + "uuid": true, + "type": "string" + }, + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "required": true + } + }, + { + "cache_ttl": { + "type": "number", + "default": 60, + "description": "Cache expiry time in seconds.", + "required": true + } + }, + { + "skip_consumer_lookup": { + "type": "boolean", + "default": false, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "required": true + } + }, + { + "allow_partial_chain": { + "type": "boolean", + "default": false, + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "required": true + } + }, + { + "authenticated_group_by": { + "type": "string", + "required": false, + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "default": "CN", + "one_of": [ + "CN", + "DN" + ] + } + }, + { + "revocation_check_mode": { + "type": "string", + "required": false, + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "default": "IGNORE_CA_ERROR", + "one_of": [ + "SKIP", + "IGNORE_CA_ERROR", + "STRICT" + ] + } + }, + { + "http_timeout": { + "type": "number", + "default": 30000, + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL." + } + }, + { + "cert_cache_ttl": { + "type": "number", + "default": 60000, + "description": "The length of time in milliseconds between refreshes of the revocation check status cache." + } + }, + { + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "http_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "http_proxy_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "https_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "https_proxy_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/header-cert-auth/3.8.x.json b/schemas/header-cert-auth/3.8.x.json new file mode 100644 index 00000000..94570d80 --- /dev/null +++ b/schemas/header-cert-auth/3.8.x.json @@ -0,0 +1,229 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "certificate_header_name": { + "description": "Name of the header that contains the certificate, received from the WAF or other L7 downstream proxy.", + "required": true, + "type": "string" + } + }, + { + "certificate_header_format": { + "description": "Format of the certificate header. Supported formats: `base64_encoded`, `url_encoded`.", + "required": true, + "type": "string", + "one_of": [ + "base64_encoded", + "url_encoded" + ] + } + }, + { + "secure_source": { + "description": "Whether to secure the source of the request. If set to `true`, the plugin will only allow requests from trusted IPs (configured by the `trusted_ips` config option).", + "type": "boolean", + "required": true, + "default": true + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "consumer_by": { + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "username", + "custom_id" + ] + }, + "type": "array", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "ca_certificates": { + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "type": "array", + "required": true, + "elements": { + "type": "string", + "uuid": true + } + } + }, + { + "cache_ttl": { + "description": "Cache expiry time in seconds.", + "type": "number", + "required": true, + "default": 60 + } + }, + { + "skip_consumer_lookup": { + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "allow_partial_chain": { + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "authenticated_group_by": { + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "required": false, + "one_of": [ + "CN", + "DN" + ], + "type": "string", + "default": "CN" + } + }, + { + "revocation_check_mode": { + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "required": false, + "one_of": [ + "SKIP", + "IGNORE_CA_ERROR", + "STRICT" + ], + "type": "string", + "default": "IGNORE_CA_ERROR" + } + }, + { + "http_timeout": { + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number", + "default": 30000 + } + }, + { + "cert_cache_ttl": { + "description": "The length of time in milliseconds between refreshes of the revocation check status cache.", + "type": "number", + "default": 60000 + } + }, + { + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + } + ], + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/header-cert-auth/3.9.x.json b/schemas/header-cert-auth/3.9.x.json new file mode 100644 index 00000000..380d6860 --- /dev/null +++ b/schemas/header-cert-auth/3.9.x.json @@ -0,0 +1,229 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "fields": [ + { + "certificate_header_name": { + "description": "Name of the header that contains the certificate, received from the WAF or other L7 downstream proxy.", + "required": true, + "type": "string" + } + }, + { + "certificate_header_format": { + "type": "string", + "description": "Format of the certificate header. Supported formats: `base64_encoded`, `url_encoded`.", + "required": true, + "one_of": [ + "base64_encoded", + "url_encoded" + ] + } + }, + { + "secure_source": { + "default": true, + "description": "Whether to secure the source of the request. If set to `true`, the plugin will only allow requests from trusted IPs (configured by the `trusted_ips` config option).", + "required": true, + "type": "boolean" + } + }, + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "consumer_by": { + "required": false, + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "username", + "custom_id" + ] + }, + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "ca_certificates": { + "elements": { + "uuid": true, + "type": "string" + }, + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "required": true, + "type": "array" + } + }, + { + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "required": true, + "type": "number" + } + }, + { + "skip_consumer_lookup": { + "default": false, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "required": true, + "type": "boolean" + } + }, + { + "allow_partial_chain": { + "default": false, + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "required": true, + "type": "boolean" + } + }, + { + "authenticated_group_by": { + "required": false, + "type": "string", + "default": "CN", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "one_of": [ + "CN", + "DN" + ] + } + }, + { + "revocation_check_mode": { + "required": false, + "type": "string", + "default": "IGNORE_CA_ERROR", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "one_of": [ + "SKIP", + "IGNORE_CA_ERROR", + "STRICT" + ] + } + }, + { + "http_timeout": { + "default": 30000, + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number" + } + }, + { + "cert_cache_ttl": { + "default": 60000, + "description": "The length of time in milliseconds between refreshes of the revocation check status cache.", + "type": "number" + } + }, + { + "default_consumer": { + "type": "string", + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "http_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "http_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "https_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "https_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/hmac-auth/3.10.x.json b/schemas/hmac-auth/3.10.x.json new file mode 100644 index 00000000..1120bc8f --- /dev/null +++ b/schemas/hmac-auth/3.10.x.json @@ -0,0 +1,132 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.algorithms" + ] + } + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "clock_skew": { + "description": "Clock skew in seconds to prevent replay attacks.", + "default": 300, + "type": "number", + "gt": 0 + } + }, + { + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + } + }, + { + "validate_request_body": { + "description": "A boolean value telling the plugin to enable body validation.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "enforce_headers": { + "description": "A list of headers that the client should at least use for HTTP signature creation.", + "type": "array", + "elements": { + "type": "string" + }, + "default": [ + + ] + } + }, + { + "algorithms": { + "description": "A list of HMAC digest algorithms that the user wants to support. Allowed values are `hmac-sha1`, `hmac-sha256`, `hmac-sha384`, and `hmac-sha512`", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ] + }, + "default": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ] + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/hmac-auth/3.11.x.json b/schemas/hmac-auth/3.11.x.json new file mode 100644 index 00000000..7b2f9b0b --- /dev/null +++ b/schemas/hmac-auth/3.11.x.json @@ -0,0 +1,132 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "clock_skew": { + "description": "Clock skew in seconds to prevent replay attacks.", + "gt": 0, + "default": 300, + "type": "number" + } + }, + { + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + } + }, + { + "validate_request_body": { + "description": "A boolean value telling the plugin to enable body validation.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "enforce_headers": { + "type": "array", + "description": "A list of headers that the client should at least use for HTTP signature creation.", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "algorithms": { + "type": "array", + "description": "A list of HMAC digest algorithms that the user wants to support. Allowed values are `hmac-sha1`, `hmac-sha256`, `hmac-sha384`, and `hmac-sha512`", + "default": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "elements": { + "one_of": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "type": "string" + } + } + }, + { + "realm": { + "required": false, + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.algorithms" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/hmac-auth/3.12.x.json b/schemas/hmac-auth/3.12.x.json new file mode 100644 index 00000000..0002d0ee --- /dev/null +++ b/schemas/hmac-auth/3.12.x.json @@ -0,0 +1,130 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.algorithms" + ] + } + } + ], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "hide_credentials": { + "type": "boolean", + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "required": true + } + }, + { + "clock_skew": { + "type": "number", + "default": 300, + "gt": 0, + "description": "Clock skew in seconds to prevent replay attacks." + } + }, + { + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + } + }, + { + "validate_request_body": { + "type": "boolean", + "default": false, + "description": "A boolean value telling the plugin to enable body validation.", + "required": true + } + }, + { + "enforce_headers": { + "type": "array", + "default": [], + "description": "A list of headers that the client should at least use for HTTP signature creation.", + "elements": { + "type": "string" + } + } + }, + { + "algorithms": { + "type": "array", + "default": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "description": "A list of HMAC digest algorithms that the user wants to support. Allowed values are `hmac-sha1`, `hmac-sha256`, `hmac-sha384`, and `hmac-sha512`", + "elements": { + "type": "string", + "one_of": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ] + } + } + }, + { + "realm": { + "type": "string", + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/hmac-auth/3.4.x.json b/schemas/hmac-auth/3.4.x.json index 4d4976dd..4f6ba080 100644 --- a/schemas/hmac-auth/3.4.x.json +++ b/schemas/hmac-auth/3.4.x.json @@ -2,8 +2,9 @@ "fields": [ { "consumer": { - "eq": null, "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, @@ -17,7 +18,10 @@ "ws", "wss" ], + "required": true, + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", @@ -25,76 +29,96 @@ "https", "ws", "wss" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "hide_credentials": { + "default": false, "required": true, "type": "boolean", - "default": false + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service." } }, { "clock_skew": { - "type": "number", + "default": 300, "gt": 0, - "default": 300 + "type": "number", + "description": "Clock skew in seconds to prevent replay attacks." } }, { "anonymous": { - "type": "string" + "type": "string", + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails." } }, { "validate_request_body": { + "default": false, "required": true, "type": "boolean", - "default": false + "description": "A boolean value telling the plugin to enable body validation." } }, { "enforce_headers": { + "default": [ + + ], + "description": "A list of headers that the client should at least use for HTTP signature creation.", "type": "array", "elements": { "type": "string" - }, - "default": [ - - ] + } } }, { "algorithms": { + "default": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "description": "A list of HMAC digest algorithms that the user wants to support. Allowed values are `hmac-sha1`, `hmac-sha256`, `hmac-sha384`, and `hmac-sha512`", "type": "array", "elements": { + "type": "string", "one_of": [ "hmac-sha1", "hmac-sha256", "hmac-sha384", "hmac-sha512" - ], - "type": "string" - }, - "default": [ - "hmac-sha1", - "hmac-sha256", - "hmac-sha384", - "hmac-sha512" - ] + ] + } } } ], - "type": "record" + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.algorithms" + ] } } ] diff --git a/schemas/hmac-auth/3.5.x.json b/schemas/hmac-auth/3.5.x.json new file mode 100644 index 00000000..8aec8cbe --- /dev/null +++ b/schemas/hmac-auth/3.5.x.json @@ -0,0 +1,125 @@ +{ + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "hide_credentials": { + "required": true, + "default": false, + "type": "boolean", + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service." + } + }, + { + "clock_skew": { + "gt": 0, + "default": 300, + "type": "number", + "description": "Clock skew in seconds to prevent replay attacks." + } + }, + { + "anonymous": { + "type": "string", + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails." + } + }, + { + "validate_request_body": { + "required": true, + "default": false, + "type": "boolean", + "description": "A boolean value telling the plugin to enable body validation." + } + }, + { + "enforce_headers": { + "description": "A list of headers that the client should at least use for HTTP signature creation.", + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "algorithms": { + "description": "A list of HMAC digest algorithms that the user wants to support. Allowed values are `hmac-sha1`, `hmac-sha256`, `hmac-sha384`, and `hmac-sha512`", + "default": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ] + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.algorithms" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/hmac-auth/3.6.x.json b/schemas/hmac-auth/3.6.x.json new file mode 100644 index 00000000..2fd8cdc7 --- /dev/null +++ b/schemas/hmac-auth/3.6.x.json @@ -0,0 +1,125 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.algorithms" + ] + } + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "hide_credentials": { + "required": true, + "type": "boolean", + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "default": false + } + }, + { + "clock_skew": { + "gt": 0, + "type": "number", + "description": "Clock skew in seconds to prevent replay attacks.", + "default": 300 + } + }, + { + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + } + }, + { + "validate_request_body": { + "required": true, + "type": "boolean", + "description": "A boolean value telling the plugin to enable body validation.", + "default": false + } + }, + { + "enforce_headers": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "A list of headers that the client should at least use for HTTP signature creation.", + "default": [ + + ] + } + }, + { + "algorithms": { + "elements": { + "one_of": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "type": "string" + }, + "type": "array", + "description": "A list of HMAC digest algorithms that the user wants to support. Allowed values are `hmac-sha1`, `hmac-sha256`, `hmac-sha384`, and `hmac-sha512`", + "default": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/hmac-auth/3.7.x.json b/schemas/hmac-auth/3.7.x.json new file mode 100644 index 00000000..f95b6922 --- /dev/null +++ b/schemas/hmac-auth/3.7.x.json @@ -0,0 +1,125 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "hide_credentials": { + "required": true, + "type": "boolean", + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "default": false + } + }, + { + "clock_skew": { + "default": 300, + "type": "number", + "description": "Clock skew in seconds to prevent replay attacks.", + "gt": 0 + } + }, + { + "anonymous": { + "type": "string", + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails." + } + }, + { + "validate_request_body": { + "required": true, + "type": "boolean", + "description": "A boolean value telling the plugin to enable body validation.", + "default": false + } + }, + { + "enforce_headers": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "A list of headers that the client should at least use for HTTP signature creation.", + "default": [ + + ] + } + }, + { + "algorithms": { + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ] + }, + "description": "A list of HMAC digest algorithms that the user wants to support. Allowed values are `hmac-sha1`, `hmac-sha256`, `hmac-sha384`, and `hmac-sha512`", + "default": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.algorithms" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/hmac-auth/3.8.x.json b/schemas/hmac-auth/3.8.x.json new file mode 100644 index 00000000..b3b458c4 --- /dev/null +++ b/schemas/hmac-auth/3.8.x.json @@ -0,0 +1,132 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": true, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "clock_skew": { + "description": "Clock skew in seconds to prevent replay attacks.", + "type": "number", + "gt": 0, + "default": 300 + } + }, + { + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + } + }, + { + "validate_request_body": { + "description": "A boolean value telling the plugin to enable body validation.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "enforce_headers": { + "description": "A list of headers that the client should at least use for HTTP signature creation.", + "type": "array", + "elements": { + "type": "string" + }, + "default": [ + + ] + } + }, + { + "algorithms": { + "description": "A list of HMAC digest algorithms that the user wants to support. Allowed values are `hmac-sha1`, `hmac-sha256`, `hmac-sha384`, and `hmac-sha512`", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ] + }, + "default": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ] + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "required": false, + "type": "string" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.algorithms" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/hmac-auth/3.9.x.json b/schemas/hmac-auth/3.9.x.json new file mode 100644 index 00000000..b922bd3e --- /dev/null +++ b/schemas/hmac-auth/3.9.x.json @@ -0,0 +1,132 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.algorithms" + ] + } + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": true, + "type": "set" + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "required": true, + "type": "boolean" + } + }, + { + "clock_skew": { + "default": 300, + "description": "Clock skew in seconds to prevent replay attacks.", + "gt": 0, + "type": "number" + } + }, + { + "anonymous": { + "description": "An optional string (Consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + } + }, + { + "validate_request_body": { + "default": false, + "description": "A boolean value telling the plugin to enable body validation.", + "required": true, + "type": "boolean" + } + }, + { + "enforce_headers": { + "elements": { + "type": "string" + }, + "description": "A list of headers that the client should at least use for HTTP signature creation.", + "default": [ + + ], + "type": "array" + } + }, + { + "algorithms": { + "elements": { + "type": "string", + "one_of": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ] + }, + "description": "A list of HMAC digest algorithms that the user wants to support. Allowed values are `hmac-sha1`, `hmac-sha256`, `hmac-sha384`, and `hmac-sha512`", + "default": [ + "hmac-sha1", + "hmac-sha256", + "hmac-sha384", + "hmac-sha512" + ], + "type": "array" + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "required": false, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/http-log/3.10.x.json b/schemas/http-log/3.10.x.json new file mode 100644 index 00000000..6b003a47 --- /dev/null +++ b/schemas/http-log/3.10.x.json @@ -0,0 +1,260 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "http_endpoint": { + "type": "string", + "referenceable": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "encrypted": true, + "required": true + } + }, + { + "method": { + "description": "An optional method used to send data to the HTTP server. Supported values are `POST` (default), `PUT`, and `PATCH`.", + "type": "string", + "default": "POST", + "one_of": [ + "POST", + "PUT", + "PATCH" + ] + } + }, + { + "content_type": { + "description": "Indicates the type of data sent. The only available option is `application/json`.", + "type": "string", + "default": "application/json", + "one_of": [ + "application/json", + "application/json; charset=utf-8" + ] + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "default": 10000, + "type": "number" + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection will live before being closed.", + "default": 60000, + "type": "number" + } + }, + { + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer", + "deprecation": { + "message": "http-log: config.retry_count no longer works, please use config.queue.max_retry_time instead", + "old_default": 10, + "removal_in_version": "4.0" + } + } + }, + { + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer", + "deprecation": { + "message": "http-log: config.queue_size is deprecated, please use config.queue.max_batch_size instead", + "old_default": 1, + "removal_in_version": "4.0" + } + } + }, + { + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number", + "deprecation": { + "message": "http-log: config.flush_timeout is deprecated, please use config.queue.max_coalescing_delay instead", + "old_default": 2, + "removal_in_version": "4.0" + } + } + }, + { + "headers": { + "description": "An optional table of headers included in the HTTP message to the upstream server. Values are indexed by header name, and each header name accepts a single string.", + "type": "map", + "values": { + "referenceable": true, + "type": "string" + }, + "keys": { + "description": "A string representing an HTTP header name.", + "type": "string", + "match_none": [ + { + "err": "cannot contain 'Host' header", + "pattern": "^[Hh][Oo][Ss][Tt]$" + }, + { + "err": "cannot contain 'Content-Length' header", + "pattern": "^[Cc][Oo][Nn][Tt][Ee][Nn][Tt]%-[Ll][Ee][nn][Gg][Tt][Hh]$" + }, + { + "err": "cannot contain 'Content-Type' header", + "pattern": "^[Cc][Oo][Nn][Tt][Ee][Nn][Tt]%-[Tt][Yy][Pp][Ee]$" + } + ] + } + } + }, + { + "queue": { + "type": "record", + "fields": [ + { + "max_batch_size": { + "between": [ + 1, + 1000000 + ], + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time." + } + }, + { + "max_coalescing_delay": { + "between": [ + 0, + 3600 + ], + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." + } + }, + { + "max_entries": { + "between": [ + 1, + 1000000 + ], + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue." + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "default": 60, + "type": "number" + } + }, + { + "initial_retry_delay": { + "between": [ + 0.001, + 1000000 + ], + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch." + } + }, + { + "max_retry_delay": { + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "default": 60, + "type": "number", + "between": [ + 0.001, + 1000000 + ] + } + }, + { + "concurrency_limit": { + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "default": 1, + "type": "integer", + "one_of": [ + -1, + 1 + ] + } + } + ], + "required": true + } + }, + { + "custom_fields_by_lua": { + "description": "Lua code as a key-value map", + "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "type": "string", + "len_min": 1 + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/http-log/3.11.x.json b/schemas/http-log/3.11.x.json new file mode 100644 index 00000000..64abd4b4 --- /dev/null +++ b/schemas/http-log/3.11.x.json @@ -0,0 +1,260 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "http_endpoint": { + "required": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "method": { + "one_of": [ + "POST", + "PUT", + "PATCH" + ], + "description": "An optional method used to send data to the HTTP server. Supported values are `POST` (default), `PUT`, and `PATCH`.", + "default": "POST", + "type": "string" + } + }, + { + "content_type": { + "one_of": [ + "application/json", + "application/json; charset=utf-8" + ], + "description": "Indicates the type of data sent. The only available option is `application/json`.", + "default": "application/json", + "type": "string" + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "default": 10000, + "type": "number" + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection will live before being closed.", + "default": 60000, + "type": "number" + } + }, + { + "retry_count": { + "deprecation": { + "old_default": 10, + "message": "http-log: config.retry_count no longer works, please use config.queue.max_retry_time instead", + "removal_in_version": "4.0" + }, + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer" + } + }, + { + "queue_size": { + "deprecation": { + "old_default": 1, + "message": "http-log: config.queue_size is deprecated, please use config.queue.max_batch_size instead", + "removal_in_version": "4.0" + }, + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + } + }, + { + "flush_timeout": { + "deprecation": { + "old_default": 2, + "message": "http-log: config.flush_timeout is deprecated, please use config.queue.max_coalescing_delay instead", + "removal_in_version": "4.0" + }, + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number" + } + }, + { + "headers": { + "description": "An optional table of headers included in the HTTP message to the upstream server. Values are indexed by header name, and each header name accepts a single string.", + "keys": { + "match_none": [ + { + "pattern": "^[Hh][Oo][Ss][Tt]$", + "err": "cannot contain 'Host' header" + }, + { + "pattern": "^[Cc][Oo][Nn][Tt][Ee][Nn][Tt]%-[Ll][Ee][nn][Gg][Tt][Hh]$", + "err": "cannot contain 'Content-Length' header" + }, + { + "pattern": "^[Cc][Oo][Nn][Tt][Ee][Nn][Tt]%-[Tt][Yy][Pp][Ee]$", + "err": "cannot contain 'Content-Type' header" + } + ], + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "values": { + "referenceable": true, + "type": "string" + }, + "type": "map" + } + }, + { + "queue": { + "required": true, + "fields": [ + { + "max_batch_size": { + "default": 1, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be processed at a time.", + "type": "integer" + } + }, + { + "max_coalescing_delay": { + "default": 1, + "between": [ + 0, + 3600 + ], + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "type": "number" + } + }, + { + "max_entries": { + "default": 10000, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be waiting on the queue.", + "type": "integer" + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "between": [ + 0.001, + 1000000 + ], + "description": "Time in seconds before the initial retry is made for a failing batch.", + "type": "number" + } + }, + { + "max_retry_delay": { + "default": 60, + "between": [ + 0.001, + 1000000 + ], + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "type": "number" + } + }, + { + "concurrency_limit": { + "one_of": [ + -1, + 1 + ], + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "type": "integer" + } + } + ], + "type": "record" + } + }, + { + "custom_fields_by_lua": { + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "len_min": 1, + "type": "string" + }, + "description": "Lua code as a key-value map", + "type": "map" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/http-log/3.12.x.json b/schemas/http-log/3.12.x.json new file mode 100644 index 00000000..eaa82a67 --- /dev/null +++ b/schemas/http-log/3.12.x.json @@ -0,0 +1,258 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "http_endpoint": { + "type": "string", + "required": true, + "encrypted": true, + "referenceable": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "method": { + "description": "An optional method used to send data to the HTTP server. Supported values are `POST` (default), `PUT`, and `PATCH`.", + "default": "POST", + "one_of": [ + "POST", + "PUT", + "PATCH" + ], + "type": "string" + } + }, + { + "content_type": { + "description": "Indicates the type of data sent. The only available option is `application/json`.", + "default": "application/json", + "one_of": [ + "application/json", + "application/json; charset=utf-8" + ], + "type": "string" + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "default": 10000, + "type": "number" + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection will live before being closed.", + "default": 60000, + "type": "number" + } + }, + { + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "deprecation": { + "old_default": 10, + "message": "http-log: config.retry_count no longer works, please use config.queue.max_retry_time instead", + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "deprecation": { + "old_default": 1, + "message": "http-log: config.queue_size is deprecated, please use config.queue.max_batch_size instead", + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "deprecation": { + "old_default": 2, + "message": "http-log: config.flush_timeout is deprecated, please use config.queue.max_coalescing_delay instead", + "removal_in_version": "4.0" + }, + "type": "number" + } + }, + { + "headers": { + "description": "An optional table of headers included in the HTTP message to the upstream server. Values are indexed by header name, and each header name accepts a single string.", + "type": "map", + "values": { + "referenceable": true, + "type": "string" + }, + "keys": { + "match_none": [ + { + "pattern": "^[Hh][Oo][Ss][Tt]$", + "err": "cannot contain 'Host' header" + }, + { + "pattern": "^[Cc][Oo][Nn][Tt][Ee][Nn][Tt]%-[Ll][Ee][nn][Gg][Tt][Hh]$", + "err": "cannot contain 'Content-Length' header" + }, + { + "pattern": "^[Cc][Oo][Nn][Tt][Ee][Nn][Tt]%-[Tt][Yy][Pp][Ee]$", + "err": "cannot contain 'Content-Type' header" + } + ], + "description": "A string representing an HTTP header name.", + "type": "string" + } + } + }, + { + "queue": { + "type": "record", + "fields": [ + { + "max_batch_size": { + "type": "integer", + "default": 1, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be processed at a time." + } + }, + { + "max_coalescing_delay": { + "type": "number", + "default": 1, + "between": [ + 0, + 3600 + ], + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." + } + }, + { + "max_entries": { + "type": "integer", + "default": 10000, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be waiting on the queue." + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "type": "number", + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." + } + }, + { + "initial_retry_delay": { + "type": "number", + "default": 0.01, + "between": [ + 0.001, + 1000000 + ], + "description": "Time in seconds before the initial retry is made for a failing batch." + } + }, + { + "max_retry_delay": { + "type": "number", + "default": 60, + "between": [ + 0.001, + 1000000 + ], + "description": "Maximum time in seconds between retries, caps exponential backoff." + } + }, + { + "concurrency_limit": { + "type": "integer", + "default": 1, + "one_of": [ + -1, + 1 + ], + "description": "The number of of queue delivery timers. -1 indicates unlimited." + } + } + ], + "required": true + } + }, + { + "custom_fields_by_lua": { + "type": "map", + "description": "Lua code as a key-value map", + "values": { + "type": "string", + "len_min": 1 + }, + "keys": { + "type": "string", + "len_min": 1 + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/http-log/3.4.x.json b/schemas/http-log/3.4.x.json index b8877735..7f9e9d14 100644 --- a/schemas/http-log/3.4.x.json +++ b/schemas/http-log/3.4.x.json @@ -8,6 +8,9 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", "elements": { "one_of": [ "grpc", @@ -21,87 +24,94 @@ "ws", "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "type": "record", - "entity_checks": [ - { - "custom_entity_check": { - "field_sources": [ - "retry_count", - "queue_size", - "flush_timeout" - ] - } - } - ], "fields": [ { "http_endpoint": { - "type": "string", - "required": true, "encrypted": true, - "referenceable": true + "required": true, + "referenceable": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" } }, { "method": { - "type": "string", "default": "POST", "one_of": [ "POST", "PUT", "PATCH" - ] + ], + "type": "string", + "description": "An optional method used to send data to the HTTP server. Supported values are `POST` (default), `PUT`, and `PATCH`." } }, { "content_type": { - "type": "string", "default": "application/json", "one_of": [ "application/json", "application/json; charset=utf-8" - ] + ], + "type": "string", + "description": "Indicates the type of data sent. The only available option is `application/json`." } }, { "timeout": { "default": 10000, - "type": "number" + "type": "number", + "description": "An optional timeout in milliseconds when sending data to the upstream server." } }, { "keepalive": { "default": 60000, - "type": "number" + "type": "number", + "description": "An optional value in milliseconds that defines how long an idle connection will live before being closed." } }, { "retry_count": { - "type": "integer" + "type": "integer", + "description": "Number of times to retry when sending data to the upstream server." } }, { "queue_size": { - "type": "integer" + "type": "integer", + "description": "Maximum number of log entries to be sent on each message to the upstream server." } }, { "flush_timeout": { - "type": "number" + "type": "number", + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records." } }, { "headers": { - "type": "map", + "values": { + "referenceable": true, + "type": "string" + }, "keys": { + "description": "A string representing an HTTP header name.", "match_none": [ { "err": "cannot contain 'Host' header", @@ -118,89 +128,118 @@ ], "type": "string" }, - "values": { - "referenceable": true, - "type": "string" - } + "description": "An optional table of headers included in the HTTP message to the upstream server. Values are indexed by header name, and each header name accepts a single string.", + "type": "map" } }, { "queue": { - "required": true, "fields": [ { "max_batch_size": { + "default": 1, + "type": "integer", "between": [ 1, 1000000 ], - "type": "number", - "default": 1 + "description": "Maximum number of entries that can be processed at a time." } }, { "max_coalescing_delay": { + "default": 1, + "type": "number", "between": [ 0, 3600 ], - "type": "number", - "default": 1 + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." } }, { "max_entries": { + "default": 10000, + "type": "integer", "between": [ 1, 1000000 ], - "type": "number", - "default": 10000 + "description": "Maximum number of entries that can be waiting on the queue." } }, { "max_bytes": { - "type": "number" + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." } }, { "max_retry_time": { "default": 60, - "type": "number" + "type": "number", + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." } }, { "initial_retry_delay": { "default": 0.01, - "type": "number" + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "description": "Time in seconds before the initial retry is made for a failing batch." } }, { "max_retry_delay": { "default": 60, - "type": "number" + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "description": "Maximum time in seconds between retries, caps exponential backoff." } } ], - "type": "record" + "type": "record", + "required": true } }, { "custom_fields_by_lua": { - "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, "keys": { "len_min": 1, "type": "string" }, - "values": { - "type": "string", - "len_min": 1 - } + "type": "map", + "description": "Lua code as a key-value map" } } ], - "required": true + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "retry_count", + "queue_size", + "flush_timeout" + ] + } + } + ], + "required": true, + "type": "record" } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/http-log/3.5.x.json b/schemas/http-log/3.5.x.json new file mode 100644 index 00000000..a0133ee6 --- /dev/null +++ b/schemas/http-log/3.5.x.json @@ -0,0 +1,245 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "retry_count", + "queue_size", + "flush_timeout" + ] + } + } + ], + "fields": [ + { + "http_endpoint": { + "type": "string", + "encrypted": true, + "referenceable": true, + "required": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "method": { + "one_of": [ + "POST", + "PUT", + "PATCH" + ], + "default": "POST", + "type": "string", + "description": "An optional method used to send data to the HTTP server. Supported values are `POST` (default), `PUT`, and `PATCH`." + } + }, + { + "content_type": { + "one_of": [ + "application/json", + "application/json; charset=utf-8" + ], + "default": "application/json", + "type": "string", + "description": "Indicates the type of data sent. The only available option is `application/json`." + } + }, + { + "timeout": { + "default": 10000, + "type": "number", + "description": "An optional timeout in milliseconds when sending data to the upstream server." + } + }, + { + "keepalive": { + "default": 60000, + "type": "number", + "description": "An optional value in milliseconds that defines how long an idle connection will live before being closed." + } + }, + { + "retry_count": { + "type": "integer", + "description": "Number of times to retry when sending data to the upstream server." + } + }, + { + "queue_size": { + "type": "integer", + "description": "Maximum number of log entries to be sent on each message to the upstream server." + } + }, + { + "flush_timeout": { + "type": "number", + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records." + } + }, + { + "headers": { + "keys": { + "match_none": [ + { + "pattern": "^[Hh][Oo][Ss][Tt]$", + "err": "cannot contain 'Host' header" + }, + { + "pattern": "^[Cc][Oo][Nn][Tt][Ee][Nn][Tt]%-[Ll][Ee][nn][Gg][Tt][Hh]$", + "err": "cannot contain 'Content-Length' header" + }, + { + "pattern": "^[Cc][Oo][Nn][Tt][Ee][Nn][Tt]%-[Tt][Yy][Pp][Ee]$", + "err": "cannot contain 'Content-Type' header" + } + ], + "type": "string", + "description": "A string representing an HTTP header name." + }, + "type": "map", + "values": { + "type": "string", + "referenceable": true + }, + "description": "An optional table of headers included in the HTTP message to the upstream server. Values are indexed by header name, and each header name accepts a single string." + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "between": [ + 1, + 1000000 + ], + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time." + } + }, + { + "max_coalescing_delay": { + "between": [ + 0, + 3600 + ], + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." + } + }, + { + "max_entries": { + "between": [ + 1, + 1000000 + ], + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue." + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "default": 60, + "type": "number", + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." + } + }, + { + "initial_retry_delay": { + "between": [ + 0.001, + 1000000 + ], + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch." + } + }, + { + "max_retry_delay": { + "between": [ + 0.001, + 1000000 + ], + "default": 60, + "type": "number", + "description": "Maximum time in seconds between retries, caps exponential backoff." + } + } + ], + "type": "record", + "required": true + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, + "description": "Lua code as a key-value map" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/http-log/3.6.x.json b/schemas/http-log/3.6.x.json new file mode 100644 index 00000000..f0923520 --- /dev/null +++ b/schemas/http-log/3.6.x.json @@ -0,0 +1,245 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "retry_count", + "queue_size", + "flush_timeout" + ] + } + } + ], + "type": "record", + "fields": [ + { + "http_endpoint": { + "referenceable": true, + "type": "string", + "encrypted": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": true + } + }, + { + "method": { + "one_of": [ + "POST", + "PUT", + "PATCH" + ], + "type": "string", + "description": "An optional method used to send data to the HTTP server. Supported values are `POST` (default), `PUT`, and `PATCH`.", + "default": "POST" + } + }, + { + "content_type": { + "one_of": [ + "application/json", + "application/json; charset=utf-8" + ], + "type": "string", + "description": "Indicates the type of data sent. The only available option is `application/json`.", + "default": "application/json" + } + }, + { + "timeout": { + "type": "number", + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "default": 10000 + } + }, + { + "keepalive": { + "type": "number", + "description": "An optional value in milliseconds that defines how long an idle connection will live before being closed.", + "default": 60000 + } + }, + { + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer" + } + }, + { + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer" + } + }, + { + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number" + } + }, + { + "headers": { + "keys": { + "type": "string", + "description": "A string representing an HTTP header name.", + "match_none": [ + { + "err": "cannot contain 'Host' header", + "pattern": "^[Hh][Oo][Ss][Tt]$" + }, + { + "err": "cannot contain 'Content-Length' header", + "pattern": "^[Cc][Oo][Nn][Tt][Ee][Nn][Tt]%-[Ll][Ee][nn][Gg][Tt][Hh]$" + }, + { + "err": "cannot contain 'Content-Type' header", + "pattern": "^[Cc][Oo][Nn][Tt][Ee][Nn][Tt]%-[Tt][Yy][Pp][Ee]$" + } + ] + }, + "type": "map", + "description": "An optional table of headers included in the HTTP message to the upstream server. Values are indexed by header name, and each header name accepts a single string.", + "values": { + "referenceable": true, + "type": "string" + } + } + }, + { + "queue": { + "required": true, + "type": "record", + "fields": [ + { + "max_batch_size": { + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_coalescing_delay": { + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "between": [ + 0, + 3600 + ] + } + }, + { + "max_entries": { + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "type": "number", + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch.", + "between": [ + 0.001, + 1000000 + ] + } + }, + { + "max_retry_delay": { + "default": 60, + "type": "number", + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "between": [ + 0.001, + 1000000 + ] + } + } + ] + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "description": "Lua code as a key-value map", + "values": { + "len_min": 1, + "type": "string" + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/http-log/3.7.x.json b/schemas/http-log/3.7.x.json new file mode 100644 index 00000000..de991dd0 --- /dev/null +++ b/schemas/http-log/3.7.x.json @@ -0,0 +1,249 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "http_endpoint": { + "encrypted": true, + "referenceable": true, + "required": true, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "method": { + "default": "POST", + "type": "string", + "description": "An optional method used to send data to the HTTP server. Supported values are `POST` (default), `PUT`, and `PATCH`.", + "one_of": [ + "POST", + "PUT", + "PATCH" + ] + } + }, + { + "content_type": { + "default": "application/json", + "type": "string", + "description": "Indicates the type of data sent. The only available option is `application/json`.", + "one_of": [ + "application/json", + "application/json; charset=utf-8" + ] + } + }, + { + "timeout": { + "type": "number", + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "default": 10000 + } + }, + { + "keepalive": { + "type": "number", + "description": "An optional value in milliseconds that defines how long an idle connection will live before being closed.", + "default": 60000 + } + }, + { + "retry_count": { + "deprecation": { + "old_default": 10, + "removal_in_version": "4.0", + "message": "http-log: config.retry_count no longer works, please use config.queue.max_retry_time instead" + }, + "type": "integer", + "description": "Number of times to retry when sending data to the upstream server." + } + }, + { + "queue_size": { + "deprecation": { + "old_default": 1, + "removal_in_version": "4.0", + "message": "http-log: config.queue_size is deprecated, please use config.queue.max_batch_size instead" + }, + "type": "integer", + "description": "Maximum number of log entries to be sent on each message to the upstream server." + } + }, + { + "flush_timeout": { + "deprecation": { + "old_default": 2, + "removal_in_version": "4.0", + "message": "http-log: config.flush_timeout is deprecated, please use config.queue.max_coalescing_delay instead" + }, + "type": "number", + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records." + } + }, + { + "headers": { + "keys": { + "match_none": [ + { + "err": "cannot contain 'Host' header", + "pattern": "^[Hh][Oo][Ss][Tt]$" + }, + { + "err": "cannot contain 'Content-Length' header", + "pattern": "^[Cc][Oo][Nn][Tt][Ee][Nn][Tt]%-[Ll][Ee][nn][Gg][Tt][Hh]$" + }, + { + "err": "cannot contain 'Content-Type' header", + "pattern": "^[Cc][Oo][Nn][Tt][Ee][Nn][Tt]%-[Tt][Yy][Pp][Ee]$" + } + ], + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "type": "map", + "description": "An optional table of headers included in the HTTP message to the upstream server. Values are indexed by header name, and each header name accepts a single string.", + "values": { + "type": "string", + "referenceable": true + } + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_coalescing_delay": { + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "between": [ + 0, + 3600 + ] + } + }, + { + "max_entries": { + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "type": "number", + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "default": 60 + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch.", + "between": [ + 0.001, + 1000000 + ] + } + }, + { + "max_retry_delay": { + "default": 60, + "type": "number", + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "between": [ + 0.001, + 1000000 + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "description": "Lua code as a key-value map", + "values": { + "type": "string", + "len_min": 1 + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/http-log/3.8.x.json b/schemas/http-log/3.8.x.json new file mode 100644 index 00000000..9a8a64ff --- /dev/null +++ b/schemas/http-log/3.8.x.json @@ -0,0 +1,260 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "http_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": true, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "method": { + "description": "An optional method used to send data to the HTTP server. Supported values are `POST` (default), `PUT`, and `PATCH`.", + "type": "string", + "default": "POST", + "one_of": [ + "POST", + "PUT", + "PATCH" + ] + } + }, + { + "content_type": { + "description": "Indicates the type of data sent. The only available option is `application/json`.", + "type": "string", + "default": "application/json", + "one_of": [ + "application/json", + "application/json; charset=utf-8" + ] + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number", + "default": 10000 + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection will live before being closed.", + "type": "number", + "default": 60000 + } + }, + { + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer", + "deprecation": { + "old_default": 10, + "message": "http-log: config.retry_count no longer works, please use config.queue.max_retry_time instead", + "removal_in_version": "4.0" + } + } + }, + { + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer", + "deprecation": { + "old_default": 1, + "message": "http-log: config.queue_size is deprecated, please use config.queue.max_batch_size instead", + "removal_in_version": "4.0" + } + } + }, + { + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number", + "deprecation": { + "old_default": 2, + "message": "http-log: config.flush_timeout is deprecated, please use config.queue.max_coalescing_delay instead", + "removal_in_version": "4.0" + } + } + }, + { + "headers": { + "description": "An optional table of headers included in the HTTP message to the upstream server. Values are indexed by header name, and each header name accepts a single string.", + "type": "map", + "values": { + "referenceable": true, + "type": "string" + }, + "keys": { + "match_none": [ + { + "pattern": "^[Hh][Oo][Ss][Tt]$", + "err": "cannot contain 'Host' header" + }, + { + "pattern": "^[Cc][Oo][Nn][Tt][Ee][Nn][Tt]%-[Ll][Ee][nn][Gg][Tt][Hh]$", + "err": "cannot contain 'Content-Length' header" + }, + { + "pattern": "^[Cc][Oo][Nn][Tt][Ee][Nn][Tt]%-[Tt][Yy][Pp][Ee]$", + "err": "cannot contain 'Content-Type' header" + } + ], + "type": "string", + "description": "A string representing an HTTP header name." + } + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "description": "Maximum number of entries that can be processed at a time.", + "type": "integer", + "between": [ + 1, + 1000000 + ], + "default": 1 + } + }, + { + "max_coalescing_delay": { + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "type": "number", + "between": [ + 0, + 3600 + ], + "default": 1 + } + }, + { + "max_entries": { + "description": "Maximum number of entries that can be waiting on the queue.", + "type": "integer", + "between": [ + 1, + 1000000 + ], + "default": 10000 + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number", + "default": 60 + } + }, + { + "initial_retry_delay": { + "description": "Time in seconds before the initial retry is made for a failing batch.", + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "default": 0.01 + } + }, + { + "max_retry_delay": { + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "default": 60 + } + }, + { + "concurrency_limit": { + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "type": "integer", + "default": 1, + "one_of": [ + -1, + 1 + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "values": { + "type": "string", + "len_min": 1 + }, + "description": "Lua code as a key-value map" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/http-log/3.9.x.json b/schemas/http-log/3.9.x.json new file mode 100644 index 00000000..0c018a80 --- /dev/null +++ b/schemas/http-log/3.9.x.json @@ -0,0 +1,260 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "http_endpoint": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": true + } + }, + { + "method": { + "default": "POST", + "description": "An optional method used to send data to the HTTP server. Supported values are `POST` (default), `PUT`, and `PATCH`.", + "type": "string", + "one_of": [ + "POST", + "PUT", + "PATCH" + ] + } + }, + { + "content_type": { + "default": "application/json", + "description": "Indicates the type of data sent. The only available option is `application/json`.", + "type": "string", + "one_of": [ + "application/json", + "application/json; charset=utf-8" + ] + } + }, + { + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + } + }, + { + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection will live before being closed.", + "type": "number" + } + }, + { + "retry_count": { + "description": "Number of times to retry when sending data to the upstream server.", + "type": "integer", + "deprecation": { + "old_default": 10, + "message": "http-log: config.retry_count no longer works, please use config.queue.max_retry_time instead", + "removal_in_version": "4.0" + } + } + }, + { + "queue_size": { + "description": "Maximum number of log entries to be sent on each message to the upstream server.", + "type": "integer", + "deprecation": { + "old_default": 1, + "message": "http-log: config.queue_size is deprecated, please use config.queue.max_batch_size instead", + "removal_in_version": "4.0" + } + } + }, + { + "flush_timeout": { + "description": "Optional time in seconds. If `queue_size` > 1, this is the max idle time before sending a log with less than `queue_size` records.", + "type": "number", + "deprecation": { + "old_default": 2, + "message": "http-log: config.flush_timeout is deprecated, please use config.queue.max_coalescing_delay instead", + "removal_in_version": "4.0" + } + } + }, + { + "headers": { + "values": { + "referenceable": true, + "type": "string" + }, + "description": "An optional table of headers included in the HTTP message to the upstream server. Values are indexed by header name, and each header name accepts a single string.", + "keys": { + "description": "A string representing an HTTP header name.", + "match_none": [ + { + "err": "cannot contain 'Host' header", + "pattern": "^[Hh][Oo][Ss][Tt]$" + }, + { + "err": "cannot contain 'Content-Length' header", + "pattern": "^[Cc][Oo][Nn][Tt][Ee][Nn][Tt]%-[Ll][Ee][nn][Gg][Tt][Hh]$" + }, + { + "err": "cannot contain 'Content-Type' header", + "pattern": "^[Cc][Oo][Nn][Tt][Ee][Nn][Tt]%-[Tt][Yy][Pp][Ee]$" + } + ], + "type": "string" + }, + "type": "map" + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "between": [ + 1, + 1000000 + ], + "type": "integer" + } + }, + { + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "between": [ + 0, + 3600 + ], + "type": "number" + } + }, + { + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "between": [ + 1, + 1000000 + ], + "type": "integer" + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "between": [ + 0.001, + 1000000 + ], + "type": "number" + } + }, + { + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "between": [ + 0.001, + 1000000 + ], + "type": "number" + } + }, + { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "type": "integer", + "one_of": [ + -1, + 1 + ] + } + } + ], + "required": true, + "type": "record" + } + }, + { + "custom_fields_by_lua": { + "description": "Lua code as a key-value map", + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/injection-protection/3.10.x.json b/schemas/injection-protection/3.10.x.json new file mode 100644 index 00000000..b8adc0d7 --- /dev/null +++ b/schemas/injection-protection/3.10.x.json @@ -0,0 +1,159 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "injection_types", + "custom_injections" + ] + } + ], + "type": "record", + "fields": [ + { + "injection_types": { + "type": "set", + "description": "The type of injections to check for.", + "default": [ + "sql" + ], + "elements": { + "type": "string", + "one_of": [ + "sql", + "js", + "ssi", + "xpath_abbreviated", + "xpath_extended", + "java_exception" + ] + }, + "required": true + } + }, + { + "locations": { + "type": "set", + "description": "The locations to check for injection.", + "default": [ + "path_and_query" + ], + "elements": { + "type": "string", + "one_of": [ + "headers", + "path_and_query", + "body" + ] + }, + "required": true + } + }, + { + "custom_injections": { + "description": "Custom regexes to check for.", + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "name": { + "description": "A unique name for this injection.", + "type": "string", + "required": true + } + }, + { + "regex": { + "description": "The regex to match against.", + "is_regex": true, + "type": "string", + "required": true + } + } + ] + }, + "default": null + } + }, + { + "enforcement_mode": { + "type": "string", + "description": "Enforcement mode of the security policy.", + "one_of": [ + "block", + "log_only" + ], + "default": "block", + "required": true + } + }, + { + "error_status_code": { + "type": "integer", + "description": "The response status code when validation fails.", + "default": 400, + "between": [ + 400, + 499 + ], + "required": true + } + }, + { + "error_message": { + "description": "The response message when validation fails", + "default": "Bad Request", + "type": "string", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/injection-protection/3.11.x.json b/schemas/injection-protection/3.11.x.json new file mode 100644 index 00000000..54f04092 --- /dev/null +++ b/schemas/injection-protection/3.11.x.json @@ -0,0 +1,159 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "entity_checks": [ + { + "at_least_one_of": [ + "injection_types", + "custom_injections" + ] + } + ], + "fields": [ + { + "injection_types": { + "required": true, + "description": "The type of injections to check for.", + "type": "set", + "default": [ + "sql" + ], + "elements": { + "one_of": [ + "sql", + "js", + "ssi", + "xpath_abbreviated", + "xpath_extended", + "java_exception" + ], + "type": "string" + } + } + }, + { + "locations": { + "required": true, + "description": "The locations to check for injection.", + "type": "set", + "default": [ + "path_and_query" + ], + "elements": { + "one_of": [ + "headers", + "path_and_query", + "body" + ], + "type": "string" + } + } + }, + { + "custom_injections": { + "type": "array", + "description": "Custom regexes to check for.", + "default": null, + "elements": { + "fields": [ + { + "name": { + "required": true, + "description": "A unique name for this injection.", + "type": "string" + } + }, + { + "regex": { + "is_regex": true, + "required": true, + "description": "The regex to match against.", + "type": "string" + } + } + ], + "type": "record" + } + } + }, + { + "enforcement_mode": { + "required": true, + "description": "Enforcement mode of the security policy.", + "one_of": [ + "block", + "log_only" + ], + "default": "block", + "type": "string" + } + }, + { + "error_status_code": { + "required": true, + "description": "The response status code when validation fails.", + "between": [ + 400, + 499 + ], + "default": 400, + "type": "integer" + } + }, + { + "error_message": { + "default": "Bad Request", + "required": true, + "description": "The response message when validation fails", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/injection-protection/3.12.x.json b/schemas/injection-protection/3.12.x.json new file mode 100644 index 00000000..e1ba27c9 --- /dev/null +++ b/schemas/injection-protection/3.12.x.json @@ -0,0 +1,157 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "injection_types": { + "type": "set", + "required": true, + "description": "The type of injections to check for.", + "default": [ + "sql" + ], + "elements": { + "type": "string", + "one_of": [ + "sql", + "js", + "ssi", + "xpath_abbreviated", + "xpath_extended", + "java_exception" + ] + } + } + }, + { + "locations": { + "type": "set", + "required": true, + "description": "The locations to check for injection.", + "default": [ + "path_and_query" + ], + "elements": { + "type": "string", + "one_of": [ + "headers", + "path_and_query", + "body" + ] + } + } + }, + { + "custom_injections": { + "description": "Custom regexes to check for.", + "default": null, + "elements": { + "type": "record", + "fields": [ + { + "name": { + "description": "A unique name for this injection.", + "type": "string", + "required": true + } + }, + { + "regex": { + "description": "The regex to match against.", + "is_regex": true, + "type": "string", + "required": true + } + } + ] + }, + "type": "array" + } + }, + { + "enforcement_mode": { + "type": "string", + "required": true, + "description": "Enforcement mode of the security policy.", + "default": "block", + "one_of": [ + "block", + "log_only" + ] + } + }, + { + "error_status_code": { + "type": "integer", + "between": [ + 400, + 499 + ], + "required": true, + "description": "The response status code when validation fails.", + "default": 400 + } + }, + { + "error_message": { + "description": "The response message when validation fails", + "default": "Bad Request", + "type": "string", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "injection_types", + "custom_injections" + ] + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/injection-protection/3.9.x.json b/schemas/injection-protection/3.9.x.json new file mode 100644 index 00000000..1f100616 --- /dev/null +++ b/schemas/injection-protection/3.9.x.json @@ -0,0 +1,159 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "injection_types", + "custom_injections" + ] + } + ], + "fields": [ + { + "injection_types": { + "required": true, + "type": "set", + "default": [ + "sql" + ], + "description": "The type of injections to check for.", + "elements": { + "type": "string", + "one_of": [ + "sql", + "js", + "ssi", + "xpath_abbreviated", + "xpath_extended", + "java_exception" + ] + } + } + }, + { + "locations": { + "required": true, + "type": "set", + "default": [ + "path_and_query" + ], + "description": "The locations to check for injection.", + "elements": { + "type": "string", + "one_of": [ + "headers", + "path_and_query", + "body" + ] + } + } + }, + { + "custom_injections": { + "elements": { + "type": "record", + "fields": [ + { + "name": { + "description": "A unique name for this injection.", + "required": true, + "type": "string" + } + }, + { + "regex": { + "description": "The regex to match against.", + "is_regex": true, + "required": true, + "type": "string" + } + } + ] + }, + "description": "Custom regexes to check for.", + "default": null, + "type": "array" + } + }, + { + "enforcement_mode": { + "required": true, + "type": "string", + "default": "block", + "description": "Enforcement mode of the security policy.", + "one_of": [ + "block", + "log_only" + ] + } + }, + { + "error_status_code": { + "between": [ + 400, + 499 + ], + "required": true, + "type": "integer", + "default": 400, + "description": "The response status code when validation fails." + } + }, + { + "error_message": { + "default": "Bad Request", + "description": "The response message when validation fails", + "required": true, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/ip-restriction/3.10.x.json b/schemas/ip-restriction/3.10.x.json new file mode 100644 index 00000000..7a0757c2 --- /dev/null +++ b/schemas/ip-restriction/3.10.x.json @@ -0,0 +1,85 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } + ], + "fields": [ + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "http", + "https", + "tcp", + "tls", + "grpc", + "grpcs" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "allow": { + "description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified.", + "type": "array", + "elements": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "type": "string" + } + } + }, + { + "deny": { + "description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified.", + "type": "array", + "elements": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "type": "string" + } + } + }, + { + "status": { + "description": "The HTTP status of the requests that will be rejected by the plugin.", + "type": "number", + "required": false + } + }, + { + "message": { + "description": "The message to send as a response body to rejected requests.", + "type": "string", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ip-restriction/3.11.x.json b/schemas/ip-restriction/3.11.x.json new file mode 100644 index 00000000..f317f38e --- /dev/null +++ b/schemas/ip-restriction/3.11.x.json @@ -0,0 +1,85 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", + "default": [ + "http", + "https", + "tcp", + "tls", + "grpc", + "grpcs" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + } + } + }, + { + "config": { + "required": true, + "fields": [ + { + "allow": { + "type": "array", + "description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified.", + "elements": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "type": "string" + } + } + }, + { + "deny": { + "type": "array", + "description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified.", + "elements": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "type": "string" + } + } + }, + { + "status": { + "required": false, + "description": "The HTTP status of the requests that will be rejected by the plugin.", + "type": "number" + } + }, + { + "message": { + "required": false, + "description": "The message to send as a response body to rejected requests.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/ip-restriction/3.12.x.json b/schemas/ip-restriction/3.12.x.json new file mode 100644 index 00000000..431df36f --- /dev/null +++ b/schemas/ip-restriction/3.12.x.json @@ -0,0 +1,85 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "http", + "https", + "tcp", + "tls", + "grpc", + "grpcs" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "allow": { + "description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified.", + "type": "array", + "elements": { + "type": "string", + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16." + } + } + }, + { + "deny": { + "description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified.", + "type": "array", + "elements": { + "type": "string", + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16." + } + } + }, + { + "status": { + "description": "The HTTP status of the requests that will be rejected by the plugin.", + "type": "number", + "required": false + } + }, + { + "message": { + "description": "The message to send as a response body to rejected requests.", + "type": "string", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ip-restriction/3.4.x.json b/schemas/ip-restriction/3.4.x.json index e1992b07..659c9887 100644 --- a/schemas/ip-restriction/3.4.x.json +++ b/schemas/ip-restriction/3.4.x.json @@ -3,59 +3,91 @@ { "protocols": { "default": [ - "grpc", - "grpcs", "http", - "https" + "https", + "tcp", + "tls", + "grpc", + "grpcs" ], + "type": "set", + "description": "A set of strings representing protocols.", + "required": true, "elements": { "one_of": [ "grpc", "grpcs", "http", - "https" + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "allow": { + "type": "array", "elements": { - "type": "string" + "type": "string", + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16." }, - "type": "array" + "description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified." } }, { "deny": { + "type": "array", "elements": { - "type": "string" + "type": "string", + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16." }, - "type": "array" + "description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified." } }, { "status": { + "required": false, "type": "number", - "required": false + "description": "The HTTP status of the requests that will be rejected by the plugin." } }, { "message": { + "required": false, "type": "string", - "required": false + "description": "The message to send as a response body to rejected requests." } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } ] } \ No newline at end of file diff --git a/schemas/ip-restriction/3.5.x.json b/schemas/ip-restriction/3.5.x.json new file mode 100644 index 00000000..d3d59adc --- /dev/null +++ b/schemas/ip-restriction/3.5.x.json @@ -0,0 +1,93 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "http", + "https", + "tcp", + "tls", + "grpc", + "grpcs" + ], + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "allow": { + "description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified.", + "type": "array", + "elements": { + "type": "string", + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16." + } + } + }, + { + "deny": { + "description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified.", + "type": "array", + "elements": { + "type": "string", + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16." + } + } + }, + { + "status": { + "required": false, + "type": "number", + "description": "The HTTP status of the requests that will be rejected by the plugin." + } + }, + { + "message": { + "required": false, + "type": "string", + "description": "The message to send as a response body to rejected requests." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/ip-restriction/3.6.x.json b/schemas/ip-restriction/3.6.x.json new file mode 100644 index 00000000..84ef56bc --- /dev/null +++ b/schemas/ip-restriction/3.6.x.json @@ -0,0 +1,85 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "http", + "https", + "tcp", + "tls", + "grpc", + "grpcs" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "allow": { + "elements": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "type": "string" + }, + "type": "array", + "description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified." + } + }, + { + "deny": { + "elements": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "type": "string" + }, + "type": "array", + "description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified." + } + }, + { + "status": { + "required": false, + "type": "number", + "description": "The HTTP status of the requests that will be rejected by the plugin." + } + }, + { + "message": { + "required": false, + "type": "string", + "description": "The message to send as a response body to rejected requests." + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/ip-restriction/3.7.x.json b/schemas/ip-restriction/3.7.x.json new file mode 100644 index 00000000..029b175e --- /dev/null +++ b/schemas/ip-restriction/3.7.x.json @@ -0,0 +1,85 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "http", + "https", + "tcp", + "tls", + "grpc", + "grpcs" + ] + } + }, + { + "config": { + "fields": [ + { + "allow": { + "elements": { + "type": "string", + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16." + }, + "type": "array", + "description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified." + } + }, + { + "deny": { + "elements": { + "type": "string", + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16." + }, + "type": "array", + "description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified." + } + }, + { + "status": { + "required": false, + "type": "number", + "description": "The HTTP status of the requests that will be rejected by the plugin." + } + }, + { + "message": { + "required": false, + "type": "string", + "description": "The message to send as a response body to rejected requests." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/ip-restriction/3.8.x.json b/schemas/ip-restriction/3.8.x.json new file mode 100644 index 00000000..aa8bec87 --- /dev/null +++ b/schemas/ip-restriction/3.8.x.json @@ -0,0 +1,85 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "http", + "https", + "tcp", + "tls", + "grpc", + "grpcs" + ] + } + }, + { + "config": { + "fields": [ + { + "allow": { + "description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified.", + "type": "array", + "elements": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "type": "string" + } + } + }, + { + "deny": { + "description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified.", + "type": "array", + "elements": { + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.", + "type": "string" + } + } + }, + { + "status": { + "description": "The HTTP status of the requests that will be rejected by the plugin.", + "type": "number", + "required": false + } + }, + { + "message": { + "description": "The message to send as a response body to rejected requests.", + "type": "string", + "required": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/ip-restriction/3.9.x.json b/schemas/ip-restriction/3.9.x.json new file mode 100644 index 00000000..6ce79129 --- /dev/null +++ b/schemas/ip-restriction/3.9.x.json @@ -0,0 +1,85 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.allow", + "config.deny" + ] + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "http", + "https", + "tcp", + "tls", + "grpc", + "grpcs" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "config": { + "fields": [ + { + "allow": { + "elements": { + "type": "string", + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16." + }, + "description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified.", + "type": "array" + } + }, + { + "deny": { + "elements": { + "type": "string", + "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16." + }, + "description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified.", + "type": "array" + } + }, + { + "status": { + "description": "The HTTP status of the requests that will be rejected by the plugin.", + "required": false, + "type": "number" + } + }, + { + "message": { + "description": "The message to send as a response body to rejected requests.", + "required": false, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/jq/3.10.x.json b/schemas/jq/3.10.x.json new file mode 100644 index 00000000..f5d53baa --- /dev/null +++ b/schemas/jq/3.10.x.json @@ -0,0 +1,197 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "request_jq_program", + "response_jq_program" + ] + } + ], + "type": "record", + "fields": [ + { + "request_jq_program": { + "required": false, + "type": "string" + } + }, + { + "request_jq_program_options": { + "required": false, + "type": "record", + "default": [ + + ], + "fields": [ + { + "compact_output": { + "type": "boolean", + "default": true, + "required": true + } + }, + { + "raw_output": { + "type": "boolean", + "default": false, + "required": true + } + }, + { + "join_output": { + "type": "boolean", + "default": false, + "required": true + } + }, + { + "ascii_output": { + "type": "boolean", + "default": false, + "required": true + } + }, + { + "sort_keys": { + "type": "boolean", + "default": false, + "required": true + } + } + ] + } + }, + { + "request_if_media_type": { + "default": [ + "application/json" + ], + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "response_jq_program": { + "required": false, + "type": "string" + } + }, + { + "response_jq_program_options": { + "required": false, + "type": "record", + "default": [ + + ], + "fields": [ + { + "compact_output": { + "type": "boolean", + "default": true, + "required": true + } + }, + { + "raw_output": { + "type": "boolean", + "default": false, + "required": true + } + }, + { + "join_output": { + "type": "boolean", + "default": false, + "required": true + } + }, + { + "ascii_output": { + "type": "boolean", + "default": false, + "required": true + } + }, + { + "sort_keys": { + "type": "boolean", + "default": false, + "required": true + } + } + ] + } + }, + { + "response_if_media_type": { + "default": [ + "application/json" + ], + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "response_if_status_code": { + "default": [ + 200 + ], + "type": "array", + "elements": { + "between": [ + 100, + 599 + ], + "type": "integer" + }, + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/jq/3.11.x.json b/schemas/jq/3.11.x.json new file mode 100644 index 00000000..13bc787a --- /dev/null +++ b/schemas/jq/3.11.x.json @@ -0,0 +1,197 @@ +{ + "fields": [ + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "entity_checks": [ + { + "at_least_one_of": [ + "request_jq_program", + "response_jq_program" + ] + } + ], + "fields": [ + { + "request_jq_program": { + "type": "string", + "required": false + } + }, + { + "request_jq_program_options": { + "default": [ + + ], + "required": false, + "fields": [ + { + "compact_output": { + "required": true, + "default": true, + "type": "boolean" + } + }, + { + "raw_output": { + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "join_output": { + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "ascii_output": { + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "sort_keys": { + "required": true, + "default": false, + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "request_if_media_type": { + "type": "array", + "required": false, + "default": [ + "application/json" + ], + "elements": { + "type": "string" + } + } + }, + { + "response_jq_program": { + "type": "string", + "required": false + } + }, + { + "response_jq_program_options": { + "default": [ + + ], + "required": false, + "fields": [ + { + "compact_output": { + "required": true, + "default": true, + "type": "boolean" + } + }, + { + "raw_output": { + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "join_output": { + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "ascii_output": { + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "sort_keys": { + "required": true, + "default": false, + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "response_if_media_type": { + "type": "array", + "required": false, + "default": [ + "application/json" + ], + "elements": { + "type": "string" + } + } + }, + { + "response_if_status_code": { + "type": "array", + "required": false, + "default": [ + 200 + ], + "elements": { + "type": "integer", + "between": [ + 100, + 599 + ] + } + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/jq/3.12.x.json b/schemas/jq/3.12.x.json new file mode 100644 index 00000000..19d5eaa6 --- /dev/null +++ b/schemas/jq/3.12.x.json @@ -0,0 +1,191 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "request_jq_program": { + "type": "string", + "required": false + } + }, + { + "request_jq_program_options": { + "type": "record", + "default": [], + "fields": [ + { + "compact_output": { + "type": "boolean", + "default": true, + "required": true + } + }, + { + "raw_output": { + "type": "boolean", + "default": false, + "required": true + } + }, + { + "join_output": { + "type": "boolean", + "default": false, + "required": true + } + }, + { + "ascii_output": { + "type": "boolean", + "default": false, + "required": true + } + }, + { + "sort_keys": { + "type": "boolean", + "default": false, + "required": true + } + } + ], + "required": false + } + }, + { + "request_if_media_type": { + "type": "array", + "default": [ + "application/json" + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "response_jq_program": { + "type": "string", + "required": false + } + }, + { + "response_jq_program_options": { + "type": "record", + "default": [], + "fields": [ + { + "compact_output": { + "type": "boolean", + "default": true, + "required": true + } + }, + { + "raw_output": { + "type": "boolean", + "default": false, + "required": true + } + }, + { + "join_output": { + "type": "boolean", + "default": false, + "required": true + } + }, + { + "ascii_output": { + "type": "boolean", + "default": false, + "required": true + } + }, + { + "sort_keys": { + "type": "boolean", + "default": false, + "required": true + } + } + ], + "required": false + } + }, + { + "response_if_media_type": { + "type": "array", + "default": [ + "application/json" + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "response_if_status_code": { + "type": "array", + "default": [ + 200 + ], + "elements": { + "type": "integer", + "between": [ + 100, + 599 + ] + }, + "required": false + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "request_jq_program", + "response_jq_program" + ] + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/jq/3.4.x.json b/schemas/jq/3.4.x.json index dbbb2971..a4dfaab7 100644 --- a/schemas/jq/3.4.x.json +++ b/schemas/jq/3.4.x.json @@ -1,5 +1,13 @@ { "fields": [ + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" + } + }, { "protocols": { "default": [ @@ -8,30 +16,22 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } } }, { "config": { - "required": true, - "entity_checks": [ - { - "at_least_one_of": [ - "request_jq_program", - "response_jq_program" - ] - } - ], "fields": [ { "request_jq_program": { @@ -48,37 +48,37 @@ "fields": [ { "compact_output": { - "required": true, + "default": true, "type": "boolean", - "default": true + "required": true } }, { "raw_output": { - "required": true, + "default": false, "type": "boolean", - "default": false + "required": true } }, { "join_output": { - "required": true, + "default": false, "type": "boolean", - "default": false + "required": true } }, { "ascii_output": { - "required": true, + "default": false, "type": "boolean", - "default": false + "required": true } }, { "sort_keys": { - "required": true, + "default": false, "type": "boolean", - "default": false + "required": true } } ], @@ -87,14 +87,14 @@ }, { "request_if_media_type": { - "elements": { - "type": "string" - }, "default": [ "application/json" ], "required": false, - "type": "array" + "type": "array", + "elements": { + "type": "string" + } } }, { @@ -112,37 +112,37 @@ "fields": [ { "compact_output": { - "required": true, + "default": true, "type": "boolean", - "default": true + "required": true } }, { "raw_output": { - "required": true, + "default": false, "type": "boolean", - "default": false + "required": true } }, { "join_output": { - "required": true, + "default": false, "type": "boolean", - "default": false + "required": true } }, { "ascii_output": { - "required": true, + "default": false, "type": "boolean", - "default": false + "required": true } }, { "sort_keys": { - "required": true, + "default": false, "type": "boolean", - "default": false + "required": true } } ], @@ -151,35 +151,47 @@ }, { "response_if_media_type": { - "elements": { - "type": "string" - }, "default": [ "application/json" ], "required": false, - "type": "array" + "type": "array", + "elements": { + "type": "string" + } } }, { "response_if_status_code": { + "default": [ + 200 + ], + "required": false, + "type": "array", "elements": { "between": [ 100, 599 ], "type": "integer" - }, - "default": [ - 200 - ], - "required": false, - "type": "array" + } } } ], - "type": "record" + "entity_checks": [ + { + "at_least_one_of": [ + "request_jq_program", + "response_jq_program" + ] + } + ], + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/jq/3.5.x.json b/schemas/jq/3.5.x.json new file mode 100644 index 00000000..fd328866 --- /dev/null +++ b/schemas/jq/3.5.x.json @@ -0,0 +1,197 @@ +{ + "fields": [ + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "request_jq_program", + "response_jq_program" + ] + } + ], + "fields": [ + { + "request_jq_program": { + "type": "string", + "required": false + } + }, + { + "request_jq_program_options": { + "fields": [ + { + "compact_output": { + "default": true, + "type": "boolean", + "required": true + } + }, + { + "raw_output": { + "default": false, + "type": "boolean", + "required": true + } + }, + { + "join_output": { + "default": false, + "type": "boolean", + "required": true + } + }, + { + "ascii_output": { + "default": false, + "type": "boolean", + "required": true + } + }, + { + "sort_keys": { + "default": false, + "type": "boolean", + "required": true + } + } + ], + "default": [ + + ], + "type": "record", + "required": false + } + }, + { + "request_if_media_type": { + "required": false, + "default": [ + "application/json" + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "response_jq_program": { + "type": "string", + "required": false + } + }, + { + "response_jq_program_options": { + "fields": [ + { + "compact_output": { + "default": true, + "type": "boolean", + "required": true + } + }, + { + "raw_output": { + "default": false, + "type": "boolean", + "required": true + } + }, + { + "join_output": { + "default": false, + "type": "boolean", + "required": true + } + }, + { + "ascii_output": { + "default": false, + "type": "boolean", + "required": true + } + }, + { + "sort_keys": { + "default": false, + "type": "boolean", + "required": true + } + } + ], + "default": [ + + ], + "type": "record", + "required": false + } + }, + { + "response_if_media_type": { + "required": false, + "default": [ + "application/json" + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "response_if_status_code": { + "required": false, + "default": [ + 200 + ], + "type": "array", + "elements": { + "type": "integer", + "between": [ + 100, + 599 + ] + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/jq/3.6.x.json b/schemas/jq/3.6.x.json new file mode 100644 index 00000000..03981bbb --- /dev/null +++ b/schemas/jq/3.6.x.json @@ -0,0 +1,197 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "request_jq_program", + "response_jq_program" + ] + } + ], + "type": "record", + "fields": [ + { + "request_jq_program": { + "required": false, + "type": "string" + } + }, + { + "request_jq_program_options": { + "required": false, + "type": "record", + "default": [ + + ], + "fields": [ + { + "compact_output": { + "required": true, + "type": "boolean", + "default": true + } + }, + { + "raw_output": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "join_output": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "ascii_output": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "sort_keys": { + "required": true, + "type": "boolean", + "default": false + } + } + ] + } + }, + { + "request_if_media_type": { + "required": false, + "type": "array", + "default": [ + "application/json" + ], + "elements": { + "type": "string" + } + } + }, + { + "response_jq_program": { + "required": false, + "type": "string" + } + }, + { + "response_jq_program_options": { + "required": false, + "type": "record", + "default": [ + + ], + "fields": [ + { + "compact_output": { + "required": true, + "type": "boolean", + "default": true + } + }, + { + "raw_output": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "join_output": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "ascii_output": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "sort_keys": { + "required": true, + "type": "boolean", + "default": false + } + } + ] + } + }, + { + "response_if_media_type": { + "required": false, + "type": "array", + "default": [ + "application/json" + ], + "elements": { + "type": "string" + } + } + }, + { + "response_if_status_code": { + "required": false, + "type": "array", + "default": [ + 200 + ], + "elements": { + "type": "integer", + "between": [ + 100, + 599 + ] + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/jq/3.7.x.json b/schemas/jq/3.7.x.json new file mode 100644 index 00000000..733feb0f --- /dev/null +++ b/schemas/jq/3.7.x.json @@ -0,0 +1,197 @@ +{ + "fields": [ + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "request_jq_program": { + "required": false, + "type": "string" + } + }, + { + "request_jq_program_options": { + "required": false, + "fields": [ + { + "compact_output": { + "required": true, + "type": "boolean", + "default": true + } + }, + { + "raw_output": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "join_output": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "ascii_output": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "sort_keys": { + "required": true, + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "default": [ + + ] + } + }, + { + "request_if_media_type": { + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "application/json" + ] + } + }, + { + "response_jq_program": { + "required": false, + "type": "string" + } + }, + { + "response_jq_program_options": { + "required": false, + "fields": [ + { + "compact_output": { + "required": true, + "type": "boolean", + "default": true + } + }, + { + "raw_output": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "join_output": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "ascii_output": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "sort_keys": { + "required": true, + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "default": [ + + ] + } + }, + { + "response_if_media_type": { + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "application/json" + ] + } + }, + { + "response_if_status_code": { + "required": false, + "elements": { + "type": "integer", + "between": [ + 100, + 599 + ] + }, + "type": "array", + "default": [ + 200 + ] + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "request_jq_program", + "response_jq_program" + ] + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/jq/3.8.x.json b/schemas/jq/3.8.x.json new file mode 100644 index 00000000..9e42f8c1 --- /dev/null +++ b/schemas/jq/3.8.x.json @@ -0,0 +1,197 @@ +{ + "fields": [ + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "request_jq_program": { + "type": "string", + "required": false + } + }, + { + "request_jq_program_options": { + "fields": [ + { + "compact_output": { + "required": true, + "type": "boolean", + "default": true + } + }, + { + "raw_output": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "join_output": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "ascii_output": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "sort_keys": { + "required": true, + "type": "boolean", + "default": false + } + } + ], + "required": false, + "type": "record", + "default": [ + + ] + } + }, + { + "request_if_media_type": { + "elements": { + "type": "string" + }, + "required": false, + "type": "array", + "default": [ + "application/json" + ] + } + }, + { + "response_jq_program": { + "type": "string", + "required": false + } + }, + { + "response_jq_program_options": { + "fields": [ + { + "compact_output": { + "required": true, + "type": "boolean", + "default": true + } + }, + { + "raw_output": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "join_output": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "ascii_output": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "sort_keys": { + "required": true, + "type": "boolean", + "default": false + } + } + ], + "required": false, + "type": "record", + "default": [ + + ] + } + }, + { + "response_if_media_type": { + "elements": { + "type": "string" + }, + "required": false, + "type": "array", + "default": [ + "application/json" + ] + } + }, + { + "response_if_status_code": { + "elements": { + "between": [ + 100, + 599 + ], + "type": "integer" + }, + "required": false, + "type": "array", + "default": [ + 200 + ] + } + } + ], + "type": "record", + "entity_checks": [ + { + "at_least_one_of": [ + "request_jq_program", + "response_jq_program" + ] + } + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/jq/3.9.x.json b/schemas/jq/3.9.x.json new file mode 100644 index 00000000..623393bd --- /dev/null +++ b/schemas/jq/3.9.x.json @@ -0,0 +1,197 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "request_jq_program", + "response_jq_program" + ] + } + ], + "fields": [ + { + "request_jq_program": { + "required": false, + "type": "string" + } + }, + { + "request_jq_program_options": { + "default": [ + + ], + "type": "record", + "required": false, + "fields": [ + { + "compact_output": { + "default": true, + "required": true, + "type": "boolean" + } + }, + { + "raw_output": { + "default": false, + "required": true, + "type": "boolean" + } + }, + { + "join_output": { + "default": false, + "required": true, + "type": "boolean" + } + }, + { + "ascii_output": { + "default": false, + "required": true, + "type": "boolean" + } + }, + { + "sort_keys": { + "default": false, + "required": true, + "type": "boolean" + } + } + ] + } + }, + { + "request_if_media_type": { + "elements": { + "type": "string" + }, + "default": [ + "application/json" + ], + "required": false, + "type": "array" + } + }, + { + "response_jq_program": { + "required": false, + "type": "string" + } + }, + { + "response_jq_program_options": { + "default": [ + + ], + "type": "record", + "required": false, + "fields": [ + { + "compact_output": { + "default": true, + "required": true, + "type": "boolean" + } + }, + { + "raw_output": { + "default": false, + "required": true, + "type": "boolean" + } + }, + { + "join_output": { + "default": false, + "required": true, + "type": "boolean" + } + }, + { + "ascii_output": { + "default": false, + "required": true, + "type": "boolean" + } + }, + { + "sort_keys": { + "default": false, + "required": true, + "type": "boolean" + } + } + ] + } + }, + { + "response_if_media_type": { + "elements": { + "type": "string" + }, + "default": [ + "application/json" + ], + "required": false, + "type": "array" + } + }, + { + "response_if_status_code": { + "elements": { + "between": [ + 100, + 599 + ], + "type": "integer" + }, + "default": [ + 200 + ], + "required": false, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/json-threat-protection/3.10.x.json b/schemas/json-threat-protection/3.10.x.json new file mode 100644 index 00000000..c88dbf3d --- /dev/null +++ b/schemas/json-threat-protection/3.10.x.json @@ -0,0 +1,172 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.max_body_size", + "config.max_container_depth" + ] + } + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "max_body_size": { + "type": "integer", + "description": "Max size of the request body. -1 means unlimited.", + "default": 8192, + "between": [ + -1, + 2147483648 + ], + "required": false + } + }, + { + "max_container_depth": { + "type": "integer", + "description": "Max nested depth of objects and arrays. -1 means unlimited.", + "default": -1, + "between": [ + -1, + 2147483648 + ], + "required": false + } + }, + { + "max_object_entry_count": { + "type": "integer", + "description": "Max number of entries in an object. -1 means unlimited.", + "default": -1, + "between": [ + -1, + 2147483648 + ], + "required": false + } + }, + { + "max_object_entry_name_length": { + "type": "integer", + "description": "Max string length of object name. -1 means unlimited.", + "default": -1, + "between": [ + -1, + 2147483648 + ], + "required": false + } + }, + { + "max_array_element_count": { + "type": "integer", + "description": "Max number of elements in an array. -1 means unlimited.", + "default": -1, + "between": [ + -1, + 2147483648 + ], + "required": false + } + }, + { + "max_string_value_length": { + "type": "integer", + "description": "Max string value length. -1 means unlimited.", + "default": -1, + "between": [ + -1, + 2147483648 + ], + "required": false + } + }, + { + "allow_duplicate_object_entry_name": { + "description": "Allow or disallow duplicate object entry name.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "enforcement_mode": { + "type": "string", + "description": "Enforcement mode of the security policy.", + "one_of": [ + "block", + "log_only" + ], + "default": "block", + "required": false + } + }, + { + "error_status_code": { + "type": "integer", + "description": "The response status code when validation fails.", + "default": 400, + "between": [ + 400, + 499 + ], + "required": false + } + }, + { + "error_message": { + "description": "The response message when validation fails", + "default": "Bad Request", + "type": "string", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/json-threat-protection/3.11.x.json b/schemas/json-threat-protection/3.11.x.json new file mode 100644 index 00000000..0cd1b8b5 --- /dev/null +++ b/schemas/json-threat-protection/3.11.x.json @@ -0,0 +1,172 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "max_body_size": { + "required": false, + "description": "Max size of the request body. -1 means unlimited.", + "between": [ + -1, + 2147483648 + ], + "default": 8192, + "type": "integer" + } + }, + { + "max_container_depth": { + "required": false, + "description": "Max nested depth of objects and arrays. -1 means unlimited.", + "between": [ + -1, + 2147483648 + ], + "default": -1, + "type": "integer" + } + }, + { + "max_object_entry_count": { + "required": false, + "description": "Max number of entries in an object. -1 means unlimited.", + "between": [ + -1, + 2147483648 + ], + "default": -1, + "type": "integer" + } + }, + { + "max_object_entry_name_length": { + "required": false, + "description": "Max string length of object name. -1 means unlimited.", + "between": [ + -1, + 2147483648 + ], + "default": -1, + "type": "integer" + } + }, + { + "max_array_element_count": { + "required": false, + "description": "Max number of elements in an array. -1 means unlimited.", + "between": [ + -1, + 2147483648 + ], + "default": -1, + "type": "integer" + } + }, + { + "max_string_value_length": { + "required": false, + "description": "Max string value length. -1 means unlimited.", + "between": [ + -1, + 2147483648 + ], + "default": -1, + "type": "integer" + } + }, + { + "allow_duplicate_object_entry_name": { + "default": true, + "required": false, + "description": "Allow or disallow duplicate object entry name.", + "type": "boolean" + } + }, + { + "enforcement_mode": { + "required": false, + "description": "Enforcement mode of the security policy.", + "one_of": [ + "block", + "log_only" + ], + "default": "block", + "type": "string" + } + }, + { + "error_status_code": { + "required": false, + "description": "The response status code when validation fails.", + "between": [ + 400, + 499 + ], + "default": 400, + "type": "integer" + } + }, + { + "error_message": { + "default": "Bad Request", + "required": false, + "description": "The response message when validation fails", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.max_body_size", + "config.max_container_depth" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/json-threat-protection/3.12.x.json b/schemas/json-threat-protection/3.12.x.json new file mode 100644 index 00000000..38eba080 --- /dev/null +++ b/schemas/json-threat-protection/3.12.x.json @@ -0,0 +1,172 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.max_body_size", + "config.max_container_depth" + ] + } + } + ], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "max_body_size": { + "type": "integer", + "between": [ + -1, + 2147483648 + ], + "required": false, + "description": "Max size of the request body. -1 means unlimited.", + "default": 8192 + } + }, + { + "max_container_depth": { + "type": "integer", + "between": [ + -1, + 2147483648 + ], + "required": false, + "description": "Max nested depth of objects and arrays. -1 means unlimited.", + "default": -1 + } + }, + { + "max_object_entry_count": { + "type": "integer", + "between": [ + -1, + 2147483648 + ], + "required": false, + "description": "Max number of entries in an object. -1 means unlimited.", + "default": -1 + } + }, + { + "max_object_entry_name_length": { + "type": "integer", + "between": [ + -1, + 2147483648 + ], + "required": false, + "description": "Max string length of object name. -1 means unlimited.", + "default": -1 + } + }, + { + "max_array_element_count": { + "type": "integer", + "between": [ + -1, + 2147483648 + ], + "required": false, + "description": "Max number of elements in an array. -1 means unlimited.", + "default": -1 + } + }, + { + "max_string_value_length": { + "type": "integer", + "between": [ + -1, + 2147483648 + ], + "required": false, + "description": "Max string value length. -1 means unlimited.", + "default": -1 + } + }, + { + "allow_duplicate_object_entry_name": { + "description": "Allow or disallow duplicate object entry name.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "enforcement_mode": { + "type": "string", + "required": false, + "description": "Enforcement mode of the security policy.", + "default": "block", + "one_of": [ + "block", + "log_only" + ] + } + }, + { + "error_status_code": { + "type": "integer", + "between": [ + 400, + 499 + ], + "required": false, + "description": "The response status code when validation fails.", + "default": 400 + } + }, + { + "error_message": { + "type": "string", + "default": "Bad Request", + "description": "The response message when validation fails", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/json-threat-protection/3.8.x.json b/schemas/json-threat-protection/3.8.x.json new file mode 100644 index 00000000..a49e1e7d --- /dev/null +++ b/schemas/json-threat-protection/3.8.x.json @@ -0,0 +1,164 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "max_body_size": { + "description": "Max size of the request body. -1 means unlimited.", + "required": false, + "between": [ + -1, + 2147483648 + ], + "type": "integer", + "default": 8192 + } + }, + { + "max_container_depth": { + "description": "Max nested depth of objects and arrays. -1 means unlimited.", + "required": false, + "between": [ + -1, + 2147483648 + ], + "type": "integer", + "default": -1 + } + }, + { + "max_object_entry_count": { + "description": "Max number of entries in an object. -1 means unlimited.", + "required": false, + "between": [ + -1, + 2147483648 + ], + "type": "integer", + "default": -1 + } + }, + { + "max_object_entry_name_length": { + "description": "Max string length of object name. -1 means unlimited.", + "required": false, + "between": [ + -1, + 2147483648 + ], + "type": "integer", + "default": -1 + } + }, + { + "max_array_element_count": { + "description": "Max number of elements in an array. -1 means unlimited.", + "required": false, + "between": [ + -1, + 2147483648 + ], + "type": "integer", + "default": -1 + } + }, + { + "max_string_value_length": { + "description": "Max string value length. -1 means unlimited.", + "required": false, + "between": [ + -1, + 2147483648 + ], + "type": "integer", + "default": -1 + } + }, + { + "enforcement_mode": { + "description": "Enforcement mode of the security policy.", + "required": false, + "one_of": [ + "block", + "log_only" + ], + "type": "string", + "default": "block" + } + }, + { + "error_status_code": { + "description": "The response status code when validation fails.", + "required": false, + "between": [ + 400, + 499 + ], + "type": "integer", + "default": 400 + } + }, + { + "error_message": { + "description": "The response message when validation fails", + "required": false, + "type": "string", + "default": "Bad Request" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.max_body_size", + "config.max_container_depth" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/json-threat-protection/3.9.x.json b/schemas/json-threat-protection/3.9.x.json new file mode 100644 index 00000000..e41dd894 --- /dev/null +++ b/schemas/json-threat-protection/3.9.x.json @@ -0,0 +1,164 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.max_body_size", + "config.max_container_depth" + ] + } + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "max_body_size": { + "between": [ + -1, + 2147483648 + ], + "required": false, + "type": "integer", + "default": 8192, + "description": "Max size of the request body. -1 means unlimited." + } + }, + { + "max_container_depth": { + "between": [ + -1, + 2147483648 + ], + "required": false, + "type": "integer", + "default": -1, + "description": "Max nested depth of objects and arrays. -1 means unlimited." + } + }, + { + "max_object_entry_count": { + "between": [ + -1, + 2147483648 + ], + "required": false, + "type": "integer", + "default": -1, + "description": "Max number of entries in an object. -1 means unlimited." + } + }, + { + "max_object_entry_name_length": { + "between": [ + -1, + 2147483648 + ], + "required": false, + "type": "integer", + "default": -1, + "description": "Max string length of object name. -1 means unlimited." + } + }, + { + "max_array_element_count": { + "between": [ + -1, + 2147483648 + ], + "required": false, + "type": "integer", + "default": -1, + "description": "Max number of elements in an array. -1 means unlimited." + } + }, + { + "max_string_value_length": { + "between": [ + -1, + 2147483648 + ], + "required": false, + "type": "integer", + "default": -1, + "description": "Max string value length. -1 means unlimited." + } + }, + { + "enforcement_mode": { + "required": false, + "type": "string", + "default": "block", + "description": "Enforcement mode of the security policy.", + "one_of": [ + "block", + "log_only" + ] + } + }, + { + "error_status_code": { + "between": [ + 400, + 499 + ], + "required": false, + "type": "integer", + "default": 400, + "description": "The response status code when validation fails." + } + }, + { + "error_message": { + "default": "Bad Request", + "description": "The response message when validation fails", + "required": false, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwe-decrypt/3.10.x.json b/schemas/jwe-decrypt/3.10.x.json new file mode 100644 index 00000000..cf442932 --- /dev/null +++ b/schemas/jwe-decrypt/3.10.x.json @@ -0,0 +1,86 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "lookup_header_name": { + "description": "The name of the header to look for the JWE token.", + "default": "Authorization", + "type": "string", + "required": true + } + }, + { + "forward_header_name": { + "description": "The name of the header that is used to set the decrypted value.", + "default": "Authorization", + "type": "string", + "required": true + } + }, + { + "key_sets": { + "description": "Denote the name or names of all Key Sets that should be inspected when trying to find a suitable key to decrypt the JWE token.", + "type": "array", + "elements": { + "type": "string" + }, + "required": true + } + }, + { + "strict": { + "description": "Defines how the plugin behaves in cases where no token was found in the request. When using `strict` mode, the request requires a token to be present and subsequently raise an error if none could be found.", + "default": true, + "type": "boolean" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwe-decrypt/3.11.x.json b/schemas/jwe-decrypt/3.11.x.json new file mode 100644 index 00000000..f2376cff --- /dev/null +++ b/schemas/jwe-decrypt/3.11.x.json @@ -0,0 +1,86 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "lookup_header_name": { + "description": "The name of the header to look for the JWE token.", + "required": true, + "default": "Authorization", + "type": "string" + } + }, + { + "forward_header_name": { + "description": "The name of the header that is used to set the decrypted value.", + "required": true, + "default": "Authorization", + "type": "string" + } + }, + { + "key_sets": { + "type": "array", + "required": true, + "description": "Denote the name or names of all Key Sets that should be inspected when trying to find a suitable key to decrypt the JWE token.", + "elements": { + "type": "string" + } + } + }, + { + "strict": { + "description": "Defines how the plugin behaves in cases where no token was found in the request. When using `strict` mode, the request requires a token to be present and subsequently raise an error if none could be found.", + "default": true, + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/jwe-decrypt/3.12.x.json b/schemas/jwe-decrypt/3.12.x.json new file mode 100644 index 00000000..d1ad8087 --- /dev/null +++ b/schemas/jwe-decrypt/3.12.x.json @@ -0,0 +1,84 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "lookup_header_name": { + "description": "The name of the header to look for the JWE token.", + "default": "Authorization", + "type": "string", + "required": true + } + }, + { + "forward_header_name": { + "description": "The name of the header that is used to set the decrypted value.", + "default": "Authorization", + "type": "string", + "required": true + } + }, + { + "key_sets": { + "description": "Denote the name or names of all Key Sets that should be inspected when trying to find a suitable key to decrypt the JWE token.", + "type": "array", + "elements": { + "type": "string" + }, + "required": true + } + }, + { + "strict": { + "description": "Defines how the plugin behaves in cases where no token was found in the request. When using `strict` mode, the request requires a token to be present and subsequently raise an error if none could be found.", + "default": true, + "type": "boolean" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwe-decrypt/3.4.x.json b/schemas/jwe-decrypt/3.4.x.json index 7a9eaac7..8a0cd9f6 100644 --- a/schemas/jwe-decrypt/3.4.x.json +++ b/schemas/jwe-decrypt/3.4.x.json @@ -8,62 +8,79 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } } }, { - "consumer": { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, + "type": "foreign" + } + }, + { + "consumer": { "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "lookup_header_name": { - "required": true, "default": "Authorization", - "type": "string" + "type": "string", + "description": "The name of the header to look for the JWE token.", + "required": true } }, { "forward_header_name": { - "required": true, "default": "Authorization", - "type": "string" + "type": "string", + "description": "The name of the header that is used to set the decrypted value.", + "required": true } }, { "key_sets": { - "required": true, "type": "array", + "description": "Denote the name or names of all Key Sets that should be inspected when trying to find a suitable key to decrypt the JWE token.", "elements": { "type": "string" - } + }, + "required": true } }, { "strict": { + "default": true, "type": "boolean", - "default": true + "description": "Defines how the plugin behaves in cases where no token was found in the request. When using `strict` mode, the request requires a token to be present and subsequently raise an error if none could be found." } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/jwe-decrypt/3.5.x.json b/schemas/jwe-decrypt/3.5.x.json new file mode 100644 index 00000000..5e7a808b --- /dev/null +++ b/schemas/jwe-decrypt/3.5.x.json @@ -0,0 +1,86 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "lookup_header_name": { + "description": "The name of the header to look for the JWE token.", + "default": "Authorization", + "type": "string", + "required": true + } + }, + { + "forward_header_name": { + "description": "The name of the header that is used to set the decrypted value.", + "default": "Authorization", + "type": "string", + "required": true + } + }, + { + "key_sets": { + "description": "Denote the name or names of all Key Sets that should be inspected when trying to find a suitable key to decrypt the JWE token.", + "elements": { + "type": "string" + }, + "type": "array", + "required": true + } + }, + { + "strict": { + "default": true, + "type": "boolean", + "description": "Defines how the plugin behaves in cases where no token was found in the request. When using `strict` mode, the request requires a token to be present and subsequently raise an error if none could be found." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/jwe-decrypt/3.6.x.json b/schemas/jwe-decrypt/3.6.x.json new file mode 100644 index 00000000..70ca7b17 --- /dev/null +++ b/schemas/jwe-decrypt/3.6.x.json @@ -0,0 +1,86 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "lookup_header_name": { + "required": true, + "type": "string", + "description": "The name of the header to look for the JWE token.", + "default": "Authorization" + } + }, + { + "forward_header_name": { + "required": true, + "type": "string", + "description": "The name of the header that is used to set the decrypted value.", + "default": "Authorization" + } + }, + { + "key_sets": { + "required": true, + "type": "array", + "description": "Denote the name or names of all Key Sets that should be inspected when trying to find a suitable key to decrypt the JWE token.", + "elements": { + "type": "string" + } + } + }, + { + "strict": { + "type": "boolean", + "description": "Defines how the plugin behaves in cases where no token was found in the request. When using `strict` mode, the request requires a token to be present and subsequently raise an error if none could be found.", + "default": true + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwe-decrypt/3.7.x.json b/schemas/jwe-decrypt/3.7.x.json new file mode 100644 index 00000000..4822044d --- /dev/null +++ b/schemas/jwe-decrypt/3.7.x.json @@ -0,0 +1,86 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "lookup_header_name": { + "required": true, + "type": "string", + "description": "The name of the header to look for the JWE token.", + "default": "Authorization" + } + }, + { + "forward_header_name": { + "required": true, + "type": "string", + "description": "The name of the header that is used to set the decrypted value.", + "default": "Authorization" + } + }, + { + "key_sets": { + "required": true, + "elements": { + "type": "string" + }, + "type": "array", + "description": "Denote the name or names of all Key Sets that should be inspected when trying to find a suitable key to decrypt the JWE token." + } + }, + { + "strict": { + "type": "boolean", + "description": "Defines how the plugin behaves in cases where no token was found in the request. When using `strict` mode, the request requires a token to be present and subsequently raise an error if none could be found.", + "default": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/jwe-decrypt/3.8.x.json b/schemas/jwe-decrypt/3.8.x.json new file mode 100644 index 00000000..f30147c9 --- /dev/null +++ b/schemas/jwe-decrypt/3.8.x.json @@ -0,0 +1,86 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "lookup_header_name": { + "description": "The name of the header to look for the JWE token.", + "type": "string", + "required": true, + "default": "Authorization" + } + }, + { + "forward_header_name": { + "description": "The name of the header that is used to set the decrypted value.", + "type": "string", + "required": true, + "default": "Authorization" + } + }, + { + "key_sets": { + "description": "Denote the name or names of all Key Sets that should be inspected when trying to find a suitable key to decrypt the JWE token.", + "type": "array", + "required": true, + "elements": { + "type": "string" + } + } + }, + { + "strict": { + "description": "Defines how the plugin behaves in cases where no token was found in the request. When using `strict` mode, the request requires a token to be present and subsequently raise an error if none could be found.", + "type": "boolean", + "default": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/jwe-decrypt/3.9.x.json b/schemas/jwe-decrypt/3.9.x.json new file mode 100644 index 00000000..f414e64e --- /dev/null +++ b/schemas/jwe-decrypt/3.9.x.json @@ -0,0 +1,86 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "lookup_header_name": { + "default": "Authorization", + "description": "The name of the header to look for the JWE token.", + "required": true, + "type": "string" + } + }, + { + "forward_header_name": { + "default": "Authorization", + "description": "The name of the header that is used to set the decrypted value.", + "required": true, + "type": "string" + } + }, + { + "key_sets": { + "elements": { + "type": "string" + }, + "description": "Denote the name or names of all Key Sets that should be inspected when trying to find a suitable key to decrypt the JWE token.", + "required": true, + "type": "array" + } + }, + { + "strict": { + "default": true, + "description": "Defines how the plugin behaves in cases where no token was found in the request. When using `strict` mode, the request requires a token to be present and subsequently raise an error if none could be found.", + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwt-signer/3.10.x.json b/schemas/jwt-signer/3.10.x.json new file mode 100644 index 00000000..1f595ac9 --- /dev/null +++ b/schemas/jwt-signer/3.10.x.json @@ -0,0 +1,997 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.access_token_upstream_header", + "config.channel_token_upstream_header", + "config.original_access_token_upstream_header", + "config.original_channel_token_upstream_header" + ] + } + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + { + "mutually_required": [ + "access_token_jwks_uri_client_username", + "access_token_jwks_uri_client_password" + ] + }, + { + "mutually_required": [ + "access_token_keyset_client_username", + "access_token_keyset_client_password" + ] + }, + { + "mutually_required": [ + "channel_token_jwks_uri_client_username", + "channel_token_jwks_uri_client_password" + ] + }, + { + "mutually_required": [ + "channel_token_keyset_client_username", + "channel_token_keyset_client_password" + ] + } + ], + "type": "record", + "required": true, + "fields": [ + { + "realm": { + "description": "When authentication or authorization fails, or there is an unexpected error, the plugin sends an `WWW-Authenticate` header with the `realm` attribute value.", + "type": "string", + "required": false + } + }, + { + "enable_hs_signatures": { + "description": "Tokens signed with HMAC algorithms such as `HS256`, `HS384`, or `HS512` are not accepted by default. If you need to accept such tokens for verification, enable this setting.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "enable_instrumentation": { + "description": "Writes log entries with some added information using `ngx.CRIT` (CRITICAL) level.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "access_token_issuer": { + "description": "The `iss` claim of a signed or re-signed access token is set to this value. Original `iss` claim of the incoming token (possibly introspected) is stored in `original_iss` claim of the newly signed access token.", + "type": "string", + "default": "kong", + "required": false + } + }, + { + "access_token_keyset": { + "description": "The name of the keyset containing signing keys.", + "type": "string", + "default": "kong", + "required": false + } + }, + { + "access_token_keyset_client_username": { + "description": "The client username that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_password`", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "access_token_keyset_client_password": { + "type": "string", + "referenceable": true, + "description": "The client password that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_username`", + "encrypted": true, + "required": false + } + }, + { + "access_token_keyset_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_keyset` is an https uri that requires mTLS Auth.", + "type": "foreign", + "reference": "certificates", + "required": false + } + }, + { + "access_token_keyset_rotate_period": { + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_keyset`. The default value 0 means no auto-rotation.", + "type": "number", + "default": 0, + "required": false + } + }, + { + "access_token_jwks_uri": { + "description": "Specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the access token.", + "type": "string", + "required": false + } + }, + { + "access_token_jwks_uri_client_username": { + "description": "The client username that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_password`", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "access_token_jwks_uri_client_password": { + "type": "string", + "referenceable": true, + "description": "The client password that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_username`", + "encrypted": true, + "required": false + } + }, + { + "access_token_jwks_uri_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "type": "foreign", + "reference": "certificates", + "required": false + } + }, + { + "access_token_jwks_uri_rotate_period": { + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_jwks_uri`. The default value 0 means no auto-rotation.", + "type": "number", + "default": 0, + "required": false + } + }, + { + "access_token_request_header": { + "description": "This parameter tells the name of the header where to look for the access token.", + "type": "string", + "default": "Authorization", + "required": false + } + }, + { + "access_token_leeway": { + "description": "Adjusts clock skew between the token issuer and Kong. The value is added to the token's `exp` claim before checking token expiry against Kong servers' current time in seconds. You can disable access token `expiry` verification altogether with `config.verify_access_token_expiry`.", + "type": "number", + "default": 0, + "required": false + } + }, + { + "access_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.access_token_scopes_claim`.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "access_token_scopes_claim": { + "type": "array", + "description": "Specify the claim in an access token to verify against values of `config.access_token_scopes_required`.", + "default": [ + "scope" + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "access_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (for example, `sub` or `username`) in an access token to Kong consumer entity.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "access_token_consumer_by": { + "type": "array", + "description": "When the plugin tries to apply an access token to a Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of alues. Valid values are `id`, `username`, and `custom_id`.", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "required": false + } + }, + { + "access_token_upstream_header": { + "description": "Removes the `config.access_token_request_header` from the request after reading its value. With `config.access_token_upstream_header`, you can specify the upstream header where the plugin adds the Kong signed token. If you don't specify a value, such as use `null` or `\"\"` (empty string), the plugin does not even try to sign or re-sign the token.", + "type": "string", + "default": "Authorization:Bearer", + "required": false + } + }, + { + "access_token_upstream_leeway": { + "description": "If you want to add or subtract (using a negative value) expiry time (in seconds) of the original access token, you can specify a value that is added to the original access token's `exp` claim.", + "type": "number", + "default": 0, + "required": false + } + }, + { + "access_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter.", + "type": "string", + "required": false + } + }, + { + "access_token_introspection_authorization": { + "description": "If the introspection endpoint requires client authentication (client being the JWT Signer plugin), you can specify the `Authorization` header's value with this configuration parameter.", + "type": "string", + "required": false + } + }, + { + "access_token_introspection_body_args": { + "description": "This parameter allows you to pass URL encoded request body arguments. For example: `resource=` or `a=1&b=&c`.", + "type": "string", + "required": false + } + }, + { + "access_token_introspection_hint": { + "description": "If you need to give `hint` parameter when introspecting an access token, use this parameter to specify the value. By default, the plugin sends `hint=access_token`.", + "type": "string", + "default": "access_token", + "required": false + } + }, + { + "access_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns an access token in one of the keys (or claims) within the introspection results (`JSON`). If the key cannot be found, the plugin responds with `401 Unauthorized`. Also if the key is found but cannot be decoded as JWT, it also responds with `401 Unauthorized`.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "access_token_introspection_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.access_token_introspection_scopes_claim`.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "access_token_introspection_scopes_claim": { + "type": "array", + "description": "Specify the claim/property in access token introspection results (`JSON`) to be verified against values of `config.access_token_introspection_scopes_required`. This supports nested claims. For example, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`, hich can be given as `realm_access,roles` (form post). If the claim is not found in access token introspection results, and you have specified `config.access_token_introspection_scopes_required`, the plugin responds with `403 Forbidden`.", + "default": [ + "scope" + ], + "elements": { + "type": "string" + }, + "required": true + } + }, + { + "access_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in access token introspection results to the Kong consumer entity.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "access_token_introspection_consumer_by": { + "type": "array", + "description": "When the plugin tries to do access token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values.", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "required": false + } + }, + { + "access_token_introspection_leeway": { + "description": "Adjusts clock skew between the token issuer introspection results and Kong. The value is added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time in seconds. You can disable access token introspection `expiry` verification altogether with `config.verify_access_token_introspection_expiry`.", + "type": "number", + "default": 0, + "required": false + } + }, + { + "access_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on access token introspection.", + "type": "number", + "required": false + } + }, + { + "access_token_signing_algorithm": { + "type": "string", + "description": "When this plugin sets the upstream header as specified with `config.access_token_upstream_header`, re-signs the original access token using the private keys of the JWT Signer plugin. Specify the algorithm that is used to sign the token. The `config.access_token_issuer` specifies which `keyset` is used to sign the new token issued by Kong using the specified signing algorithm.", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ], + "default": "RS256", + "required": true + } + }, + { + "add_access_token_claims": { + "type": "map", + "keys": { + "type": "string" + }, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "values": { + "type": "string" + }, + "default": [ + + ], + "required": false + } + }, + { + "set_access_token_claims": { + "type": "map", + "keys": { + "type": "string" + }, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "values": { + "type": "string" + }, + "default": [ + + ], + "required": false + } + }, + { + "remove_access_token_claims": { + "type": "array", + "description": "remove claims. It should be an array, and each element is a claim key string.", + "default": [ + + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "original_access_token_upstream_header": { + "description": "The HTTP header name used to store the original access token.", + "type": "string", + "required": false + } + }, + { + "access_token_optional": { + "description": "If an access token is not provided or no `config.access_token_request_header` is specified, the plugin cannot verify the access token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Use this parameter to allow the request to proceed even when there is no token to check. If the token is provided, then this parameter has no effect", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "verify_access_token_signature": { + "description": "Quickly turn access token signature verification off and on as needed.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "verify_access_token_expiry": { + "description": "Quickly turn access token expiry verification off and on as needed.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "verify_access_token_scopes": { + "description": "Quickly turn off and on the access token required scopes verification, specified with `config.access_token_scopes_required`.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "verify_access_token_introspection_expiry": { + "description": "Quickly turn access token introspection expiry verification off and on as needed.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "verify_access_token_introspection_scopes": { + "description": "Quickly turn off and on the access token introspection scopes verification, specified with `config.access_token_introspection_scopes_required`.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "cache_access_token_introspection": { + "description": "Whether to cache access token introspection results.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "trust_access_token_introspection": { + "description": "Use this parameter to enable and disable further checks on a payload before the new token is signed. If you set this to `true`, the expiry or scopes are not checked on a payload.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "enable_access_token_introspection": { + "description": "If you don't want to support opaque access tokens, change this configuration parameter to `false` to disable introspection.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "channel_token_issuer": { + "description": "The `iss` claim of the re-signed channel token is set to this value, which is `kong` by default. The original `iss` claim of the incoming token (possibly introspected) is stored in the `original_iss` claim of the newly signed channel token.", + "type": "string", + "default": "kong", + "required": false + } + }, + { + "channel_token_keyset": { + "description": "The name of the keyset containing signing keys.", + "type": "string", + "default": "kong", + "required": false + } + }, + { + "channel_token_keyset_client_username": { + "description": "The client username that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_password`", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "channel_token_keyset_client_password": { + "type": "string", + "referenceable": true, + "description": "The client password that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_username`", + "encrypted": true, + "required": false + } + }, + { + "channel_token_keyset_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `channel_token_keyset` is an https uri that requires mTLS Auth.", + "type": "foreign", + "reference": "certificates", + "required": false + } + }, + { + "channel_token_keyset_rotate_period": { + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_keyset`. The default value 0 means no auto-rotation.", + "type": "number", + "default": 0, + "required": false + } + }, + { + "channel_token_jwks_uri": { + "description": "If you want to use `config.verify_channel_token_signature`, you must specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the channel token. If you don't specify a URI and you pass a JWT token to the plugin, then the plugin responds with `401 Unauthorized`.", + "type": "string", + "required": false + } + }, + { + "channel_token_jwks_uri_client_username": { + "description": "The client username that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_password`", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "channel_token_jwks_uri_client_password": { + "type": "string", + "referenceable": true, + "description": "The client password that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_username`", + "encrypted": true, + "required": false + } + }, + { + "channel_token_jwks_uri_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "type": "foreign", + "reference": "certificates", + "required": false + } + }, + { + "channel_token_jwks_uri_rotate_period": { + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_jwks_uri`. The default value 0 means no auto-rotation.", + "type": "number", + "default": 0, + "required": false + } + }, + { + "channel_token_request_header": { + "description": "This parameter tells the name of the header where to look for the channel token. If you don't want to do anything with the channel token, then you can set this to `null` or `\"\"` (empty string).", + "type": "string", + "required": false + } + }, + { + "channel_token_leeway": { + "description": "Adjusts clock skew between the token issuer and Kong. The value will be added to token's `exp` claim before checking token expiry against Kong servers current time in seconds. You can disable channel token `expiry` verification altogether with `config.verify_channel_token_expiry`.", + "type": "number", + "default": 0, + "required": false + } + }, + { + "channel_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.channel_token_scopes_claim`.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "channel_token_scopes_claim": { + "type": "array", + "description": "Specify the claim in a channel token to verify against values of `config.channel_token_scopes_required`. This supports nested claims.", + "default": [ + "scope" + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "channel_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter. Kong consumers have an `id`, a `username`, and a `custom_id`. If this parameter is enabled but the mapping fails, such as when there's a non-existent Kong consumer, the plugin responds with `403 Forbidden`.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "channel_token_consumer_by": { + "description": "When the plugin tries to do channel token to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of valid values: `id`, `username`, and `custom_id`.", + "type": "array", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + } + } + }, + { + "channel_token_upstream_header": { + "description": "This plugin removes the `config.channel_token_request_header` from the request after reading its value.", + "type": "string", + "required": false + } + }, + { + "channel_token_upstream_leeway": { + "description": "If you want to add or perhaps subtract (using negative value) expiry time of the original channel token, you can specify a value that is added to the original channel token's `exp` claim.", + "type": "number", + "default": 0, + "required": false + } + }, + { + "channel_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise, the plugin does not try introspection and returns `401 Unauthorized` instead.", + "type": "string", + "required": false + } + }, + { + "channel_token_introspection_authorization": { + "description": "When using `opaque` channel tokens, and you want to turn on channel token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise the plugin will not try introspection, and instead returns `401 Unauthorized` when using opaque channel tokens.", + "type": "string", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "channel_token_introspection_body_args": { + "description": "If you need to pass additional body arguments to introspection endpoint when the plugin introspects the opaque channel token, you can use this config parameter to specify them. You should URL encode the value. For example: `resource=` or `a=1&b=&c`.", + "type": "string", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "channel_token_introspection_hint": { + "description": "If you need to give `hint` parameter when introspecting a channel token, you can use this parameter to specify the value of such parameter. By default, a `hint` isn't sent with channel token introspection.", + "type": "string", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "channel_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns a channel token in one of the keys (or claims) in the introspection results (`JSON`), the plugin can use that value instead of the introspection results when doing expiry verification and signing of the new token issued by Kong.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "channel_token_introspection_scopes_required": { + "description": "Use this parameter to specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.channel_token_introspection_scopes_claim`.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "channel_token_introspection_scopes_claim": { + "type": "array", + "description": "Use this parameter to specify the claim/property in channel token introspection results (`JSON`) to be verified against values of `config.channel_token_introspection_scopes_required`. This supports nested claims.", + "default": [ + "scope" + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "channel_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in channel token introspection results to Kong consumer entity", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "channel_token_introspection_consumer_by": { + "type": "array", + "description": "When the plugin tries to do channel token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values. Valid values are `id`, `username` and `custom_id`.", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "required": false + } + }, + { + "channel_token_introspection_leeway": { + "description": "You can use this parameter to adjust clock skew between the token issuer introspection results and Kong. The value will be added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time (in seconds). You can disable channel token introspection `expiry` verification altogether with `config.verify_channel_token_introspection_expiry`.", + "type": "number", + "default": 0, + "required": false + } + }, + { + "channel_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on channel token introspection.", + "type": "number", + "required": false + } + }, + { + "channel_token_signing_algorithm": { + "type": "string", + "description": "When this plugin sets the upstream header as specified with `config.channel_token_upstream_header`, it also re-signs the original channel token using private keys of this plugin. Specify the algorithm that is used to sign the token.", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ], + "default": "RS256", + "required": true + } + }, + { + "add_channel_token_claims": { + "type": "map", + "keys": { + "type": "string" + }, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "values": { + "type": "string" + }, + "default": [ + + ], + "required": false + } + }, + { + "set_channel_token_claims": { + "type": "map", + "keys": { + "type": "string" + }, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "values": { + "type": "string" + }, + "default": [ + + ], + "required": false + } + }, + { + "remove_channel_token_claims": { + "type": "array", + "description": "remove claims. It should be an array, and each element is a claim key string.", + "default": [ + + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "original_channel_token_upstream_header": { + "description": "The HTTP header name used to store the original channel token.", + "type": "string", + "required": false + } + }, + { + "channel_token_optional": { + "description": "If a channel token is not provided or no `config.channel_token_request_header` is specified, the plugin cannot verify the channel token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Enable this parameter to allow the request to proceed even when there is no channel token to check. If the channel token is provided, then this parameter has no effect", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "verify_channel_token_signature": { + "description": "Quickly turn on/off the channel token signature verification.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "verify_channel_token_expiry": { + "type": "boolean", + "default": true, + "required": false + } + }, + { + "verify_channel_token_scopes": { + "description": "Quickly turn on/off the channel token required scopes verification specified with `config.channel_token_scopes_required`.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "verify_channel_token_introspection_expiry": { + "description": "Quickly turn on/off the channel token introspection expiry verification.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "verify_channel_token_introspection_scopes": { + "description": "Quickly turn on/off the channel token introspection scopes verification specified with `config.channel_token_introspection_scopes_required`.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "cache_channel_token_introspection": { + "description": "Whether to cache channel token introspection results.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "trust_channel_token_introspection": { + "description": "Providing an opaque channel token for plugin introspection, and verifying expiry and scopes on introspection results may make further payload checks unnecessary before the plugin signs a new token. This also applies when using a JWT token with introspection JSON as per config.channel_token_introspection_jwt_claim. Use this parameter to manage additional payload checks before signing a new token. With true (default), payload's expiry or scopes aren't checked.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "enable_channel_token_introspection": { + "description": "If you don't want to support opaque channel tokens, disable introspection by changing this configuration parameter to `false`.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "add_claims": { + "type": "map", + "keys": { + "type": "string" + }, + "description": "Add customized claims to both tokens if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "values": { + "type": "string" + }, + "default": [ + + ], + "required": false + } + }, + { + "set_claims": { + "type": "map", + "keys": { + "type": "string" + }, + "description": "Set customized claims to both tokens. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "values": { + "type": "string" + }, + "default": [ + + ], + "required": false + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwt-signer/3.11.x.json b/schemas/jwt-signer/3.11.x.json new file mode 100644 index 00000000..9564f583 --- /dev/null +++ b/schemas/jwt-signer/3.11.x.json @@ -0,0 +1,997 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "entity_checks": [ + { + "mutually_required": [ + "access_token_jwks_uri_client_username", + "access_token_jwks_uri_client_password" + ] + }, + { + "mutually_required": [ + "access_token_keyset_client_username", + "access_token_keyset_client_password" + ] + }, + { + "mutually_required": [ + "channel_token_jwks_uri_client_username", + "channel_token_jwks_uri_client_password" + ] + }, + { + "mutually_required": [ + "channel_token_keyset_client_username", + "channel_token_keyset_client_password" + ] + } + ], + "fields": [ + { + "realm": { + "required": false, + "description": "When authentication or authorization fails, or there is an unexpected error, the plugin sends an `WWW-Authenticate` header with the `realm` attribute value.", + "type": "string" + } + }, + { + "enable_hs_signatures": { + "default": false, + "required": false, + "description": "Tokens signed with HMAC algorithms such as `HS256`, `HS384`, or `HS512` are not accepted by default. If you need to accept such tokens for verification, enable this setting.", + "type": "boolean" + } + }, + { + "enable_instrumentation": { + "default": false, + "required": false, + "description": "Writes log entries with some added information using `ngx.CRIT` (CRITICAL) level.", + "type": "boolean" + } + }, + { + "access_token_issuer": { + "default": "kong", + "required": false, + "description": "The `iss` claim of a signed or re-signed access token is set to this value. Original `iss` claim of the incoming token (possibly introspected) is stored in `original_iss` claim of the newly signed access token.", + "type": "string" + } + }, + { + "access_token_keyset": { + "default": "kong", + "required": false, + "description": "The name of the keyset containing signing keys.", + "type": "string" + } + }, + { + "access_token_keyset_client_username": { + "referenceable": true, + "required": false, + "description": "The client username that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_password`", + "type": "string" + } + }, + { + "access_token_keyset_client_password": { + "required": false, + "description": "The client password that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_username`", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "access_token_keyset_client_certificate": { + "required": false, + "reference": "certificates", + "description": "The client certificate that will be used to authenticate Kong if `access_token_keyset` is an https uri that requires mTLS Auth.", + "type": "foreign" + } + }, + { + "access_token_keyset_rotate_period": { + "default": 0, + "required": false, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_keyset`. The default value 0 means no auto-rotation.", + "type": "number" + } + }, + { + "access_token_jwks_uri": { + "required": false, + "description": "Specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the access token.", + "type": "string" + } + }, + { + "access_token_jwks_uri_client_username": { + "referenceable": true, + "required": false, + "description": "The client username that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_password`", + "type": "string" + } + }, + { + "access_token_jwks_uri_client_password": { + "required": false, + "description": "The client password that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_username`", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "access_token_jwks_uri_client_certificate": { + "required": false, + "reference": "certificates", + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "type": "foreign" + } + }, + { + "access_token_jwks_uri_rotate_period": { + "default": 0, + "required": false, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_jwks_uri`. The default value 0 means no auto-rotation.", + "type": "number" + } + }, + { + "access_token_request_header": { + "default": "Authorization", + "required": false, + "description": "This parameter tells the name of the header where to look for the access token.", + "type": "string" + } + }, + { + "access_token_leeway": { + "default": 0, + "required": false, + "description": "Adjusts clock skew between the token issuer and Kong. The value is added to the token's `exp` claim before checking token expiry against Kong servers' current time in seconds. You can disable access token `expiry` verification altogether with `config.verify_access_token_expiry`.", + "type": "number" + } + }, + { + "access_token_scopes_required": { + "type": "array", + "required": false, + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.access_token_scopes_claim`.", + "elements": { + "type": "string" + } + } + }, + { + "access_token_scopes_claim": { + "required": false, + "description": "Specify the claim in an access token to verify against values of `config.access_token_scopes_required`.", + "type": "array", + "default": [ + "scope" + ], + "elements": { + "type": "string" + } + } + }, + { + "access_token_consumer_claim": { + "type": "array", + "required": false, + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (for example, `sub` or `username`) in an access token to Kong consumer entity.", + "elements": { + "type": "string" + } + } + }, + { + "access_token_consumer_by": { + "required": false, + "description": "When the plugin tries to apply an access token to a Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of alues. Valid values are `id`, `username`, and `custom_id`.", + "type": "array", + "default": [ + "username", + "custom_id" + ], + "elements": { + "one_of": [ + "id", + "username", + "custom_id" + ], + "type": "string" + } + } + }, + { + "access_token_upstream_header": { + "default": "Authorization:Bearer", + "required": false, + "description": "Removes the `config.access_token_request_header` from the request after reading its value. With `config.access_token_upstream_header`, you can specify the upstream header where the plugin adds the Kong signed token. If you don't specify a value, such as use `null` or `\"\"` (empty string), the plugin does not even try to sign or re-sign the token.", + "type": "string" + } + }, + { + "access_token_upstream_leeway": { + "default": 0, + "required": false, + "description": "If you want to add or subtract (using a negative value) expiry time (in seconds) of the original access token, you can specify a value that is added to the original access token's `exp` claim.", + "type": "number" + } + }, + { + "access_token_introspection_endpoint": { + "required": false, + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter.", + "type": "string" + } + }, + { + "access_token_introspection_authorization": { + "required": false, + "description": "If the introspection endpoint requires client authentication (client being the JWT Signer plugin), you can specify the `Authorization` header's value with this configuration parameter.", + "type": "string" + } + }, + { + "access_token_introspection_body_args": { + "required": false, + "description": "This parameter allows you to pass URL encoded request body arguments. For example: `resource=` or `a=1&b=&c`.", + "type": "string" + } + }, + { + "access_token_introspection_hint": { + "default": "access_token", + "required": false, + "description": "If you need to give `hint` parameter when introspecting an access token, use this parameter to specify the value. By default, the plugin sends `hint=access_token`.", + "type": "string" + } + }, + { + "access_token_introspection_jwt_claim": { + "type": "array", + "required": false, + "description": "If your introspection endpoint returns an access token in one of the keys (or claims) within the introspection results (`JSON`). If the key cannot be found, the plugin responds with `401 Unauthorized`. Also if the key is found but cannot be decoded as JWT, it also responds with `401 Unauthorized`.", + "elements": { + "type": "string" + } + } + }, + { + "access_token_introspection_scopes_required": { + "type": "array", + "required": false, + "description": "Specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.access_token_introspection_scopes_claim`.", + "elements": { + "type": "string" + } + } + }, + { + "access_token_introspection_scopes_claim": { + "required": true, + "description": "Specify the claim/property in access token introspection results (`JSON`) to be verified against values of `config.access_token_introspection_scopes_required`. This supports nested claims. For example, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`, hich can be given as `realm_access,roles` (form post). If the claim is not found in access token introspection results, and you have specified `config.access_token_introspection_scopes_required`, the plugin responds with `403 Forbidden`.", + "type": "array", + "default": [ + "scope" + ], + "elements": { + "type": "string" + } + } + }, + { + "access_token_introspection_consumer_claim": { + "type": "array", + "required": false, + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in access token introspection results to the Kong consumer entity.", + "elements": { + "type": "string" + } + } + }, + { + "access_token_introspection_consumer_by": { + "required": false, + "description": "When the plugin tries to do access token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values.", + "type": "array", + "default": [ + "username", + "custom_id" + ], + "elements": { + "one_of": [ + "id", + "username", + "custom_id" + ], + "type": "string" + } + } + }, + { + "access_token_introspection_leeway": { + "default": 0, + "required": false, + "description": "Adjusts clock skew between the token issuer introspection results and Kong. The value is added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time in seconds. You can disable access token introspection `expiry` verification altogether with `config.verify_access_token_introspection_expiry`.", + "type": "number" + } + }, + { + "access_token_introspection_timeout": { + "required": false, + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on access token introspection.", + "type": "number" + } + }, + { + "access_token_signing_algorithm": { + "required": true, + "description": "When this plugin sets the upstream header as specified with `config.access_token_upstream_header`, re-signs the original access token using the private keys of the JWT Signer plugin. Specify the algorithm that is used to sign the token. The `config.access_token_issuer` specifies which `keyset` is used to sign the new token issued by Kong using the specified signing algorithm.", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ], + "default": "RS256", + "type": "string" + } + }, + { + "add_access_token_claims": { + "required": false, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "values": { + "type": "string" + }, + "keys": { + "type": "string" + }, + "default": [ + + ], + "type": "map" + } + }, + { + "set_access_token_claims": { + "required": false, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "values": { + "type": "string" + }, + "keys": { + "type": "string" + }, + "default": [ + + ], + "type": "map" + } + }, + { + "remove_access_token_claims": { + "required": false, + "description": "remove claims. It should be an array, and each element is a claim key string.", + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "original_access_token_upstream_header": { + "required": false, + "description": "The HTTP header name used to store the original access token.", + "type": "string" + } + }, + { + "access_token_optional": { + "default": false, + "required": false, + "description": "If an access token is not provided or no `config.access_token_request_header` is specified, the plugin cannot verify the access token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Use this parameter to allow the request to proceed even when there is no token to check. If the token is provided, then this parameter has no effect", + "type": "boolean" + } + }, + { + "verify_access_token_signature": { + "default": true, + "required": false, + "description": "Quickly turn access token signature verification off and on as needed.", + "type": "boolean" + } + }, + { + "verify_access_token_expiry": { + "default": true, + "required": false, + "description": "Quickly turn access token expiry verification off and on as needed.", + "type": "boolean" + } + }, + { + "verify_access_token_scopes": { + "default": true, + "required": false, + "description": "Quickly turn off and on the access token required scopes verification, specified with `config.access_token_scopes_required`.", + "type": "boolean" + } + }, + { + "verify_access_token_introspection_expiry": { + "default": true, + "required": false, + "description": "Quickly turn access token introspection expiry verification off and on as needed.", + "type": "boolean" + } + }, + { + "verify_access_token_introspection_scopes": { + "default": true, + "required": false, + "description": "Quickly turn off and on the access token introspection scopes verification, specified with `config.access_token_introspection_scopes_required`.", + "type": "boolean" + } + }, + { + "cache_access_token_introspection": { + "default": true, + "required": false, + "description": "Whether to cache access token introspection results.", + "type": "boolean" + } + }, + { + "trust_access_token_introspection": { + "default": true, + "required": false, + "description": "Use this parameter to enable and disable further checks on a payload before the new token is signed. If you set this to `true`, the expiry or scopes are not checked on a payload.", + "type": "boolean" + } + }, + { + "enable_access_token_introspection": { + "default": true, + "required": false, + "description": "If you don't want to support opaque access tokens, change this configuration parameter to `false` to disable introspection.", + "type": "boolean" + } + }, + { + "channel_token_issuer": { + "default": "kong", + "required": false, + "description": "The `iss` claim of the re-signed channel token is set to this value, which is `kong` by default. The original `iss` claim of the incoming token (possibly introspected) is stored in the `original_iss` claim of the newly signed channel token.", + "type": "string" + } + }, + { + "channel_token_keyset": { + "default": "kong", + "required": false, + "description": "The name of the keyset containing signing keys.", + "type": "string" + } + }, + { + "channel_token_keyset_client_username": { + "referenceable": true, + "required": false, + "description": "The client username that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_password`", + "type": "string" + } + }, + { + "channel_token_keyset_client_password": { + "required": false, + "description": "The client password that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_username`", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "channel_token_keyset_client_certificate": { + "required": false, + "reference": "certificates", + "description": "The client certificate that will be used to authenticate Kong if `channel_token_keyset` is an https uri that requires mTLS Auth.", + "type": "foreign" + } + }, + { + "channel_token_keyset_rotate_period": { + "default": 0, + "required": false, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_keyset`. The default value 0 means no auto-rotation.", + "type": "number" + } + }, + { + "channel_token_jwks_uri": { + "required": false, + "description": "If you want to use `config.verify_channel_token_signature`, you must specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the channel token. If you don't specify a URI and you pass a JWT token to the plugin, then the plugin responds with `401 Unauthorized`.", + "type": "string" + } + }, + { + "channel_token_jwks_uri_client_username": { + "referenceable": true, + "required": false, + "description": "The client username that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_password`", + "type": "string" + } + }, + { + "channel_token_jwks_uri_client_password": { + "required": false, + "description": "The client password that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_username`", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "channel_token_jwks_uri_client_certificate": { + "required": false, + "reference": "certificates", + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "type": "foreign" + } + }, + { + "channel_token_jwks_uri_rotate_period": { + "default": 0, + "required": false, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_jwks_uri`. The default value 0 means no auto-rotation.", + "type": "number" + } + }, + { + "channel_token_request_header": { + "required": false, + "description": "This parameter tells the name of the header where to look for the channel token. If you don't want to do anything with the channel token, then you can set this to `null` or `\"\"` (empty string).", + "type": "string" + } + }, + { + "channel_token_leeway": { + "default": 0, + "required": false, + "description": "Adjusts clock skew between the token issuer and Kong. The value will be added to token's `exp` claim before checking token expiry against Kong servers current time in seconds. You can disable channel token `expiry` verification altogether with `config.verify_channel_token_expiry`.", + "type": "number" + } + }, + { + "channel_token_scopes_required": { + "type": "array", + "required": false, + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.channel_token_scopes_claim`.", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_scopes_claim": { + "required": false, + "description": "Specify the claim in a channel token to verify against values of `config.channel_token_scopes_required`. This supports nested claims.", + "type": "array", + "default": [ + "scope" + ], + "elements": { + "type": "string" + } + } + }, + { + "channel_token_consumer_claim": { + "type": "array", + "required": false, + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter. Kong consumers have an `id`, a `username`, and a `custom_id`. If this parameter is enabled but the mapping fails, such as when there's a non-existent Kong consumer, the plugin responds with `403 Forbidden`.", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_consumer_by": { + "type": "array", + "description": "When the plugin tries to do channel token to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of valid values: `id`, `username`, and `custom_id`.", + "default": [ + "username", + "custom_id" + ], + "elements": { + "one_of": [ + "id", + "username", + "custom_id" + ], + "type": "string" + } + } + }, + { + "channel_token_upstream_header": { + "required": false, + "description": "This plugin removes the `config.channel_token_request_header` from the request after reading its value.", + "type": "string" + } + }, + { + "channel_token_upstream_leeway": { + "default": 0, + "required": false, + "description": "If you want to add or perhaps subtract (using negative value) expiry time of the original channel token, you can specify a value that is added to the original channel token's `exp` claim.", + "type": "number" + } + }, + { + "channel_token_introspection_endpoint": { + "required": false, + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise, the plugin does not try introspection and returns `401 Unauthorized` instead.", + "type": "string" + } + }, + { + "channel_token_introspection_authorization": { + "type": "string", + "required": false, + "description": "When using `opaque` channel tokens, and you want to turn on channel token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise the plugin will not try introspection, and instead returns `401 Unauthorized` when using opaque channel tokens.", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_body_args": { + "type": "string", + "required": false, + "description": "If you need to pass additional body arguments to introspection endpoint when the plugin introspects the opaque channel token, you can use this config parameter to specify them. You should URL encode the value. For example: `resource=` or `a=1&b=&c`.", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_hint": { + "type": "string", + "required": false, + "description": "If you need to give `hint` parameter when introspecting a channel token, you can use this parameter to specify the value of such parameter. By default, a `hint` isn't sent with channel token introspection.", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_jwt_claim": { + "type": "array", + "required": false, + "description": "If your introspection endpoint returns a channel token in one of the keys (or claims) in the introspection results (`JSON`), the plugin can use that value instead of the introspection results when doing expiry verification and signing of the new token issued by Kong.", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_scopes_required": { + "type": "array", + "required": false, + "description": "Use this parameter to specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.channel_token_introspection_scopes_claim`.", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_scopes_claim": { + "required": false, + "description": "Use this parameter to specify the claim/property in channel token introspection results (`JSON`) to be verified against values of `config.channel_token_introspection_scopes_required`. This supports nested claims.", + "type": "array", + "default": [ + "scope" + ], + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_consumer_claim": { + "type": "array", + "required": false, + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in channel token introspection results to Kong consumer entity", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_consumer_by": { + "required": false, + "description": "When the plugin tries to do channel token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values. Valid values are `id`, `username` and `custom_id`.", + "type": "array", + "default": [ + "username", + "custom_id" + ], + "elements": { + "one_of": [ + "id", + "username", + "custom_id" + ], + "type": "string" + } + } + }, + { + "channel_token_introspection_leeway": { + "default": 0, + "required": false, + "description": "You can use this parameter to adjust clock skew between the token issuer introspection results and Kong. The value will be added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time (in seconds). You can disable channel token introspection `expiry` verification altogether with `config.verify_channel_token_introspection_expiry`.", + "type": "number" + } + }, + { + "channel_token_introspection_timeout": { + "required": false, + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on channel token introspection.", + "type": "number" + } + }, + { + "channel_token_signing_algorithm": { + "required": true, + "description": "When this plugin sets the upstream header as specified with `config.channel_token_upstream_header`, it also re-signs the original channel token using private keys of this plugin. Specify the algorithm that is used to sign the token.", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ], + "default": "RS256", + "type": "string" + } + }, + { + "add_channel_token_claims": { + "required": false, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "values": { + "type": "string" + }, + "keys": { + "type": "string" + }, + "default": [ + + ], + "type": "map" + } + }, + { + "set_channel_token_claims": { + "required": false, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "values": { + "type": "string" + }, + "keys": { + "type": "string" + }, + "default": [ + + ], + "type": "map" + } + }, + { + "remove_channel_token_claims": { + "required": false, + "description": "remove claims. It should be an array, and each element is a claim key string.", + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "original_channel_token_upstream_header": { + "required": false, + "description": "The HTTP header name used to store the original channel token.", + "type": "string" + } + }, + { + "channel_token_optional": { + "default": false, + "required": false, + "description": "If a channel token is not provided or no `config.channel_token_request_header` is specified, the plugin cannot verify the channel token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Enable this parameter to allow the request to proceed even when there is no channel token to check. If the channel token is provided, then this parameter has no effect", + "type": "boolean" + } + }, + { + "verify_channel_token_signature": { + "default": true, + "required": false, + "description": "Quickly turn on/off the channel token signature verification.", + "type": "boolean" + } + }, + { + "verify_channel_token_expiry": { + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "verify_channel_token_scopes": { + "default": true, + "required": false, + "description": "Quickly turn on/off the channel token required scopes verification specified with `config.channel_token_scopes_required`.", + "type": "boolean" + } + }, + { + "verify_channel_token_introspection_expiry": { + "default": true, + "required": false, + "description": "Quickly turn on/off the channel token introspection expiry verification.", + "type": "boolean" + } + }, + { + "verify_channel_token_introspection_scopes": { + "default": true, + "required": false, + "description": "Quickly turn on/off the channel token introspection scopes verification specified with `config.channel_token_introspection_scopes_required`.", + "type": "boolean" + } + }, + { + "cache_channel_token_introspection": { + "default": true, + "required": false, + "description": "Whether to cache channel token introspection results.", + "type": "boolean" + } + }, + { + "trust_channel_token_introspection": { + "default": true, + "required": false, + "description": "Providing an opaque channel token for plugin introspection, and verifying expiry and scopes on introspection results may make further payload checks unnecessary before the plugin signs a new token. This also applies when using a JWT token with introspection JSON as per config.channel_token_introspection_jwt_claim. Use this parameter to manage additional payload checks before signing a new token. With true (default), payload's expiry or scopes aren't checked.", + "type": "boolean" + } + }, + { + "enable_channel_token_introspection": { + "default": true, + "required": false, + "description": "If you don't want to support opaque channel tokens, disable introspection by changing this configuration parameter to `false`.", + "type": "boolean" + } + }, + { + "add_claims": { + "required": false, + "description": "Add customized claims to both tokens if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "values": { + "type": "string" + }, + "keys": { + "type": "string" + }, + "default": [ + + ], + "type": "map" + } + }, + { + "set_claims": { + "required": false, + "description": "Set customized claims to both tokens. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "values": { + "type": "string" + }, + "keys": { + "type": "string" + }, + "default": [ + + ], + "type": "map" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.access_token_upstream_header", + "config.channel_token_upstream_header", + "config.original_access_token_upstream_header", + "config.original_channel_token_upstream_header" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwt-signer/3.12.x.json b/schemas/jwt-signer/3.12.x.json new file mode 100644 index 00000000..701eee75 --- /dev/null +++ b/schemas/jwt-signer/3.12.x.json @@ -0,0 +1,981 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.access_token_upstream_header", + "config.channel_token_upstream_header", + "config.original_access_token_upstream_header", + "config.original_channel_token_upstream_header" + ] + } + } + ], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "realm": { + "type": "string", + "description": "When authentication or authorization fails, or there is an unexpected error, the plugin sends an `WWW-Authenticate` header with the `realm` attribute value.", + "required": false + } + }, + { + "enable_hs_signatures": { + "type": "boolean", + "default": false, + "description": "Tokens signed with HMAC algorithms such as `HS256`, `HS384`, or `HS512` are not accepted by default. If you need to accept such tokens for verification, enable this setting.", + "required": false + } + }, + { + "enable_instrumentation": { + "type": "boolean", + "default": false, + "description": "Writes log entries with some added information using `ngx.CRIT` (CRITICAL) level.", + "required": false + } + }, + { + "access_token_issuer": { + "type": "string", + "default": "kong", + "description": "The `iss` claim of a signed or re-signed access token is set to this value. Original `iss` claim of the incoming token (possibly introspected) is stored in `original_iss` claim of the newly signed access token.", + "required": false + } + }, + { + "access_token_keyset": { + "type": "string", + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "required": false + } + }, + { + "access_token_keyset_client_username": { + "type": "string", + "description": "The client username that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_password`", + "referenceable": true, + "required": false + } + }, + { + "access_token_keyset_client_password": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "The client password that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_username`" + } + }, + { + "access_token_keyset_client_certificate": { + "type": "foreign", + "reference": "certificates", + "description": "The client certificate that will be used to authenticate Kong if `access_token_keyset` is an https uri that requires mTLS Auth.", + "required": false + } + }, + { + "access_token_keyset_rotate_period": { + "type": "number", + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_keyset`. The default value 0 means no auto-rotation.", + "required": false + } + }, + { + "access_token_jwks_uri": { + "description": "Specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the access token.", + "type": "string", + "required": false + } + }, + { + "access_token_jwks_uri_client_username": { + "type": "string", + "description": "The client username that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_password`", + "referenceable": true, + "required": false + } + }, + { + "access_token_jwks_uri_client_password": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "The client password that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_username`" + } + }, + { + "access_token_jwks_uri_client_certificate": { + "type": "foreign", + "reference": "certificates", + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "required": false + } + }, + { + "access_token_jwks_uri_rotate_period": { + "type": "number", + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_jwks_uri`. The default value 0 means no auto-rotation.", + "required": false + } + }, + { + "access_token_request_header": { + "type": "string", + "default": "Authorization", + "description": "This parameter tells the name of the header where to look for the access token.", + "required": false + } + }, + { + "access_token_leeway": { + "type": "number", + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value is added to the token's `exp` claim before checking token expiry against Kong servers' current time in seconds. You can disable access token `expiry` verification altogether with `config.verify_access_token_expiry`.", + "required": false + } + }, + { + "access_token_scopes_required": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.access_token_scopes_claim`.", + "required": false + } + }, + { + "access_token_scopes_claim": { + "type": "array", + "required": false, + "description": "Specify the claim in an access token to verify against values of `config.access_token_scopes_required`.", + "default": [ + "scope" + ], + "elements": { + "type": "string" + } + } + }, + { + "access_token_consumer_claim": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (for example, `sub` or `username`) in an access token to Kong consumer entity.", + "required": false + } + }, + { + "access_token_consumer_by": { + "type": "array", + "required": false, + "description": "When the plugin tries to apply an access token to a Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of alues. Valid values are `id`, `username`, and `custom_id`.", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + } + } + }, + { + "access_token_upstream_header": { + "type": "string", + "default": "Authorization:Bearer", + "description": "Removes the `config.access_token_request_header` from the request after reading its value. With `config.access_token_upstream_header`, you can specify the upstream header where the plugin adds the Kong signed token. If you don't specify a value, such as use `null` or `\"\"` (empty string), the plugin does not even try to sign or re-sign the token.", + "required": false + } + }, + { + "access_token_upstream_leeway": { + "type": "number", + "default": 0, + "description": "If you want to add or subtract (using a negative value) expiry time (in seconds) of the original access token, you can specify a value that is added to the original access token's `exp` claim.", + "required": false + } + }, + { + "access_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter.", + "type": "string", + "required": false + } + }, + { + "access_token_introspection_authorization": { + "type": "string", + "description": "If the introspection endpoint requires client authentication (client being the JWT Signer plugin), you can specify the `Authorization` header's value with this configuration parameter.", + "required": false + } + }, + { + "access_token_introspection_body_args": { + "type": "string", + "description": "This parameter allows you to pass URL encoded request body arguments. For example: `resource=` or `a=1&b=&c`.", + "required": false + } + }, + { + "access_token_introspection_hint": { + "type": "string", + "default": "access_token", + "description": "If you need to give `hint` parameter when introspecting an access token, use this parameter to specify the value. By default, the plugin sends `hint=access_token`.", + "required": false + } + }, + { + "access_token_introspection_jwt_claim": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "If your introspection endpoint returns an access token in one of the keys (or claims) within the introspection results (`JSON`). If the key cannot be found, the plugin responds with `401 Unauthorized`. Also if the key is found but cannot be decoded as JWT, it also responds with `401 Unauthorized`.", + "required": false + } + }, + { + "access_token_introspection_scopes_required": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "Specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.access_token_introspection_scopes_claim`.", + "required": false + } + }, + { + "access_token_introspection_scopes_claim": { + "type": "array", + "required": true, + "description": "Specify the claim/property in access token introspection results (`JSON`) to be verified against values of `config.access_token_introspection_scopes_required`. This supports nested claims. For example, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`, hich can be given as `realm_access,roles` (form post). If the claim is not found in access token introspection results, and you have specified `config.access_token_introspection_scopes_required`, the plugin responds with `403 Forbidden`.", + "default": [ + "scope" + ], + "elements": { + "type": "string" + } + } + }, + { + "access_token_introspection_consumer_claim": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in access token introspection results to the Kong consumer entity.", + "required": false + } + }, + { + "access_token_introspection_consumer_by": { + "type": "array", + "required": false, + "description": "When the plugin tries to do access token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values.", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + } + } + }, + { + "access_token_introspection_leeway": { + "type": "number", + "default": 0, + "description": "Adjusts clock skew between the token issuer introspection results and Kong. The value is added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time in seconds. You can disable access token introspection `expiry` verification altogether with `config.verify_access_token_introspection_expiry`.", + "required": false + } + }, + { + "access_token_introspection_timeout": { + "type": "number", + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on access token introspection.", + "required": false + } + }, + { + "access_token_signing_algorithm": { + "type": "string", + "required": true, + "description": "When this plugin sets the upstream header as specified with `config.access_token_upstream_header`, re-signs the original access token using the private keys of the JWT Signer plugin. Specify the algorithm that is used to sign the token. The `config.access_token_issuer` specifies which `keyset` is used to sign the new token issued by Kong using the specified signing algorithm.", + "default": "RS256", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ] + } + }, + { + "add_access_token_claims": { + "type": "map", + "required": false, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "default": [], + "values": { + "type": "string" + }, + "keys": { + "type": "string" + } + } + }, + { + "set_access_token_claims": { + "type": "map", + "required": false, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "default": [], + "values": { + "type": "string" + }, + "keys": { + "type": "string" + } + } + }, + { + "remove_access_token_claims": { + "type": "array", + "required": false, + "description": "remove claims. It should be an array, and each element is a claim key string.", + "default": [], + "elements": { + "type": "string" + } + } + }, + { + "original_access_token_upstream_header": { + "type": "string", + "description": "The HTTP header name used to store the original access token.", + "required": false + } + }, + { + "access_token_optional": { + "type": "boolean", + "default": false, + "description": "If an access token is not provided or no `config.access_token_request_header` is specified, the plugin cannot verify the access token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Use this parameter to allow the request to proceed even when there is no token to check. If the token is provided, then this parameter has no effect", + "required": false + } + }, + { + "verify_access_token_signature": { + "type": "boolean", + "default": true, + "description": "Quickly turn access token signature verification off and on as needed.", + "required": false + } + }, + { + "verify_access_token_expiry": { + "type": "boolean", + "default": true, + "description": "Quickly turn access token expiry verification off and on as needed.", + "required": false + } + }, + { + "verify_access_token_scopes": { + "type": "boolean", + "default": true, + "description": "Quickly turn off and on the access token required scopes verification, specified with `config.access_token_scopes_required`.", + "required": false + } + }, + { + "verify_access_token_introspection_expiry": { + "type": "boolean", + "default": true, + "description": "Quickly turn access token introspection expiry verification off and on as needed.", + "required": false + } + }, + { + "verify_access_token_introspection_scopes": { + "type": "boolean", + "default": true, + "description": "Quickly turn off and on the access token introspection scopes verification, specified with `config.access_token_introspection_scopes_required`.", + "required": false + } + }, + { + "cache_access_token_introspection": { + "type": "boolean", + "default": true, + "description": "Whether to cache access token introspection results.", + "required": false + } + }, + { + "trust_access_token_introspection": { + "type": "boolean", + "default": true, + "description": "Use this parameter to enable and disable further checks on a payload before the new token is signed. If you set this to `true`, the expiry or scopes are not checked on a payload.", + "required": false + } + }, + { + "enable_access_token_introspection": { + "type": "boolean", + "default": true, + "description": "If you don't want to support opaque access tokens, change this configuration parameter to `false` to disable introspection.", + "required": false + } + }, + { + "channel_token_issuer": { + "type": "string", + "default": "kong", + "description": "The `iss` claim of the re-signed channel token is set to this value, which is `kong` by default. The original `iss` claim of the incoming token (possibly introspected) is stored in the `original_iss` claim of the newly signed channel token.", + "required": false + } + }, + { + "channel_token_keyset": { + "type": "string", + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "required": false + } + }, + { + "channel_token_keyset_client_username": { + "type": "string", + "description": "The client username that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_password`", + "referenceable": true, + "required": false + } + }, + { + "channel_token_keyset_client_password": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "The client password that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_username`" + } + }, + { + "channel_token_keyset_client_certificate": { + "type": "foreign", + "reference": "certificates", + "description": "The client certificate that will be used to authenticate Kong if `channel_token_keyset` is an https uri that requires mTLS Auth.", + "required": false + } + }, + { + "channel_token_keyset_rotate_period": { + "type": "number", + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_keyset`. The default value 0 means no auto-rotation.", + "required": false + } + }, + { + "channel_token_jwks_uri": { + "description": "If you want to use `config.verify_channel_token_signature`, you must specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the channel token. If you don't specify a URI and you pass a JWT token to the plugin, then the plugin responds with `401 Unauthorized`.", + "type": "string", + "required": false + } + }, + { + "channel_token_jwks_uri_client_username": { + "type": "string", + "description": "The client username that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_password`", + "referenceable": true, + "required": false + } + }, + { + "channel_token_jwks_uri_client_password": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "The client password that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_username`" + } + }, + { + "channel_token_jwks_uri_client_certificate": { + "type": "foreign", + "reference": "certificates", + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "required": false + } + }, + { + "channel_token_jwks_uri_rotate_period": { + "type": "number", + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_jwks_uri`. The default value 0 means no auto-rotation.", + "required": false + } + }, + { + "channel_token_request_header": { + "type": "string", + "description": "This parameter tells the name of the header where to look for the channel token. If you don't want to do anything with the channel token, then you can set this to `null` or `\"\"` (empty string).", + "required": false + } + }, + { + "channel_token_leeway": { + "type": "number", + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value will be added to token's `exp` claim before checking token expiry against Kong servers current time in seconds. You can disable channel token `expiry` verification altogether with `config.verify_channel_token_expiry`.", + "required": false + } + }, + { + "channel_token_scopes_required": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.channel_token_scopes_claim`.", + "required": false + } + }, + { + "channel_token_scopes_claim": { + "type": "array", + "required": false, + "description": "Specify the claim in a channel token to verify against values of `config.channel_token_scopes_required`. This supports nested claims.", + "default": [ + "scope" + ], + "elements": { + "type": "string" + } + } + }, + { + "channel_token_consumer_claim": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter. Kong consumers have an `id`, a `username`, and a `custom_id`. If this parameter is enabled but the mapping fails, such as when there's a non-existent Kong consumer, the plugin responds with `403 Forbidden`.", + "required": false + } + }, + { + "channel_token_consumer_by": { + "type": "array", + "default": [ + "username", + "custom_id" + ], + "description": "When the plugin tries to do channel token to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of valid values: `id`, `username`, and `custom_id`.", + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + } + } + }, + { + "channel_token_upstream_header": { + "type": "string", + "description": "This plugin removes the `config.channel_token_request_header` from the request after reading its value.", + "required": false + } + }, + { + "channel_token_upstream_leeway": { + "type": "number", + "default": 0, + "description": "If you want to add or perhaps subtract (using negative value) expiry time of the original channel token, you can specify a value that is added to the original channel token's `exp` claim.", + "required": false + } + }, + { + "channel_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise, the plugin does not try introspection and returns `401 Unauthorized` instead.", + "type": "string", + "required": false + } + }, + { + "channel_token_introspection_authorization": { + "type": "string", + "elements": { + "type": "string" + }, + "description": "When using `opaque` channel tokens, and you want to turn on channel token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise the plugin will not try introspection, and instead returns `401 Unauthorized` when using opaque channel tokens.", + "required": false + } + }, + { + "channel_token_introspection_body_args": { + "type": "string", + "elements": { + "type": "string" + }, + "description": "If you need to pass additional body arguments to introspection endpoint when the plugin introspects the opaque channel token, you can use this config parameter to specify them. You should URL encode the value. For example: `resource=` or `a=1&b=&c`.", + "required": false + } + }, + { + "channel_token_introspection_hint": { + "type": "string", + "elements": { + "type": "string" + }, + "description": "If you need to give `hint` parameter when introspecting a channel token, you can use this parameter to specify the value of such parameter. By default, a `hint` isn't sent with channel token introspection.", + "required": false + } + }, + { + "channel_token_introspection_jwt_claim": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "If your introspection endpoint returns a channel token in one of the keys (or claims) in the introspection results (`JSON`), the plugin can use that value instead of the introspection results when doing expiry verification and signing of the new token issued by Kong.", + "required": false + } + }, + { + "channel_token_introspection_scopes_required": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "Use this parameter to specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.channel_token_introspection_scopes_claim`.", + "required": false + } + }, + { + "channel_token_introspection_scopes_claim": { + "type": "array", + "required": false, + "description": "Use this parameter to specify the claim/property in channel token introspection results (`JSON`) to be verified against values of `config.channel_token_introspection_scopes_required`. This supports nested claims.", + "default": [ + "scope" + ], + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_consumer_claim": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in channel token introspection results to Kong consumer entity", + "required": false + } + }, + { + "channel_token_introspection_consumer_by": { + "type": "array", + "required": false, + "description": "When the plugin tries to do channel token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values. Valid values are `id`, `username` and `custom_id`.", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + } + } + }, + { + "channel_token_introspection_leeway": { + "type": "number", + "default": 0, + "description": "You can use this parameter to adjust clock skew between the token issuer introspection results and Kong. The value will be added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time (in seconds). You can disable channel token introspection `expiry` verification altogether with `config.verify_channel_token_introspection_expiry`.", + "required": false + } + }, + { + "channel_token_introspection_timeout": { + "type": "number", + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on channel token introspection.", + "required": false + } + }, + { + "channel_token_signing_algorithm": { + "type": "string", + "required": true, + "description": "When this plugin sets the upstream header as specified with `config.channel_token_upstream_header`, it also re-signs the original channel token using private keys of this plugin. Specify the algorithm that is used to sign the token.", + "default": "RS256", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ] + } + }, + { + "add_channel_token_claims": { + "type": "map", + "required": false, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "default": [], + "values": { + "type": "string" + }, + "keys": { + "type": "string" + } + } + }, + { + "set_channel_token_claims": { + "type": "map", + "required": false, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "default": [], + "values": { + "type": "string" + }, + "keys": { + "type": "string" + } + } + }, + { + "remove_channel_token_claims": { + "type": "array", + "required": false, + "description": "remove claims. It should be an array, and each element is a claim key string.", + "default": [], + "elements": { + "type": "string" + } + } + }, + { + "original_channel_token_upstream_header": { + "type": "string", + "description": "The HTTP header name used to store the original channel token.", + "required": false + } + }, + { + "channel_token_optional": { + "type": "boolean", + "default": false, + "description": "If a channel token is not provided or no `config.channel_token_request_header` is specified, the plugin cannot verify the channel token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Enable this parameter to allow the request to proceed even when there is no channel token to check. If the channel token is provided, then this parameter has no effect", + "required": false + } + }, + { + "verify_channel_token_signature": { + "type": "boolean", + "default": true, + "description": "Quickly turn on/off the channel token signature verification.", + "required": false + } + }, + { + "verify_channel_token_expiry": { + "type": "boolean", + "default": true, + "required": false + } + }, + { + "verify_channel_token_scopes": { + "type": "boolean", + "default": true, + "description": "Quickly turn on/off the channel token required scopes verification specified with `config.channel_token_scopes_required`.", + "required": false + } + }, + { + "verify_channel_token_introspection_expiry": { + "type": "boolean", + "default": true, + "description": "Quickly turn on/off the channel token introspection expiry verification.", + "required": false + } + }, + { + "verify_channel_token_introspection_scopes": { + "type": "boolean", + "default": true, + "description": "Quickly turn on/off the channel token introspection scopes verification specified with `config.channel_token_introspection_scopes_required`.", + "required": false + } + }, + { + "cache_channel_token_introspection": { + "type": "boolean", + "default": true, + "description": "Whether to cache channel token introspection results.", + "required": false + } + }, + { + "trust_channel_token_introspection": { + "type": "boolean", + "default": true, + "description": "Providing an opaque channel token for plugin introspection, and verifying expiry and scopes on introspection results may make further payload checks unnecessary before the plugin signs a new token. This also applies when using a JWT token with introspection JSON as per config.channel_token_introspection_jwt_claim. Use this parameter to manage additional payload checks before signing a new token. With true (default), payload's expiry or scopes aren't checked.", + "required": false + } + }, + { + "enable_channel_token_introspection": { + "type": "boolean", + "default": true, + "description": "If you don't want to support opaque channel tokens, disable introspection by changing this configuration parameter to `false`.", + "required": false + } + }, + { + "add_claims": { + "type": "map", + "required": false, + "description": "Add customized claims to both tokens if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "default": [], + "values": { + "type": "string" + }, + "keys": { + "type": "string" + } + } + }, + { + "set_claims": { + "type": "map", + "required": false, + "description": "Set customized claims to both tokens. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "default": [], + "values": { + "type": "string" + }, + "keys": { + "type": "string" + } + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "access_token_jwks_uri_client_username", + "access_token_jwks_uri_client_password" + ] + }, + { + "mutually_required": [ + "access_token_keyset_client_username", + "access_token_keyset_client_password" + ] + }, + { + "mutually_required": [ + "channel_token_jwks_uri_client_username", + "channel_token_jwks_uri_client_password" + ] + }, + { + "mutually_required": [ + "channel_token_keyset_client_username", + "channel_token_keyset_client_password" + ] + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwt-signer/3.4.x.json b/schemas/jwt-signer/3.4.x.json index 7e889bba..1352e33a 100644 --- a/schemas/jwt-signer/3.4.x.json +++ b/schemas/jwt-signer/3.4.x.json @@ -2,6 +2,7 @@ "fields": [ { "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, "reference": "consumers", "type": "foreign" @@ -9,85 +10,102 @@ }, { "protocols": { - "default": [ - "grpc", - "grpcs", - "http", - "https" - ], + "description": "A set of strings representing HTTP protocols.", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" + ] }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], "required": true, "type": "set" } }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, { "config": { - "required": true, "fields": [ { "realm": { - "type": "string", - "required": false + "description": "When authentication or authorization fails, or there is an unexpected error, the plugin sends an `WWW-Authenticate` header with the `realm` attribute value.", + "required": false, + "type": "string" } }, { "enable_hs_signatures": { "default": false, "required": false, - "type": "boolean" + "type": "boolean", + "description": "Tokens signed with HMAC algorithms such as `HS256`, `HS384`, or `HS512` are not accepted by default. If you need to accept such tokens for verification, enable this setting." } }, { "enable_instrumentation": { "default": false, "required": false, - "type": "boolean" + "type": "boolean", + "description": "Writes log entries with some added information using `ngx.CRIT` (CRITICAL) level." } }, { "access_token_issuer": { "default": "kong", "required": false, - "type": "string" + "type": "string", + "description": "The `iss` claim of a signed or re-signed access token is set to this value. Original `iss` claim of the incoming token (possibly introspected) is stored in `original_iss` claim of the newly signed access token." } }, { "access_token_keyset": { "default": "kong", "required": false, - "type": "string" + "type": "string", + "description": "The name of the keyset containing signing keys." } }, { "access_token_jwks_uri": { - "type": "string", - "required": false + "description": "Specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the access token.", + "required": false, + "type": "string" } }, { "access_token_request_header": { "default": "Authorization", "required": false, - "type": "string" + "type": "string", + "description": "This parameter tells the name of the header where to look for the access token." } }, { "access_token_leeway": { "default": 0, "required": false, - "type": "number" + "type": "number", + "description": "Adjusts clock skew between the token issuer and Kong. The value is added to the token's `exp` claim before checking token expiry against Kong servers' current time in seconds. You can disable access token `expiry` verification altogether with `config.verify_access_token_expiry`." } }, { "access_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.access_token_scopes_claim`.", "required": false, "type": "array", "elements": { @@ -97,18 +115,20 @@ }, { "access_token_scopes_claim": { + "description": "Specify the claim in an access token to verify against values of `config.access_token_scopes_required`.", "elements": { "type": "string" }, "default": [ "scope" ], - "type": "array", - "required": false + "required": false, + "type": "array" } }, { "access_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (for example, `sub` or `username`) in an access token to Kong consumer entity.", "required": false, "type": "array", "elements": { @@ -118,63 +138,71 @@ }, { "access_token_consumer_by": { + "description": "When the plugin tries to apply an access token to a Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of alues. Valid values are `id`, `username`, and `custom_id`.", "elements": { + "type": "string", "one_of": [ "id", "username", "custom_id" - ], - "type": "string" + ] }, "default": [ "username", "custom_id" ], - "type": "array", - "required": false + "required": false, + "type": "array" } }, { "access_token_upstream_header": { "default": "Authorization:Bearer", "required": false, - "type": "string" + "type": "string", + "description": "Removes the `config.access_token_request_header` from the request after reading its value. With `config.access_token_upstream_header`, you can specify the upstream header where the plugin adds the Kong signed token. If you don't specify a value, such as use `null` or `\"\"` (empty string), the plugin does not even try to sign or re-sign the token." } }, { "access_token_upstream_leeway": { "default": 0, "required": false, - "type": "number" + "type": "number", + "description": "If you want to add or subtract (using a negative value) expiry time (in seconds) of the original access token, you can specify a value that is added to the original access token's `exp` claim." } }, { "access_token_introspection_endpoint": { - "type": "string", - "required": false + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter.", + "required": false, + "type": "string" } }, { "access_token_introspection_authorization": { - "type": "string", - "required": false + "description": "If the introspection endpoint requires client authentication (client being the JWT Signer plugin), you can specify the `Authorization` header's value with this configuration parameter.", + "required": false, + "type": "string" } }, { "access_token_introspection_body_args": { - "type": "string", - "required": false + "description": "This parameter allows you to pass URL encoded request body arguments. For example: `resource=` or `a=1&b=&c`.", + "required": false, + "type": "string" } }, { "access_token_introspection_hint": { "default": "access_token", "required": false, - "type": "string" + "type": "string", + "description": "If you need to give `hint` parameter when introspecting an access token, use this parameter to specify the value. By default, the plugin sends `hint=access_token`." } }, { "access_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns an access token in one of the keys (or claims) within the introspection results (`JSON`). If the key cannot be found, the plugin responds with `401 Unauthorized`. Also if the key is found but cannot be decoded as JWT, it also responds with `401 Unauthorized`.", "required": false, "type": "array", "elements": { @@ -184,6 +212,7 @@ }, { "access_token_introspection_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.access_token_introspection_scopes_claim`.", "required": false, "type": "array", "elements": { @@ -193,18 +222,20 @@ }, { "access_token_introspection_scopes_claim": { + "description": "Specify the claim/property in access token introspection results (`JSON`) to be verified against values of `config.access_token_introspection_scopes_required`. This supports nested claims. For example, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`, hich can be given as `realm_access,roles` (form post). If the claim is not found in access token introspection results, and you have specified `config.access_token_introspection_scopes_required`, the plugin responds with `403 Forbidden`.", "elements": { "type": "string" }, "default": [ "scope" ], - "type": "array", - "required": true + "required": true, + "type": "array" } }, { "access_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in access token introspection results to the Kong consumer entity.", "required": false, "type": "array", "elements": { @@ -214,38 +245,41 @@ }, { "access_token_introspection_consumer_by": { + "description": "When the plugin tries to do access token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values.", "elements": { + "type": "string", "one_of": [ "id", "username", "custom_id" - ], - "type": "string" + ] }, "default": [ "username", "custom_id" ], - "type": "array", - "required": false + "required": false, + "type": "array" } }, { "access_token_introspection_leeway": { "default": 0, "required": false, - "type": "number" + "type": "number", + "description": "Adjusts clock skew between the token issuer introspection results and Kong. The value is added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time in seconds. You can disable access token introspection `expiry` verification altogether with `config.verify_access_token_introspection_expiry`." } }, { "access_token_introspection_timeout": { - "type": "number", - "required": false + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on access token introspection.", + "required": false, + "type": "number" } }, { "access_token_signing_algorithm": { - "type": "string", + "description": "When this plugin sets the upstream header as specified with `config.access_token_upstream_header`, re-signs the original access token using the private keys of the JWT Signer plugin. Specify the algorithm that is used to sign the token. The `config.access_token_issuer` specifies which `keyset` is used to sign the new token issued by Kong using the specified signing algorithm.", "one_of": [ "HS256", "HS384", @@ -261,107 +295,123 @@ "EdDSA" ], "default": "RS256", - "required": true + "required": true, + "type": "string" } }, { "access_token_optional": { "default": false, "required": false, - "type": "boolean" + "type": "boolean", + "description": "If an access token is not provided or no `config.access_token_request_header` is specified, the plugin cannot verify the access token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Use this parameter to allow the request to proceed even when there is no token to check. If the token is provided, then this parameter has no effect" } }, { "verify_access_token_signature": { "default": true, "required": false, - "type": "boolean" + "type": "boolean", + "description": "Quickly turn access token signature verification off and on as needed." } }, { "verify_access_token_expiry": { "default": true, "required": false, - "type": "boolean" + "type": "boolean", + "description": "Quickly turn access token expiry verification off and on as needed." } }, { "verify_access_token_scopes": { "default": true, "required": false, - "type": "boolean" + "type": "boolean", + "description": "Quickly turn off and on the access token required scopes verification, specified with `config.access_token_scopes_required`." } }, { "verify_access_token_introspection_expiry": { "default": true, "required": false, - "type": "boolean" + "type": "boolean", + "description": "Quickly turn access token introspection expiry verification off and on as needed." } }, { "verify_access_token_introspection_scopes": { "default": true, "required": false, - "type": "boolean" + "type": "boolean", + "description": "Quickly turn off and on the access token introspection scopes verification, specified with `config.access_token_introspection_scopes_required`." } }, { "cache_access_token_introspection": { "default": true, "required": false, - "type": "boolean" + "type": "boolean", + "description": "Whether to cache access token introspection results." } }, { "trust_access_token_introspection": { "default": true, "required": false, - "type": "boolean" + "type": "boolean", + "description": "Use this parameter to enable and disable further checks on a payload before the new token is signed. If you set this to `true`, the expiry or scopes are not checked on a payload." } }, { "enable_access_token_introspection": { "default": true, "required": false, - "type": "boolean" + "type": "boolean", + "description": "If you don't want to support opaque access tokens, change this configuration parameter to `false` to disable introspection." } }, { "channel_token_issuer": { "default": "kong", "required": false, - "type": "string" + "type": "string", + "description": "The `iss` claim of the re-signed channel token is set to this value, which is `kong` by default. The original `iss` claim of the incoming token (possibly introspected) is stored in the `original_iss` claim of the newly signed channel token." } }, { "channel_token_keyset": { "default": "kong", "required": false, - "type": "string" + "type": "string", + "description": "The name of the keyset containing signing keys." } }, { "channel_token_jwks_uri": { - "type": "string", - "required": false + "description": "If you want to use `config.verify_channel_token_signature`, you must specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the channel token. If you don't specify a URI and you pass a JWT token to the plugin, then the plugin responds with `401 Unauthorized`.", + "required": false, + "type": "string" } }, { "channel_token_request_header": { - "type": "string", - "required": false + "description": "This parameter tells the name of the header where to look for the channel token. If you don't want to do anything with the channel token, then you can set this to `null` or `\"\"` (empty string).", + "required": false, + "type": "string" } }, { "channel_token_leeway": { "default": 0, "required": false, - "type": "number" + "type": "number", + "description": "Adjusts clock skew between the token issuer and Kong. The value will be added to token's `exp` claim before checking token expiry against Kong servers current time in seconds. You can disable channel token `expiry` verification altogether with `config.verify_channel_token_expiry`." } }, { "channel_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.channel_token_scopes_claim`.", "required": false, "type": "array", "elements": { @@ -371,18 +421,20 @@ }, { "channel_token_scopes_claim": { + "description": "Specify the claim in a channel token to verify against values of `config.channel_token_scopes_required`. This supports nested claims.", "elements": { "type": "string" }, "default": [ "scope" ], - "type": "array", - "required": false + "required": false, + "type": "array" } }, { "channel_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter. Kong consumers have an `id`, a `username`, and a `custom_id`. If this parameter is enabled but the mapping fails, such as when there's a non-existent Kong consumer, the plugin responds with `403 Forbidden`.", "required": false, "type": "array", "elements": { @@ -392,15 +444,16 @@ }, { "channel_token_consumer_by": { - "type": "array", + "description": "When the plugin tries to do channel token to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of valid values: `id`, `username`, and `custom_id`.", "elements": { + "type": "string", "one_of": [ "id", "username", "custom_id" - ], - "type": "string" + ] }, + "type": "array", "default": [ "username", "custom_id" @@ -409,25 +462,29 @@ }, { "channel_token_upstream_header": { - "type": "string", - "required": false + "description": "This plugin removes the `config.channel_token_request_header` from the request after reading its value.", + "required": false, + "type": "string" } }, { "channel_token_upstream_leeway": { "default": 0, "required": false, - "type": "number" + "type": "number", + "description": "If you want to add or perhaps subtract (using negative value) expiry time of the original channel token, you can specify a value that is added to the original channel token's `exp` claim." } }, { "channel_token_introspection_endpoint": { - "type": "string", - "required": false + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise, the plugin does not try introspection and returns `401 Unauthorized` instead.", + "required": false, + "type": "string" } }, { "channel_token_introspection_authorization": { + "description": "When using `opaque` channel tokens, and you want to turn on channel token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise the plugin will not try introspection, and instead returns `401 Unauthorized` when using opaque channel tokens.", "required": false, "type": "string", "elements": { @@ -437,6 +494,7 @@ }, { "channel_token_introspection_body_args": { + "description": "If you need to pass additional body arguments to introspection endpoint when the plugin introspects the opaque channel token, you can use this config parameter to specify them. You should URL encode the value. For example: `resource=` or `a=1&b=&c`.", "required": false, "type": "string", "elements": { @@ -446,6 +504,7 @@ }, { "channel_token_introspection_hint": { + "description": "If you need to give `hint` parameter when introspecting a channel token, you can use this parameter to specify the value of such parameter. By default, a `hint` isn't sent with channel token introspection.", "required": false, "type": "string", "elements": { @@ -455,6 +514,7 @@ }, { "channel_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns a channel token in one of the keys (or claims) in the introspection results (`JSON`), the plugin can use that value instead of the introspection results when doing expiry verification and signing of the new token issued by Kong.", "required": false, "type": "array", "elements": { @@ -464,6 +524,7 @@ }, { "channel_token_introspection_scopes_required": { + "description": "Use this parameter to specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.channel_token_introspection_scopes_claim`.", "required": false, "type": "array", "elements": { @@ -473,18 +534,20 @@ }, { "channel_token_introspection_scopes_claim": { + "description": "Use this parameter to specify the claim/property in channel token introspection results (`JSON`) to be verified against values of `config.channel_token_introspection_scopes_required`. This supports nested claims.", "elements": { "type": "string" }, "default": [ "scope" ], - "type": "array", - "required": false + "required": false, + "type": "array" } }, { "channel_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in channel token introspection results to Kong consumer entity", "required": false, "type": "array", "elements": { @@ -494,38 +557,41 @@ }, { "channel_token_introspection_consumer_by": { + "description": "When the plugin tries to do channel token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values. Valid values are `id`, `username` and `custom_id`.", "elements": { + "type": "string", "one_of": [ "id", "username", "custom_id" - ], - "type": "string" + ] }, "default": [ "username", "custom_id" ], - "type": "array", - "required": false + "required": false, + "type": "array" } }, { "channel_token_introspection_leeway": { "default": 0, "required": false, - "type": "number" + "type": "number", + "description": "You can use this parameter to adjust clock skew between the token issuer introspection results and Kong. The value will be added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time (in seconds). You can disable channel token introspection `expiry` verification altogether with `config.verify_channel_token_introspection_expiry`." } }, { "channel_token_introspection_timeout": { - "type": "number", - "required": false + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on channel token introspection.", + "required": false, + "type": "number" } }, { "channel_token_signing_algorithm": { - "type": "string", + "description": "When this plugin sets the upstream header as specified with `config.channel_token_upstream_header`, it also re-signs the original channel token using private keys of this plugin. Specify the algorithm that is used to sign the token.", "one_of": [ "HS256", "HS384", @@ -541,21 +607,24 @@ "EdDSA" ], "default": "RS256", - "required": true + "required": true, + "type": "string" } }, { "channel_token_optional": { "default": false, "required": false, - "type": "boolean" + "type": "boolean", + "description": "If a channel token is not provided or no `config.channel_token_request_header` is specified, the plugin cannot verify the channel token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Enable this parameter to allow the request to proceed even when there is no channel token to check. If the channel token is provided, then this parameter has no effect" } }, { "verify_channel_token_signature": { "default": true, "required": false, - "type": "boolean" + "type": "boolean", + "description": "Quickly turn on/off the channel token signature verification." } }, { @@ -569,77 +638,89 @@ "verify_channel_token_scopes": { "default": true, "required": false, - "type": "boolean" + "type": "boolean", + "description": "Quickly turn on/off the channel token required scopes verification specified with `config.channel_token_scopes_required`." } }, { "verify_channel_token_introspection_expiry": { "default": true, "required": false, - "type": "boolean" + "type": "boolean", + "description": "Quickly turn on/off the channel token introspection expiry verification." } }, { "verify_channel_token_introspection_scopes": { "default": true, "required": false, - "type": "boolean" + "type": "boolean", + "description": "Quickly turn on/off the channel token introspection scopes verification specified with `config.channel_token_introspection_scopes_required`." } }, { "cache_channel_token_introspection": { "default": true, "required": false, - "type": "boolean" + "type": "boolean", + "description": "Whether to cache channel token introspection results." } }, { "trust_channel_token_introspection": { "default": true, "required": false, - "type": "boolean" + "type": "boolean", + "description": "Providing an opaque channel token for plugin introspection, and verifying expiry and scopes on introspection results may make further payload checks unnecessary before the plugin signs a new token. This also applies when using a JWT token with introspection JSON as per config.channel_token_introspection_jwt_claim. Use this parameter to manage additional payload checks before signing a new token. With true (default), payload's expiry or scopes aren't checked." } }, { "enable_channel_token_introspection": { "default": true, "required": false, - "type": "boolean" + "type": "boolean", + "description": "If you don't want to support opaque channel tokens, disable introspection by changing this configuration parameter to `false`." } }, { "add_claims": { - "values": { + "description": "Add customized claims if they are not present yet.", + "keys": { "type": "string" }, "default": [ ], - "keys": { - "type": "string" - }, "required": false, - "type": "map" + "type": "map", + "values": { + "type": "string" + } } }, { "set_claims": { - "values": { + "description": "Set customized claims. If a claim is already present, it will be overwritten.", + "keys": { "type": "string" }, "default": [ ], - "keys": { - "type": "string" - }, "required": false, - "type": "map" + "type": "map", + "values": { + "type": "string" + } } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/jwt-signer/3.5.x.json b/schemas/jwt-signer/3.5.x.json new file mode 100644 index 00000000..adf2ea3c --- /dev/null +++ b/schemas/jwt-signer/3.5.x.json @@ -0,0 +1,726 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumers" + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumer_groups" + } + }, + { + "config": { + "fields": [ + { + "realm": { + "required": false, + "type": "string", + "description": "When authentication or authorization fails, or there is an unexpected error, the plugin sends an `WWW-Authenticate` header with the `realm` attribute value." + } + }, + { + "enable_hs_signatures": { + "required": false, + "type": "boolean", + "description": "Tokens signed with HMAC algorithms such as `HS256`, `HS384`, or `HS512` are not accepted by default. If you need to accept such tokens for verification, enable this setting.", + "default": false + } + }, + { + "enable_instrumentation": { + "required": false, + "type": "boolean", + "description": "Writes log entries with some added information using `ngx.CRIT` (CRITICAL) level.", + "default": false + } + }, + { + "access_token_issuer": { + "required": false, + "type": "string", + "description": "The `iss` claim of a signed or re-signed access token is set to this value. Original `iss` claim of the incoming token (possibly introspected) is stored in `original_iss` claim of the newly signed access token.", + "default": "kong" + } + }, + { + "access_token_keyset": { + "required": false, + "type": "string", + "description": "The name of the keyset containing signing keys.", + "default": "kong" + } + }, + { + "access_token_jwks_uri": { + "required": false, + "description": "Specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the access token.", + "type": "string" + } + }, + { + "access_token_request_header": { + "required": false, + "type": "string", + "description": "This parameter tells the name of the header where to look for the access token.", + "default": "Authorization" + } + }, + { + "access_token_leeway": { + "required": false, + "type": "number", + "description": "Adjusts clock skew between the token issuer and Kong. The value is added to the token's `exp` claim before checking token expiry against Kong servers' current time in seconds. You can disable access token `expiry` verification altogether with `config.verify_access_token_expiry`.", + "default": 0 + } + }, + { + "access_token_scopes_required": { + "required": false, + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.access_token_scopes_claim`.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "access_token_scopes_claim": { + "required": false, + "type": "array", + "default": [ + "scope" + ], + "elements": { + "type": "string" + }, + "description": "Specify the claim in an access token to verify against values of `config.access_token_scopes_required`." + } + }, + { + "access_token_consumer_claim": { + "required": false, + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (for example, `sub` or `username`) in an access token to Kong consumer entity.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "access_token_consumer_by": { + "required": false, + "type": "array", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "description": "When the plugin tries to apply an access token to a Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of alues. Valid values are `id`, `username`, and `custom_id`." + } + }, + { + "access_token_upstream_header": { + "required": false, + "type": "string", + "description": "Removes the `config.access_token_request_header` from the request after reading its value. With `config.access_token_upstream_header`, you can specify the upstream header where the plugin adds the Kong signed token. If you don't specify a value, such as use `null` or `\"\"` (empty string), the plugin does not even try to sign or re-sign the token.", + "default": "Authorization:Bearer" + } + }, + { + "access_token_upstream_leeway": { + "required": false, + "type": "number", + "description": "If you want to add or subtract (using a negative value) expiry time (in seconds) of the original access token, you can specify a value that is added to the original access token's `exp` claim.", + "default": 0 + } + }, + { + "access_token_introspection_endpoint": { + "required": false, + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter.", + "type": "string" + } + }, + { + "access_token_introspection_authorization": { + "required": false, + "type": "string", + "description": "If the introspection endpoint requires client authentication (client being the JWT Signer plugin), you can specify the `Authorization` header's value with this configuration parameter." + } + }, + { + "access_token_introspection_body_args": { + "required": false, + "type": "string", + "description": "This parameter allows you to pass URL encoded request body arguments. For example: `resource=` or `a=1&b=&c`." + } + }, + { + "access_token_introspection_hint": { + "required": false, + "type": "string", + "description": "If you need to give `hint` parameter when introspecting an access token, use this parameter to specify the value. By default, the plugin sends `hint=access_token`.", + "default": "access_token" + } + }, + { + "access_token_introspection_jwt_claim": { + "required": false, + "description": "If your introspection endpoint returns an access token in one of the keys (or claims) within the introspection results (`JSON`). If the key cannot be found, the plugin responds with `401 Unauthorized`. Also if the key is found but cannot be decoded as JWT, it also responds with `401 Unauthorized`.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "access_token_introspection_scopes_required": { + "required": false, + "description": "Specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.access_token_introspection_scopes_claim`.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "access_token_introspection_scopes_claim": { + "required": true, + "type": "array", + "default": [ + "scope" + ], + "elements": { + "type": "string" + }, + "description": "Specify the claim/property in access token introspection results (`JSON`) to be verified against values of `config.access_token_introspection_scopes_required`. This supports nested claims. For example, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`, hich can be given as `realm_access,roles` (form post). If the claim is not found in access token introspection results, and you have specified `config.access_token_introspection_scopes_required`, the plugin responds with `403 Forbidden`." + } + }, + { + "access_token_introspection_consumer_claim": { + "required": false, + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in access token introspection results to the Kong consumer entity.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "access_token_introspection_consumer_by": { + "required": false, + "type": "array", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "description": "When the plugin tries to do access token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values." + } + }, + { + "access_token_introspection_leeway": { + "required": false, + "type": "number", + "description": "Adjusts clock skew between the token issuer introspection results and Kong. The value is added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time in seconds. You can disable access token introspection `expiry` verification altogether with `config.verify_access_token_introspection_expiry`.", + "default": 0 + } + }, + { + "access_token_introspection_timeout": { + "required": false, + "type": "number", + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on access token introspection." + } + }, + { + "access_token_signing_algorithm": { + "required": true, + "type": "string", + "default": "RS256", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ], + "description": "When this plugin sets the upstream header as specified with `config.access_token_upstream_header`, re-signs the original access token using the private keys of the JWT Signer plugin. Specify the algorithm that is used to sign the token. The `config.access_token_issuer` specifies which `keyset` is used to sign the new token issued by Kong using the specified signing algorithm." + } + }, + { + "access_token_optional": { + "required": false, + "type": "boolean", + "description": "If an access token is not provided or no `config.access_token_request_header` is specified, the plugin cannot verify the access token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Use this parameter to allow the request to proceed even when there is no token to check. If the token is provided, then this parameter has no effect", + "default": false + } + }, + { + "verify_access_token_signature": { + "required": false, + "type": "boolean", + "description": "Quickly turn access token signature verification off and on as needed.", + "default": true + } + }, + { + "verify_access_token_expiry": { + "required": false, + "type": "boolean", + "description": "Quickly turn access token expiry verification off and on as needed.", + "default": true + } + }, + { + "verify_access_token_scopes": { + "required": false, + "type": "boolean", + "description": "Quickly turn off and on the access token required scopes verification, specified with `config.access_token_scopes_required`.", + "default": true + } + }, + { + "verify_access_token_introspection_expiry": { + "required": false, + "type": "boolean", + "description": "Quickly turn access token introspection expiry verification off and on as needed.", + "default": true + } + }, + { + "verify_access_token_introspection_scopes": { + "required": false, + "type": "boolean", + "description": "Quickly turn off and on the access token introspection scopes verification, specified with `config.access_token_introspection_scopes_required`.", + "default": true + } + }, + { + "cache_access_token_introspection": { + "required": false, + "type": "boolean", + "description": "Whether to cache access token introspection results.", + "default": true + } + }, + { + "trust_access_token_introspection": { + "required": false, + "type": "boolean", + "description": "Use this parameter to enable and disable further checks on a payload before the new token is signed. If you set this to `true`, the expiry or scopes are not checked on a payload.", + "default": true + } + }, + { + "enable_access_token_introspection": { + "required": false, + "type": "boolean", + "description": "If you don't want to support opaque access tokens, change this configuration parameter to `false` to disable introspection.", + "default": true + } + }, + { + "channel_token_issuer": { + "required": false, + "type": "string", + "description": "The `iss` claim of the re-signed channel token is set to this value, which is `kong` by default. The original `iss` claim of the incoming token (possibly introspected) is stored in the `original_iss` claim of the newly signed channel token.", + "default": "kong" + } + }, + { + "channel_token_keyset": { + "required": false, + "type": "string", + "description": "The name of the keyset containing signing keys.", + "default": "kong" + } + }, + { + "channel_token_jwks_uri": { + "required": false, + "description": "If you want to use `config.verify_channel_token_signature`, you must specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the channel token. If you don't specify a URI and you pass a JWT token to the plugin, then the plugin responds with `401 Unauthorized`.", + "type": "string" + } + }, + { + "channel_token_request_header": { + "required": false, + "type": "string", + "description": "This parameter tells the name of the header where to look for the channel token. If you don't want to do anything with the channel token, then you can set this to `null` or `\"\"` (empty string)." + } + }, + { + "channel_token_leeway": { + "required": false, + "type": "number", + "description": "Adjusts clock skew between the token issuer and Kong. The value will be added to token's `exp` claim before checking token expiry against Kong servers current time in seconds. You can disable channel token `expiry` verification altogether with `config.verify_channel_token_expiry`.", + "default": 0 + } + }, + { + "channel_token_scopes_required": { + "required": false, + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.channel_token_scopes_claim`.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_scopes_claim": { + "required": false, + "type": "array", + "default": [ + "scope" + ], + "elements": { + "type": "string" + }, + "description": "Specify the claim in a channel token to verify against values of `config.channel_token_scopes_required`. This supports nested claims." + } + }, + { + "channel_token_consumer_claim": { + "required": false, + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter. Kong consumers have an `id`, a `username`, and a `custom_id`. If this parameter is enabled but the mapping fails, such as when there's a non-existent Kong consumer, the plugin responds with `403 Forbidden`.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_consumer_by": { + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "type": "array", + "description": "When the plugin tries to do channel token to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of valid values: `id`, `username`, and `custom_id`.", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "channel_token_upstream_header": { + "required": false, + "type": "string", + "description": "This plugin removes the `config.channel_token_request_header` from the request after reading its value." + } + }, + { + "channel_token_upstream_leeway": { + "required": false, + "type": "number", + "description": "If you want to add or perhaps subtract (using negative value) expiry time of the original channel token, you can specify a value that is added to the original channel token's `exp` claim.", + "default": 0 + } + }, + { + "channel_token_introspection_endpoint": { + "required": false, + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise, the plugin does not try introspection and returns `401 Unauthorized` instead.", + "type": "string" + } + }, + { + "channel_token_introspection_authorization": { + "required": false, + "description": "When using `opaque` channel tokens, and you want to turn on channel token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise the plugin will not try introspection, and instead returns `401 Unauthorized` when using opaque channel tokens.", + "type": "string", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_body_args": { + "required": false, + "description": "If you need to pass additional body arguments to introspection endpoint when the plugin introspects the opaque channel token, you can use this config parameter to specify them. You should URL encode the value. For example: `resource=` or `a=1&b=&c`.", + "type": "string", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_hint": { + "required": false, + "description": "If you need to give `hint` parameter when introspecting a channel token, you can use this parameter to specify the value of such parameter. By default, a `hint` isn't sent with channel token introspection.", + "type": "string", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_jwt_claim": { + "required": false, + "description": "If your introspection endpoint returns a channel token in one of the keys (or claims) in the introspection results (`JSON`), the plugin can use that value instead of the introspection results when doing expiry verification and signing of the new token issued by Kong.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_scopes_required": { + "required": false, + "description": "Use this parameter to specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.channel_token_introspection_scopes_claim`.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_scopes_claim": { + "required": false, + "type": "array", + "default": [ + "scope" + ], + "elements": { + "type": "string" + }, + "description": "Use this parameter to specify the claim/property in channel token introspection results (`JSON`) to be verified against values of `config.channel_token_introspection_scopes_required`. This supports nested claims." + } + }, + { + "channel_token_introspection_consumer_claim": { + "required": false, + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in channel token introspection results to Kong consumer entity", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_consumer_by": { + "required": false, + "type": "array", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "description": "When the plugin tries to do channel token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values. Valid values are `id`, `username` and `custom_id`." + } + }, + { + "channel_token_introspection_leeway": { + "required": false, + "type": "number", + "description": "You can use this parameter to adjust clock skew between the token issuer introspection results and Kong. The value will be added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time (in seconds). You can disable channel token introspection `expiry` verification altogether with `config.verify_channel_token_introspection_expiry`.", + "default": 0 + } + }, + { + "channel_token_introspection_timeout": { + "required": false, + "type": "number", + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on channel token introspection." + } + }, + { + "channel_token_signing_algorithm": { + "required": true, + "type": "string", + "default": "RS256", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ], + "description": "When this plugin sets the upstream header as specified with `config.channel_token_upstream_header`, it also re-signs the original channel token using private keys of this plugin. Specify the algorithm that is used to sign the token." + } + }, + { + "channel_token_optional": { + "required": false, + "type": "boolean", + "description": "If a channel token is not provided or no `config.channel_token_request_header` is specified, the plugin cannot verify the channel token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Enable this parameter to allow the request to proceed even when there is no channel token to check. If the channel token is provided, then this parameter has no effect", + "default": false + } + }, + { + "verify_channel_token_signature": { + "required": false, + "type": "boolean", + "description": "Quickly turn on/off the channel token signature verification.", + "default": true + } + }, + { + "verify_channel_token_expiry": { + "required": false, + "type": "boolean", + "default": true + } + }, + { + "verify_channel_token_scopes": { + "required": false, + "type": "boolean", + "description": "Quickly turn on/off the channel token required scopes verification specified with `config.channel_token_scopes_required`.", + "default": true + } + }, + { + "verify_channel_token_introspection_expiry": { + "required": false, + "type": "boolean", + "description": "Quickly turn on/off the channel token introspection expiry verification.", + "default": true + } + }, + { + "verify_channel_token_introspection_scopes": { + "required": false, + "type": "boolean", + "description": "Quickly turn on/off the channel token introspection scopes verification specified with `config.channel_token_introspection_scopes_required`.", + "default": true + } + }, + { + "cache_channel_token_introspection": { + "required": false, + "type": "boolean", + "description": "Whether to cache channel token introspection results.", + "default": true + } + }, + { + "trust_channel_token_introspection": { + "required": false, + "type": "boolean", + "description": "Providing an opaque channel token for plugin introspection, and verifying expiry and scopes on introspection results may make further payload checks unnecessary before the plugin signs a new token. This also applies when using a JWT token with introspection JSON as per config.channel_token_introspection_jwt_claim. Use this parameter to manage additional payload checks before signing a new token. With true (default), payload's expiry or scopes aren't checked.", + "default": true + } + }, + { + "enable_channel_token_introspection": { + "required": false, + "type": "boolean", + "description": "If you don't want to support opaque channel tokens, disable introspection by changing this configuration parameter to `false`.", + "default": true + } + }, + { + "add_claims": { + "required": false, + "keys": { + "type": "string" + }, + "default": [ + + ], + "values": { + "type": "string" + }, + "description": "Add customized claims if they are not present yet.", + "type": "map" + } + }, + { + "set_claims": { + "required": false, + "keys": { + "type": "string" + }, + "default": [ + + ], + "values": { + "type": "string" + }, + "description": "Set customized claims. If a claim is already present, it will be overwritten.", + "type": "map" + } + } + ], + "type": "record", + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwt-signer/3.6.x.json b/schemas/jwt-signer/3.6.x.json new file mode 100644 index 00000000..71ac03cd --- /dev/null +++ b/schemas/jwt-signer/3.6.x.json @@ -0,0 +1,726 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "realm": { + "required": false, + "type": "string", + "description": "When authentication or authorization fails, or there is an unexpected error, the plugin sends an `WWW-Authenticate` header with the `realm` attribute value." + } + }, + { + "enable_hs_signatures": { + "required": false, + "type": "boolean", + "default": false, + "description": "Tokens signed with HMAC algorithms such as `HS256`, `HS384`, or `HS512` are not accepted by default. If you need to accept such tokens for verification, enable this setting." + } + }, + { + "enable_instrumentation": { + "required": false, + "type": "boolean", + "default": false, + "description": "Writes log entries with some added information using `ngx.CRIT` (CRITICAL) level." + } + }, + { + "access_token_issuer": { + "required": false, + "type": "string", + "default": "kong", + "description": "The `iss` claim of a signed or re-signed access token is set to this value. Original `iss` claim of the incoming token (possibly introspected) is stored in `original_iss` claim of the newly signed access token." + } + }, + { + "access_token_keyset": { + "required": false, + "type": "string", + "default": "kong", + "description": "The name of the keyset containing signing keys." + } + }, + { + "access_token_jwks_uri": { + "required": false, + "type": "string", + "description": "Specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the access token." + } + }, + { + "access_token_request_header": { + "required": false, + "type": "string", + "default": "Authorization", + "description": "This parameter tells the name of the header where to look for the access token." + } + }, + { + "access_token_leeway": { + "required": false, + "type": "number", + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value is added to the token's `exp` claim before checking token expiry against Kong servers' current time in seconds. You can disable access token `expiry` verification altogether with `config.verify_access_token_expiry`." + } + }, + { + "access_token_scopes_required": { + "required": false, + "type": "array", + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.access_token_scopes_claim`.", + "elements": { + "type": "string" + } + } + }, + { + "access_token_scopes_claim": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "scope" + ], + "required": false, + "description": "Specify the claim in an access token to verify against values of `config.access_token_scopes_required`." + } + }, + { + "access_token_consumer_claim": { + "required": false, + "type": "array", + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (for example, `sub` or `username`) in an access token to Kong consumer entity.", + "elements": { + "type": "string" + } + } + }, + { + "access_token_consumer_by": { + "elements": { + "one_of": [ + "id", + "username", + "custom_id" + ], + "type": "string" + }, + "type": "array", + "default": [ + "username", + "custom_id" + ], + "required": false, + "description": "When the plugin tries to apply an access token to a Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of alues. Valid values are `id`, `username`, and `custom_id`." + } + }, + { + "access_token_upstream_header": { + "required": false, + "type": "string", + "default": "Authorization:Bearer", + "description": "Removes the `config.access_token_request_header` from the request after reading its value. With `config.access_token_upstream_header`, you can specify the upstream header where the plugin adds the Kong signed token. If you don't specify a value, such as use `null` or `\"\"` (empty string), the plugin does not even try to sign or re-sign the token." + } + }, + { + "access_token_upstream_leeway": { + "required": false, + "type": "number", + "default": 0, + "description": "If you want to add or subtract (using a negative value) expiry time (in seconds) of the original access token, you can specify a value that is added to the original access token's `exp` claim." + } + }, + { + "access_token_introspection_endpoint": { + "required": false, + "type": "string", + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter." + } + }, + { + "access_token_introspection_authorization": { + "required": false, + "type": "string", + "description": "If the introspection endpoint requires client authentication (client being the JWT Signer plugin), you can specify the `Authorization` header's value with this configuration parameter." + } + }, + { + "access_token_introspection_body_args": { + "required": false, + "type": "string", + "description": "This parameter allows you to pass URL encoded request body arguments. For example: `resource=` or `a=1&b=&c`." + } + }, + { + "access_token_introspection_hint": { + "required": false, + "type": "string", + "default": "access_token", + "description": "If you need to give `hint` parameter when introspecting an access token, use this parameter to specify the value. By default, the plugin sends `hint=access_token`." + } + }, + { + "access_token_introspection_jwt_claim": { + "required": false, + "type": "array", + "description": "If your introspection endpoint returns an access token in one of the keys (or claims) within the introspection results (`JSON`). If the key cannot be found, the plugin responds with `401 Unauthorized`. Also if the key is found but cannot be decoded as JWT, it also responds with `401 Unauthorized`.", + "elements": { + "type": "string" + } + } + }, + { + "access_token_introspection_scopes_required": { + "required": false, + "type": "array", + "description": "Specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.access_token_introspection_scopes_claim`.", + "elements": { + "type": "string" + } + } + }, + { + "access_token_introspection_scopes_claim": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "scope" + ], + "required": true, + "description": "Specify the claim/property in access token introspection results (`JSON`) to be verified against values of `config.access_token_introspection_scopes_required`. This supports nested claims. For example, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`, hich can be given as `realm_access,roles` (form post). If the claim is not found in access token introspection results, and you have specified `config.access_token_introspection_scopes_required`, the plugin responds with `403 Forbidden`." + } + }, + { + "access_token_introspection_consumer_claim": { + "required": false, + "type": "array", + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in access token introspection results to the Kong consumer entity.", + "elements": { + "type": "string" + } + } + }, + { + "access_token_introspection_consumer_by": { + "elements": { + "one_of": [ + "id", + "username", + "custom_id" + ], + "type": "string" + }, + "type": "array", + "default": [ + "username", + "custom_id" + ], + "required": false, + "description": "When the plugin tries to do access token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values." + } + }, + { + "access_token_introspection_leeway": { + "required": false, + "type": "number", + "default": 0, + "description": "Adjusts clock skew between the token issuer introspection results and Kong. The value is added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time in seconds. You can disable access token introspection `expiry` verification altogether with `config.verify_access_token_introspection_expiry`." + } + }, + { + "access_token_introspection_timeout": { + "required": false, + "type": "number", + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on access token introspection." + } + }, + { + "access_token_signing_algorithm": { + "type": "string", + "default": "RS256", + "required": true, + "description": "When this plugin sets the upstream header as specified with `config.access_token_upstream_header`, re-signs the original access token using the private keys of the JWT Signer plugin. Specify the algorithm that is used to sign the token. The `config.access_token_issuer` specifies which `keyset` is used to sign the new token issued by Kong using the specified signing algorithm.", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ] + } + }, + { + "access_token_optional": { + "required": false, + "type": "boolean", + "default": false, + "description": "If an access token is not provided or no `config.access_token_request_header` is specified, the plugin cannot verify the access token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Use this parameter to allow the request to proceed even when there is no token to check. If the token is provided, then this parameter has no effect" + } + }, + { + "verify_access_token_signature": { + "required": false, + "type": "boolean", + "default": true, + "description": "Quickly turn access token signature verification off and on as needed." + } + }, + { + "verify_access_token_expiry": { + "required": false, + "type": "boolean", + "default": true, + "description": "Quickly turn access token expiry verification off and on as needed." + } + }, + { + "verify_access_token_scopes": { + "required": false, + "type": "boolean", + "default": true, + "description": "Quickly turn off and on the access token required scopes verification, specified with `config.access_token_scopes_required`." + } + }, + { + "verify_access_token_introspection_expiry": { + "required": false, + "type": "boolean", + "default": true, + "description": "Quickly turn access token introspection expiry verification off and on as needed." + } + }, + { + "verify_access_token_introspection_scopes": { + "required": false, + "type": "boolean", + "default": true, + "description": "Quickly turn off and on the access token introspection scopes verification, specified with `config.access_token_introspection_scopes_required`." + } + }, + { + "cache_access_token_introspection": { + "required": false, + "type": "boolean", + "default": true, + "description": "Whether to cache access token introspection results." + } + }, + { + "trust_access_token_introspection": { + "required": false, + "type": "boolean", + "default": true, + "description": "Use this parameter to enable and disable further checks on a payload before the new token is signed. If you set this to `true`, the expiry or scopes are not checked on a payload." + } + }, + { + "enable_access_token_introspection": { + "required": false, + "type": "boolean", + "default": true, + "description": "If you don't want to support opaque access tokens, change this configuration parameter to `false` to disable introspection." + } + }, + { + "channel_token_issuer": { + "required": false, + "type": "string", + "default": "kong", + "description": "The `iss` claim of the re-signed channel token is set to this value, which is `kong` by default. The original `iss` claim of the incoming token (possibly introspected) is stored in the `original_iss` claim of the newly signed channel token." + } + }, + { + "channel_token_keyset": { + "required": false, + "type": "string", + "default": "kong", + "description": "The name of the keyset containing signing keys." + } + }, + { + "channel_token_jwks_uri": { + "required": false, + "type": "string", + "description": "If you want to use `config.verify_channel_token_signature`, you must specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the channel token. If you don't specify a URI and you pass a JWT token to the plugin, then the plugin responds with `401 Unauthorized`." + } + }, + { + "channel_token_request_header": { + "required": false, + "type": "string", + "description": "This parameter tells the name of the header where to look for the channel token. If you don't want to do anything with the channel token, then you can set this to `null` or `\"\"` (empty string)." + } + }, + { + "channel_token_leeway": { + "required": false, + "type": "number", + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value will be added to token's `exp` claim before checking token expiry against Kong servers current time in seconds. You can disable channel token `expiry` verification altogether with `config.verify_channel_token_expiry`." + } + }, + { + "channel_token_scopes_required": { + "required": false, + "type": "array", + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.channel_token_scopes_claim`.", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_scopes_claim": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "scope" + ], + "required": false, + "description": "Specify the claim in a channel token to verify against values of `config.channel_token_scopes_required`. This supports nested claims." + } + }, + { + "channel_token_consumer_claim": { + "required": false, + "type": "array", + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter. Kong consumers have an `id`, a `username`, and a `custom_id`. If this parameter is enabled but the mapping fails, such as when there's a non-existent Kong consumer, the plugin responds with `403 Forbidden`.", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_consumer_by": { + "elements": { + "one_of": [ + "id", + "username", + "custom_id" + ], + "type": "string" + }, + "type": "array", + "description": "When the plugin tries to do channel token to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of valid values: `id`, `username`, and `custom_id`.", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "channel_token_upstream_header": { + "required": false, + "type": "string", + "description": "This plugin removes the `config.channel_token_request_header` from the request after reading its value." + } + }, + { + "channel_token_upstream_leeway": { + "required": false, + "type": "number", + "default": 0, + "description": "If you want to add or perhaps subtract (using negative value) expiry time of the original channel token, you can specify a value that is added to the original channel token's `exp` claim." + } + }, + { + "channel_token_introspection_endpoint": { + "required": false, + "type": "string", + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise, the plugin does not try introspection and returns `401 Unauthorized` instead." + } + }, + { + "channel_token_introspection_authorization": { + "required": false, + "type": "string", + "description": "When using `opaque` channel tokens, and you want to turn on channel token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise the plugin will not try introspection, and instead returns `401 Unauthorized` when using opaque channel tokens.", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_body_args": { + "required": false, + "type": "string", + "description": "If you need to pass additional body arguments to introspection endpoint when the plugin introspects the opaque channel token, you can use this config parameter to specify them. You should URL encode the value. For example: `resource=` or `a=1&b=&c`.", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_hint": { + "required": false, + "type": "string", + "description": "If you need to give `hint` parameter when introspecting a channel token, you can use this parameter to specify the value of such parameter. By default, a `hint` isn't sent with channel token introspection.", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_jwt_claim": { + "required": false, + "type": "array", + "description": "If your introspection endpoint returns a channel token in one of the keys (or claims) in the introspection results (`JSON`), the plugin can use that value instead of the introspection results when doing expiry verification and signing of the new token issued by Kong.", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_scopes_required": { + "required": false, + "type": "array", + "description": "Use this parameter to specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.channel_token_introspection_scopes_claim`.", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_scopes_claim": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "scope" + ], + "required": false, + "description": "Use this parameter to specify the claim/property in channel token introspection results (`JSON`) to be verified against values of `config.channel_token_introspection_scopes_required`. This supports nested claims." + } + }, + { + "channel_token_introspection_consumer_claim": { + "required": false, + "type": "array", + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in channel token introspection results to Kong consumer entity", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_consumer_by": { + "elements": { + "one_of": [ + "id", + "username", + "custom_id" + ], + "type": "string" + }, + "type": "array", + "default": [ + "username", + "custom_id" + ], + "required": false, + "description": "When the plugin tries to do channel token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values. Valid values are `id`, `username` and `custom_id`." + } + }, + { + "channel_token_introspection_leeway": { + "required": false, + "type": "number", + "default": 0, + "description": "You can use this parameter to adjust clock skew between the token issuer introspection results and Kong. The value will be added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time (in seconds). You can disable channel token introspection `expiry` verification altogether with `config.verify_channel_token_introspection_expiry`." + } + }, + { + "channel_token_introspection_timeout": { + "required": false, + "type": "number", + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on channel token introspection." + } + }, + { + "channel_token_signing_algorithm": { + "type": "string", + "default": "RS256", + "required": true, + "description": "When this plugin sets the upstream header as specified with `config.channel_token_upstream_header`, it also re-signs the original channel token using private keys of this plugin. Specify the algorithm that is used to sign the token.", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ] + } + }, + { + "channel_token_optional": { + "required": false, + "type": "boolean", + "default": false, + "description": "If a channel token is not provided or no `config.channel_token_request_header` is specified, the plugin cannot verify the channel token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Enable this parameter to allow the request to proceed even when there is no channel token to check. If the channel token is provided, then this parameter has no effect" + } + }, + { + "verify_channel_token_signature": { + "required": false, + "type": "boolean", + "default": true, + "description": "Quickly turn on/off the channel token signature verification." + } + }, + { + "verify_channel_token_expiry": { + "required": false, + "type": "boolean", + "default": true + } + }, + { + "verify_channel_token_scopes": { + "required": false, + "type": "boolean", + "default": true, + "description": "Quickly turn on/off the channel token required scopes verification specified with `config.channel_token_scopes_required`." + } + }, + { + "verify_channel_token_introspection_expiry": { + "required": false, + "type": "boolean", + "default": true, + "description": "Quickly turn on/off the channel token introspection expiry verification." + } + }, + { + "verify_channel_token_introspection_scopes": { + "required": false, + "type": "boolean", + "default": true, + "description": "Quickly turn on/off the channel token introspection scopes verification specified with `config.channel_token_introspection_scopes_required`." + } + }, + { + "cache_channel_token_introspection": { + "required": false, + "type": "boolean", + "default": true, + "description": "Whether to cache channel token introspection results." + } + }, + { + "trust_channel_token_introspection": { + "required": false, + "type": "boolean", + "default": true, + "description": "Providing an opaque channel token for plugin introspection, and verifying expiry and scopes on introspection results may make further payload checks unnecessary before the plugin signs a new token. This also applies when using a JWT token with introspection JSON as per config.channel_token_introspection_jwt_claim. Use this parameter to manage additional payload checks before signing a new token. With true (default), payload's expiry or scopes aren't checked." + } + }, + { + "enable_channel_token_introspection": { + "required": false, + "type": "boolean", + "default": true, + "description": "If you don't want to support opaque channel tokens, disable introspection by changing this configuration parameter to `false`." + } + }, + { + "add_claims": { + "keys": { + "type": "string" + }, + "type": "map", + "default": [ + + ], + "required": false, + "description": "Add customized claims if they are not present yet.", + "values": { + "type": "string" + } + } + }, + { + "set_claims": { + "keys": { + "type": "string" + }, + "type": "map", + "default": [ + + ], + "required": false, + "description": "Set customized claims. If a claim is already present, it will be overwritten.", + "values": { + "type": "string" + } + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwt-signer/3.7.x.json b/schemas/jwt-signer/3.7.x.json new file mode 100644 index 00000000..e6cc6eb6 --- /dev/null +++ b/schemas/jwt-signer/3.7.x.json @@ -0,0 +1,997 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "realm": { + "required": false, + "type": "string", + "description": "When authentication or authorization fails, or there is an unexpected error, the plugin sends an `WWW-Authenticate` header with the `realm` attribute value." + } + }, + { + "enable_hs_signatures": { + "required": false, + "type": "boolean", + "description": "Tokens signed with HMAC algorithms such as `HS256`, `HS384`, or `HS512` are not accepted by default. If you need to accept such tokens for verification, enable this setting.", + "default": false + } + }, + { + "enable_instrumentation": { + "required": false, + "type": "boolean", + "description": "Writes log entries with some added information using `ngx.CRIT` (CRITICAL) level.", + "default": false + } + }, + { + "access_token_issuer": { + "required": false, + "type": "string", + "description": "The `iss` claim of a signed or re-signed access token is set to this value. Original `iss` claim of the incoming token (possibly introspected) is stored in `original_iss` claim of the newly signed access token.", + "default": "kong" + } + }, + { + "access_token_keyset": { + "required": false, + "type": "string", + "description": "The name of the keyset containing signing keys.", + "default": "kong" + } + }, + { + "access_token_keyset_client_username": { + "required": false, + "description": "The client username that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_password`", + "referenceable": true, + "type": "string" + } + }, + { + "access_token_keyset_client_password": { + "encrypted": true, + "referenceable": true, + "required": false, + "type": "string", + "description": "The client password that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_username`" + } + }, + { + "access_token_keyset_client_certificate": { + "required": false, + "type": "foreign", + "description": "The client certificate that will be used to authenticate Kong if `access_token_keyset` is an https uri that requires mTLS Auth.", + "reference": "certificates" + } + }, + { + "access_token_keyset_rotate_period": { + "required": false, + "type": "number", + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_keyset`. The default value 0 means no auto-rotation.", + "default": 0 + } + }, + { + "access_token_jwks_uri": { + "required": false, + "type": "string", + "description": "Specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the access token." + } + }, + { + "access_token_jwks_uri_client_username": { + "required": false, + "description": "The client username that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_password`", + "referenceable": true, + "type": "string" + } + }, + { + "access_token_jwks_uri_client_password": { + "encrypted": true, + "referenceable": true, + "required": false, + "type": "string", + "description": "The client password that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_username`" + } + }, + { + "access_token_jwks_uri_client_certificate": { + "required": false, + "type": "foreign", + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "reference": "certificates" + } + }, + { + "access_token_jwks_uri_rotate_period": { + "required": false, + "type": "number", + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_jwks_uri`. The default value 0 means no auto-rotation.", + "default": 0 + } + }, + { + "access_token_request_header": { + "required": false, + "type": "string", + "description": "This parameter tells the name of the header where to look for the access token.", + "default": "Authorization" + } + }, + { + "access_token_leeway": { + "required": false, + "type": "number", + "description": "Adjusts clock skew between the token issuer and Kong. The value is added to the token's `exp` claim before checking token expiry against Kong servers' current time in seconds. You can disable access token `expiry` verification altogether with `config.verify_access_token_expiry`.", + "default": 0 + } + }, + { + "access_token_scopes_required": { + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.access_token_scopes_claim`." + } + }, + { + "access_token_scopes_claim": { + "type": "array", + "required": false, + "elements": { + "type": "string" + }, + "description": "Specify the claim in an access token to verify against values of `config.access_token_scopes_required`.", + "default": [ + "scope" + ] + } + }, + { + "access_token_consumer_claim": { + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (for example, `sub` or `username`) in an access token to Kong consumer entity." + } + }, + { + "access_token_consumer_by": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "description": "When the plugin tries to apply an access token to a Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of alues. Valid values are `id`, `username`, and `custom_id`.", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "access_token_upstream_header": { + "required": false, + "type": "string", + "description": "Removes the `config.access_token_request_header` from the request after reading its value. With `config.access_token_upstream_header`, you can specify the upstream header where the plugin adds the Kong signed token. If you don't specify a value, such as use `null` or `\"\"` (empty string), the plugin does not even try to sign or re-sign the token.", + "default": "Authorization:Bearer" + } + }, + { + "access_token_upstream_leeway": { + "required": false, + "type": "number", + "description": "If you want to add or subtract (using a negative value) expiry time (in seconds) of the original access token, you can specify a value that is added to the original access token's `exp` claim.", + "default": 0 + } + }, + { + "access_token_introspection_endpoint": { + "required": false, + "type": "string", + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter." + } + }, + { + "access_token_introspection_authorization": { + "required": false, + "type": "string", + "description": "If the introspection endpoint requires client authentication (client being the JWT Signer plugin), you can specify the `Authorization` header's value with this configuration parameter." + } + }, + { + "access_token_introspection_body_args": { + "required": false, + "type": "string", + "description": "This parameter allows you to pass URL encoded request body arguments. For example: `resource=` or `a=1&b=&c`." + } + }, + { + "access_token_introspection_hint": { + "required": false, + "type": "string", + "description": "If you need to give `hint` parameter when introspecting an access token, use this parameter to specify the value. By default, the plugin sends `hint=access_token`.", + "default": "access_token" + } + }, + { + "access_token_introspection_jwt_claim": { + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "description": "If your introspection endpoint returns an access token in one of the keys (or claims) within the introspection results (`JSON`). If the key cannot be found, the plugin responds with `401 Unauthorized`. Also if the key is found but cannot be decoded as JWT, it also responds with `401 Unauthorized`." + } + }, + { + "access_token_introspection_scopes_required": { + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "description": "Specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.access_token_introspection_scopes_claim`." + } + }, + { + "access_token_introspection_scopes_claim": { + "type": "array", + "required": true, + "elements": { + "type": "string" + }, + "description": "Specify the claim/property in access token introspection results (`JSON`) to be verified against values of `config.access_token_introspection_scopes_required`. This supports nested claims. For example, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`, hich can be given as `realm_access,roles` (form post). If the claim is not found in access token introspection results, and you have specified `config.access_token_introspection_scopes_required`, the plugin responds with `403 Forbidden`.", + "default": [ + "scope" + ] + } + }, + { + "access_token_introspection_consumer_claim": { + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in access token introspection results to the Kong consumer entity." + } + }, + { + "access_token_introspection_consumer_by": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "description": "When the plugin tries to do access token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values.", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "access_token_introspection_leeway": { + "required": false, + "type": "number", + "description": "Adjusts clock skew between the token issuer introspection results and Kong. The value is added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time in seconds. You can disable access token introspection `expiry` verification altogether with `config.verify_access_token_introspection_expiry`.", + "default": 0 + } + }, + { + "access_token_introspection_timeout": { + "required": false, + "type": "number", + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on access token introspection." + } + }, + { + "access_token_signing_algorithm": { + "default": "RS256", + "required": true, + "type": "string", + "description": "When this plugin sets the upstream header as specified with `config.access_token_upstream_header`, re-signs the original access token using the private keys of the JWT Signer plugin. Specify the algorithm that is used to sign the token. The `config.access_token_issuer` specifies which `keyset` is used to sign the new token issued by Kong using the specified signing algorithm.", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ] + } + }, + { + "add_access_token_claims": { + "keys": { + "type": "string" + }, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "required": false, + "values": { + "type": "string" + }, + "type": "map", + "default": [ + + ] + } + }, + { + "set_access_token_claims": { + "keys": { + "type": "string" + }, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "required": false, + "values": { + "type": "string" + }, + "type": "map", + "default": [ + + ] + } + }, + { + "remove_access_token_claims": { + "type": "array", + "required": false, + "elements": { + "type": "string" + }, + "description": "remove claims. It should be an array, and each element is a claim key string.", + "default": [ + + ] + } + }, + { + "original_access_token_upstream_header": { + "required": false, + "type": "string", + "description": "The HTTP header name used to store the original access token." + } + }, + { + "access_token_optional": { + "required": false, + "type": "boolean", + "description": "If an access token is not provided or no `config.access_token_request_header` is specified, the plugin cannot verify the access token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Use this parameter to allow the request to proceed even when there is no token to check. If the token is provided, then this parameter has no effect", + "default": false + } + }, + { + "verify_access_token_signature": { + "required": false, + "type": "boolean", + "description": "Quickly turn access token signature verification off and on as needed.", + "default": true + } + }, + { + "verify_access_token_expiry": { + "required": false, + "type": "boolean", + "description": "Quickly turn access token expiry verification off and on as needed.", + "default": true + } + }, + { + "verify_access_token_scopes": { + "required": false, + "type": "boolean", + "description": "Quickly turn off and on the access token required scopes verification, specified with `config.access_token_scopes_required`.", + "default": true + } + }, + { + "verify_access_token_introspection_expiry": { + "required": false, + "type": "boolean", + "description": "Quickly turn access token introspection expiry verification off and on as needed.", + "default": true + } + }, + { + "verify_access_token_introspection_scopes": { + "required": false, + "type": "boolean", + "description": "Quickly turn off and on the access token introspection scopes verification, specified with `config.access_token_introspection_scopes_required`.", + "default": true + } + }, + { + "cache_access_token_introspection": { + "required": false, + "type": "boolean", + "description": "Whether to cache access token introspection results.", + "default": true + } + }, + { + "trust_access_token_introspection": { + "required": false, + "type": "boolean", + "description": "Use this parameter to enable and disable further checks on a payload before the new token is signed. If you set this to `true`, the expiry or scopes are not checked on a payload.", + "default": true + } + }, + { + "enable_access_token_introspection": { + "required": false, + "type": "boolean", + "description": "If you don't want to support opaque access tokens, change this configuration parameter to `false` to disable introspection.", + "default": true + } + }, + { + "channel_token_issuer": { + "required": false, + "type": "string", + "description": "The `iss` claim of the re-signed channel token is set to this value, which is `kong` by default. The original `iss` claim of the incoming token (possibly introspected) is stored in the `original_iss` claim of the newly signed channel token.", + "default": "kong" + } + }, + { + "channel_token_keyset": { + "required": false, + "type": "string", + "description": "The name of the keyset containing signing keys.", + "default": "kong" + } + }, + { + "channel_token_keyset_client_username": { + "required": false, + "description": "The client username that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_password`", + "referenceable": true, + "type": "string" + } + }, + { + "channel_token_keyset_client_password": { + "encrypted": true, + "referenceable": true, + "required": false, + "type": "string", + "description": "The client password that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_username`" + } + }, + { + "channel_token_keyset_client_certificate": { + "required": false, + "type": "foreign", + "description": "The client certificate that will be used to authenticate Kong if `channel_token_keyset` is an https uri that requires mTLS Auth.", + "reference": "certificates" + } + }, + { + "channel_token_keyset_rotate_period": { + "required": false, + "type": "number", + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_keyset`. The default value 0 means no auto-rotation.", + "default": 0 + } + }, + { + "channel_token_jwks_uri": { + "required": false, + "type": "string", + "description": "If you want to use `config.verify_channel_token_signature`, you must specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the channel token. If you don't specify a URI and you pass a JWT token to the plugin, then the plugin responds with `401 Unauthorized`." + } + }, + { + "channel_token_jwks_uri_client_username": { + "required": false, + "description": "The client username that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_password`", + "referenceable": true, + "type": "string" + } + }, + { + "channel_token_jwks_uri_client_password": { + "encrypted": true, + "referenceable": true, + "required": false, + "type": "string", + "description": "The client password that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_username`" + } + }, + { + "channel_token_jwks_uri_client_certificate": { + "required": false, + "type": "foreign", + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "reference": "certificates" + } + }, + { + "channel_token_jwks_uri_rotate_period": { + "required": false, + "type": "number", + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_jwks_uri`. The default value 0 means no auto-rotation.", + "default": 0 + } + }, + { + "channel_token_request_header": { + "required": false, + "type": "string", + "description": "This parameter tells the name of the header where to look for the channel token. If you don't want to do anything with the channel token, then you can set this to `null` or `\"\"` (empty string)." + } + }, + { + "channel_token_leeway": { + "required": false, + "type": "number", + "description": "Adjusts clock skew between the token issuer and Kong. The value will be added to token's `exp` claim before checking token expiry against Kong servers current time in seconds. You can disable channel token `expiry` verification altogether with `config.verify_channel_token_expiry`.", + "default": 0 + } + }, + { + "channel_token_scopes_required": { + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.channel_token_scopes_claim`." + } + }, + { + "channel_token_scopes_claim": { + "type": "array", + "required": false, + "elements": { + "type": "string" + }, + "description": "Specify the claim in a channel token to verify against values of `config.channel_token_scopes_required`. This supports nested claims.", + "default": [ + "scope" + ] + } + }, + { + "channel_token_consumer_claim": { + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter. Kong consumers have an `id`, a `username`, and a `custom_id`. If this parameter is enabled but the mapping fails, such as when there's a non-existent Kong consumer, the plugin responds with `403 Forbidden`." + } + }, + { + "channel_token_consumer_by": { + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "description": "When the plugin tries to do channel token to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of valid values: `id`, `username`, and `custom_id`.", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "channel_token_upstream_header": { + "required": false, + "type": "string", + "description": "This plugin removes the `config.channel_token_request_header` from the request after reading its value." + } + }, + { + "channel_token_upstream_leeway": { + "required": false, + "type": "number", + "description": "If you want to add or perhaps subtract (using negative value) expiry time of the original channel token, you can specify a value that is added to the original channel token's `exp` claim.", + "default": 0 + } + }, + { + "channel_token_introspection_endpoint": { + "required": false, + "type": "string", + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise, the plugin does not try introspection and returns `401 Unauthorized` instead." + } + }, + { + "channel_token_introspection_authorization": { + "required": false, + "elements": { + "type": "string" + }, + "type": "string", + "description": "When using `opaque` channel tokens, and you want to turn on channel token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise the plugin will not try introspection, and instead returns `401 Unauthorized` when using opaque channel tokens." + } + }, + { + "channel_token_introspection_body_args": { + "required": false, + "elements": { + "type": "string" + }, + "type": "string", + "description": "If you need to pass additional body arguments to introspection endpoint when the plugin introspects the opaque channel token, you can use this config parameter to specify them. You should URL encode the value. For example: `resource=` or `a=1&b=&c`." + } + }, + { + "channel_token_introspection_hint": { + "required": false, + "elements": { + "type": "string" + }, + "type": "string", + "description": "If you need to give `hint` parameter when introspecting a channel token, you can use this parameter to specify the value of such parameter. By default, a `hint` isn't sent with channel token introspection." + } + }, + { + "channel_token_introspection_jwt_claim": { + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "description": "If your introspection endpoint returns a channel token in one of the keys (or claims) in the introspection results (`JSON`), the plugin can use that value instead of the introspection results when doing expiry verification and signing of the new token issued by Kong." + } + }, + { + "channel_token_introspection_scopes_required": { + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "description": "Use this parameter to specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.channel_token_introspection_scopes_claim`." + } + }, + { + "channel_token_introspection_scopes_claim": { + "type": "array", + "required": false, + "elements": { + "type": "string" + }, + "description": "Use this parameter to specify the claim/property in channel token introspection results (`JSON`) to be verified against values of `config.channel_token_introspection_scopes_required`. This supports nested claims.", + "default": [ + "scope" + ] + } + }, + { + "channel_token_introspection_consumer_claim": { + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in channel token introspection results to Kong consumer entity" + } + }, + { + "channel_token_introspection_consumer_by": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "description": "When the plugin tries to do channel token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values. Valid values are `id`, `username` and `custom_id`.", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "channel_token_introspection_leeway": { + "required": false, + "type": "number", + "description": "You can use this parameter to adjust clock skew between the token issuer introspection results and Kong. The value will be added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time (in seconds). You can disable channel token introspection `expiry` verification altogether with `config.verify_channel_token_introspection_expiry`.", + "default": 0 + } + }, + { + "channel_token_introspection_timeout": { + "required": false, + "type": "number", + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on channel token introspection." + } + }, + { + "channel_token_signing_algorithm": { + "default": "RS256", + "required": true, + "type": "string", + "description": "When this plugin sets the upstream header as specified with `config.channel_token_upstream_header`, it also re-signs the original channel token using private keys of this plugin. Specify the algorithm that is used to sign the token.", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ] + } + }, + { + "add_channel_token_claims": { + "keys": { + "type": "string" + }, + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "required": false, + "values": { + "type": "string" + }, + "type": "map", + "default": [ + + ] + } + }, + { + "set_channel_token_claims": { + "keys": { + "type": "string" + }, + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "required": false, + "values": { + "type": "string" + }, + "type": "map", + "default": [ + + ] + } + }, + { + "remove_channel_token_claims": { + "type": "array", + "required": false, + "elements": { + "type": "string" + }, + "description": "remove claims. It should be an array, and each element is a claim key string.", + "default": [ + + ] + } + }, + { + "original_channel_token_upstream_header": { + "required": false, + "type": "string", + "description": "The HTTP header name used to store the original channel token." + } + }, + { + "channel_token_optional": { + "required": false, + "type": "boolean", + "description": "If a channel token is not provided or no `config.channel_token_request_header` is specified, the plugin cannot verify the channel token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Enable this parameter to allow the request to proceed even when there is no channel token to check. If the channel token is provided, then this parameter has no effect", + "default": false + } + }, + { + "verify_channel_token_signature": { + "required": false, + "type": "boolean", + "description": "Quickly turn on/off the channel token signature verification.", + "default": true + } + }, + { + "verify_channel_token_expiry": { + "required": false, + "type": "boolean", + "default": true + } + }, + { + "verify_channel_token_scopes": { + "required": false, + "type": "boolean", + "description": "Quickly turn on/off the channel token required scopes verification specified with `config.channel_token_scopes_required`.", + "default": true + } + }, + { + "verify_channel_token_introspection_expiry": { + "required": false, + "type": "boolean", + "description": "Quickly turn on/off the channel token introspection expiry verification.", + "default": true + } + }, + { + "verify_channel_token_introspection_scopes": { + "required": false, + "type": "boolean", + "description": "Quickly turn on/off the channel token introspection scopes verification specified with `config.channel_token_introspection_scopes_required`.", + "default": true + } + }, + { + "cache_channel_token_introspection": { + "required": false, + "type": "boolean", + "description": "Whether to cache channel token introspection results.", + "default": true + } + }, + { + "trust_channel_token_introspection": { + "required": false, + "type": "boolean", + "description": "Providing an opaque channel token for plugin introspection, and verifying expiry and scopes on introspection results may make further payload checks unnecessary before the plugin signs a new token. This also applies when using a JWT token with introspection JSON as per config.channel_token_introspection_jwt_claim. Use this parameter to manage additional payload checks before signing a new token. With true (default), payload's expiry or scopes aren't checked.", + "default": true + } + }, + { + "enable_channel_token_introspection": { + "required": false, + "type": "boolean", + "description": "If you don't want to support opaque channel tokens, disable introspection by changing this configuration parameter to `false`.", + "default": true + } + }, + { + "add_claims": { + "keys": { + "type": "string" + }, + "description": "Add customized claims to both tokens if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "required": false, + "values": { + "type": "string" + }, + "type": "map", + "default": [ + + ] + } + }, + { + "set_claims": { + "keys": { + "type": "string" + }, + "description": "Set customized claims to both tokens. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "required": false, + "values": { + "type": "string" + }, + "type": "map", + "default": [ + + ] + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "access_token_jwks_uri_client_username", + "access_token_jwks_uri_client_password" + ] + }, + { + "mutually_required": [ + "access_token_keyset_client_username", + "access_token_keyset_client_password" + ] + }, + { + "mutually_required": [ + "channel_token_jwks_uri_client_username", + "channel_token_jwks_uri_client_password" + ] + }, + { + "mutually_required": [ + "channel_token_keyset_client_username", + "channel_token_keyset_client_password" + ] + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.access_token_upstream_header", + "config.channel_token_upstream_header", + "config.original_access_token_upstream_header", + "config.original_channel_token_upstream_header" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwt-signer/3.8.x.json b/schemas/jwt-signer/3.8.x.json new file mode 100644 index 00000000..1f21e368 --- /dev/null +++ b/schemas/jwt-signer/3.8.x.json @@ -0,0 +1,997 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "realm": { + "description": "When authentication or authorization fails, or there is an unexpected error, the plugin sends an `WWW-Authenticate` header with the `realm` attribute value.", + "required": false, + "type": "string" + } + }, + { + "enable_hs_signatures": { + "description": "Tokens signed with HMAC algorithms such as `HS256`, `HS384`, or `HS512` are not accepted by default. If you need to accept such tokens for verification, enable this setting.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "enable_instrumentation": { + "description": "Writes log entries with some added information using `ngx.CRIT` (CRITICAL) level.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "access_token_issuer": { + "description": "The `iss` claim of a signed or re-signed access token is set to this value. Original `iss` claim of the incoming token (possibly introspected) is stored in `original_iss` claim of the newly signed access token.", + "required": false, + "type": "string", + "default": "kong" + } + }, + { + "access_token_keyset": { + "description": "The name of the keyset containing signing keys.", + "required": false, + "type": "string", + "default": "kong" + } + }, + { + "access_token_keyset_client_username": { + "description": "The client username that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_password`", + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "access_token_keyset_client_password": { + "description": "The client password that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_username`", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "access_token_keyset_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_keyset` is an https uri that requires mTLS Auth.", + "required": false, + "type": "foreign", + "reference": "certificates" + } + }, + { + "access_token_keyset_rotate_period": { + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_keyset`. The default value 0 means no auto-rotation.", + "required": false, + "type": "number", + "default": 0 + } + }, + { + "access_token_jwks_uri": { + "description": "Specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the access token.", + "required": false, + "type": "string" + } + }, + { + "access_token_jwks_uri_client_username": { + "description": "The client username that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_password`", + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "access_token_jwks_uri_client_password": { + "description": "The client password that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_username`", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "access_token_jwks_uri_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "required": false, + "type": "foreign", + "reference": "certificates" + } + }, + { + "access_token_jwks_uri_rotate_period": { + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_jwks_uri`. The default value 0 means no auto-rotation.", + "required": false, + "type": "number", + "default": 0 + } + }, + { + "access_token_request_header": { + "description": "This parameter tells the name of the header where to look for the access token.", + "required": false, + "type": "string", + "default": "Authorization" + } + }, + { + "access_token_leeway": { + "description": "Adjusts clock skew between the token issuer and Kong. The value is added to the token's `exp` claim before checking token expiry against Kong servers' current time in seconds. You can disable access token `expiry` verification altogether with `config.verify_access_token_expiry`.", + "required": false, + "type": "number", + "default": 0 + } + }, + { + "access_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.access_token_scopes_claim`.", + "required": false, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "access_token_scopes_claim": { + "description": "Specify the claim in an access token to verify against values of `config.access_token_scopes_required`.", + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "scope" + ] + } + }, + { + "access_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (for example, `sub` or `username`) in an access token to Kong consumer entity.", + "required": false, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "access_token_consumer_by": { + "description": "When the plugin tries to apply an access token to a Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of alues. Valid values are `id`, `username`, and `custom_id`.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "type": "array", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "access_token_upstream_header": { + "description": "Removes the `config.access_token_request_header` from the request after reading its value. With `config.access_token_upstream_header`, you can specify the upstream header where the plugin adds the Kong signed token. If you don't specify a value, such as use `null` or `\"\"` (empty string), the plugin does not even try to sign or re-sign the token.", + "required": false, + "type": "string", + "default": "Authorization:Bearer" + } + }, + { + "access_token_upstream_leeway": { + "description": "If you want to add or subtract (using a negative value) expiry time (in seconds) of the original access token, you can specify a value that is added to the original access token's `exp` claim.", + "required": false, + "type": "number", + "default": 0 + } + }, + { + "access_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter.", + "required": false, + "type": "string" + } + }, + { + "access_token_introspection_authorization": { + "description": "If the introspection endpoint requires client authentication (client being the JWT Signer plugin), you can specify the `Authorization` header's value with this configuration parameter.", + "required": false, + "type": "string" + } + }, + { + "access_token_introspection_body_args": { + "description": "This parameter allows you to pass URL encoded request body arguments. For example: `resource=` or `a=1&b=&c`.", + "required": false, + "type": "string" + } + }, + { + "access_token_introspection_hint": { + "description": "If you need to give `hint` parameter when introspecting an access token, use this parameter to specify the value. By default, the plugin sends `hint=access_token`.", + "required": false, + "type": "string", + "default": "access_token" + } + }, + { + "access_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns an access token in one of the keys (or claims) within the introspection results (`JSON`). If the key cannot be found, the plugin responds with `401 Unauthorized`. Also if the key is found but cannot be decoded as JWT, it also responds with `401 Unauthorized`.", + "required": false, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "access_token_introspection_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.access_token_introspection_scopes_claim`.", + "required": false, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "access_token_introspection_scopes_claim": { + "description": "Specify the claim/property in access token introspection results (`JSON`) to be verified against values of `config.access_token_introspection_scopes_required`. This supports nested claims. For example, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`, hich can be given as `realm_access,roles` (form post). If the claim is not found in access token introspection results, and you have specified `config.access_token_introspection_scopes_required`, the plugin responds with `403 Forbidden`.", + "required": true, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "scope" + ] + } + }, + { + "access_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in access token introspection results to the Kong consumer entity.", + "required": false, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "access_token_introspection_consumer_by": { + "description": "When the plugin tries to do access token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "type": "array", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "access_token_introspection_leeway": { + "description": "Adjusts clock skew between the token issuer introspection results and Kong. The value is added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time in seconds. You can disable access token introspection `expiry` verification altogether with `config.verify_access_token_introspection_expiry`.", + "required": false, + "type": "number", + "default": 0 + } + }, + { + "access_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on access token introspection.", + "required": false, + "type": "number" + } + }, + { + "access_token_signing_algorithm": { + "description": "When this plugin sets the upstream header as specified with `config.access_token_upstream_header`, re-signs the original access token using the private keys of the JWT Signer plugin. Specify the algorithm that is used to sign the token. The `config.access_token_issuer` specifies which `keyset` is used to sign the new token issued by Kong using the specified signing algorithm.", + "required": true, + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ], + "type": "string", + "default": "RS256" + } + }, + { + "add_access_token_claims": { + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "required": false, + "values": { + "type": "string" + }, + "keys": { + "type": "string" + }, + "type": "map", + "default": [ + + ] + } + }, + { + "set_access_token_claims": { + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "required": false, + "values": { + "type": "string" + }, + "keys": { + "type": "string" + }, + "type": "map", + "default": [ + + ] + } + }, + { + "remove_access_token_claims": { + "description": "remove claims. It should be an array, and each element is a claim key string.", + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "original_access_token_upstream_header": { + "description": "The HTTP header name used to store the original access token.", + "required": false, + "type": "string" + } + }, + { + "access_token_optional": { + "description": "If an access token is not provided or no `config.access_token_request_header` is specified, the plugin cannot verify the access token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Use this parameter to allow the request to proceed even when there is no token to check. If the token is provided, then this parameter has no effect", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "verify_access_token_signature": { + "description": "Quickly turn access token signature verification off and on as needed.", + "required": false, + "type": "boolean", + "default": true + } + }, + { + "verify_access_token_expiry": { + "description": "Quickly turn access token expiry verification off and on as needed.", + "required": false, + "type": "boolean", + "default": true + } + }, + { + "verify_access_token_scopes": { + "description": "Quickly turn off and on the access token required scopes verification, specified with `config.access_token_scopes_required`.", + "required": false, + "type": "boolean", + "default": true + } + }, + { + "verify_access_token_introspection_expiry": { + "description": "Quickly turn access token introspection expiry verification off and on as needed.", + "required": false, + "type": "boolean", + "default": true + } + }, + { + "verify_access_token_introspection_scopes": { + "description": "Quickly turn off and on the access token introspection scopes verification, specified with `config.access_token_introspection_scopes_required`.", + "required": false, + "type": "boolean", + "default": true + } + }, + { + "cache_access_token_introspection": { + "description": "Whether to cache access token introspection results.", + "required": false, + "type": "boolean", + "default": true + } + }, + { + "trust_access_token_introspection": { + "description": "Use this parameter to enable and disable further checks on a payload before the new token is signed. If you set this to `true`, the expiry or scopes are not checked on a payload.", + "required": false, + "type": "boolean", + "default": true + } + }, + { + "enable_access_token_introspection": { + "description": "If you don't want to support opaque access tokens, change this configuration parameter to `false` to disable introspection.", + "required": false, + "type": "boolean", + "default": true + } + }, + { + "channel_token_issuer": { + "description": "The `iss` claim of the re-signed channel token is set to this value, which is `kong` by default. The original `iss` claim of the incoming token (possibly introspected) is stored in the `original_iss` claim of the newly signed channel token.", + "required": false, + "type": "string", + "default": "kong" + } + }, + { + "channel_token_keyset": { + "description": "The name of the keyset containing signing keys.", + "required": false, + "type": "string", + "default": "kong" + } + }, + { + "channel_token_keyset_client_username": { + "description": "The client username that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_password`", + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "channel_token_keyset_client_password": { + "description": "The client password that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_username`", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "channel_token_keyset_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `channel_token_keyset` is an https uri that requires mTLS Auth.", + "required": false, + "type": "foreign", + "reference": "certificates" + } + }, + { + "channel_token_keyset_rotate_period": { + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_keyset`. The default value 0 means no auto-rotation.", + "required": false, + "type": "number", + "default": 0 + } + }, + { + "channel_token_jwks_uri": { + "description": "If you want to use `config.verify_channel_token_signature`, you must specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the channel token. If you don't specify a URI and you pass a JWT token to the plugin, then the plugin responds with `401 Unauthorized`.", + "required": false, + "type": "string" + } + }, + { + "channel_token_jwks_uri_client_username": { + "description": "The client username that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_password`", + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "channel_token_jwks_uri_client_password": { + "description": "The client password that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_username`", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "channel_token_jwks_uri_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "required": false, + "type": "foreign", + "reference": "certificates" + } + }, + { + "channel_token_jwks_uri_rotate_period": { + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_jwks_uri`. The default value 0 means no auto-rotation.", + "required": false, + "type": "number", + "default": 0 + } + }, + { + "channel_token_request_header": { + "description": "This parameter tells the name of the header where to look for the channel token. If you don't want to do anything with the channel token, then you can set this to `null` or `\"\"` (empty string).", + "required": false, + "type": "string" + } + }, + { + "channel_token_leeway": { + "description": "Adjusts clock skew between the token issuer and Kong. The value will be added to token's `exp` claim before checking token expiry against Kong servers current time in seconds. You can disable channel token `expiry` verification altogether with `config.verify_channel_token_expiry`.", + "required": false, + "type": "number", + "default": 0 + } + }, + { + "channel_token_scopes_required": { + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.channel_token_scopes_claim`.", + "required": false, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_scopes_claim": { + "description": "Specify the claim in a channel token to verify against values of `config.channel_token_scopes_required`. This supports nested claims.", + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "scope" + ] + } + }, + { + "channel_token_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter. Kong consumers have an `id`, a `username`, and a `custom_id`. If this parameter is enabled but the mapping fails, such as when there's a non-existent Kong consumer, the plugin responds with `403 Forbidden`.", + "required": false, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_consumer_by": { + "description": "When the plugin tries to do channel token to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of valid values: `id`, `username`, and `custom_id`.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "default": [ + "username", + "custom_id" + ] + } + }, + { + "channel_token_upstream_header": { + "description": "This plugin removes the `config.channel_token_request_header` from the request after reading its value.", + "required": false, + "type": "string" + } + }, + { + "channel_token_upstream_leeway": { + "description": "If you want to add or perhaps subtract (using negative value) expiry time of the original channel token, you can specify a value that is added to the original channel token's `exp` claim.", + "required": false, + "type": "number", + "default": 0 + } + }, + { + "channel_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise, the plugin does not try introspection and returns `401 Unauthorized` instead.", + "required": false, + "type": "string" + } + }, + { + "channel_token_introspection_authorization": { + "description": "When using `opaque` channel tokens, and you want to turn on channel token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise the plugin will not try introspection, and instead returns `401 Unauthorized` when using opaque channel tokens.", + "required": false, + "type": "string", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_body_args": { + "description": "If you need to pass additional body arguments to introspection endpoint when the plugin introspects the opaque channel token, you can use this config parameter to specify them. You should URL encode the value. For example: `resource=` or `a=1&b=&c`.", + "required": false, + "type": "string", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_hint": { + "description": "If you need to give `hint` parameter when introspecting a channel token, you can use this parameter to specify the value of such parameter. By default, a `hint` isn't sent with channel token introspection.", + "required": false, + "type": "string", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_jwt_claim": { + "description": "If your introspection endpoint returns a channel token in one of the keys (or claims) in the introspection results (`JSON`), the plugin can use that value instead of the introspection results when doing expiry verification and signing of the new token issued by Kong.", + "required": false, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_scopes_required": { + "description": "Use this parameter to specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.channel_token_introspection_scopes_claim`.", + "required": false, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_scopes_claim": { + "description": "Use this parameter to specify the claim/property in channel token introspection results (`JSON`) to be verified against values of `config.channel_token_introspection_scopes_required`. This supports nested claims.", + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "scope" + ] + } + }, + { + "channel_token_introspection_consumer_claim": { + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in channel token introspection results to Kong consumer entity", + "required": false, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "channel_token_introspection_consumer_by": { + "description": "When the plugin tries to do channel token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values. Valid values are `id`, `username` and `custom_id`.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "type": "array", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "channel_token_introspection_leeway": { + "description": "You can use this parameter to adjust clock skew between the token issuer introspection results and Kong. The value will be added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time (in seconds). You can disable channel token introspection `expiry` verification altogether with `config.verify_channel_token_introspection_expiry`.", + "required": false, + "type": "number", + "default": 0 + } + }, + { + "channel_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on channel token introspection.", + "required": false, + "type": "number" + } + }, + { + "channel_token_signing_algorithm": { + "description": "When this plugin sets the upstream header as specified with `config.channel_token_upstream_header`, it also re-signs the original channel token using private keys of this plugin. Specify the algorithm that is used to sign the token.", + "required": true, + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ], + "type": "string", + "default": "RS256" + } + }, + { + "add_channel_token_claims": { + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "required": false, + "values": { + "type": "string" + }, + "keys": { + "type": "string" + }, + "type": "map", + "default": [ + + ] + } + }, + { + "set_channel_token_claims": { + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "required": false, + "values": { + "type": "string" + }, + "keys": { + "type": "string" + }, + "type": "map", + "default": [ + + ] + } + }, + { + "remove_channel_token_claims": { + "description": "remove claims. It should be an array, and each element is a claim key string.", + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "original_channel_token_upstream_header": { + "description": "The HTTP header name used to store the original channel token.", + "required": false, + "type": "string" + } + }, + { + "channel_token_optional": { + "description": "If a channel token is not provided or no `config.channel_token_request_header` is specified, the plugin cannot verify the channel token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Enable this parameter to allow the request to proceed even when there is no channel token to check. If the channel token is provided, then this parameter has no effect", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "verify_channel_token_signature": { + "description": "Quickly turn on/off the channel token signature verification.", + "required": false, + "type": "boolean", + "default": true + } + }, + { + "verify_channel_token_expiry": { + "type": "boolean", + "required": false, + "default": true + } + }, + { + "verify_channel_token_scopes": { + "description": "Quickly turn on/off the channel token required scopes verification specified with `config.channel_token_scopes_required`.", + "required": false, + "type": "boolean", + "default": true + } + }, + { + "verify_channel_token_introspection_expiry": { + "description": "Quickly turn on/off the channel token introspection expiry verification.", + "required": false, + "type": "boolean", + "default": true + } + }, + { + "verify_channel_token_introspection_scopes": { + "description": "Quickly turn on/off the channel token introspection scopes verification specified with `config.channel_token_introspection_scopes_required`.", + "required": false, + "type": "boolean", + "default": true + } + }, + { + "cache_channel_token_introspection": { + "description": "Whether to cache channel token introspection results.", + "required": false, + "type": "boolean", + "default": true + } + }, + { + "trust_channel_token_introspection": { + "description": "Providing an opaque channel token for plugin introspection, and verifying expiry and scopes on introspection results may make further payload checks unnecessary before the plugin signs a new token. This also applies when using a JWT token with introspection JSON as per config.channel_token_introspection_jwt_claim. Use this parameter to manage additional payload checks before signing a new token. With true (default), payload's expiry or scopes aren't checked.", + "required": false, + "type": "boolean", + "default": true + } + }, + { + "enable_channel_token_introspection": { + "description": "If you don't want to support opaque channel tokens, disable introspection by changing this configuration parameter to `false`.", + "required": false, + "type": "boolean", + "default": true + } + }, + { + "add_claims": { + "description": "Add customized claims to both tokens if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "required": false, + "values": { + "type": "string" + }, + "keys": { + "type": "string" + }, + "type": "map", + "default": [ + + ] + } + }, + { + "set_claims": { + "description": "Set customized claims to both tokens. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "required": false, + "values": { + "type": "string" + }, + "keys": { + "type": "string" + }, + "type": "map", + "default": [ + + ] + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "access_token_jwks_uri_client_username", + "access_token_jwks_uri_client_password" + ] + }, + { + "mutually_required": [ + "access_token_keyset_client_username", + "access_token_keyset_client_password" + ] + }, + { + "mutually_required": [ + "channel_token_jwks_uri_client_username", + "channel_token_jwks_uri_client_password" + ] + }, + { + "mutually_required": [ + "channel_token_keyset_client_username", + "channel_token_keyset_client_password" + ] + } + ], + "required": true, + "type": "record" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.access_token_upstream_header", + "config.channel_token_upstream_header", + "config.original_access_token_upstream_header", + "config.original_channel_token_upstream_header" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwt-signer/3.9.x.json b/schemas/jwt-signer/3.9.x.json new file mode 100644 index 00000000..613ca8b3 --- /dev/null +++ b/schemas/jwt-signer/3.9.x.json @@ -0,0 +1,997 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config.access_token_upstream_header", + "config.channel_token_upstream_header", + "config.original_access_token_upstream_header", + "config.original_channel_token_upstream_header" + ] + } + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "mutually_required": [ + "access_token_jwks_uri_client_username", + "access_token_jwks_uri_client_password" + ] + }, + { + "mutually_required": [ + "access_token_keyset_client_username", + "access_token_keyset_client_password" + ] + }, + { + "mutually_required": [ + "channel_token_jwks_uri_client_username", + "channel_token_jwks_uri_client_password" + ] + }, + { + "mutually_required": [ + "channel_token_keyset_client_username", + "channel_token_keyset_client_password" + ] + } + ], + "type": "record", + "required": true, + "fields": [ + { + "realm": { + "description": "When authentication or authorization fails, or there is an unexpected error, the plugin sends an `WWW-Authenticate` header with the `realm` attribute value.", + "required": false, + "type": "string" + } + }, + { + "enable_hs_signatures": { + "default": false, + "description": "Tokens signed with HMAC algorithms such as `HS256`, `HS384`, or `HS512` are not accepted by default. If you need to accept such tokens for verification, enable this setting.", + "required": false, + "type": "boolean" + } + }, + { + "enable_instrumentation": { + "default": false, + "description": "Writes log entries with some added information using `ngx.CRIT` (CRITICAL) level.", + "required": false, + "type": "boolean" + } + }, + { + "access_token_issuer": { + "default": "kong", + "description": "The `iss` claim of a signed or re-signed access token is set to this value. Original `iss` claim of the incoming token (possibly introspected) is stored in `original_iss` claim of the newly signed access token.", + "required": false, + "type": "string" + } + }, + { + "access_token_keyset": { + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "required": false, + "type": "string" + } + }, + { + "access_token_keyset_client_username": { + "referenceable": true, + "description": "The client username that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_password`", + "required": false, + "type": "string" + } + }, + { + "access_token_keyset_client_password": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "The client password that will be used to authenticate Kong if `access_token_keyset` is a uri that requires Basic Auth. Should be configured together with `access_token_keyset_client_username`", + "required": false + } + }, + { + "access_token_keyset_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_keyset` is an https uri that requires mTLS Auth.", + "reference": "certificates", + "required": false, + "type": "foreign" + } + }, + { + "access_token_keyset_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_keyset`. The default value 0 means no auto-rotation.", + "required": false, + "type": "number" + } + }, + { + "access_token_jwks_uri": { + "description": "Specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the access token.", + "required": false, + "type": "string" + } + }, + { + "access_token_jwks_uri_client_username": { + "referenceable": true, + "description": "The client username that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_password`", + "required": false, + "type": "string" + } + }, + { + "access_token_jwks_uri_client_password": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "The client password that will be used to authenticate Kong if `access_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `access_token_jwks_uri_client_username`", + "required": false + } + }, + { + "access_token_jwks_uri_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "reference": "certificates", + "required": false, + "type": "foreign" + } + }, + { + "access_token_jwks_uri_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `access_token_jwks_uri`. The default value 0 means no auto-rotation.", + "required": false, + "type": "number" + } + }, + { + "access_token_request_header": { + "default": "Authorization", + "description": "This parameter tells the name of the header where to look for the access token.", + "required": false, + "type": "string" + } + }, + { + "access_token_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value is added to the token's `exp` claim before checking token expiry against Kong servers' current time in seconds. You can disable access token `expiry` verification altogether with `config.verify_access_token_expiry`.", + "required": false, + "type": "number" + } + }, + { + "access_token_scopes_required": { + "elements": { + "type": "string" + }, + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.access_token_scopes_claim`.", + "required": false, + "type": "array" + } + }, + { + "access_token_scopes_claim": { + "required": false, + "type": "array", + "elements": { + "type": "string" + }, + "description": "Specify the claim in an access token to verify against values of `config.access_token_scopes_required`.", + "default": [ + "scope" + ] + } + }, + { + "access_token_consumer_claim": { + "elements": { + "type": "string" + }, + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (for example, `sub` or `username`) in an access token to Kong consumer entity.", + "required": false, + "type": "array" + } + }, + { + "access_token_consumer_by": { + "required": false, + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "description": "When the plugin tries to apply an access token to a Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of alues. Valid values are `id`, `username`, and `custom_id`.", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "access_token_upstream_header": { + "default": "Authorization:Bearer", + "description": "Removes the `config.access_token_request_header` from the request after reading its value. With `config.access_token_upstream_header`, you can specify the upstream header where the plugin adds the Kong signed token. If you don't specify a value, such as use `null` or `\"\"` (empty string), the plugin does not even try to sign or re-sign the token.", + "required": false, + "type": "string" + } + }, + { + "access_token_upstream_leeway": { + "default": 0, + "description": "If you want to add or subtract (using a negative value) expiry time (in seconds) of the original access token, you can specify a value that is added to the original access token's `exp` claim.", + "required": false, + "type": "number" + } + }, + { + "access_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter.", + "required": false, + "type": "string" + } + }, + { + "access_token_introspection_authorization": { + "description": "If the introspection endpoint requires client authentication (client being the JWT Signer plugin), you can specify the `Authorization` header's value with this configuration parameter.", + "required": false, + "type": "string" + } + }, + { + "access_token_introspection_body_args": { + "description": "This parameter allows you to pass URL encoded request body arguments. For example: `resource=` or `a=1&b=&c`.", + "required": false, + "type": "string" + } + }, + { + "access_token_introspection_hint": { + "default": "access_token", + "description": "If you need to give `hint` parameter when introspecting an access token, use this parameter to specify the value. By default, the plugin sends `hint=access_token`.", + "required": false, + "type": "string" + } + }, + { + "access_token_introspection_jwt_claim": { + "elements": { + "type": "string" + }, + "description": "If your introspection endpoint returns an access token in one of the keys (or claims) within the introspection results (`JSON`). If the key cannot be found, the plugin responds with `401 Unauthorized`. Also if the key is found but cannot be decoded as JWT, it also responds with `401 Unauthorized`.", + "required": false, + "type": "array" + } + }, + { + "access_token_introspection_scopes_required": { + "elements": { + "type": "string" + }, + "description": "Specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.access_token_introspection_scopes_claim`.", + "required": false, + "type": "array" + } + }, + { + "access_token_introspection_scopes_claim": { + "required": true, + "type": "array", + "elements": { + "type": "string" + }, + "description": "Specify the claim/property in access token introspection results (`JSON`) to be verified against values of `config.access_token_introspection_scopes_required`. This supports nested claims. For example, with Keycloak you could use `[ \"realm_access\", \"roles\" ]`, hich can be given as `realm_access,roles` (form post). If the claim is not found in access token introspection results, and you have specified `config.access_token_introspection_scopes_required`, the plugin responds with `403 Forbidden`.", + "default": [ + "scope" + ] + } + }, + { + "access_token_introspection_consumer_claim": { + "elements": { + "type": "string" + }, + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in access token introspection results to the Kong consumer entity.", + "required": false, + "type": "array" + } + }, + { + "access_token_introspection_consumer_by": { + "required": false, + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "description": "When the plugin tries to do access token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values.", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "access_token_introspection_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer introspection results and Kong. The value is added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time in seconds. You can disable access token introspection `expiry` verification altogether with `config.verify_access_token_introspection_expiry`.", + "required": false, + "type": "number" + } + }, + { + "access_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on access token introspection.", + "required": false, + "type": "number" + } + }, + { + "access_token_signing_algorithm": { + "required": true, + "type": "string", + "default": "RS256", + "description": "When this plugin sets the upstream header as specified with `config.access_token_upstream_header`, re-signs the original access token using the private keys of the JWT Signer plugin. Specify the algorithm that is used to sign the token. The `config.access_token_issuer` specifies which `keyset` is used to sign the new token issued by Kong using the specified signing algorithm.", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ] + } + }, + { + "add_access_token_claims": { + "values": { + "type": "string" + }, + "required": false, + "type": "map", + "default": [ + + ], + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "keys": { + "type": "string" + } + } + }, + { + "set_access_token_claims": { + "values": { + "type": "string" + }, + "required": false, + "type": "map", + "default": [ + + ], + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "keys": { + "type": "string" + } + } + }, + { + "remove_access_token_claims": { + "required": false, + "type": "array", + "elements": { + "type": "string" + }, + "description": "remove claims. It should be an array, and each element is a claim key string.", + "default": [ + + ] + } + }, + { + "original_access_token_upstream_header": { + "description": "The HTTP header name used to store the original access token.", + "required": false, + "type": "string" + } + }, + { + "access_token_optional": { + "default": false, + "description": "If an access token is not provided or no `config.access_token_request_header` is specified, the plugin cannot verify the access token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Use this parameter to allow the request to proceed even when there is no token to check. If the token is provided, then this parameter has no effect", + "required": false, + "type": "boolean" + } + }, + { + "verify_access_token_signature": { + "default": true, + "description": "Quickly turn access token signature verification off and on as needed.", + "required": false, + "type": "boolean" + } + }, + { + "verify_access_token_expiry": { + "default": true, + "description": "Quickly turn access token expiry verification off and on as needed.", + "required": false, + "type": "boolean" + } + }, + { + "verify_access_token_scopes": { + "default": true, + "description": "Quickly turn off and on the access token required scopes verification, specified with `config.access_token_scopes_required`.", + "required": false, + "type": "boolean" + } + }, + { + "verify_access_token_introspection_expiry": { + "default": true, + "description": "Quickly turn access token introspection expiry verification off and on as needed.", + "required": false, + "type": "boolean" + } + }, + { + "verify_access_token_introspection_scopes": { + "default": true, + "description": "Quickly turn off and on the access token introspection scopes verification, specified with `config.access_token_introspection_scopes_required`.", + "required": false, + "type": "boolean" + } + }, + { + "cache_access_token_introspection": { + "default": true, + "description": "Whether to cache access token introspection results.", + "required": false, + "type": "boolean" + } + }, + { + "trust_access_token_introspection": { + "default": true, + "description": "Use this parameter to enable and disable further checks on a payload before the new token is signed. If you set this to `true`, the expiry or scopes are not checked on a payload.", + "required": false, + "type": "boolean" + } + }, + { + "enable_access_token_introspection": { + "default": true, + "description": "If you don't want to support opaque access tokens, change this configuration parameter to `false` to disable introspection.", + "required": false, + "type": "boolean" + } + }, + { + "channel_token_issuer": { + "default": "kong", + "description": "The `iss` claim of the re-signed channel token is set to this value, which is `kong` by default. The original `iss` claim of the incoming token (possibly introspected) is stored in the `original_iss` claim of the newly signed channel token.", + "required": false, + "type": "string" + } + }, + { + "channel_token_keyset": { + "default": "kong", + "description": "The name of the keyset containing signing keys.", + "required": false, + "type": "string" + } + }, + { + "channel_token_keyset_client_username": { + "referenceable": true, + "description": "The client username that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_password`", + "required": false, + "type": "string" + } + }, + { + "channel_token_keyset_client_password": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "The client password that will be used to authenticate Kong if `channel_token_keyset` is a uri that requires Basic Auth. Should be configured together with `channel_token_keyset_client_username`", + "required": false + } + }, + { + "channel_token_keyset_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `channel_token_keyset` is an https uri that requires mTLS Auth.", + "reference": "certificates", + "required": false, + "type": "foreign" + } + }, + { + "channel_token_keyset_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_keyset`. The default value 0 means no auto-rotation.", + "required": false, + "type": "number" + } + }, + { + "channel_token_jwks_uri": { + "description": "If you want to use `config.verify_channel_token_signature`, you must specify the URI where the plugin can fetch the public keys (JWKS) to verify the signature of the channel token. If you don't specify a URI and you pass a JWT token to the plugin, then the plugin responds with `401 Unauthorized`.", + "required": false, + "type": "string" + } + }, + { + "channel_token_jwks_uri_client_username": { + "referenceable": true, + "description": "The client username that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_password`", + "required": false, + "type": "string" + } + }, + { + "channel_token_jwks_uri_client_password": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "The client password that will be used to authenticate Kong if `channel_token_jwks_uri` is a uri that requires Basic Auth. Should be configured together with `channel_token_jwks_uri_client_username`", + "required": false + } + }, + { + "channel_token_jwks_uri_client_certificate": { + "description": "The client certificate that will be used to authenticate Kong if `access_token_jwks_uri` is an https uri that requires mTLS Auth.", + "reference": "certificates", + "required": false, + "type": "foreign" + } + }, + { + "channel_token_jwks_uri_rotate_period": { + "default": 0, + "description": "Specify the period (in seconds) to auto-rotate the jwks for `channel_token_jwks_uri`. The default value 0 means no auto-rotation.", + "required": false, + "type": "number" + } + }, + { + "channel_token_request_header": { + "description": "This parameter tells the name of the header where to look for the channel token. If you don't want to do anything with the channel token, then you can set this to `null` or `\"\"` (empty string).", + "required": false, + "type": "string" + } + }, + { + "channel_token_leeway": { + "default": 0, + "description": "Adjusts clock skew between the token issuer and Kong. The value will be added to token's `exp` claim before checking token expiry against Kong servers current time in seconds. You can disable channel token `expiry` verification altogether with `config.verify_channel_token_expiry`.", + "required": false, + "type": "number" + } + }, + { + "channel_token_scopes_required": { + "elements": { + "type": "string" + }, + "description": "Specify the required values (or scopes) that are checked by a claim specified by `config.channel_token_scopes_claim`.", + "required": false, + "type": "array" + } + }, + { + "channel_token_scopes_claim": { + "required": false, + "type": "array", + "elements": { + "type": "string" + }, + "description": "Specify the claim in a channel token to verify against values of `config.channel_token_scopes_required`. This supports nested claims.", + "default": [ + "scope" + ] + } + }, + { + "channel_token_consumer_claim": { + "elements": { + "type": "string" + }, + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter. Kong consumers have an `id`, a `username`, and a `custom_id`. If this parameter is enabled but the mapping fails, such as when there's a non-existent Kong consumer, the plugin responds with `403 Forbidden`.", + "required": false, + "type": "array" + } + }, + { + "channel_token_consumer_by": { + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "description": "When the plugin tries to do channel token to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of valid values: `id`, `username`, and `custom_id`.", + "default": [ + "username", + "custom_id" + ], + "type": "array" + } + }, + { + "channel_token_upstream_header": { + "description": "This plugin removes the `config.channel_token_request_header` from the request after reading its value.", + "required": false, + "type": "string" + } + }, + { + "channel_token_upstream_leeway": { + "default": 0, + "description": "If you want to add or perhaps subtract (using negative value) expiry time of the original channel token, you can specify a value that is added to the original channel token's `exp` claim.", + "required": false, + "type": "number" + } + }, + { + "channel_token_introspection_endpoint": { + "description": "When you use `opaque` access tokens and you want to turn on access token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise, the plugin does not try introspection and returns `401 Unauthorized` instead.", + "required": false, + "type": "string" + } + }, + { + "channel_token_introspection_authorization": { + "elements": { + "type": "string" + }, + "description": "When using `opaque` channel tokens, and you want to turn on channel token introspection, you need to specify the OAuth 2.0 introspection endpoint URI with this configuration parameter. Otherwise the plugin will not try introspection, and instead returns `401 Unauthorized` when using opaque channel tokens.", + "required": false, + "type": "string" + } + }, + { + "channel_token_introspection_body_args": { + "elements": { + "type": "string" + }, + "description": "If you need to pass additional body arguments to introspection endpoint when the plugin introspects the opaque channel token, you can use this config parameter to specify them. You should URL encode the value. For example: `resource=` or `a=1&b=&c`.", + "required": false, + "type": "string" + } + }, + { + "channel_token_introspection_hint": { + "elements": { + "type": "string" + }, + "description": "If you need to give `hint` parameter when introspecting a channel token, you can use this parameter to specify the value of such parameter. By default, a `hint` isn't sent with channel token introspection.", + "required": false, + "type": "string" + } + }, + { + "channel_token_introspection_jwt_claim": { + "elements": { + "type": "string" + }, + "description": "If your introspection endpoint returns a channel token in one of the keys (or claims) in the introspection results (`JSON`), the plugin can use that value instead of the introspection results when doing expiry verification and signing of the new token issued by Kong.", + "required": false, + "type": "array" + } + }, + { + "channel_token_introspection_scopes_required": { + "elements": { + "type": "string" + }, + "description": "Use this parameter to specify the required values (or scopes) that are checked by an introspection claim/property specified by `config.channel_token_introspection_scopes_claim`.", + "required": false, + "type": "array" + } + }, + { + "channel_token_introspection_scopes_claim": { + "required": false, + "type": "array", + "elements": { + "type": "string" + }, + "description": "Use this parameter to specify the claim/property in channel token introspection results (`JSON`) to be verified against values of `config.channel_token_introspection_scopes_required`. This supports nested claims.", + "default": [ + "scope" + ] + } + }, + { + "channel_token_introspection_consumer_claim": { + "elements": { + "type": "string" + }, + "description": "When you set a value for this parameter, the plugin tries to map an arbitrary claim specified with this configuration parameter (such as `sub` or `username`) in channel token introspection results to Kong consumer entity", + "required": false, + "type": "array" + } + }, + { + "channel_token_introspection_consumer_by": { + "required": false, + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "description": "When the plugin tries to do channel token introspection results to Kong consumer mapping, it tries to find a matching Kong consumer from properties defined using this configuration parameter. The parameter can take an array of values. Valid values are `id`, `username` and `custom_id`.", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "channel_token_introspection_leeway": { + "default": 0, + "description": "You can use this parameter to adjust clock skew between the token issuer introspection results and Kong. The value will be added to introspection results (`JSON`) `exp` claim/property before checking token expiry against Kong servers current time (in seconds). You can disable channel token introspection `expiry` verification altogether with `config.verify_channel_token_introspection_expiry`.", + "required": false, + "type": "number" + } + }, + { + "channel_token_introspection_timeout": { + "description": "Timeout in milliseconds for an introspection request. The plugin tries to introspect twice if the first request fails for some reason. If both requests timeout, then the plugin runs two times the `config.access_token_introspection_timeout` on channel token introspection.", + "required": false, + "type": "number" + } + }, + { + "channel_token_signing_algorithm": { + "required": true, + "type": "string", + "default": "RS256", + "description": "When this plugin sets the upstream header as specified with `config.channel_token_upstream_header`, it also re-signs the original channel token using private keys of this plugin. Specify the algorithm that is used to sign the token.", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ] + } + }, + { + "add_channel_token_claims": { + "values": { + "type": "string" + }, + "required": false, + "type": "map", + "default": [ + + ], + "description": "Add customized claims if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "keys": { + "type": "string" + } + } + }, + { + "set_channel_token_claims": { + "values": { + "type": "string" + }, + "required": false, + "type": "map", + "default": [ + + ], + "description": "Set customized claims. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "keys": { + "type": "string" + } + } + }, + { + "remove_channel_token_claims": { + "required": false, + "type": "array", + "elements": { + "type": "string" + }, + "description": "remove claims. It should be an array, and each element is a claim key string.", + "default": [ + + ] + } + }, + { + "original_channel_token_upstream_header": { + "description": "The HTTP header name used to store the original channel token.", + "required": false, + "type": "string" + } + }, + { + "channel_token_optional": { + "default": false, + "description": "If a channel token is not provided or no `config.channel_token_request_header` is specified, the plugin cannot verify the channel token. In that case, the plugin normally responds with `401 Unauthorized` (client didn't send a token) or `500 Unexpected` (a configuration error). Enable this parameter to allow the request to proceed even when there is no channel token to check. If the channel token is provided, then this parameter has no effect", + "required": false, + "type": "boolean" + } + }, + { + "verify_channel_token_signature": { + "default": true, + "description": "Quickly turn on/off the channel token signature verification.", + "required": false, + "type": "boolean" + } + }, + { + "verify_channel_token_expiry": { + "default": true, + "required": false, + "type": "boolean" + } + }, + { + "verify_channel_token_scopes": { + "default": true, + "description": "Quickly turn on/off the channel token required scopes verification specified with `config.channel_token_scopes_required`.", + "required": false, + "type": "boolean" + } + }, + { + "verify_channel_token_introspection_expiry": { + "default": true, + "description": "Quickly turn on/off the channel token introspection expiry verification.", + "required": false, + "type": "boolean" + } + }, + { + "verify_channel_token_introspection_scopes": { + "default": true, + "description": "Quickly turn on/off the channel token introspection scopes verification specified with `config.channel_token_introspection_scopes_required`.", + "required": false, + "type": "boolean" + } + }, + { + "cache_channel_token_introspection": { + "default": true, + "description": "Whether to cache channel token introspection results.", + "required": false, + "type": "boolean" + } + }, + { + "trust_channel_token_introspection": { + "default": true, + "description": "Providing an opaque channel token for plugin introspection, and verifying expiry and scopes on introspection results may make further payload checks unnecessary before the plugin signs a new token. This also applies when using a JWT token with introspection JSON as per config.channel_token_introspection_jwt_claim. Use this parameter to manage additional payload checks before signing a new token. With true (default), payload's expiry or scopes aren't checked.", + "required": false, + "type": "boolean" + } + }, + { + "enable_channel_token_introspection": { + "default": true, + "description": "If you don't want to support opaque channel tokens, disable introspection by changing this configuration parameter to `false`.", + "required": false, + "type": "boolean" + } + }, + { + "add_claims": { + "values": { + "type": "string" + }, + "required": false, + "type": "map", + "default": [ + + ], + "description": "Add customized claims to both tokens if they are not present yet. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "keys": { + "type": "string" + } + } + }, + { + "set_claims": { + "values": { + "type": "string" + }, + "required": false, + "type": "map", + "default": [ + + ], + "description": "Set customized claims to both tokens. If a claim is already present, it will be overwritten. Value can be a regular or JSON string; if JSON, decoded data is used as the claim's value.", + "keys": { + "type": "string" + } + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwt/3.10.x.json b/schemas/jwt/3.10.x.json new file mode 100644 index 00000000..ecc92de6 --- /dev/null +++ b/schemas/jwt/3.10.x.json @@ -0,0 +1,160 @@ +{ + "entity_checks": [ + { + "conditional": { + "if_match": { + "gt": 0 + }, + "then_field": "config.claims_to_verify", + "if_field": "config.maximum_expiration", + "then_match": { + "contains": "exp" + } + } + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "uri_param_names": { + "description": "A list of querystring parameters that Kong will inspect to retrieve JWTs.", + "type": "set", + "elements": { + "type": "string" + }, + "default": [ + "jwt" + ] + } + }, + { + "cookie_names": { + "description": "A list of cookie names that Kong will inspect to retrieve JWTs.", + "type": "set", + "elements": { + "type": "string" + }, + "default": [ + + ] + } + }, + { + "key_claim_name": { + "description": "The name of the claim in which the key identifying the secret must be passed. The plugin will attempt to read this claim from the JWT payload and the header, in that order.", + "type": "string", + "default": "iss" + } + }, + { + "secret_is_base64": { + "description": "If true, the plugin assumes the credential’s secret to be base64 encoded. You will need to create a base64-encoded secret for your Consumer, and sign your JWT with the original secret.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "claims_to_verify": { + "description": "A list of registered claims (according to RFC 7519) that Kong can verify as well. Accepted values: one of exp or nbf.", + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "exp", + "nbf" + ] + } + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + } + }, + { + "run_on_preflight": { + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONS preflight requests. If set to false, then OPTIONS requests will always be allowed.", + "type": "boolean", + "default": true, + "required": true + } + }, + { + "maximum_expiration": { + "description": "A value between 0 and 31536000 (365 days) limiting the lifetime of the JWT to maximum_expiration seconds in the future.", + "type": "number", + "default": 0, + "between": [ + 0, + 31536000 + ] + } + }, + { + "header_names": { + "description": "A list of HTTP header names that Kong will inspect to retrieve JWTs.", + "type": "set", + "elements": { + "type": "string" + }, + "default": [ + "authorization" + ] + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwt/3.11.x.json b/schemas/jwt/3.11.x.json new file mode 100644 index 00000000..07905299 --- /dev/null +++ b/schemas/jwt/3.11.x.json @@ -0,0 +1,160 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "uri_param_names": { + "type": "set", + "description": "A list of querystring parameters that Kong will inspect to retrieve JWTs.", + "default": [ + "jwt" + ], + "elements": { + "type": "string" + } + } + }, + { + "cookie_names": { + "type": "set", + "description": "A list of cookie names that Kong will inspect to retrieve JWTs.", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "key_claim_name": { + "default": "iss", + "description": "The name of the claim in which the key identifying the secret must be passed. The plugin will attempt to read this claim from the JWT payload and the header, in that order.", + "type": "string" + } + }, + { + "secret_is_base64": { + "description": "If true, the plugin assumes the credential’s secret to be base64 encoded. You will need to create a base64-encoded secret for your Consumer, and sign your JWT with the original secret.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "claims_to_verify": { + "type": "set", + "description": "A list of registered claims (according to RFC 7519) that Kong can verify as well. Accepted values: one of exp or nbf.", + "elements": { + "one_of": [ + "exp", + "nbf" + ], + "type": "string" + } + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + } + }, + { + "run_on_preflight": { + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONS preflight requests. If set to false, then OPTIONS requests will always be allowed.", + "required": true, + "default": true, + "type": "boolean" + } + }, + { + "maximum_expiration": { + "default": 0, + "between": [ + 0, + 31536000 + ], + "description": "A value between 0 and 31536000 (365 days) limiting the lifetime of the JWT to maximum_expiration seconds in the future.", + "type": "number" + } + }, + { + "header_names": { + "type": "set", + "description": "A list of HTTP header names that Kong will inspect to retrieve JWTs.", + "default": [ + "authorization" + ], + "elements": { + "type": "string" + } + } + }, + { + "realm": { + "required": false, + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_match": { + "gt": 0 + }, + "then_field": "config.claims_to_verify", + "if_field": "config.maximum_expiration", + "then_match": { + "contains": "exp" + } + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwt/3.12.x.json b/schemas/jwt/3.12.x.json new file mode 100644 index 00000000..2677f4e6 --- /dev/null +++ b/schemas/jwt/3.12.x.json @@ -0,0 +1,158 @@ +{ + "entity_checks": [ + { + "conditional": { + "then_match": { + "contains": "exp" + }, + "if_match": { + "gt": 0 + }, + "then_field": "config.claims_to_verify", + "if_field": "config.maximum_expiration" + } + } + ], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "uri_param_names": { + "description": "A list of querystring parameters that Kong will inspect to retrieve JWTs.", + "default": [ + "jwt" + ], + "elements": { + "type": "string" + }, + "type": "set" + } + }, + { + "cookie_names": { + "description": "A list of cookie names that Kong will inspect to retrieve JWTs.", + "default": [], + "elements": { + "type": "string" + }, + "type": "set" + } + }, + { + "key_claim_name": { + "description": "The name of the claim in which the key identifying the secret must be passed. The plugin will attempt to read this claim from the JWT payload and the header, in that order.", + "default": "iss", + "type": "string" + } + }, + { + "secret_is_base64": { + "description": "If true, the plugin assumes the credential’s secret to be base64 encoded. You will need to create a base64-encoded secret for your Consumer, and sign your JWT with the original secret.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "claims_to_verify": { + "description": "A list of registered claims (according to RFC 7519) that Kong can verify as well. Accepted values: one of exp or nbf.", + "elements": { + "type": "string", + "one_of": [ + "exp", + "nbf" + ] + }, + "type": "set" + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + } + }, + { + "run_on_preflight": { + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONS preflight requests. If set to false, then OPTIONS requests will always be allowed.", + "default": true, + "type": "boolean", + "required": true + } + }, + { + "maximum_expiration": { + "description": "A value between 0 and 31536000 (365 days) limiting the lifetime of the JWT to maximum_expiration seconds in the future.", + "default": 0, + "between": [ + 0, + 31536000 + ], + "type": "number" + } + }, + { + "header_names": { + "description": "A list of HTTP header names that Kong will inspect to retrieve JWTs.", + "default": [ + "authorization" + ], + "elements": { + "type": "string" + }, + "type": "set" + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwt/3.4.x.json b/schemas/jwt/3.4.x.json index 63d063a7..f7510bf8 100644 --- a/schemas/jwt/3.4.x.json +++ b/schemas/jwt/3.4.x.json @@ -2,8 +2,9 @@ "fields": [ { "consumer": { - "eq": null, "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, @@ -15,105 +16,137 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "uri_param_names": { + "default": [ + "jwt" + ], + "description": "A list of querystring parameters that Kong will inspect to retrieve JWTs.", "type": "set", "elements": { "type": "string" - }, - "default": [ - "jwt" - ] + } } }, { "cookie_names": { + "default": [ + + ], + "description": "A list of cookie names that Kong will inspect to retrieve JWTs.", "type": "set", "elements": { "type": "string" - }, - "default": [ - - ] + } } }, { "key_claim_name": { "default": "iss", - "type": "string" + "type": "string", + "description": "The name of the claim in which the key identifying the secret must be passed. The plugin will attempt to read this claim from the JWT payload and the header, in that order." } }, { "secret_is_base64": { "default": false, + "type": "boolean", "required": true, - "type": "boolean" + "description": "If true, the plugin assumes the credential’s secret to be base64 encoded. You will need to create a base64-encoded secret for your Consumer, and sign your JWT with the original secret." } }, { "claims_to_verify": { + "description": "A list of registered claims (according to RFC 7519) that Kong can verify as well. Accepted values: one of exp or nbf.", "elements": { + "type": "string", "one_of": [ "exp", "nbf" - ], - "type": "string" + ] }, "type": "set" } }, { "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", "type": "string" } }, { "run_on_preflight": { "default": true, + "type": "boolean", "required": true, - "type": "boolean" + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONS preflight requests. If set to false, then OPTIONS requests will always be allowed." } }, { "maximum_expiration": { + "default": 0, + "type": "number", "between": [ 0, 31536000 ], - "type": "number", - "default": 0 + "description": "A value between 0 and 31536000 (365 days) limiting the lifetime of the JWT to maximum_expiration seconds in the future." } }, { "header_names": { + "default": [ + "authorization" + ], + "description": "A list of HTTP header names that Kong will inspect to retrieve JWTs.", "type": "set", "elements": { "type": "string" - }, - "default": [ - "authorization" - ] + } } } ], - "type": "record" + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_field": "config.claims_to_verify", + "if_match": { + "gt": 0 + }, + "then_match": { + "contains": "exp" + }, + "if_field": "config.maximum_expiration" } } ] diff --git a/schemas/jwt/3.5.x.json b/schemas/jwt/3.5.x.json new file mode 100644 index 00000000..649659f7 --- /dev/null +++ b/schemas/jwt/3.5.x.json @@ -0,0 +1,153 @@ +{ + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "uri_param_names": { + "description": "A list of querystring parameters that Kong will inspect to retrieve JWTs.", + "default": [ + "jwt" + ], + "type": "set", + "elements": { + "type": "string" + } + } + }, + { + "cookie_names": { + "description": "A list of cookie names that Kong will inspect to retrieve JWTs.", + "default": [ + + ], + "type": "set", + "elements": { + "type": "string" + } + } + }, + { + "key_claim_name": { + "default": "iss", + "type": "string", + "description": "The name of the claim in which the key identifying the secret must be passed. The plugin will attempt to read this claim from the JWT payload and the header, in that order." + } + }, + { + "secret_is_base64": { + "required": true, + "default": false, + "type": "boolean", + "description": "If true, the plugin assumes the credential’s secret to be base64 encoded. You will need to create a base64-encoded secret for your Consumer, and sign your JWT with the original secret." + } + }, + { + "claims_to_verify": { + "description": "A list of registered claims (according to RFC 7519) that Kong can verify as well. Accepted values: one of exp or nbf.", + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "exp", + "nbf" + ] + } + } + }, + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails." + } + }, + { + "run_on_preflight": { + "required": true, + "default": true, + "type": "boolean", + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONS preflight requests. If set to false, then OPTIONS requests will always be allowed." + } + }, + { + "maximum_expiration": { + "between": [ + 0, + 31536000 + ], + "default": 0, + "type": "number", + "description": "A value between 0 and 31536000 (365 days) limiting the lifetime of the JWT to maximum_expiration seconds in the future." + } + }, + { + "header_names": { + "description": "A list of HTTP header names that Kong will inspect to retrieve JWTs.", + "default": [ + "authorization" + ], + "type": "set", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_field": "config.claims_to_verify", + "if_match": { + "gt": 0 + }, + "then_match": { + "contains": "exp" + }, + "if_field": "config.maximum_expiration" + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwt/3.6.x.json b/schemas/jwt/3.6.x.json new file mode 100644 index 00000000..ee578f47 --- /dev/null +++ b/schemas/jwt/3.6.x.json @@ -0,0 +1,153 @@ +{ + "entity_checks": [ + { + "conditional": { + "then_field": "config.claims_to_verify", + "if_field": "config.maximum_expiration", + "then_match": { + "contains": "exp" + }, + "if_match": { + "gt": 0 + } + } + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "uri_param_names": { + "elements": { + "type": "string" + }, + "type": "set", + "description": "A list of querystring parameters that Kong will inspect to retrieve JWTs.", + "default": [ + "jwt" + ] + } + }, + { + "cookie_names": { + "elements": { + "type": "string" + }, + "type": "set", + "description": "A list of cookie names that Kong will inspect to retrieve JWTs.", + "default": [ + + ] + } + }, + { + "key_claim_name": { + "type": "string", + "description": "The name of the claim in which the key identifying the secret must be passed. The plugin will attempt to read this claim from the JWT payload and the header, in that order.", + "default": "iss" + } + }, + { + "secret_is_base64": { + "required": true, + "type": "boolean", + "description": "If true, the plugin assumes the credential’s secret to be base64 encoded. You will need to create a base64-encoded secret for your Consumer, and sign your JWT with the original secret.", + "default": false + } + }, + { + "claims_to_verify": { + "elements": { + "one_of": [ + "exp", + "nbf" + ], + "type": "string" + }, + "type": "set", + "description": "A list of registered claims (according to RFC 7519) that Kong can verify as well. Accepted values: one of exp or nbf." + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + } + }, + { + "run_on_preflight": { + "required": true, + "type": "boolean", + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONS preflight requests. If set to false, then OPTIONS requests will always be allowed.", + "default": true + } + }, + { + "maximum_expiration": { + "default": 0, + "type": "number", + "description": "A value between 0 and 31536000 (365 days) limiting the lifetime of the JWT to maximum_expiration seconds in the future.", + "between": [ + 0, + 31536000 + ] + } + }, + { + "header_names": { + "elements": { + "type": "string" + }, + "type": "set", + "description": "A list of HTTP header names that Kong will inspect to retrieve JWTs.", + "default": [ + "authorization" + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwt/3.7.x.json b/schemas/jwt/3.7.x.json new file mode 100644 index 00000000..a33e407e --- /dev/null +++ b/schemas/jwt/3.7.x.json @@ -0,0 +1,153 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "uri_param_names": { + "type": "set", + "elements": { + "type": "string" + }, + "description": "A list of querystring parameters that Kong will inspect to retrieve JWTs.", + "default": [ + "jwt" + ] + } + }, + { + "cookie_names": { + "type": "set", + "elements": { + "type": "string" + }, + "description": "A list of cookie names that Kong will inspect to retrieve JWTs.", + "default": [ + + ] + } + }, + { + "key_claim_name": { + "type": "string", + "description": "The name of the claim in which the key identifying the secret must be passed. The plugin will attempt to read this claim from the JWT payload and the header, in that order.", + "default": "iss" + } + }, + { + "secret_is_base64": { + "required": true, + "type": "boolean", + "description": "If true, the plugin assumes the credential’s secret to be base64 encoded. You will need to create a base64-encoded secret for your Consumer, and sign your JWT with the original secret.", + "default": false + } + }, + { + "claims_to_verify": { + "elements": { + "type": "string", + "one_of": [ + "exp", + "nbf" + ] + }, + "type": "set", + "description": "A list of registered claims (according to RFC 7519) that Kong can verify as well. Accepted values: one of exp or nbf." + } + }, + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails." + } + }, + { + "run_on_preflight": { + "required": true, + "type": "boolean", + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONS preflight requests. If set to false, then OPTIONS requests will always be allowed.", + "default": true + } + }, + { + "maximum_expiration": { + "default": 0, + "type": "number", + "description": "A value between 0 and 31536000 (365 days) limiting the lifetime of the JWT to maximum_expiration seconds in the future.", + "between": [ + 0, + 31536000 + ] + } + }, + { + "header_names": { + "type": "set", + "elements": { + "type": "string" + }, + "description": "A list of HTTP header names that Kong will inspect to retrieve JWTs.", + "default": [ + "authorization" + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_field": "config.maximum_expiration", + "if_match": { + "gt": 0 + }, + "then_field": "config.claims_to_verify", + "then_match": { + "contains": "exp" + } + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwt/3.8.x.json b/schemas/jwt/3.8.x.json new file mode 100644 index 00000000..2530ff46 --- /dev/null +++ b/schemas/jwt/3.8.x.json @@ -0,0 +1,160 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "uri_param_names": { + "description": "A list of querystring parameters that Kong will inspect to retrieve JWTs.", + "type": "set", + "elements": { + "type": "string" + }, + "default": [ + "jwt" + ] + } + }, + { + "cookie_names": { + "description": "A list of cookie names that Kong will inspect to retrieve JWTs.", + "type": "set", + "elements": { + "type": "string" + }, + "default": [ + + ] + } + }, + { + "key_claim_name": { + "description": "The name of the claim in which the key identifying the secret must be passed. The plugin will attempt to read this claim from the JWT payload and the header, in that order.", + "type": "string", + "default": "iss" + } + }, + { + "secret_is_base64": { + "description": "If true, the plugin assumes the credential’s secret to be base64 encoded. You will need to create a base64-encoded secret for your Consumer, and sign your JWT with the original secret.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "claims_to_verify": { + "description": "A list of registered claims (according to RFC 7519) that Kong can verify as well. Accepted values: one of exp or nbf.", + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "exp", + "nbf" + ] + } + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + } + }, + { + "run_on_preflight": { + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONS preflight requests. If set to false, then OPTIONS requests will always be allowed.", + "type": "boolean", + "required": true, + "default": true + } + }, + { + "maximum_expiration": { + "description": "A value between 0 and 31536000 (365 days) limiting the lifetime of the JWT to maximum_expiration seconds in the future.", + "type": "number", + "between": [ + 0, + 31536000 + ], + "default": 0 + } + }, + { + "header_names": { + "description": "A list of HTTP header names that Kong will inspect to retrieve JWTs.", + "type": "set", + "elements": { + "type": "string" + }, + "default": [ + "authorization" + ] + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string", + "required": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_field": "config.maximum_expiration", + "if_match": { + "gt": 0 + }, + "then_field": "config.claims_to_verify", + "then_match": { + "contains": "exp" + } + } + } + ] +} \ No newline at end of file diff --git a/schemas/jwt/3.9.x.json b/schemas/jwt/3.9.x.json new file mode 100644 index 00000000..06e0c528 --- /dev/null +++ b/schemas/jwt/3.9.x.json @@ -0,0 +1,160 @@ +{ + "entity_checks": [ + { + "conditional": { + "if_match": { + "gt": 0 + }, + "then_field": "config.claims_to_verify", + "if_field": "config.maximum_expiration", + "then_match": { + "contains": "exp" + } + } + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "uri_param_names": { + "elements": { + "type": "string" + }, + "description": "A list of querystring parameters that Kong will inspect to retrieve JWTs.", + "default": [ + "jwt" + ], + "type": "set" + } + }, + { + "cookie_names": { + "elements": { + "type": "string" + }, + "description": "A list of cookie names that Kong will inspect to retrieve JWTs.", + "default": [ + + ], + "type": "set" + } + }, + { + "key_claim_name": { + "default": "iss", + "description": "The name of the claim in which the key identifying the secret must be passed. The plugin will attempt to read this claim from the JWT payload and the header, in that order.", + "type": "string" + } + }, + { + "secret_is_base64": { + "default": false, + "description": "If true, the plugin assumes the credential’s secret to be base64 encoded. You will need to create a base64-encoded secret for your Consumer, and sign your JWT with the original secret.", + "required": true, + "type": "boolean" + } + }, + { + "claims_to_verify": { + "elements": { + "type": "string", + "one_of": [ + "exp", + "nbf" + ] + }, + "description": "A list of registered claims (according to RFC 7519) that Kong can verify as well. Accepted values: one of exp or nbf.", + "type": "set" + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + } + }, + { + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on OPTIONS preflight requests. If set to false, then OPTIONS requests will always be allowed.", + "required": true, + "type": "boolean" + } + }, + { + "maximum_expiration": { + "default": 0, + "description": "A value between 0 and 31536000 (365 days) limiting the lifetime of the JWT to maximum_expiration seconds in the future.", + "between": [ + 0, + 31536000 + ], + "type": "number" + } + }, + { + "header_names": { + "elements": { + "type": "string" + }, + "description": "A list of HTTP header names that Kong will inspect to retrieve JWTs.", + "default": [ + "authorization" + ], + "type": "set" + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "required": false, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/kafka-consume/3.10.x.json b/schemas/kafka-consume/3.10.x.json new file mode 100644 index 00000000..727f8b8b --- /dev/null +++ b/schemas/kafka-consume/3.10.x.json @@ -0,0 +1,239 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "type": "record", + "fields": [ + { + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "type": "set", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true + } + } + ] + }, + "required": true + } + }, + { + "topics": { + "type": "array", + "len_min": 1, + "description": "The Kafka topics and their configuration you want to consume from.", + "elements": { + "type": "record", + "fields": [ + { + "name": { + "required": true, + "type": "string" + } + } + ] + }, + "required": true + } + }, + { + "mode": { + "type": "string", + "description": "The mode of operation for the plugin.", + "one_of": [ + "server-sent-events", + "http-get" + ], + "default": "http-get", + "required": true + } + }, + { + "message_deserializer": { + "type": "string", + "description": "The deserializer to use for the consumed messages.", + "one_of": [ + "json", + "noop" + ], + "default": "noop", + "required": true + } + }, + { + "auto_offset_reset": { + "type": "string", + "description": "The offset to start from when there is no initial offset in the consumer group.", + "one_of": [ + "earliest", + "latest" + ], + "default": "latest", + "required": true + } + }, + { + "commit_strategy": { + "type": "string", + "description": "The strategy to use for committing offsets.", + "one_of": [ + "auto", + "off" + ], + "default": "auto", + "required": true + } + }, + { + "authentication": { + "type": "record", + "fields": [ + { + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "type": "string", + "one_of": [ + "sasl" + ], + "required": false + } + }, + { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN` or `SCRAM-SHA-256`.", + "type": "string", + "one_of": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "required": false + } + }, + { + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication", + "type": "boolean", + "required": false + } + }, + { + "user": { + "type": "string", + "referenceable": true, + "description": "Username for SASL authentication.", + "encrypted": true, + "required": false + } + }, + { + "password": { + "type": "string", + "referenceable": true, + "description": "Password for SASL authentication.", + "encrypted": true, + "required": false + } + } + ], + "required": true + } + }, + { + "security": { + "type": "record", + "fields": [ + { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "required": false, + "uuid": true + } + }, + { + "ssl": { + "description": "Enables TLS.", + "type": "boolean", + "required": false + } + } + ], + "required": true + } + }, + { + "cluster_name": { + "description": "An identifier for the Kafka cluster.", + "type": "string", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/kafka-consume/3.11.x.json b/schemas/kafka-consume/3.11.x.json new file mode 100644 index 00000000..00c59233 --- /dev/null +++ b/schemas/kafka-consume/3.11.x.json @@ -0,0 +1,436 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "fields": [ + { + "bootstrap_servers": { + "type": "set", + "required": true, + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "elements": { + "fields": [ + { + "host": { + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "required": true, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "topics": { + "required": true, + "description": "The Kafka topics and their configuration you want to consume from.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "name": { + "type": "string", + "required": true + } + }, + { + "schema_registry": { + "description": "The plugin-global schema registry configuration.", + "required": true, + "fields": [ + { + "confluent": { + "required": false, + "fields": [ + { + "url": { + "required": false, + "description": "The URL of the schema registry.", + "type": "string" + } + }, + { + "ttl": { + "between": [ + 0, + 3600 + ], + "description": "The TTL in seconds for the schema registry cache.", + "type": "number" + } + }, + { + "ssl_verify": { + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "default": true, + "type": "boolean" + } + }, + { + "authentication": { + "required": true, + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "mode", + "basic" + ] + } + } + ], + "fields": [ + { + "mode": { + "required": true, + "description": "Authentication mode to use with the schema registry.", + "one_of": [ + "none", + "basic" + ], + "default": "none", + "type": "string" + } + }, + { + "basic": { + "required": false, + "fields": [ + { + "username": { + "type": "string", + "required": true, + "referenceable": true, + "encrypted": true + } + }, + { + "password": { + "type": "string", + "required": true, + "referenceable": true, + "encrypted": true + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + }, + { + "schema_registry": { + "description": "The plugin-global schema registry configuration.", + "required": true, + "fields": [ + { + "confluent": { + "required": false, + "fields": [ + { + "url": { + "required": false, + "description": "The URL of the schema registry.", + "type": "string" + } + }, + { + "ttl": { + "between": [ + 0, + 3600 + ], + "description": "The TTL in seconds for the schema registry cache.", + "type": "number" + } + }, + { + "ssl_verify": { + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "default": true, + "type": "boolean" + } + }, + { + "authentication": { + "required": true, + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "mode", + "basic" + ] + } + } + ], + "fields": [ + { + "mode": { + "required": true, + "description": "Authentication mode to use with the schema registry.", + "one_of": [ + "none", + "basic" + ], + "default": "none", + "type": "string" + } + }, + { + "basic": { + "required": false, + "fields": [ + { + "username": { + "type": "string", + "required": true, + "referenceable": true, + "encrypted": true + } + }, + { + "password": { + "type": "string", + "required": true, + "referenceable": true, + "encrypted": true + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "mode": { + "required": true, + "description": "The mode of operation for the plugin.", + "one_of": [ + "server-sent-events", + "http-get", + "websocket" + ], + "default": "http-get", + "type": "string" + } + }, + { + "message_deserializer": { + "required": true, + "description": "The deserializer to use for the consumed messages.", + "one_of": [ + "json", + "noop" + ], + "default": "noop", + "type": "string" + } + }, + { + "auto_offset_reset": { + "required": true, + "description": "The offset to start from when there is no initial offset in the consumer group.", + "one_of": [ + "earliest", + "latest" + ], + "default": "latest", + "type": "string" + } + }, + { + "commit_strategy": { + "required": true, + "description": "The strategy to use for committing offsets.", + "one_of": [ + "auto", + "off" + ], + "default": "auto", + "type": "string" + } + }, + { + "authentication": { + "required": true, + "fields": [ + { + "strategy": { + "one_of": [ + "sasl" + ], + "required": false, + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "type": "string" + } + }, + { + "mechanism": { + "one_of": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "required": false, + "description": "The SASL authentication mechanism. Supported options: `PLAIN` or `SCRAM-SHA-256`.", + "type": "string" + } + }, + { + "tokenauth": { + "required": false, + "description": "Enable this to indicate `DelegationToken` authentication", + "type": "boolean" + } + }, + { + "user": { + "required": false, + "description": "Username for SASL authentication.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "required": false, + "description": "Password for SASL authentication.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "security": { + "required": true, + "fields": [ + { + "certificate_id": { + "uuid": true, + "required": false, + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string" + } + }, + { + "ssl": { + "required": false, + "description": "Enables TLS.", + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "cluster_name": { + "required": false, + "description": "An identifier for the Kafka cluster.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/kafka-consume/3.12.x.json b/schemas/kafka-consume/3.12.x.json new file mode 100644 index 00000000..53114d7e --- /dev/null +++ b/schemas/kafka-consume/3.12.x.json @@ -0,0 +1,436 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "bootstrap_servers": { + "type": "set", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "required": true + } + } + ] + }, + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "required": true + } + }, + { + "topics": { + "type": "array", + "len_min": 1, + "required": true, + "description": "The Kafka topics and their configuration you want to consume from.", + "elements": { + "type": "record", + "fields": [ + { + "name": { + "type": "string", + "required": true + } + }, + { + "schema_registry": { + "description": "The plugin-global schema registry configuration.", + "fields": [ + { + "confluent": { + "type": "record", + "fields": [ + { + "url": { + "description": "The URL of the schema registry.", + "type": "string", + "required": false + } + }, + { + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "between": [ + 0, + 3600 + ], + "type": "number" + } + }, + { + "ssl_verify": { + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "default": true, + "type": "boolean" + } + }, + { + "authentication": { + "type": "record", + "fields": [ + { + "mode": { + "type": "string", + "required": true, + "description": "Authentication mode to use with the schema registry.", + "default": "none", + "one_of": [ + "none", + "basic" + ] + } + }, + { + "basic": { + "type": "record", + "fields": [ + { + "username": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": true + } + }, + { + "password": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": true + } + } + ], + "required": false + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "mode", + "basic" + ] + } + } + ], + "required": true + } + } + ], + "required": false + } + } + ], + "type": "record", + "required": true + } + } + ] + } + } + }, + { + "schema_registry": { + "description": "The plugin-global schema registry configuration.", + "fields": [ + { + "confluent": { + "type": "record", + "fields": [ + { + "url": { + "description": "The URL of the schema registry.", + "type": "string", + "required": false + } + }, + { + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "between": [ + 0, + 3600 + ], + "type": "number" + } + }, + { + "ssl_verify": { + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "default": true, + "type": "boolean" + } + }, + { + "authentication": { + "type": "record", + "fields": [ + { + "mode": { + "type": "string", + "required": true, + "description": "Authentication mode to use with the schema registry.", + "default": "none", + "one_of": [ + "none", + "basic" + ] + } + }, + { + "basic": { + "type": "record", + "fields": [ + { + "username": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": true + } + }, + { + "password": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": true + } + } + ], + "required": false + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "mode", + "basic" + ] + } + } + ], + "required": true + } + } + ], + "required": false + } + } + ], + "type": "record", + "required": true + } + }, + { + "mode": { + "type": "string", + "required": true, + "description": "The mode of operation for the plugin.", + "default": "http-get", + "one_of": [ + "server-sent-events", + "http-get", + "websocket" + ] + } + }, + { + "message_deserializer": { + "type": "string", + "required": true, + "description": "The deserializer to use for the consumed messages.", + "default": "noop", + "one_of": [ + "json", + "noop" + ] + } + }, + { + "auto_offset_reset": { + "type": "string", + "required": true, + "description": "The offset to start from when there is no initial offset in the consumer group.", + "default": "latest", + "one_of": [ + "earliest", + "latest" + ] + } + }, + { + "commit_strategy": { + "type": "string", + "required": true, + "description": "The strategy to use for committing offsets.", + "default": "auto", + "one_of": [ + "auto", + "off" + ] + } + }, + { + "authentication": { + "type": "record", + "fields": [ + { + "strategy": { + "type": "string", + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "one_of": [ + "sasl" + ], + "required": false + } + }, + { + "mechanism": { + "type": "string", + "description": "The SASL authentication mechanism. Supported options: `PLAIN` or `SCRAM-SHA-256`.", + "one_of": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "required": false + } + }, + { + "tokenauth": { + "type": "boolean", + "description": "Enable this to indicate `DelegationToken` authentication", + "required": false + } + }, + { + "user": { + "type": "string", + "required": false, + "description": "Username for SASL authentication.", + "referenceable": true, + "encrypted": true + } + }, + { + "password": { + "type": "string", + "required": false, + "description": "Password for SASL authentication.", + "referenceable": true, + "encrypted": true + } + } + ], + "required": true + } + }, + { + "security": { + "type": "record", + "fields": [ + { + "certificate_id": { + "type": "string", + "description": "UUID of certificate entity for mTLS authentication.", + "uuid": true, + "required": false + } + }, + { + "ssl": { + "type": "boolean", + "description": "Enables TLS.", + "required": false + } + } + ], + "required": true + } + }, + { + "cluster_name": { + "type": "string", + "description": "An identifier for the Kafka cluster.", + "required": false + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/kafka-log/3.10.x.json b/schemas/kafka-log/3.10.x.json new file mode 100644 index 00000000..c726d219 --- /dev/null +++ b/schemas/kafka-log/3.10.x.json @@ -0,0 +1,280 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "type": "record", + "fields": [ + { + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "type": "set", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true + } + } + ] + } + } + }, + { + "topic": { + "description": "The Kafka topic to publish to.", + "type": "string", + "required": true + } + }, + { + "timeout": { + "description": "Socket timeout in milliseconds.", + "type": "integer", + "default": 10000 + } + }, + { + "keepalive": { + "type": "integer", + "default": 60000 + } + }, + { + "keepalive_enabled": { + "type": "boolean", + "default": false + } + }, + { + "authentication": { + "type": "record", + "fields": [ + { + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "type": "string", + "one_of": [ + "sasl" + ], + "required": false + } + }, + { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256` or `SCRAM-SHA-512`.", + "type": "string", + "one_of": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "required": false + } + }, + { + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication", + "type": "boolean", + "required": false + } + }, + { + "user": { + "type": "string", + "referenceable": true, + "description": "Username for SASL authentication.", + "encrypted": true, + "required": false + } + }, + { + "password": { + "type": "string", + "referenceable": true, + "description": "Password for SASL authentication.", + "encrypted": true, + "required": false + } + } + ], + "required": true + } + }, + { + "security": { + "type": "record", + "fields": [ + { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true, + "required": false + } + }, + { + "ssl": { + "description": "Enables TLS.", + "type": "boolean", + "required": false + } + } + ], + "required": true + } + }, + { + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string", + "auto": true, + "required": false + } + }, + { + "producer_request_acks": { + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "type": "integer", + "one_of": [ + -1, + 0, + 1 + ], + "default": 1 + } + }, + { + "producer_request_timeout": { + "description": "Time to wait for a Produce response in milliseconds", + "type": "integer", + "default": 2000 + } + }, + { + "producer_request_limits_messages_per_request": { + "description": "Maximum number of messages to include into a single Produce request.", + "type": "integer", + "default": 200 + } + }, + { + "producer_request_limits_bytes_per_request": { + "description": "Maximum size of a Produce request in bytes.", + "type": "integer", + "default": 1048576 + } + }, + { + "producer_request_retries_max_attempts": { + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer", + "default": 10 + } + }, + { + "producer_request_retries_backoff_timeout": { + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer", + "default": 100 + } + }, + { + "producer_async": { + "description": "Flag to enable asynchronous mode.", + "type": "boolean", + "default": true + } + }, + { + "producer_async_flush_timeout": { + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer", + "default": 1000 + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer", + "default": 50000 + } + }, + { + "custom_fields_by_lua": { + "description": "Lua code as a key-value map", + "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "type": "string", + "len_min": 1 + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/kafka-log/3.11.x.json b/schemas/kafka-log/3.11.x.json new file mode 100644 index 00000000..4eab856e --- /dev/null +++ b/schemas/kafka-log/3.11.x.json @@ -0,0 +1,446 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "fields": [ + { + "bootstrap_servers": { + "type": "set", + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "elements": { + "fields": [ + { + "host": { + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "required": true, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "topic": { + "required": true, + "description": "The Kafka topic to publish to.", + "type": "string" + } + }, + { + "key_query_arg": { + "required": false, + "description": "The request query parameter name that contains the Kafka message key. If specified, messages with the same key will be sent to the same Kafka partition, ensuring consistent ordering.", + "type": "string" + } + }, + { + "timeout": { + "description": "Socket timeout in milliseconds.", + "default": 10000, + "type": "integer" + } + }, + { + "keepalive": { + "default": 60000, + "type": "integer" + } + }, + { + "keepalive_enabled": { + "default": false, + "type": "boolean" + } + }, + { + "authentication": { + "required": true, + "fields": [ + { + "strategy": { + "one_of": [ + "sasl" + ], + "required": false, + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "type": "string" + } + }, + { + "mechanism": { + "one_of": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "required": false, + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256` or `SCRAM-SHA-512`.", + "type": "string" + } + }, + { + "tokenauth": { + "required": false, + "description": "Enable this to indicate `DelegationToken` authentication", + "type": "boolean" + } + }, + { + "user": { + "required": false, + "description": "Username for SASL authentication.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "required": false, + "description": "Password for SASL authentication.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "schema_registry": { + "description": "The plugin-global schema registry configuration. This can be overwritten by the topic configuration.", + "required": true, + "fields": [ + { + "confluent": { + "required": false, + "fields": [ + { + "url": { + "required": false, + "description": "The URL of the schema registry.", + "type": "string" + } + }, + { + "ttl": { + "between": [ + 0, + 3600 + ], + "description": "The TTL in seconds for the schema registry cache.", + "type": "number" + } + }, + { + "ssl_verify": { + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "default": true, + "type": "boolean" + } + }, + { + "authentication": { + "required": true, + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "mode", + "basic" + ] + } + } + ], + "fields": [ + { + "mode": { + "required": true, + "description": "Authentication mode to use with the schema registry.", + "one_of": [ + "none", + "basic" + ], + "default": "none", + "type": "string" + } + }, + { + "basic": { + "required": false, + "fields": [ + { + "username": { + "type": "string", + "required": true, + "referenceable": true, + "encrypted": true + } + }, + { + "password": { + "type": "string", + "required": true, + "referenceable": true, + "encrypted": true + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "value_schema": { + "required": false, + "fields": [ + { + "subject_name": { + "required": false, + "description": "The name of the subject", + "type": "string" + } + }, + { + "schema_version": { + "match_any": { + "err": "must be either 'latest' or a positive integer", + "patterns": [ + "^latest$", + "^[0-9]+$" + ] + }, + "required": false, + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "key_schema": { + "required": false, + "fields": [ + { + "subject_name": { + "required": false, + "description": "The name of the subject", + "type": "string" + } + }, + { + "schema_version": { + "match_any": { + "err": "must be either 'latest' or a positive integer", + "patterns": [ + "^latest$", + "^[0-9]+$" + ] + }, + "required": false, + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "security": { + "required": true, + "fields": [ + { + "certificate_id": { + "required": false, + "uuid": true, + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string" + } + }, + { + "ssl": { + "required": false, + "description": "Enables TLS.", + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "cluster_name": { + "auto": true, + "required": false, + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + } + }, + { + "producer_request_acks": { + "one_of": [ + -1, + 0, + 1 + ], + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "default": 1, + "type": "integer" + } + }, + { + "producer_request_timeout": { + "description": "Time to wait for a Produce response in milliseconds", + "default": 2000, + "type": "integer" + } + }, + { + "producer_request_limits_messages_per_request": { + "description": "Maximum number of messages to include into a single Produce request.", + "default": 200, + "type": "integer" + } + }, + { + "producer_request_limits_bytes_per_request": { + "description": "Maximum size of a Produce request in bytes.", + "default": 1048576, + "type": "integer" + } + }, + { + "producer_request_retries_max_attempts": { + "description": "Maximum number of retry attempts per single Produce request.", + "default": 10, + "type": "integer" + } + }, + { + "producer_request_retries_backoff_timeout": { + "description": "Backoff interval between retry attempts in milliseconds.", + "default": 100, + "type": "integer" + } + }, + { + "producer_async": { + "description": "Flag to enable asynchronous mode.", + "default": true, + "type": "boolean" + } + }, + { + "producer_async_flush_timeout": { + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "default": 1000, + "type": "integer" + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "default": 50000, + "type": "integer" + } + }, + { + "custom_fields_by_lua": { + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "len_min": 1, + "type": "string" + }, + "description": "Lua code as a key-value map", + "type": "map" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/kafka-log/3.12.x.json b/schemas/kafka-log/3.12.x.json new file mode 100644 index 00000000..14e8015f --- /dev/null +++ b/schemas/kafka-log/3.12.x.json @@ -0,0 +1,446 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "type": "set", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "required": true + } + } + ] + } + } + }, + { + "topic": { + "description": "The Kafka topic to publish to.", + "type": "string", + "required": true + } + }, + { + "key_query_arg": { + "description": "The request query parameter name that contains the Kafka message key. If specified, messages with the same key will be sent to the same Kafka partition, ensuring consistent ordering.", + "type": "string", + "required": false + } + }, + { + "timeout": { + "description": "Socket timeout in milliseconds.", + "default": 10000, + "type": "integer" + } + }, + { + "keepalive": { + "type": "integer", + "default": 60000 + } + }, + { + "keepalive_enabled": { + "type": "boolean", + "default": false + } + }, + { + "authentication": { + "type": "record", + "fields": [ + { + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "type": "string", + "one_of": [ + "sasl" + ], + "required": false + } + }, + { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256` or `SCRAM-SHA-512`.", + "type": "string", + "one_of": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "required": false + } + }, + { + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication", + "type": "boolean", + "required": false + } + }, + { + "user": { + "type": "string", + "required": false, + "description": "Username for SASL authentication.", + "referenceable": true, + "encrypted": true + } + }, + { + "password": { + "type": "string", + "required": false, + "description": "Password for SASL authentication.", + "referenceable": true, + "encrypted": true + } + } + ], + "required": true + } + }, + { + "schema_registry": { + "description": "The plugin-global schema registry configuration. This can be overwritten by the topic configuration.", + "fields": [ + { + "confluent": { + "type": "record", + "fields": [ + { + "url": { + "description": "The URL of the schema registry.", + "type": "string", + "required": false + } + }, + { + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "between": [ + 0, + 3600 + ], + "type": "number" + } + }, + { + "ssl_verify": { + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "default": true, + "type": "boolean" + } + }, + { + "authentication": { + "type": "record", + "fields": [ + { + "mode": { + "type": "string", + "required": true, + "description": "Authentication mode to use with the schema registry.", + "default": "none", + "one_of": [ + "none", + "basic" + ] + } + }, + { + "basic": { + "type": "record", + "fields": [ + { + "username": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": true + } + }, + { + "password": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": true + } + } + ], + "required": false + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "mode", + "basic" + ] + } + } + ], + "required": true + } + }, + { + "value_schema": { + "type": "record", + "fields": [ + { + "subject_name": { + "type": "string", + "description": "The name of the subject", + "required": false + } + }, + { + "schema_version": { + "type": "string", + "match_any": { + "patterns": [ + "^latest$", + "^[0-9]+$" + ], + "err": "must be either 'latest' or a positive integer" + }, + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "required": false + } + } + ], + "required": false + } + }, + { + "key_schema": { + "type": "record", + "fields": [ + { + "subject_name": { + "type": "string", + "description": "The name of the subject", + "required": false + } + }, + { + "schema_version": { + "type": "string", + "match_any": { + "patterns": [ + "^latest$", + "^[0-9]+$" + ], + "err": "must be either 'latest' or a positive integer" + }, + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "required": false + } + } + ], + "required": false + } + } + ], + "required": false + } + } + ], + "type": "record", + "required": true + } + }, + { + "security": { + "type": "record", + "fields": [ + { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true, + "required": false + } + }, + { + "ssl": { + "description": "Enables TLS.", + "type": "boolean", + "required": false + } + } + ], + "required": true + } + }, + { + "cluster_name": { + "type": "string", + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "auto": true, + "required": false + } + }, + { + "producer_request_acks": { + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "default": 1, + "one_of": [ + -1, + 0, + 1 + ], + "type": "integer" + } + }, + { + "producer_request_timeout": { + "description": "Time to wait for a Produce response in milliseconds", + "default": 2000, + "type": "integer" + } + }, + { + "producer_request_limits_messages_per_request": { + "description": "Maximum number of messages to include into a single Produce request.", + "default": 200, + "type": "integer" + } + }, + { + "producer_request_limits_bytes_per_request": { + "description": "Maximum size of a Produce request in bytes.", + "default": 1048576, + "type": "integer" + } + }, + { + "producer_request_retries_max_attempts": { + "description": "Maximum number of retry attempts per single Produce request.", + "default": 10, + "type": "integer" + } + }, + { + "producer_request_retries_backoff_timeout": { + "description": "Backoff interval between retry attempts in milliseconds.", + "default": 100, + "type": "integer" + } + }, + { + "producer_async": { + "description": "Flag to enable asynchronous mode.", + "default": true, + "type": "boolean" + } + }, + { + "producer_async_flush_timeout": { + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "default": 1000, + "type": "integer" + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "default": 50000, + "type": "integer" + } + }, + { + "custom_fields_by_lua": { + "type": "map", + "description": "Lua code as a key-value map", + "values": { + "type": "string", + "len_min": 1 + }, + "keys": { + "type": "string", + "len_min": 1 + } + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/kafka-log/3.4.x.json b/schemas/kafka-log/3.4.x.json index 2b8e5c19..f5a622fb 100644 --- a/schemas/kafka-log/3.4.x.json +++ b/schemas/kafka-log/3.4.x.json @@ -10,7 +10,10 @@ "ws", "wss" ], + "required": true, + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", @@ -18,32 +21,29 @@ "https", "ws", "wss" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, - "entity_checks": [ - { - "custom_entity_check": { - "field_sources": [ - "authentication" - ] - } - } - ], "fields": [ { "bootstrap_servers": { + "type": "set", "elements": { "fields": [ { "host": { + "description": "A string representing a host name, such as example.com.", "type": "string", "required": true } @@ -54,25 +54,28 @@ 0, 65535 ], - "type": "integer", - "required": true + "required": true, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" } } ], "type": "record" }, - "type": "set" + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format." } }, { "topic": { - "required": true, - "type": "string" + "description": "The Kafka topic to publish to.", + "type": "string", + "required": true } }, { "timeout": { "default": 10000, + "description": "Socket timeout in milliseconds.", "type": "integer" } }, @@ -90,144 +93,188 @@ }, { "authentication": { - "required": true, "fields": [ { "strategy": { "required": false, - "type": "string", "one_of": [ "sasl" - ] + ], + "type": "string", + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`." } }, { "mechanism": { "required": false, - "type": "string", "one_of": [ "PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512" - ] + ], + "type": "string", + "description": "The SASL authentication mechanism. Supported options: `PLAIN` or `SCRAM-SHA-256`." } }, { "tokenauth": { - "required": false, - "type": "boolean" + "description": "Enable this to indicate `DelegationToken` authentication", + "type": "boolean", + "required": false } }, { "user": { - "type": "string", "encrypted": true, + "description": "Username for SASL authentication.", "referenceable": true, + "type": "string", "required": false } }, { "password": { - "type": "string", "encrypted": true, + "description": "Password for SASL authentication.", "referenceable": true, + "type": "string", "required": false } } ], - "type": "record" + "type": "record", + "required": true } }, { "security": { - "required": true, "fields": [ { "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", "uuid": true, - "type": "string", - "required": false + "required": false, + "type": "string" } }, { "ssl": { - "required": false, - "type": "boolean" + "description": "Enables TLS.", + "type": "boolean", + "required": false } } ], - "type": "record" + "type": "record", + "required": true } }, { "cluster_name": { - "required": false, "auto": true, + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "required": false, "type": "string" } }, { "producer_request_acks": { "default": 1, - "type": "integer", "one_of": [ -1, 0, 1 - ] + ], + "type": "integer", + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set)." } }, { "producer_request_timeout": { "default": 2000, + "description": "Time to wait for a Produce response in milliseconds", "type": "integer" } }, { "producer_request_limits_messages_per_request": { "default": 200, + "description": "Maximum number of messages to include into a single Produce request.", "type": "integer" } }, { "producer_request_limits_bytes_per_request": { "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", "type": "integer" } }, { "producer_request_retries_max_attempts": { "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", "type": "integer" } }, { "producer_request_retries_backoff_timeout": { "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", "type": "integer" } }, { "producer_async": { "default": true, + "description": "Flag to enable asynchronous mode.", "type": "boolean" } }, { "producer_async_flush_timeout": { "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", "type": "integer" } }, { "producer_async_buffering_limits_messages_in_memory": { "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", "type": "integer" } + }, + { + "custom_fields_by_lua": { + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "len_min": 1, + "type": "string" + }, + "type": "map", + "description": "Lua code as a key-value map" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/kafka-log/3.5.x.json b/schemas/kafka-log/3.5.x.json new file mode 100644 index 00000000..58310faa --- /dev/null +++ b/schemas/kafka-log/3.5.x.json @@ -0,0 +1,280 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "fields": [ + { + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "type": "set", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "required": true, + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "required": true, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "topic": { + "required": true, + "type": "string", + "description": "The Kafka topic to publish to." + } + }, + { + "timeout": { + "default": 10000, + "type": "integer", + "description": "Socket timeout in milliseconds." + } + }, + { + "keepalive": { + "type": "integer", + "default": 60000 + } + }, + { + "keepalive_enabled": { + "type": "boolean", + "default": false + } + }, + { + "authentication": { + "fields": [ + { + "strategy": { + "required": false, + "one_of": [ + "sasl" + ], + "type": "string", + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`." + } + }, + { + "mechanism": { + "required": false, + "one_of": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string", + "description": "The SASL authentication mechanism. Supported options: `PLAIN` or `SCRAM-SHA-256`." + } + }, + { + "tokenauth": { + "required": false, + "type": "boolean", + "description": "Enable this to indicate `DelegationToken` authentication" + } + }, + { + "user": { + "type": "string", + "required": false, + "referenceable": true, + "encrypted": true, + "description": "Username for SASL authentication." + } + }, + { + "password": { + "type": "string", + "required": false, + "referenceable": true, + "encrypted": true, + "description": "Password for SASL authentication." + } + } + ], + "type": "record", + "required": true + } + }, + { + "security": { + "fields": [ + { + "certificate_id": { + "uuid": true, + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "required": false + } + }, + { + "ssl": { + "required": false, + "type": "boolean", + "description": "Enables TLS." + } + } + ], + "type": "record", + "required": true + } + }, + { + "cluster_name": { + "required": false, + "type": "string", + "auto": true, + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster." + } + }, + { + "producer_request_acks": { + "one_of": [ + -1, + 0, + 1 + ], + "default": 1, + "type": "integer", + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set)." + } + }, + { + "producer_request_timeout": { + "default": 2000, + "type": "integer", + "description": "Time to wait for a Produce response in milliseconds" + } + }, + { + "producer_request_limits_messages_per_request": { + "default": 200, + "type": "integer", + "description": "Maximum number of messages to include into a single Produce request." + } + }, + { + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "type": "integer", + "description": "Maximum size of a Produce request in bytes." + } + }, + { + "producer_request_retries_max_attempts": { + "default": 10, + "type": "integer", + "description": "Maximum number of retry attempts per single Produce request." + } + }, + { + "producer_request_retries_backoff_timeout": { + "default": 100, + "type": "integer", + "description": "Backoff interval between retry attempts in milliseconds." + } + }, + { + "producer_async": { + "default": true, + "type": "boolean", + "description": "Flag to enable asynchronous mode." + } + }, + { + "producer_async_flush_timeout": { + "default": 1000, + "type": "integer", + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode." + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "type": "integer", + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode." + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, + "description": "Lua code as a key-value map" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/kafka-log/3.6.x.json b/schemas/kafka-log/3.6.x.json new file mode 100644 index 00000000..f547e455 --- /dev/null +++ b/schemas/kafka-log/3.6.x.json @@ -0,0 +1,280 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "type": "record", + "fields": [ + { + "bootstrap_servers": { + "elements": { + "fields": [ + { + "host": { + "required": true, + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "required": true, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + } + ], + "type": "record" + }, + "type": "set", + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format." + } + }, + { + "topic": { + "required": true, + "type": "string", + "description": "The Kafka topic to publish to." + } + }, + { + "timeout": { + "type": "integer", + "description": "Socket timeout in milliseconds.", + "default": 10000 + } + }, + { + "keepalive": { + "default": 60000, + "type": "integer" + } + }, + { + "keepalive_enabled": { + "default": false, + "type": "boolean" + } + }, + { + "authentication": { + "required": true, + "type": "record", + "fields": [ + { + "strategy": { + "required": false, + "type": "string", + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "one_of": [ + "sasl" + ] + } + }, + { + "mechanism": { + "required": false, + "type": "string", + "description": "The SASL authentication mechanism. Supported options: `PLAIN` or `SCRAM-SHA-256`.", + "one_of": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ] + } + }, + { + "tokenauth": { + "required": false, + "type": "boolean", + "description": "Enable this to indicate `DelegationToken` authentication" + } + }, + { + "user": { + "referenceable": true, + "type": "string", + "encrypted": true, + "description": "Username for SASL authentication.", + "required": false + } + }, + { + "password": { + "referenceable": true, + "type": "string", + "encrypted": true, + "description": "Password for SASL authentication.", + "required": false + } + } + ] + } + }, + { + "security": { + "required": true, + "type": "record", + "fields": [ + { + "certificate_id": { + "required": false, + "type": "string", + "description": "UUID of certificate entity for mTLS authentication.", + "uuid": true + } + }, + { + "ssl": { + "required": false, + "type": "boolean", + "description": "Enables TLS." + } + } + ] + } + }, + { + "cluster_name": { + "required": false, + "type": "string", + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "auto": true + } + }, + { + "producer_request_acks": { + "one_of": [ + -1, + 0, + 1 + ], + "type": "integer", + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "default": 1 + } + }, + { + "producer_request_timeout": { + "type": "integer", + "description": "Time to wait for a Produce response in milliseconds", + "default": 2000 + } + }, + { + "producer_request_limits_messages_per_request": { + "type": "integer", + "description": "Maximum number of messages to include into a single Produce request.", + "default": 200 + } + }, + { + "producer_request_limits_bytes_per_request": { + "type": "integer", + "description": "Maximum size of a Produce request in bytes.", + "default": 1048576 + } + }, + { + "producer_request_retries_max_attempts": { + "type": "integer", + "description": "Maximum number of retry attempts per single Produce request.", + "default": 10 + } + }, + { + "producer_request_retries_backoff_timeout": { + "type": "integer", + "description": "Backoff interval between retry attempts in milliseconds.", + "default": 100 + } + }, + { + "producer_async": { + "type": "boolean", + "description": "Flag to enable asynchronous mode.", + "default": true + } + }, + { + "producer_async_flush_timeout": { + "type": "integer", + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "default": 1000 + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "type": "integer", + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "default": 50000 + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "description": "Lua code as a key-value map", + "values": { + "len_min": 1, + "type": "string" + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/kafka-log/3.7.x.json b/schemas/kafka-log/3.7.x.json new file mode 100644 index 00000000..fe4b936f --- /dev/null +++ b/schemas/kafka-log/3.7.x.json @@ -0,0 +1,280 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "bootstrap_servers": { + "elements": { + "type": "record", + "fields": [ + { + "host": { + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "required": true, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + } + ] + }, + "type": "set", + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format." + } + }, + { + "topic": { + "required": true, + "type": "string", + "description": "The Kafka topic to publish to." + } + }, + { + "timeout": { + "type": "integer", + "description": "Socket timeout in milliseconds.", + "default": 10000 + } + }, + { + "keepalive": { + "type": "integer", + "default": 60000 + } + }, + { + "keepalive_enabled": { + "type": "boolean", + "default": false + } + }, + { + "authentication": { + "fields": [ + { + "strategy": { + "required": false, + "type": "string", + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "one_of": [ + "sasl" + ] + } + }, + { + "mechanism": { + "required": false, + "type": "string", + "description": "The SASL authentication mechanism. Supported options: `PLAIN` or `SCRAM-SHA-256`.", + "one_of": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ] + } + }, + { + "tokenauth": { + "required": false, + "type": "boolean", + "description": "Enable this to indicate `DelegationToken` authentication" + } + }, + { + "user": { + "encrypted": true, + "referenceable": true, + "required": false, + "description": "Username for SASL authentication.", + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "required": false, + "description": "Password for SASL authentication.", + "type": "string" + } + } + ], + "type": "record", + "required": true + } + }, + { + "security": { + "fields": [ + { + "certificate_id": { + "required": false, + "type": "string", + "description": "UUID of certificate entity for mTLS authentication.", + "uuid": true + } + }, + { + "ssl": { + "required": false, + "type": "boolean", + "description": "Enables TLS." + } + } + ], + "type": "record", + "required": true + } + }, + { + "cluster_name": { + "required": false, + "auto": true, + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string" + } + }, + { + "producer_request_acks": { + "default": 1, + "type": "integer", + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "one_of": [ + -1, + 0, + 1 + ] + } + }, + { + "producer_request_timeout": { + "type": "integer", + "description": "Time to wait for a Produce response in milliseconds", + "default": 2000 + } + }, + { + "producer_request_limits_messages_per_request": { + "type": "integer", + "description": "Maximum number of messages to include into a single Produce request.", + "default": 200 + } + }, + { + "producer_request_limits_bytes_per_request": { + "type": "integer", + "description": "Maximum size of a Produce request in bytes.", + "default": 1048576 + } + }, + { + "producer_request_retries_max_attempts": { + "type": "integer", + "description": "Maximum number of retry attempts per single Produce request.", + "default": 10 + } + }, + { + "producer_request_retries_backoff_timeout": { + "type": "integer", + "description": "Backoff interval between retry attempts in milliseconds.", + "default": 100 + } + }, + { + "producer_async": { + "type": "boolean", + "description": "Flag to enable asynchronous mode.", + "default": true + } + }, + { + "producer_async_flush_timeout": { + "type": "integer", + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "default": 1000 + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "type": "integer", + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "default": 50000 + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "description": "Lua code as a key-value map", + "values": { + "type": "string", + "len_min": 1 + } + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/kafka-log/3.8.x.json b/schemas/kafka-log/3.8.x.json new file mode 100644 index 00000000..00a36770 --- /dev/null +++ b/schemas/kafka-log/3.8.x.json @@ -0,0 +1,280 @@ +{ + "fields": [ + { + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": true, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "type": "set", + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true, + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "topic": { + "description": "The Kafka topic to publish to.", + "type": "string", + "required": true + } + }, + { + "timeout": { + "description": "Socket timeout in milliseconds.", + "type": "integer", + "default": 10000 + } + }, + { + "keepalive": { + "default": 60000, + "type": "integer" + } + }, + { + "keepalive_enabled": { + "default": false, + "type": "boolean" + } + }, + { + "authentication": { + "fields": [ + { + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "type": "string", + "required": false, + "one_of": [ + "sasl" + ] + } + }, + { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN` or `SCRAM-SHA-256`.", + "type": "string", + "required": false, + "one_of": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ] + } + }, + { + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication", + "type": "boolean", + "required": false + } + }, + { + "user": { + "description": "Username for SASL authentication.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "password": { + "description": "Password for SASL authentication.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + } + ], + "type": "record", + "required": true + } + }, + { + "security": { + "fields": [ + { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "uuid": true, + "type": "string", + "required": false + } + }, + { + "ssl": { + "description": "Enables TLS.", + "type": "boolean", + "required": false + } + } + ], + "type": "record", + "required": true + } + }, + { + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "auto": true, + "type": "string", + "required": false + } + }, + { + "producer_request_acks": { + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "type": "integer", + "default": 1, + "one_of": [ + -1, + 0, + 1 + ] + } + }, + { + "producer_request_timeout": { + "description": "Time to wait for a Produce response in milliseconds", + "type": "integer", + "default": 2000 + } + }, + { + "producer_request_limits_messages_per_request": { + "description": "Maximum number of messages to include into a single Produce request.", + "type": "integer", + "default": 200 + } + }, + { + "producer_request_limits_bytes_per_request": { + "description": "Maximum size of a Produce request in bytes.", + "type": "integer", + "default": 1048576 + } + }, + { + "producer_request_retries_max_attempts": { + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer", + "default": 10 + } + }, + { + "producer_request_retries_backoff_timeout": { + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer", + "default": 100 + } + }, + { + "producer_async": { + "description": "Flag to enable asynchronous mode.", + "type": "boolean", + "default": true + } + }, + { + "producer_async_flush_timeout": { + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer", + "default": 1000 + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer", + "default": 50000 + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "values": { + "type": "string", + "len_min": 1 + }, + "description": "Lua code as a key-value map" + } + } + ], + "type": "record", + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/kafka-log/3.9.x.json b/schemas/kafka-log/3.9.x.json new file mode 100644 index 00000000..2b4dc212 --- /dev/null +++ b/schemas/kafka-log/3.9.x.json @@ -0,0 +1,280 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": true, + "type": "set" + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "fields": [ + { + "bootstrap_servers": { + "elements": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true, + "type": "integer" + } + } + ] + }, + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "type": "set" + } + }, + { + "topic": { + "description": "The Kafka topic to publish to.", + "required": true, + "type": "string" + } + }, + { + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + } + }, + { + "keepalive": { + "default": 60000, + "type": "integer" + } + }, + { + "keepalive_enabled": { + "default": false, + "type": "boolean" + } + }, + { + "authentication": { + "fields": [ + { + "strategy": { + "type": "string", + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "required": false, + "one_of": [ + "sasl" + ] + } + }, + { + "mechanism": { + "type": "string", + "description": "The SASL authentication mechanism. Supported options: `PLAIN` or `SCRAM-SHA-256`.", + "required": false, + "one_of": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ] + } + }, + { + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication", + "required": false, + "type": "boolean" + } + }, + { + "user": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "Username for SASL authentication.", + "required": false + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "Password for SASL authentication.", + "required": false + } + } + ], + "required": true, + "type": "record" + } + }, + { + "security": { + "fields": [ + { + "certificate_id": { + "required": false, + "description": "UUID of certificate entity for mTLS authentication.", + "uuid": true, + "type": "string" + } + }, + { + "ssl": { + "description": "Enables TLS.", + "required": false, + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "cluster_name": { + "auto": true, + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "required": false, + "type": "string" + } + }, + { + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "type": "integer", + "one_of": [ + -1, + 0, + 1 + ] + } + }, + { + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds", + "type": "integer" + } + }, + { + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single Produce request.", + "type": "integer" + } + }, + { + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + } + }, + { + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + } + }, + { + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + } + }, + { + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + } + }, + { + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + } + }, + { + "custom_fields_by_lua": { + "description": "Lua code as a key-value map", + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/kafka-upstream/3.10.x.json b/schemas/kafka-upstream/3.10.x.json new file mode 100644 index 00000000..3817ecb4 --- /dev/null +++ b/schemas/kafka-upstream/3.10.x.json @@ -0,0 +1,329 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "forward_method", + "forward_uri", + "forward_headers", + "forward_body" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "type": "record", + "fields": [ + { + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "type": "set", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true + } + } + ] + } + } + }, + { + "topics_query_arg": { + "description": "The request query parameter name that contains the topics to publish to", + "type": "string", + "required": false + } + }, + { + "allowed_topics": { + "description": "The list of allowed topic names to which messages can be sent. The default topic configured in the `topic` field is always allowed, regardless of its inclusion in `allowed_topics`.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "topic": { + "description": "The default Kafka topic to publish to if the query parameter defined in the `topics_query_arg` does not exist in the request", + "type": "string", + "required": true + } + }, + { + "timeout": { + "description": "Socket timeout in milliseconds.", + "default": 10000, + "type": "integer" + } + }, + { + "keepalive": { + "description": "Keepalive timeout in milliseconds.", + "default": 60000, + "type": "integer" + } + }, + { + "keepalive_enabled": { + "type": "boolean", + "default": false + } + }, + { + "authentication": { + "type": "record", + "fields": [ + { + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "type": "string", + "one_of": [ + "sasl" + ], + "required": false + } + }, + { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256`, or `SCRAM-SHA-512`.", + "type": "string", + "one_of": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "required": false + } + }, + { + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication.", + "type": "boolean", + "required": false + } + }, + { + "user": { + "type": "string", + "referenceable": true, + "description": "Username for SASL authentication.", + "encrypted": true, + "required": false + } + }, + { + "password": { + "type": "string", + "referenceable": true, + "description": "Password for SASL authentication.", + "encrypted": true, + "required": false + } + } + ], + "required": true + } + }, + { + "security": { + "type": "record", + "fields": [ + { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string", + "uuid": true, + "required": false + } + }, + { + "ssl": { + "description": "Enables TLS.", + "type": "boolean", + "required": false + } + } + ], + "required": true + } + }, + { + "forward_method": { + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "default": false, + "type": "boolean" + } + }, + { + "forward_uri": { + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "default": false, + "type": "boolean" + } + }, + { + "forward_headers": { + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "default": false, + "type": "boolean" + } + }, + { + "forward_body": { + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "default": true, + "type": "boolean" + } + }, + { + "message_by_lua_functions": { + "description": "The Lua functions that manipulates the message being sent to the Kafka topic.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string", + "required": false, + "auto": true + } + }, + { + "producer_request_acks": { + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "default": 1, + "type": "integer", + "one_of": [ + -1, + 0, + 1 + ] + } + }, + { + "producer_request_timeout": { + "description": "Time to wait for a Produce response in milliseconds.", + "default": 2000, + "type": "integer" + } + }, + { + "producer_request_limits_messages_per_request": { + "description": "Maximum number of messages to include into a single producer request.", + "default": 200, + "type": "integer" + } + }, + { + "producer_request_limits_bytes_per_request": { + "description": "Maximum size of a Produce request in bytes.", + "default": 1048576, + "type": "integer" + } + }, + { + "producer_request_retries_max_attempts": { + "description": "Maximum number of retry attempts per single Produce request.", + "default": 10, + "type": "integer" + } + }, + { + "producer_request_retries_backoff_timeout": { + "description": "Backoff interval between retry attempts in milliseconds.", + "default": 100, + "type": "integer" + } + }, + { + "producer_async": { + "description": "Flag to enable asynchronous mode.", + "default": true, + "type": "boolean" + } + }, + { + "producer_async_flush_timeout": { + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "default": 1000, + "type": "integer" + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "default": 50000, + "type": "integer" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/kafka-upstream/3.11.x.json b/schemas/kafka-upstream/3.11.x.json new file mode 100644 index 00000000..9cd3f7d2 --- /dev/null +++ b/schemas/kafka-upstream/3.11.x.json @@ -0,0 +1,495 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "forward_method", + "forward_uri", + "forward_headers", + "forward_body" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "fields": [ + { + "bootstrap_servers": { + "type": "set", + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "elements": { + "fields": [ + { + "host": { + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "required": true, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "schema_registry": { + "description": "The plugin-global schema registry configuration. This can be overwritten by the topic configuration.", + "required": true, + "fields": [ + { + "confluent": { + "required": false, + "fields": [ + { + "url": { + "required": false, + "description": "The URL of the schema registry.", + "type": "string" + } + }, + { + "ttl": { + "between": [ + 0, + 3600 + ], + "description": "The TTL in seconds for the schema registry cache.", + "type": "number" + } + }, + { + "ssl_verify": { + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "default": true, + "type": "boolean" + } + }, + { + "authentication": { + "required": true, + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "mode", + "basic" + ] + } + } + ], + "fields": [ + { + "mode": { + "required": true, + "description": "Authentication mode to use with the schema registry.", + "one_of": [ + "none", + "basic" + ], + "default": "none", + "type": "string" + } + }, + { + "basic": { + "required": false, + "fields": [ + { + "username": { + "type": "string", + "required": true, + "referenceable": true, + "encrypted": true + } + }, + { + "password": { + "type": "string", + "required": true, + "referenceable": true, + "encrypted": true + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "value_schema": { + "required": false, + "fields": [ + { + "subject_name": { + "required": false, + "description": "The name of the subject", + "type": "string" + } + }, + { + "schema_version": { + "match_any": { + "err": "must be either 'latest' or a positive integer", + "patterns": [ + "^latest$", + "^[0-9]+$" + ] + }, + "required": false, + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "key_schema": { + "required": false, + "fields": [ + { + "subject_name": { + "required": false, + "description": "The name of the subject", + "type": "string" + } + }, + { + "schema_version": { + "match_any": { + "err": "must be either 'latest' or a positive integer", + "patterns": [ + "^latest$", + "^[0-9]+$" + ] + }, + "required": false, + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "topics_query_arg": { + "required": false, + "description": "The request query parameter name that contains the topics to publish to", + "type": "string" + } + }, + { + "allowed_topics": { + "type": "array", + "required": false, + "description": "The list of allowed topic names to which messages can be sent. The default topic configured in the `topic` field is always allowed, regardless of its inclusion in `allowed_topics`.", + "elements": { + "type": "string" + } + } + }, + { + "topic": { + "required": true, + "description": "The default Kafka topic to publish to if the query parameter defined in the `topics_query_arg` does not exist in the request", + "type": "string" + } + }, + { + "key_query_arg": { + "required": false, + "description": "The request query parameter name that contains the Kafka message key. If specified, messages with the same key will be sent to the same Kafka partition, ensuring consistent ordering.", + "type": "string" + } + }, + { + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + } + }, + { + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + } + }, + { + "keepalive_enabled": { + "default": false, + "type": "boolean" + } + }, + { + "authentication": { + "required": true, + "fields": [ + { + "strategy": { + "one_of": [ + "sasl" + ], + "required": false, + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "type": "string" + } + }, + { + "mechanism": { + "one_of": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "required": false, + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256`, or `SCRAM-SHA-512`.", + "type": "string" + } + }, + { + "tokenauth": { + "required": false, + "description": "Enable this to indicate `DelegationToken` authentication.", + "type": "boolean" + } + }, + { + "user": { + "required": false, + "description": "Username for SASL authentication.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "required": false, + "description": "Password for SASL authentication.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "security": { + "required": true, + "fields": [ + { + "certificate_id": { + "uuid": true, + "required": false, + "description": "UUID of certificate entity for mTLS authentication.", + "type": "string" + } + }, + { + "ssl": { + "required": false, + "description": "Enables TLS.", + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "forward_method": { + "default": false, + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + } + }, + { + "forward_uri": { + "default": false, + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + } + }, + { + "forward_headers": { + "default": false, + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + } + }, + { + "forward_body": { + "default": true, + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + } + }, + { + "message_by_lua_functions": { + "type": "array", + "required": false, + "description": "The Lua functions that manipulates the message being sent to the Kafka topic.", + "elements": { + "type": "string" + } + } + }, + { + "cluster_name": { + "type": "string", + "required": false, + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "auto": true + } + }, + { + "producer_request_acks": { + "one_of": [ + -1, + 0, + 1 + ], + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "type": "integer" + } + }, + { + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer" + } + }, + { + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single producer request.", + "type": "integer" + } + }, + { + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + } + }, + { + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + } + }, + { + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + } + }, + { + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + } + }, + { + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/kafka-upstream/3.12.x.json b/schemas/kafka-upstream/3.12.x.json new file mode 100644 index 00000000..6211fd54 --- /dev/null +++ b/schemas/kafka-upstream/3.12.x.json @@ -0,0 +1,495 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "bootstrap_servers": { + "type": "set", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "required": true + } + } + ] + }, + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format." + } + }, + { + "schema_registry": { + "description": "The plugin-global schema registry configuration. This can be overwritten by the topic configuration.", + "fields": [ + { + "confluent": { + "type": "record", + "fields": [ + { + "url": { + "description": "The URL of the schema registry.", + "type": "string", + "required": false + } + }, + { + "ttl": { + "description": "The TTL in seconds for the schema registry cache.", + "between": [ + 0, + 3600 + ], + "type": "number" + } + }, + { + "ssl_verify": { + "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.", + "default": true, + "type": "boolean" + } + }, + { + "authentication": { + "type": "record", + "fields": [ + { + "mode": { + "type": "string", + "required": true, + "description": "Authentication mode to use with the schema registry.", + "default": "none", + "one_of": [ + "none", + "basic" + ] + } + }, + { + "basic": { + "type": "record", + "fields": [ + { + "username": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": true + } + }, + { + "password": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": true + } + } + ], + "required": false + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "mode", + "basic" + ] + } + } + ], + "required": true + } + }, + { + "value_schema": { + "type": "record", + "fields": [ + { + "subject_name": { + "type": "string", + "description": "The name of the subject", + "required": false + } + }, + { + "schema_version": { + "type": "string", + "match_any": { + "patterns": [ + "^latest$", + "^[0-9]+$" + ], + "err": "must be either 'latest' or a positive integer" + }, + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "required": false + } + } + ], + "required": false + } + }, + { + "key_schema": { + "type": "record", + "fields": [ + { + "subject_name": { + "type": "string", + "description": "The name of the subject", + "required": false + } + }, + { + "schema_version": { + "type": "string", + "match_any": { + "patterns": [ + "^latest$", + "^[0-9]+$" + ], + "err": "must be either 'latest' or a positive integer" + }, + "description": "The schema version to use for serialization/deserialization. Use 'latest' to always fetch the most recent version.", + "required": false + } + } + ], + "required": false + } + } + ], + "required": false + } + } + ], + "type": "record", + "required": true + } + }, + { + "topics_query_arg": { + "type": "string", + "description": "The request query parameter name that contains the topics to publish to", + "required": false + } + }, + { + "allowed_topics": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "The list of allowed topic names to which messages can be sent. The default topic configured in the `topic` field is always allowed, regardless of its inclusion in `allowed_topics`.", + "required": false + } + }, + { + "topic": { + "type": "string", + "description": "The default Kafka topic to publish to if the query parameter defined in the `topics_query_arg` does not exist in the request", + "required": true + } + }, + { + "key_query_arg": { + "type": "string", + "description": "The request query parameter name that contains the Kafka message key. If specified, messages with the same key will be sent to the same Kafka partition, ensuring consistent ordering.", + "required": false + } + }, + { + "timeout": { + "type": "integer", + "default": 10000, + "description": "Socket timeout in milliseconds." + } + }, + { + "keepalive": { + "type": "integer", + "default": 60000, + "description": "Keepalive timeout in milliseconds." + } + }, + { + "keepalive_enabled": { + "type": "boolean", + "default": false + } + }, + { + "authentication": { + "type": "record", + "fields": [ + { + "strategy": { + "type": "string", + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "one_of": [ + "sasl" + ], + "required": false + } + }, + { + "mechanism": { + "type": "string", + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256`, or `SCRAM-SHA-512`.", + "one_of": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "required": false + } + }, + { + "tokenauth": { + "type": "boolean", + "description": "Enable this to indicate `DelegationToken` authentication.", + "required": false + } + }, + { + "user": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Username for SASL authentication." + } + }, + { + "password": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "Password for SASL authentication." + } + } + ], + "required": true + } + }, + { + "security": { + "type": "record", + "fields": [ + { + "certificate_id": { + "type": "string", + "description": "UUID of certificate entity for mTLS authentication.", + "uuid": true, + "required": false + } + }, + { + "ssl": { + "type": "boolean", + "description": "Enables TLS.", + "required": false + } + } + ], + "required": true + } + }, + { + "forward_method": { + "type": "boolean", + "default": false, + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`." + } + }, + { + "forward_uri": { + "type": "boolean", + "default": false, + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`." + } + }, + { + "forward_headers": { + "type": "boolean", + "default": false, + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`." + } + }, + { + "forward_body": { + "type": "boolean", + "default": true, + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`." + } + }, + { + "message_by_lua_functions": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "The Lua functions that manipulates the message being sent to the Kafka topic.", + "required": false + } + }, + { + "cluster_name": { + "type": "string", + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "auto": true, + "required": false + } + }, + { + "producer_request_acks": { + "type": "integer", + "default": 1, + "one_of": [ + -1, + 0, + 1 + ], + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set)." + } + }, + { + "producer_request_timeout": { + "type": "integer", + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds." + } + }, + { + "producer_request_limits_messages_per_request": { + "type": "integer", + "default": 200, + "description": "Maximum number of messages to include into a single producer request." + } + }, + { + "producer_request_limits_bytes_per_request": { + "type": "integer", + "default": 1048576, + "description": "Maximum size of a Produce request in bytes." + } + }, + { + "producer_request_retries_max_attempts": { + "type": "integer", + "default": 10, + "description": "Maximum number of retry attempts per single Produce request." + } + }, + { + "producer_request_retries_backoff_timeout": { + "type": "integer", + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds." + } + }, + { + "producer_async": { + "type": "boolean", + "default": true, + "description": "Flag to enable asynchronous mode." + } + }, + { + "producer_async_flush_timeout": { + "type": "integer", + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode." + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "type": "integer", + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode." + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "forward_method", + "forward_uri", + "forward_headers", + "forward_body" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/kafka-upstream/3.4.x.json b/schemas/kafka-upstream/3.4.x.json index e06ee2d2..d99a49f4 100644 --- a/schemas/kafka-upstream/3.4.x.json +++ b/schemas/kafka-upstream/3.4.x.json @@ -8,48 +8,39 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, - "entity_checks": [ - { - "custom_entity_check": { - "field_sources": [ - "forward_method", - "forward_uri", - "forward_headers", - "forward_body" - ] - } - }, - { - "custom_entity_check": { - "field_sources": [ - "authentication" - ] - } - } - ], "fields": [ { "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", "elements": { "fields": [ { "host": { + "description": "A string representing a host name, such as example.com.", "type": "string", "required": true } @@ -60,8 +51,9 @@ 0, 65535 ], - "type": "integer", - "required": true + "required": true, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" } } ], @@ -72,192 +64,239 @@ }, { "topic": { - "type": "string", - "required": true + "required": true, + "description": "The Kafka topic to publish to.", + "type": "string" } }, { "timeout": { + "default": 10000, "type": "integer", - "default": 10000 + "description": "Socket timeout in milliseconds." } }, { "keepalive": { + "default": 60000, "type": "integer", - "default": 60000 + "description": "Keepalive timeout in milliseconds." } }, { "keepalive_enabled": { - "type": "boolean", - "default": false + "default": false, + "type": "boolean" } }, { "authentication": { - "required": true, "fields": [ { "strategy": { "required": false, - "type": "string", "one_of": [ "sasl" - ] + ], + "type": "string", + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`." } }, { "mechanism": { "required": false, - "type": "string", "one_of": [ "PLAIN", "SCRAM-SHA-256", "SCRAM-SHA-512" - ] + ], + "type": "string", + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256`, or `SCRAM-SHA-512`." } }, { "tokenauth": { - "type": "boolean", - "required": false + "required": false, + "description": "Enable this to indicate `DelegationToken` authentication.", + "type": "boolean" } }, { "user": { - "referenceable": true, + "required": false, "type": "string", - "encrypted": true, - "required": false + "referenceable": true, + "description": "Username for SASL authentication.", + "encrypted": true } }, { "password": { - "referenceable": true, + "required": false, "type": "string", - "encrypted": true, - "required": false + "referenceable": true, + "description": "Password for SASL authentication.", + "encrypted": true } } ], - "type": "record" + "type": "record", + "required": true } }, { "security": { - "required": true, "fields": [ { "certificate_id": { + "required": false, "uuid": true, "type": "string", - "required": false + "description": "UUID of certificate entity for mTLS authentication." } }, { "ssl": { - "type": "boolean", - "required": false + "required": false, + "description": "Enables TLS.", + "type": "boolean" } } ], - "type": "record" + "type": "record", + "required": true } }, { "forward_method": { + "default": false, "type": "boolean", - "default": false + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`." } }, { "forward_uri": { + "default": false, "type": "boolean", - "default": false + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`." } }, { "forward_headers": { + "default": false, "type": "boolean", - "default": false + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`." } }, { "forward_body": { + "default": true, "type": "boolean", - "default": true + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`." } }, { "cluster_name": { - "required": false, "auto": true, - "type": "string" + "required": false, + "type": "string", + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster." } }, { "producer_request_acks": { "default": 1, - "type": "integer", "one_of": [ -1, 0, 1 - ] + ], + "type": "integer", + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set)." } }, { "producer_request_timeout": { + "default": 2000, "type": "integer", - "default": 2000 + "description": "Time to wait for a Produce response in milliseconds." } }, { "producer_request_limits_messages_per_request": { + "default": 200, "type": "integer", - "default": 200 + "description": "Maximum number of messages to include into a single producer request." } }, { "producer_request_limits_bytes_per_request": { + "default": 1048576, "type": "integer", - "default": 1048576 + "description": "Maximum size of a Produce request in bytes." } }, { "producer_request_retries_max_attempts": { + "default": 10, "type": "integer", - "default": 10 + "description": "Maximum number of retry attempts per single Produce request." } }, { "producer_request_retries_backoff_timeout": { + "default": 100, "type": "integer", - "default": 100 + "description": "Backoff interval between retry attempts in milliseconds." } }, { "producer_async": { + "default": true, "type": "boolean", - "default": true + "description": "Flag to enable asynchronous mode." } }, { "producer_async_flush_timeout": { + "default": 1000, "type": "integer", - "default": 1000 + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode." } }, { "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, "type": "integer", - "default": 50000 + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode." + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "forward_method", + "forward_uri", + "forward_headers", + "forward_body" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/kafka-upstream/3.5.x.json b/schemas/kafka-upstream/3.5.x.json new file mode 100644 index 00000000..457c24f1 --- /dev/null +++ b/schemas/kafka-upstream/3.5.x.json @@ -0,0 +1,302 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "forward_method", + "forward_uri", + "forward_headers", + "forward_body" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "fields": [ + { + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "type": "set", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "required": true, + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "required": true, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "topic": { + "required": true, + "type": "string", + "description": "The Kafka topic to publish to." + } + }, + { + "timeout": { + "default": 10000, + "type": "integer", + "description": "Socket timeout in milliseconds." + } + }, + { + "keepalive": { + "default": 60000, + "type": "integer", + "description": "Keepalive timeout in milliseconds." + } + }, + { + "keepalive_enabled": { + "type": "boolean", + "default": false + } + }, + { + "authentication": { + "fields": [ + { + "strategy": { + "required": false, + "one_of": [ + "sasl" + ], + "type": "string", + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`." + } + }, + { + "mechanism": { + "required": false, + "one_of": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ], + "type": "string", + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256`, or `SCRAM-SHA-512`." + } + }, + { + "tokenauth": { + "required": false, + "type": "boolean", + "description": "Enable this to indicate `DelegationToken` authentication." + } + }, + { + "user": { + "type": "string", + "required": false, + "referenceable": true, + "encrypted": true, + "description": "Username for SASL authentication." + } + }, + { + "password": { + "type": "string", + "required": false, + "referenceable": true, + "encrypted": true, + "description": "Password for SASL authentication." + } + } + ], + "type": "record", + "required": true + } + }, + { + "security": { + "fields": [ + { + "certificate_id": { + "uuid": true, + "required": false, + "type": "string", + "description": "UUID of certificate entity for mTLS authentication." + } + }, + { + "ssl": { + "required": false, + "type": "boolean", + "description": "Enables TLS." + } + } + ], + "type": "record", + "required": true + } + }, + { + "forward_method": { + "default": false, + "type": "boolean", + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`." + } + }, + { + "forward_uri": { + "default": false, + "type": "boolean", + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`." + } + }, + { + "forward_headers": { + "default": false, + "type": "boolean", + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`." + } + }, + { + "forward_body": { + "default": true, + "type": "boolean", + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`." + } + }, + { + "cluster_name": { + "required": false, + "auto": true, + "type": "string", + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster." + } + }, + { + "producer_request_acks": { + "one_of": [ + -1, + 0, + 1 + ], + "default": 1, + "type": "integer", + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set)." + } + }, + { + "producer_request_timeout": { + "default": 2000, + "type": "integer", + "description": "Time to wait for a Produce response in milliseconds." + } + }, + { + "producer_request_limits_messages_per_request": { + "default": 200, + "type": "integer", + "description": "Maximum number of messages to include into a single producer request." + } + }, + { + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "type": "integer", + "description": "Maximum size of a Produce request in bytes." + } + }, + { + "producer_request_retries_max_attempts": { + "default": 10, + "type": "integer", + "description": "Maximum number of retry attempts per single Produce request." + } + }, + { + "producer_request_retries_backoff_timeout": { + "default": 100, + "type": "integer", + "description": "Backoff interval between retry attempts in milliseconds." + } + }, + { + "producer_async": { + "default": true, + "type": "boolean", + "description": "Flag to enable asynchronous mode." + } + }, + { + "producer_async_flush_timeout": { + "default": 1000, + "type": "integer", + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode." + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "type": "integer", + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/kafka-upstream/3.6.x.json b/schemas/kafka-upstream/3.6.x.json new file mode 100644 index 00000000..adf9d86e --- /dev/null +++ b/schemas/kafka-upstream/3.6.x.json @@ -0,0 +1,302 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "forward_method", + "forward_uri", + "forward_headers", + "forward_body" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "type": "record", + "fields": [ + { + "bootstrap_servers": { + "elements": { + "fields": [ + { + "host": { + "required": true, + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "required": true, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + } + ], + "type": "record" + }, + "type": "set", + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format." + } + }, + { + "topic": { + "required": true, + "type": "string", + "description": "The Kafka topic to publish to." + } + }, + { + "timeout": { + "type": "integer", + "description": "Socket timeout in milliseconds.", + "default": 10000 + } + }, + { + "keepalive": { + "type": "integer", + "description": "Keepalive timeout in milliseconds.", + "default": 60000 + } + }, + { + "keepalive_enabled": { + "default": false, + "type": "boolean" + } + }, + { + "authentication": { + "required": true, + "type": "record", + "fields": [ + { + "strategy": { + "required": false, + "type": "string", + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "one_of": [ + "sasl" + ] + } + }, + { + "mechanism": { + "required": false, + "type": "string", + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256`, or `SCRAM-SHA-512`.", + "one_of": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ] + } + }, + { + "tokenauth": { + "required": false, + "type": "boolean", + "description": "Enable this to indicate `DelegationToken` authentication." + } + }, + { + "user": { + "referenceable": true, + "type": "string", + "encrypted": true, + "description": "Username for SASL authentication.", + "required": false + } + }, + { + "password": { + "referenceable": true, + "type": "string", + "encrypted": true, + "description": "Password for SASL authentication.", + "required": false + } + } + ] + } + }, + { + "security": { + "required": true, + "type": "record", + "fields": [ + { + "certificate_id": { + "required": false, + "type": "string", + "description": "UUID of certificate entity for mTLS authentication.", + "uuid": true + } + }, + { + "ssl": { + "required": false, + "type": "boolean", + "description": "Enables TLS." + } + } + ] + } + }, + { + "forward_method": { + "type": "boolean", + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "default": false + } + }, + { + "forward_uri": { + "type": "boolean", + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "default": false + } + }, + { + "forward_headers": { + "type": "boolean", + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "default": false + } + }, + { + "forward_body": { + "type": "boolean", + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "default": true + } + }, + { + "cluster_name": { + "auto": true, + "type": "string", + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "required": false + } + }, + { + "producer_request_acks": { + "one_of": [ + -1, + 0, + 1 + ], + "type": "integer", + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set)." + } + }, + { + "producer_request_timeout": { + "type": "integer", + "description": "Time to wait for a Produce response in milliseconds.", + "default": 2000 + } + }, + { + "producer_request_limits_messages_per_request": { + "type": "integer", + "description": "Maximum number of messages to include into a single producer request.", + "default": 200 + } + }, + { + "producer_request_limits_bytes_per_request": { + "type": "integer", + "description": "Maximum size of a Produce request in bytes.", + "default": 1048576 + } + }, + { + "producer_request_retries_max_attempts": { + "type": "integer", + "description": "Maximum number of retry attempts per single Produce request.", + "default": 10 + } + }, + { + "producer_request_retries_backoff_timeout": { + "type": "integer", + "description": "Backoff interval between retry attempts in milliseconds.", + "default": 100 + } + }, + { + "producer_async": { + "type": "boolean", + "description": "Flag to enable asynchronous mode.", + "default": true + } + }, + { + "producer_async_flush_timeout": { + "type": "integer", + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "default": 1000 + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "type": "integer", + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "default": 50000 + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/kafka-upstream/3.7.x.json b/schemas/kafka-upstream/3.7.x.json new file mode 100644 index 00000000..5cec5052 --- /dev/null +++ b/schemas/kafka-upstream/3.7.x.json @@ -0,0 +1,302 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "bootstrap_servers": { + "elements": { + "type": "record", + "fields": [ + { + "host": { + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "required": true, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + } + ] + }, + "type": "set", + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format." + } + }, + { + "topic": { + "required": true, + "type": "string", + "description": "The Kafka topic to publish to." + } + }, + { + "timeout": { + "type": "integer", + "description": "Socket timeout in milliseconds.", + "default": 10000 + } + }, + { + "keepalive": { + "type": "integer", + "description": "Keepalive timeout in milliseconds.", + "default": 60000 + } + }, + { + "keepalive_enabled": { + "type": "boolean", + "default": false + } + }, + { + "authentication": { + "fields": [ + { + "strategy": { + "required": false, + "type": "string", + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "one_of": [ + "sasl" + ] + } + }, + { + "mechanism": { + "required": false, + "type": "string", + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256`, or `SCRAM-SHA-512`.", + "one_of": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ] + } + }, + { + "tokenauth": { + "required": false, + "type": "boolean", + "description": "Enable this to indicate `DelegationToken` authentication." + } + }, + { + "user": { + "encrypted": true, + "referenceable": true, + "required": false, + "type": "string", + "description": "Username for SASL authentication." + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "required": false, + "type": "string", + "description": "Password for SASL authentication." + } + } + ], + "type": "record", + "required": true + } + }, + { + "security": { + "fields": [ + { + "certificate_id": { + "required": false, + "description": "UUID of certificate entity for mTLS authentication.", + "uuid": true, + "type": "string" + } + }, + { + "ssl": { + "required": false, + "type": "boolean", + "description": "Enables TLS." + } + } + ], + "type": "record", + "required": true + } + }, + { + "forward_method": { + "type": "boolean", + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "default": false + } + }, + { + "forward_uri": { + "type": "boolean", + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "default": false + } + }, + { + "forward_headers": { + "type": "boolean", + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "default": false + } + }, + { + "forward_body": { + "type": "boolean", + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "default": true + } + }, + { + "cluster_name": { + "required": false, + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "type": "string", + "auto": true + } + }, + { + "producer_request_acks": { + "default": 1, + "type": "integer", + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "one_of": [ + -1, + 0, + 1 + ] + } + }, + { + "producer_request_timeout": { + "type": "integer", + "description": "Time to wait for a Produce response in milliseconds.", + "default": 2000 + } + }, + { + "producer_request_limits_messages_per_request": { + "type": "integer", + "description": "Maximum number of messages to include into a single producer request.", + "default": 200 + } + }, + { + "producer_request_limits_bytes_per_request": { + "type": "integer", + "description": "Maximum size of a Produce request in bytes.", + "default": 1048576 + } + }, + { + "producer_request_retries_max_attempts": { + "type": "integer", + "description": "Maximum number of retry attempts per single Produce request.", + "default": 10 + } + }, + { + "producer_request_retries_backoff_timeout": { + "type": "integer", + "description": "Backoff interval between retry attempts in milliseconds.", + "default": 100 + } + }, + { + "producer_async": { + "type": "boolean", + "description": "Flag to enable asynchronous mode.", + "default": true + } + }, + { + "producer_async_flush_timeout": { + "type": "integer", + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "default": 1000 + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "type": "integer", + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "default": 50000 + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "forward_method", + "forward_uri", + "forward_headers", + "forward_body" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/kafka-upstream/3.8.x.json b/schemas/kafka-upstream/3.8.x.json new file mode 100644 index 00000000..1229e543 --- /dev/null +++ b/schemas/kafka-upstream/3.8.x.json @@ -0,0 +1,302 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "bootstrap_servers": { + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "type": "set", + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true, + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "topic": { + "description": "The Kafka topic to publish to.", + "required": true, + "type": "string" + } + }, + { + "timeout": { + "description": "Socket timeout in milliseconds.", + "type": "integer", + "default": 10000 + } + }, + { + "keepalive": { + "description": "Keepalive timeout in milliseconds.", + "type": "integer", + "default": 60000 + } + }, + { + "keepalive_enabled": { + "default": false, + "type": "boolean" + } + }, + { + "authentication": { + "fields": [ + { + "strategy": { + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "required": false, + "type": "string", + "one_of": [ + "sasl" + ] + } + }, + { + "mechanism": { + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256`, or `SCRAM-SHA-512`.", + "required": false, + "type": "string", + "one_of": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ] + } + }, + { + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication.", + "required": false, + "type": "boolean" + } + }, + { + "user": { + "description": "Username for SASL authentication.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "password": { + "description": "Password for SASL authentication.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + } + ], + "type": "record", + "required": true + } + }, + { + "security": { + "fields": [ + { + "certificate_id": { + "description": "UUID of certificate entity for mTLS authentication.", + "required": false, + "uuid": true, + "type": "string" + } + }, + { + "ssl": { + "description": "Enables TLS.", + "required": false, + "type": "boolean" + } + } + ], + "type": "record", + "required": true + } + }, + { + "forward_method": { + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean", + "default": false + } + }, + { + "forward_uri": { + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean", + "default": false + } + }, + { + "forward_headers": { + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean", + "default": false + } + }, + { + "forward_body": { + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean", + "default": true + } + }, + { + "cluster_name": { + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "required": false, + "auto": true, + "type": "string" + } + }, + { + "producer_request_acks": { + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "type": "integer", + "default": 1, + "one_of": [ + -1, + 0, + 1 + ] + } + }, + { + "producer_request_timeout": { + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer", + "default": 2000 + } + }, + { + "producer_request_limits_messages_per_request": { + "description": "Maximum number of messages to include into a single producer request.", + "type": "integer", + "default": 200 + } + }, + { + "producer_request_limits_bytes_per_request": { + "description": "Maximum size of a Produce request in bytes.", + "type": "integer", + "default": 1048576 + } + }, + { + "producer_request_retries_max_attempts": { + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer", + "default": 10 + } + }, + { + "producer_request_retries_backoff_timeout": { + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer", + "default": 100 + } + }, + { + "producer_async": { + "description": "Flag to enable asynchronous mode.", + "type": "boolean", + "default": true + } + }, + { + "producer_async_flush_timeout": { + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer", + "default": 1000 + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer", + "default": 50000 + } + } + ], + "type": "record", + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "forward_method", + "forward_uri", + "forward_headers", + "forward_body" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/kafka-upstream/3.9.x.json b/schemas/kafka-upstream/3.9.x.json new file mode 100644 index 00000000..e05b530c --- /dev/null +++ b/schemas/kafka-upstream/3.9.x.json @@ -0,0 +1,302 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "forward_method", + "forward_uri", + "forward_headers", + "forward_body" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "authentication" + ] + } + } + ], + "fields": [ + { + "bootstrap_servers": { + "elements": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true, + "type": "integer" + } + } + ] + }, + "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format.", + "type": "set" + } + }, + { + "topic": { + "description": "The Kafka topic to publish to.", + "required": true, + "type": "string" + } + }, + { + "timeout": { + "default": 10000, + "description": "Socket timeout in milliseconds.", + "type": "integer" + } + }, + { + "keepalive": { + "default": 60000, + "description": "Keepalive timeout in milliseconds.", + "type": "integer" + } + }, + { + "keepalive_enabled": { + "default": false, + "type": "boolean" + } + }, + { + "authentication": { + "fields": [ + { + "strategy": { + "type": "string", + "description": "The authentication strategy for the plugin, the only option for the value is `sasl`.", + "required": false, + "one_of": [ + "sasl" + ] + } + }, + { + "mechanism": { + "type": "string", + "description": "The SASL authentication mechanism. Supported options: `PLAIN`, `SCRAM-SHA-256`, or `SCRAM-SHA-512`.", + "required": false, + "one_of": [ + "PLAIN", + "SCRAM-SHA-256", + "SCRAM-SHA-512" + ] + } + }, + { + "tokenauth": { + "description": "Enable this to indicate `DelegationToken` authentication.", + "required": false, + "type": "boolean" + } + }, + { + "user": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "Username for SASL authentication.", + "required": false + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "Password for SASL authentication.", + "required": false + } + } + ], + "required": true, + "type": "record" + } + }, + { + "security": { + "fields": [ + { + "certificate_id": { + "uuid": true, + "description": "UUID of certificate entity for mTLS authentication.", + "required": false, + "type": "string" + } + }, + { + "ssl": { + "description": "Enables TLS.", + "required": false, + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "forward_method": { + "default": false, + "description": "Include the request method in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + } + }, + { + "forward_uri": { + "default": false, + "description": "Include the request URI and URI arguments (as in, query arguments) in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + } + }, + { + "forward_headers": { + "default": false, + "description": "Include the request headers in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + } + }, + { + "forward_body": { + "default": true, + "description": "Include the request body in the message. At least one of these must be true: `forward_method`, `forward_uri`, `forward_headers`, `forward_body`.", + "type": "boolean" + } + }, + { + "cluster_name": { + "auto": true, + "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier. If more than one Kafka plugin is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these plugins will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster.", + "required": false, + "type": "string" + } + }, + { + "producer_request_acks": { + "default": 1, + "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. Allowed values: 0 for no acknowledgments; 1 for only the leader; and -1 for the full ISR (In-Sync Replica set).", + "type": "integer", + "one_of": [ + -1, + 0, + 1 + ] + } + }, + { + "producer_request_timeout": { + "default": 2000, + "description": "Time to wait for a Produce response in milliseconds.", + "type": "integer" + } + }, + { + "producer_request_limits_messages_per_request": { + "default": 200, + "description": "Maximum number of messages to include into a single producer request.", + "type": "integer" + } + }, + { + "producer_request_limits_bytes_per_request": { + "default": 1048576, + "description": "Maximum size of a Produce request in bytes.", + "type": "integer" + } + }, + { + "producer_request_retries_max_attempts": { + "default": 10, + "description": "Maximum number of retry attempts per single Produce request.", + "type": "integer" + } + }, + { + "producer_request_retries_backoff_timeout": { + "default": 100, + "description": "Backoff interval between retry attempts in milliseconds.", + "type": "integer" + } + }, + { + "producer_async": { + "default": true, + "description": "Flag to enable asynchronous mode.", + "type": "boolean" + } + }, + { + "producer_async_flush_timeout": { + "default": 1000, + "description": "Maximum time interval in milliseconds between buffer flushes in asynchronous mode.", + "type": "integer" + } + }, + { + "producer_async_buffering_limits_messages_in_memory": { + "default": 50000, + "description": "Maximum number of messages that can be buffered in memory in asynchronous mode.", + "type": "integer" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/key-auth-enc/3.10.x.json b/schemas/key-auth-enc/3.10.x.json new file mode 100644 index 00000000..ca122104 --- /dev/null +++ b/schemas/key-auth-enc/3.10.x.json @@ -0,0 +1,118 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "key_names": { + "type": "array", + "description": "Describes an array of parameter names where the plugin will look for a key. The client must send the authentication key in one of those key names, and the plugin will try to read the credential from a header, request body, or query string parameter with the same name. Key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "default": [ + "apikey" + ], + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "required": true + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request (i.e., the header, query string, or request body containing the key) before proxying it.", + "type": "boolean", + "default": false + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "key_in_header": { + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean", + "default": true + } + }, + { + "key_in_query": { + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean", + "default": true + } + }, + { + "key_in_body": { + "description": "If enabled, the plugin reads the request body (if said request has one and its MIME type is supported) and tries to find the key in it. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean", + "default": false + } + }, + { + "run_on_preflight": { + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean", + "default": true + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/key-auth-enc/3.11.x.json b/schemas/key-auth-enc/3.11.x.json new file mode 100644 index 00000000..7a11b032 --- /dev/null +++ b/schemas/key-auth-enc/3.11.x.json @@ -0,0 +1,118 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "key_names": { + "required": true, + "description": "Describes an array of parameter names where the plugin will look for a key. The client must send the authentication key in one of those key names, and the plugin will try to read the credential from a header, request body, or query string parameter with the same name. Key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "type": "array", + "default": [ + "apikey" + ], + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + } + }, + { + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request (i.e., the header, query string, or request body containing the key) before proxying it.", + "type": "boolean" + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "key_in_header": { + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean" + } + }, + { + "key_in_query": { + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean" + } + }, + { + "key_in_body": { + "default": false, + "description": "If enabled, the plugin reads the request body (if said request has one and its MIME type is supported) and tries to find the key in it. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + } + }, + { + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean" + } + }, + { + "realm": { + "required": false, + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/key-auth-enc/3.12.x.json b/schemas/key-auth-enc/3.12.x.json new file mode 100644 index 00000000..86ecaaa6 --- /dev/null +++ b/schemas/key-auth-enc/3.12.x.json @@ -0,0 +1,116 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "key_names": { + "type": "array", + "required": true, + "description": "Describes an array of parameter names where the plugin will look for a key. The client must send the authentication key in one of those key names, and the plugin will try to read the credential from a header, request body, or query string parameter with the same name. Key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "default": [ + "apikey" + ], + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request (i.e., the header, query string, or request body containing the key) before proxying it.", + "default": false, + "type": "boolean" + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "key_in_header": { + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "default": true, + "type": "boolean" + } + }, + { + "key_in_query": { + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "default": true, + "type": "boolean" + } + }, + { + "key_in_body": { + "description": "If enabled, the plugin reads the request body (if said request has one and its MIME type is supported) and tries to find the key in it. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "default": false, + "type": "boolean" + } + }, + { + "run_on_preflight": { + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "default": true, + "type": "boolean" + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/key-auth-enc/3.4.x.json b/schemas/key-auth-enc/3.4.x.json index 4c92373b..2d2c2e41 100644 --- a/schemas/key-auth-enc/3.4.x.json +++ b/schemas/key-auth-enc/3.4.x.json @@ -2,8 +2,9 @@ "fields": [ { "consumer": { - "eq": null, "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, @@ -17,7 +18,10 @@ "ws", "wss" ], + "required": true, + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", @@ -25,67 +29,83 @@ "https", "ws", "wss" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "key_names": { - "elements": { - "type": "string" - }, "default": [ "apikey" ], + "type": "array", + "description": "Describes an array of parameter names where the plugin will look for a key. The client must send the authentication key in one of those key names, and the plugin will try to read the credential from a header, request body, or query string parameter with the same name. Key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", "required": true, - "type": "array" + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + } } }, { "hide_credentials": { "default": false, - "type": "boolean" + "type": "boolean", + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request (i.e., the header, query string, or request body containing the key) before proxying it." } }, { "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", "type": "string" } }, { "key_in_header": { "default": true, - "type": "boolean" + "type": "boolean", + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it." } }, { "key_in_query": { "default": true, - "type": "boolean" + "type": "boolean", + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it." } }, { "key_in_body": { "default": false, - "type": "boolean" + "type": "boolean", + "description": "If enabled, the plugin reads the request body (if said request has one and its MIME type is supported) and tries to find the key in it. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`." } }, { "run_on_preflight": { "default": true, - "type": "boolean" + "type": "boolean", + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed." } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/key-auth-enc/3.5.x.json b/schemas/key-auth-enc/3.5.x.json new file mode 100644 index 00000000..ad51da84 --- /dev/null +++ b/schemas/key-auth-enc/3.5.x.json @@ -0,0 +1,111 @@ +{ + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "key_names": { + "type": "array", + "required": true, + "default": [ + "apikey" + ], + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "description": "Describes an array of parameter names where the plugin will look for a key. The client must send the authentication key in one of those key names, and the plugin will try to read the credential from a header, request body, or query string parameter with the same name. Key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen." + } + }, + { + "hide_credentials": { + "default": false, + "type": "boolean", + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request (i.e., the header, query string, or request body containing the key) before proxying it." + } + }, + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "key_in_header": { + "default": true, + "type": "boolean", + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it." + } + }, + { + "key_in_query": { + "default": true, + "type": "boolean", + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it." + } + }, + { + "key_in_body": { + "default": false, + "type": "boolean", + "description": "If enabled, the plugin reads the request body (if said request has one and its MIME type is supported) and tries to find the key in it. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`." + } + }, + { + "run_on_preflight": { + "default": true, + "type": "boolean", + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/key-auth-enc/3.6.x.json b/schemas/key-auth-enc/3.6.x.json new file mode 100644 index 00000000..3f541517 --- /dev/null +++ b/schemas/key-auth-enc/3.6.x.json @@ -0,0 +1,111 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "key_names": { + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "type": "array", + "default": [ + "apikey" + ], + "required": true, + "description": "Describes an array of parameter names where the plugin will look for a key. The client must send the authentication key in one of those key names, and the plugin will try to read the credential from a header, request body, or query string parameter with the same name. Key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen." + } + }, + { + "hide_credentials": { + "type": "boolean", + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request (i.e., the header, query string, or request body containing the key) before proxying it." + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "key_in_header": { + "type": "boolean", + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it." + } + }, + { + "key_in_query": { + "type": "boolean", + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it." + } + }, + { + "key_in_body": { + "type": "boolean", + "default": false, + "description": "If enabled, the plugin reads the request body (if said request has one and its MIME type is supported) and tries to find the key in it. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`." + } + }, + { + "run_on_preflight": { + "type": "boolean", + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed." + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/key-auth-enc/3.7.x.json b/schemas/key-auth-enc/3.7.x.json new file mode 100644 index 00000000..ea7ddea3 --- /dev/null +++ b/schemas/key-auth-enc/3.7.x.json @@ -0,0 +1,111 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "key_names": { + "description": "Describes an array of parameter names where the plugin will look for a key. The client must send the authentication key in one of those key names, and the plugin will try to read the credential from a header, request body, or query string parameter with the same name. Key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "required": true, + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "type": "array", + "default": [ + "apikey" + ] + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request (i.e., the header, query string, or request body containing the key) before proxying it.", + "type": "boolean", + "default": false + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "key_in_header": { + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean", + "default": true + } + }, + { + "key_in_query": { + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean", + "default": true + } + }, + { + "key_in_body": { + "description": "If enabled, the plugin reads the request body (if said request has one and its MIME type is supported) and tries to find the key in it. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean", + "default": false + } + }, + { + "run_on_preflight": { + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean", + "default": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/key-auth-enc/3.8.x.json b/schemas/key-auth-enc/3.8.x.json new file mode 100644 index 00000000..c141f8db --- /dev/null +++ b/schemas/key-auth-enc/3.8.x.json @@ -0,0 +1,118 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": true, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "key_names": { + "description": "Describes an array of parameter names where the plugin will look for a key. The client must send the authentication key in one of those key names, and the plugin will try to read the credential from a header, request body, or query string parameter with the same name. Key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "required": true, + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "type": "array", + "default": [ + "apikey" + ] + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request (i.e., the header, query string, or request body containing the key) before proxying it.", + "type": "boolean", + "default": false + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "key_in_header": { + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean", + "default": true + } + }, + { + "key_in_query": { + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean", + "default": true + } + }, + { + "key_in_body": { + "description": "If enabled, the plugin reads the request body (if said request has one and its MIME type is supported) and tries to find the key in it. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean", + "default": false + } + }, + { + "run_on_preflight": { + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean", + "default": true + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string", + "required": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/key-auth-enc/3.9.x.json b/schemas/key-auth-enc/3.9.x.json new file mode 100644 index 00000000..0db052a3 --- /dev/null +++ b/schemas/key-auth-enc/3.9.x.json @@ -0,0 +1,118 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": true, + "type": "set" + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "key_names": { + "required": true, + "type": "array", + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "description": "Describes an array of parameter names where the plugin will look for a key. The client must send the authentication key in one of those key names, and the plugin will try to read the credential from a header, request body, or query string parameter with the same name. Key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "default": [ + "apikey" + ] + } + }, + { + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request (i.e., the header, query string, or request body containing the key) before proxying it.", + "type": "boolean" + } + }, + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "key_in_header": { + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean" + } + }, + { + "key_in_query": { + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean" + } + }, + { + "key_in_body": { + "default": false, + "description": "If enabled, the plugin reads the request body (if said request has one and its MIME type is supported) and tries to find the key in it. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + } + }, + { + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean" + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "required": false, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/key-auth/3.10.x.json b/schemas/key-auth/3.10.x.json new file mode 100644 index 00000000..dc98b704 --- /dev/null +++ b/schemas/key-auth/3.10.x.json @@ -0,0 +1,215 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "key_names": { + "type": "array", + "description": "Describes an array of parameter names where the plugin will look for a key. The key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "default": [ + "apikey" + ], + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "required": true + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`.", + "type": "string" + } + }, + { + "key_in_header": { + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean", + "default": true, + "required": true + } + }, + { + "key_in_query": { + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean", + "default": true, + "required": true + } + }, + { + "key_in_body": { + "description": "If enabled, the plugin reads the request body. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "run_on_preflight": { + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean", + "default": true, + "required": true + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string", + "required": false + } + }, + { + "identity_realms": { + "description": "A configuration of Konnect Identity Realms that indicate where to source a consumer from.", + "type": "set", + "elements": { + "entity_checks": [ + { + "conditional": { + "if_match": { + "eq": "realm" + }, + "then_field": "id", + "if_field": "scope", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "realm" + }, + "then_field": "region", + "if_field": "scope", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "cp" + }, + "then_field": "id", + "if_field": "scope", + "then_match": { + "eq": null, + "required": false + } + } + }, + { + "conditional": { + "if_match": { + "eq": "cp" + }, + "then_field": "region", + "if_field": "scope", + "then_match": { + "eq": null, + "required": false + } + } + } + ], + "type": "record", + "fields": [ + { + "scope": { + "type": "string", + "one_of": [ + "cp", + "realm" + ] + } + }, + { + "id": { + "description": "A string representing a UUID (universally unique identifier).", + "type": "string", + "auto": false, + "uuid": true + } + }, + { + "region": { + "type": "string" + } + } + ] + }, + "default": [ + { + "scope": "cp", + "region": null, + "id": null + } + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/key-auth/3.11.x.json b/schemas/key-auth/3.11.x.json new file mode 100644 index 00000000..0c5ec366 --- /dev/null +++ b/schemas/key-auth/3.11.x.json @@ -0,0 +1,203 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "key_names": { + "required": true, + "description": "Describes an array of parameter names where the plugin will look for a key. The key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "type": "array", + "default": [ + "apikey" + ], + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + } + }, + { + "hide_credentials": { + "default": false, + "required": true, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request.", + "type": "boolean" + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`.", + "type": "string" + } + }, + { + "key_in_header": { + "default": true, + "required": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean" + } + }, + { + "key_in_query": { + "default": true, + "required": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean" + } + }, + { + "key_in_body": { + "default": false, + "required": true, + "description": "If enabled, the plugin reads the request body. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + } + }, + { + "run_on_preflight": { + "default": true, + "required": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean" + } + }, + { + "realm": { + "required": false, + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + } + }, + { + "identity_realms": { + "type": "set", + "default": [ + { + "scope": "cp", + "region": null, + "id": null + } + ], + "description": "A configuration of Konnect Identity Realms that indicate where to source a consumer from.", + "elements": { + "entity_checks": [ + { + "conditional": { + "if_match": { + "eq": "realm" + }, + "then_field": "id", + "if_field": "scope", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "cp" + }, + "then_field": "id", + "if_field": "scope", + "then_match": { + "required": false, + "eq": null + } + } + }, + { + "conditional": { + "if_match": { + "eq": "cp" + }, + "then_field": "region", + "if_field": "scope", + "then_match": { + "required": false, + "eq": null + } + } + } + ], + "fields": [ + { + "scope": { + "one_of": [ + "cp", + "realm" + ], + "type": "string" + } + }, + { + "id": { + "auto": false, + "uuid": true, + "description": "A string representing a UUID (universally unique identifier).", + "type": "string" + } + }, + { + "region": { + "type": "string" + } + } + ], + "type": "record" + } + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/key-auth/3.12.x.json b/schemas/key-auth/3.12.x.json new file mode 100644 index 00000000..782ddbdf --- /dev/null +++ b/schemas/key-auth/3.12.x.json @@ -0,0 +1,201 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "key_names": { + "type": "array", + "required": true, + "description": "Describes an array of parameter names where the plugin will look for a key. The key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "default": [ + "apikey" + ], + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + }, + { + "hide_credentials": { + "type": "boolean", + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request.", + "required": true + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`.", + "type": "string" + } + }, + { + "key_in_header": { + "type": "boolean", + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "required": true + } + }, + { + "key_in_query": { + "type": "boolean", + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "required": true + } + }, + { + "key_in_body": { + "type": "boolean", + "default": false, + "description": "If enabled, the plugin reads the request body. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "required": true + } + }, + { + "run_on_preflight": { + "type": "boolean", + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "required": true + } + }, + { + "realm": { + "type": "string", + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "required": false + } + }, + { + "identity_realms": { + "type": "set", + "default": [ + { + "id": null, + "region": null, + "scope": "cp" + } + ], + "elements": { + "type": "record", + "fields": [ + { + "scope": { + "type": "string", + "one_of": [ + "cp", + "realm" + ] + } + }, + { + "id": { + "type": "string", + "description": "A string representing a UUID (universally unique identifier).", + "uuid": true, + "auto": false + } + }, + { + "region": { + "type": "string" + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "realm" + }, + "then_field": "id", + "if_field": "scope" + } + }, + { + "conditional": { + "then_match": { + "eq": null, + "required": false + }, + "if_match": { + "eq": "cp" + }, + "then_field": "id", + "if_field": "scope" + } + }, + { + "conditional": { + "then_match": { + "eq": null, + "required": false + }, + "if_match": { + "eq": "cp" + }, + "then_field": "region", + "if_field": "scope" + } + } + ] + }, + "description": "A configuration of Konnect Identity Realms that indicate where to source a consumer from." + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/key-auth/3.4.x.json b/schemas/key-auth/3.4.x.json index 4c8e5f56..d414f629 100644 --- a/schemas/key-auth/3.4.x.json +++ b/schemas/key-auth/3.4.x.json @@ -2,8 +2,9 @@ "fields": [ { "consumer": { - "eq": null, "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, @@ -17,7 +18,10 @@ "ws", "wss" ], + "required": true, + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", @@ -25,72 +29,88 @@ "https", "ws", "wss" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "key_names": { - "elements": { - "type": "string" - }, "default": [ "apikey" ], + "type": "array", + "description": "Describes an array of parameter names where the plugin will look for a key. The key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", "required": true, - "type": "array" + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + } } }, { "hide_credentials": { - "type": "boolean", "default": false, - "required": true + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request.", + "required": true, + "type": "boolean" } }, { "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`.", "type": "string" } }, { "key_in_header": { - "type": "boolean", "default": true, - "required": true + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "required": true, + "type": "boolean" } }, { "key_in_query": { - "type": "boolean", "default": true, - "required": true + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "required": true, + "type": "boolean" } }, { "key_in_body": { - "type": "boolean", "default": false, - "required": true + "description": "If enabled, the plugin reads the request body. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "required": true, + "type": "boolean" } }, { "run_on_preflight": { - "type": "boolean", "default": true, - "required": true + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "required": true, + "type": "boolean" } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/key-auth/3.5.x.json b/schemas/key-auth/3.5.x.json new file mode 100644 index 00000000..1f6f3189 --- /dev/null +++ b/schemas/key-auth/3.5.x.json @@ -0,0 +1,116 @@ +{ + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "key_names": { + "type": "array", + "required": true, + "default": [ + "apikey" + ], + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "description": "Describes an array of parameter names where the plugin will look for a key. The key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen." + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`." + } + }, + { + "key_in_header": { + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "default": true, + "type": "boolean", + "required": true + } + }, + { + "key_in_query": { + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "default": true, + "type": "boolean", + "required": true + } + }, + { + "key_in_body": { + "description": "If enabled, the plugin reads the request body. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "run_on_preflight": { + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "default": true, + "type": "boolean", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/key-auth/3.6.x.json b/schemas/key-auth/3.6.x.json new file mode 100644 index 00000000..e4340436 --- /dev/null +++ b/schemas/key-auth/3.6.x.json @@ -0,0 +1,116 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "key_names": { + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "type": "array", + "default": [ + "apikey" + ], + "required": true, + "description": "Describes an array of parameter names where the plugin will look for a key. The key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen." + } + }, + { + "hide_credentials": { + "required": true, + "type": "boolean", + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request." + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`.", + "type": "string" + } + }, + { + "key_in_header": { + "required": true, + "type": "boolean", + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it." + } + }, + { + "key_in_query": { + "required": true, + "type": "boolean", + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it." + } + }, + { + "key_in_body": { + "required": true, + "type": "boolean", + "default": false, + "description": "If enabled, the plugin reads the request body. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`." + } + }, + { + "run_on_preflight": { + "required": true, + "type": "boolean", + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed." + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/key-auth/3.7.x.json b/schemas/key-auth/3.7.x.json new file mode 100644 index 00000000..77952bad --- /dev/null +++ b/schemas/key-auth/3.7.x.json @@ -0,0 +1,123 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "key_names": { + "description": "Describes an array of parameter names where the plugin will look for a key. The key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "required": true, + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "type": "array", + "default": [ + "apikey" + ] + } + }, + { + "hide_credentials": { + "required": true, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request.", + "type": "boolean", + "default": false + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`.", + "type": "string" + } + }, + { + "key_in_header": { + "required": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "type": "boolean", + "default": true + } + }, + { + "key_in_query": { + "required": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "type": "boolean", + "default": true + } + }, + { + "key_in_body": { + "required": true, + "description": "If enabled, the plugin reads the request body. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean", + "default": false + } + }, + { + "run_on_preflight": { + "required": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "type": "boolean", + "default": true + } + }, + { + "realm": { + "required": false, + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/key-auth/3.8.x.json b/schemas/key-auth/3.8.x.json new file mode 100644 index 00000000..f391803f --- /dev/null +++ b/schemas/key-auth/3.8.x.json @@ -0,0 +1,123 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": true, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "key_names": { + "description": "Describes an array of parameter names where the plugin will look for a key. The key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "required": true, + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "type": "array", + "default": [ + "apikey" + ] + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`.", + "type": "string" + } + }, + { + "key_in_header": { + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "required": true, + "type": "boolean", + "default": true + } + }, + { + "key_in_query": { + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "required": true, + "type": "boolean", + "default": true + } + }, + { + "key_in_body": { + "description": "If enabled, the plugin reads the request body. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "run_on_preflight": { + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "required": true, + "type": "boolean", + "default": true + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "required": false, + "type": "string" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/key-auth/3.9.x.json b/schemas/key-auth/3.9.x.json new file mode 100644 index 00000000..dbb4a35d --- /dev/null +++ b/schemas/key-auth/3.9.x.json @@ -0,0 +1,123 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": true, + "type": "set" + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "key_names": { + "required": true, + "type": "array", + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "description": "Describes an array of parameter names where the plugin will look for a key. The key names may only contain [a-z], [A-Z], [0-9], [_] underscore, and [-] hyphen.", + "default": [ + "apikey" + ] + } + }, + { + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin strips the credential from the request.", + "required": true, + "type": "boolean" + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`.", + "type": "string" + } + }, + { + "key_in_header": { + "default": true, + "description": "If enabled (default), the plugin reads the request header and tries to find the key in it.", + "required": true, + "type": "boolean" + } + }, + { + "key_in_query": { + "default": true, + "description": "If enabled (default), the plugin reads the query parameter in the request and tries to find the key in it.", + "required": true, + "type": "boolean" + } + }, + { + "key_in_body": { + "default": false, + "description": "If enabled, the plugin reads the request body. Supported MIME types: `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "required": true, + "type": "boolean" + } + }, + { + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests are always allowed.", + "required": true, + "type": "boolean" + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "required": false, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/konnect-application-auth/3.10.x.json b/schemas/konnect-application-auth/3.10.x.json new file mode 100644 index 00000000..075d1580 --- /dev/null +++ b/schemas/konnect-application-auth/3.10.x.json @@ -0,0 +1,3269 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + + ], + "type": "record", + "fields": [ + { + "key_names": { + "type": "array", + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "default": [ + "apikey" + ], + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "required": true + } + }, + { + "auth_type": { + "type": "string", + "description": "The type of authentication to be performed. Possible values are: 'openid-connect', 'key-auth', 'v2-strategies'.", + "one_of": [ + "openid-connect", + "key-auth", + "v2-strategies" + ], + "default": "openid-connect", + "required": true + } + }, + { + "scope": { + "description": "The unique scope identifier for the plugin configuration.", + "unique": true, + "type": "string", + "required": true + } + }, + { + "v2_strategies": { + "type": "record", + "fields": [ + { + "key_auth": { + "description": "List of key_auth strategies.", + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "strategy_id": { + "description": "The strategy id the config is tied to.", + "type": "string", + "required": true + } + }, + { + "config": { + "type": "record", + "required": true, + "fields": [ + { + "key_names": { + "type": "array", + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "default": [ + "apikey" + ], + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "required": true + } + } + ] + } + } + ] + }, + "required": false + } + }, + { + "openid_connect": { + "description": "List of openid_connect strategies.", + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "strategy_id": { + "description": "The strategy id the config is tied to.", + "type": "string", + "required": true + } + }, + { + "config": { + "description": "openid-connect plugin configuration.", + "type": "record", + "fields": [ + { + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "type": "string", + "required": true + } + }, + { + "using_pseudo_issuer": { + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "type": "set", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "required": false + } + }, + { + "rediscovery_lifetime": { + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "default": 30, + "type": "number", + "required": false + } + }, + { + "auth_methods": { + "type": "array", + "description": "Types of credentials/grants to enable.", + "default": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "required": false + } + }, + { + "client_id": { + "type": "array", + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.", + "encrypted": true, + "elements": { + "referenceable": true, + "type": "string" + }, + "required": false + } + }, + { + "client_secret": { + "type": "array", + "description": "The client secret.", + "encrypted": true, + "elements": { + "referenceable": true, + "type": "string" + }, + "required": false + } + }, + { + "client_auth": { + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + }, + "required": false + } + }, + { + "client_jwk": { + "description": "The JWK used for the private_key_jwt authentication.", + "type": "array", + "elements": { + "type": "record", + "required": false, + "fields": [ + { + "issuer": { + "required": false, + "type": "string" + } + }, + { + "kty": { + "required": false, + "type": "string" + } + }, + { + "use": { + "required": false, + "type": "string" + } + }, + { + "key_ops": { + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "alg": { + "required": false, + "type": "string" + } + }, + { + "kid": { + "required": false, + "type": "string" + } + }, + { + "x5u": { + "required": false, + "type": "string" + } + }, + { + "x5c": { + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "x5t": { + "required": false, + "type": "string" + } + }, + { + "x5t#S256": { + "required": false, + "type": "string" + } + }, + { + "k": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + }, + { + "x": { + "required": false, + "type": "string" + } + }, + { + "y": { + "required": false, + "type": "string" + } + }, + { + "crv": { + "required": false, + "type": "string" + } + }, + { + "n": { + "required": false, + "type": "string" + } + }, + { + "e": { + "required": false, + "type": "string" + } + }, + { + "d": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + }, + { + "p": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + }, + { + "q": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + }, + { + "dp": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + }, + { + "dq": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + }, + { + "qi": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + }, + { + "oth": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + }, + { + "r": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + }, + { + "t": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + } + ] + }, + "required": false + } + }, + { + "client_alg": { + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ] + }, + "required": false + } + }, + { + "client_arg": { + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "default": "client_id", + "type": "string", + "required": false + } + }, + { + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "type": "array", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "required": false + } + }, + { + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "type": "array", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string", + "referenceable": true + }, + "required": false + } + }, + { + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "type": "array", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string", + "referenceable": true + }, + "required": false + } + }, + { + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "type": "array", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "required": false + } + }, + { + "forbidden_error_message": { + "description": "The error message for the forbidden requests (when not using the redirection).", + "default": "Forbidden", + "type": "string", + "required": false + } + }, + { + "forbidden_destroy_session": { + "description": "Destroy any active session for the forbidden requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "unauthorized_destroy_session": { + "description": "Destroy any active session for the unauthorized requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "type": "array", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "required": false + } + }, + { + "unauthorized_error_message": { + "description": "The error message for the unauthorized requests (when not using the redirection).", + "default": "Unauthorized", + "type": "string", + "required": false + } + }, + { + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "type": "array", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "required": false + } + }, + { + "response_mode": { + "type": "string", + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "one_of": [ + "query", + "form_post", + "fragment", + "query.jwt", + "form_post.jwt", + "fragment.jwt", + "jwt" + ], + "default": "query", + "required": false + } + }, + { + "response_type": { + "type": "array", + "description": "The response type passed to the authorization endpoint.", + "default": [ + "code" + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "scopes": { + "type": "array", + "description": "The scopes passed to the authorization and token endpoints.", + "default": [ + "openid" + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "required": false + } + }, + { + "audience": { + "description": "The audience passed to the authorization endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "scopes_claim": { + "type": "array", + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "scope" + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "audience_claim": { + "type": "array", + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "aud" + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "groups_claim": { + "type": "array", + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "groups" + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "roles_claim": { + "type": "array", + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "roles" + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "domains": { + "description": "The allowed values for the `hd` claim.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number", + "required": false + } + }, + { + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "pushed_authorization_request_endpoint_auth_method": { + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false + } + }, + { + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean", + "required": false + } + }, + { + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean", + "required": false + } + }, + { + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean", + "required": false + } + }, + { + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "authorization_rolling_timeout": { + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "default": 600, + "type": "number", + "required": false + } + }, + { + "authorization_cookie_name": { + "description": "The authorization cookie name.", + "default": "authorization", + "type": "string", + "required": false + } + }, + { + "authorization_cookie_path": { + "type": "string", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "starts_with": "/", + "default": "/", + "description": "The authorization cookie Path flag.", + "required": false + } + }, + { + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string", + "required": false + } + }, + { + "authorization_cookie_same_site": { + "type": "string", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "default": "Default", + "required": false + } + }, + { + "authorization_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean", + "required": false + } + }, + { + "preserve_query_args": { + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false + } + }, + { + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string", + "required": false + } + }, + { + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token" + ] + }, + "required": false + } + }, + { + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false + } + }, + { + "introspection_hint": { + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "default": "access_token", + "type": "string", + "required": false + } + }, + { + "introspection_check_active": { + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "introspection_accept": { + "type": "string", + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "one_of": [ + "application/json", + "application/token-introspection+jwt", + "application/jwt" + ], + "default": "application/json", + "required": false + } + }, + { + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "introspection_headers_values": { + "type": "array", + "description": "Extra header values passed to the introspection endpoint.", + "encrypted": true, + "elements": { + "referenceable": true, + "type": "string" + }, + "required": false + } + }, + { + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "introspection_post_args_client_headers": { + "description": "Extra post arguments passed from the client headers to the introspection endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "introspect_jwt_tokens": { + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false + } + }, + { + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "userinfo_accept": { + "type": "string", + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "one_of": [ + "application/json", + "application/jwt" + ], + "default": "application/json", + "required": false + } + }, + { + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "type": "string", + "required": false + } + }, + { + "session_secret": { + "type": "string", + "referenceable": true, + "description": "The session secret.", + "encrypted": true, + "required": false + } + }, + { + "session_audience": { + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "default": "default", + "type": "string", + "required": false + } + }, + { + "session_cookie_name": { + "description": "The session cookie name.", + "default": "session", + "type": "string", + "required": false + } + }, + { + "session_remember": { + "description": "Enables or disables persistent sessions.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_remember_cookie_name": { + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "default": "remember", + "type": "string", + "required": false + } + }, + { + "session_remember_rolling_timeout": { + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "default": 604800, + "type": "number", + "required": false + } + }, + { + "session_remember_absolute_timeout": { + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "default": 2592000, + "type": "number", + "required": false + } + }, + { + "session_idling_timeout": { + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "default": 900, + "type": "number", + "required": false + } + }, + { + "session_rolling_timeout": { + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "default": 3600, + "type": "number", + "required": false + } + }, + { + "session_absolute_timeout": { + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "default": 86400, + "type": "number", + "required": false + } + }, + { + "session_cookie_path": { + "type": "string", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "starts_with": "/", + "default": "/", + "description": "The session cookie Path flag.", + "required": false + } + }, + { + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string", + "required": false + } + }, + { + "session_cookie_same_site": { + "type": "string", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "default": "Lax", + "required": false + } + }, + { + "session_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean", + "required": false + } + }, + { + "session_request_headers": { + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "type": "set", + "required": false + } + }, + { + "session_response_headers": { + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "type": "set", + "required": false + } + }, + { + "session_storage": { + "type": "string", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "default": "cookie", + "required": false + } + }, + { + "session_store_metadata": { + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_enforce_same_subject": { + "description": "When set to `true`, audiences are forced to share the same subject.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_hash_subject": { + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_hash_storage_key": { + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string", + "required": false + } + }, + { + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string", + "required": false + } + }, + { + "session_memcached_host": { + "description": "The memcached host.", + "default": "127.0.0.1", + "type": "string", + "required": false + } + }, + { + "session_memcached_port": { + "type": "integer", + "description": "The memcached port.", + "default": 11211, + "between": [ + 0, + 65535 + ], + "required": false + } + }, + { + "redis": { + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "type": "array", + "elements": { + "type": "string" + }, + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "len_min": 1 + } + }, + { + "cluster_addresses": { + "type": "array", + "elements": { + "type": "string" + }, + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "len_min": 1 + } + } + ], + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + }, + "required": false + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + }, + "required": false + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "prefix": { + "description": "The Redis session key prefix.", + "type": "string", + "required": false + } + }, + { + "socket": { + "description": "The Redis unix socket path.", + "type": "string", + "required": false + } + } + ] + } + }, + { + "reverify": { + "description": "Specifies whether to always verify tokens stored in the session.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "jwt_session_claim": { + "description": "The claim to match against the JWT session cookie.", + "default": "sid", + "type": "string", + "required": false + } + }, + { + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string", + "required": false + } + }, + { + "bearer_token_param_type": { + "type": "array", + "description": "Where to look for the bearer token: - `header`: search the `Authorization`, `access-token`, and `x-access-token` HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "cookie", + "query", + "body" + ] + }, + "required": false + } + }, + { + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string", + "required": false + } + }, + { + "client_credentials_param_type": { + "type": "array", + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "required": false + } + }, + { + "password_param_type": { + "type": "array", + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "required": false + } + }, + { + "id_token_param_type": { + "type": "array", + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "required": false + } + }, + { + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string", + "required": false + } + }, + { + "refresh_token_param_type": { + "type": "array", + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "required": false + } + }, + { + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string", + "required": false + } + }, + { + "refresh_tokens": { + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "upstream_headers_claims": { + "description": "The upstream header claims. Only top level claims are supported.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "upstream_access_token_header": { + "description": "The upstream access token header.", + "default": "authorization:bearer", + "type": "string", + "required": false + } + }, + { + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string", + "required": false + } + }, + { + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string", + "required": false + } + }, + { + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string", + "required": false + } + }, + { + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string", + "required": false + } + }, + { + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string", + "required": false + } + }, + { + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string", + "required": false + } + }, + { + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string", + "required": false + } + }, + { + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "type": "string", + "required": false + } + }, + { + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string", + "required": false + } + }, + { + "downstream_headers_claims": { + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string", + "required": false + } + }, + { + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string", + "required": false + } + }, + { + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string", + "required": false + } + }, + { + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string", + "required": false + } + }, + { + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string", + "required": false + } + }, + { + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string", + "required": false + } + }, + { + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string", + "required": false + } + }, + { + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string", + "required": false + } + }, + { + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "type": "string", + "required": false + } + }, + { + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string", + "required": false + } + }, + { + "login_methods": { + "type": "array", + "description": "Enable login functionality with specified grants.", + "default": [ + "authorization_code" + ], + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "required": false + } + }, + { + "login_action": { + "type": "string", + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "one_of": [ + "upstream", + "response", + "redirect" + ], + "default": "upstream", + "required": false + } + }, + { + "login_tokens": { + "type": "array", + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "default": [ + "id_token" + ], + "elements": { + "type": "string", + "one_of": [ + "id_token", + "access_token", + "refresh_token", + "tokens", + "introspection" + ] + }, + "required": false + } + }, + { + "login_redirect_mode": { + "type": "string", + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "one_of": [ + "query", + "fragment" + ], + "default": "fragment", + "required": false + } + }, + { + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string", + "required": false + } + }, + { + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string", + "required": false + } + }, + { + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string", + "required": false + } + }, + { + "logout_methods": { + "type": "array", + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "default": [ + "POST", + "DELETE" + ], + "elements": { + "type": "string", + "one_of": [ + "POST", + "GET", + "DELETE" + ] + }, + "required": false + } + }, + { + "logout_revoke": { + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "logout_revoke_access_token": { + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "logout_revoke_refresh_token": { + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "consumer_claim": { + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "consumer_by": { + "type": "array", + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "required": false + } + }, + { + "consumer_optional": { + "description": "Do not terminate the request if consumer mapping fails.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "credential_claim": { + "type": "array", + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "sub" + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string", + "required": false + } + }, + { + "run_on_preflight": { + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "leeway": { + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "default": 0, + "type": "number", + "required": false + } + }, + { + "verify_parameters": { + "description": "Verify plugin configuration against discovery.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "verify_nonce": { + "description": "Verify nonce on authorization code flow.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "verify_claims": { + "description": "Verify tokens for standard claims.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "verify_signature": { + "description": "Verify signature of tokens.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "ignore_signature": { + "type": "array", + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token", + "session", + "introspection", + "userinfo" + ] + }, + "required": false + } + }, + { + "enable_hs_signatures": { + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "required": false + } + }, + { + "cache_ttl": { + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "default": 3600, + "type": "number", + "required": false + } + }, + { + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number", + "required": false + } + }, + { + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number", + "required": false + } + }, + { + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number", + "required": false + } + }, + { + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number", + "required": false + } + }, + { + "cache_tokens": { + "description": "Cache the token endpoint requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "type": "string", + "required": false, + "auto": true + } + }, + { + "cache_introspection": { + "description": "Cache the introspection endpoint requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "cache_token_exchange": { + "description": "Cache the token exchange endpoint requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "cache_user_info": { + "description": "Cache the user info requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "search_user_info": { + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "hide_credentials": { + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "http_version": { + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "type": "number", + "default": 1.1, + "required": false + } + }, + { + "http_proxy": { + "description": "The HTTP proxy.", + "type": "string", + "required": false + } + }, + { + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "https_proxy": { + "description": "The HTTPS proxy.", + "type": "string", + "required": false + } + }, + { + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string", + "required": false + } + }, + { + "keepalive": { + "description": "Use keepalive with the HTTP client.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "timeout": { + "description": "Network IO timeout in milliseconds.", + "default": 10000, + "type": "number", + "required": false + } + }, + { + "display_errors": { + "description": "Display errors on failure responses.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "by_username_ignore_case": { + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "resolve_distributed_claims": { + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "expose_error_code": { + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "default": true, + "type": "boolean" + } + }, + { + "token_cache_key_include_scope": { + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "default": false, + "type": "boolean" + } + }, + { + "introspection_token_param_name": { + "description": "Designate token's parameter name for introspection.", + "default": "token", + "type": "string", + "required": false + } + }, + { + "revocation_token_param_name": { + "description": "Designate token's parameter name for revocation.", + "default": "token", + "type": "string", + "required": false + } + }, + { + "proof_of_possession_mtls": { + "type": "string", + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "one_of": [ + "off", + "strict", + "optional" + ], + "default": "off", + "required": false + } + }, + { + "proof_of_possession_auth_methods_validation": { + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "tls_client_auth_cert_id": { + "type": "string", + "auto": false, + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "required": false, + "uuid": true + } + }, + { + "tls_client_auth_ssl_verify": { + "description": "Verify identity provider server certificate during mTLS client authentication.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "proof_of_possession_dpop": { + "type": "string", + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "one_of": [ + "off", + "strict", + "optional" + ], + "default": "off", + "required": false + } + }, + { + "dpop_use_nonce": { + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "dpop_proof_lifetime": { + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "default": 300, + "type": "number", + "required": false + } + }, + { + "claims_forbidden": { + "description": "If given, these claims are forbidden in the token payload.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "cluster_cache_strategy": { + "type": "string", + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "one_of": [ + "off", + "redis" + ], + "default": "off", + "required": false + } + }, + { + "cluster_cache_redis": { + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + } + ], + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "default": 256, + "type": "integer", + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "default": false, + "type": "boolean", + "required": false + } + } + ] + } + } + ] + } + } + ] + }, + "required": false + } + } + ], + "description": "The map of v2 strategies.", + "default": [ + + ], + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/konnect-application-auth/3.11.x.json b/schemas/konnect-application-auth/3.11.x.json new file mode 100644 index 00000000..76abf09b --- /dev/null +++ b/schemas/konnect-application-auth/3.11.x.json @@ -0,0 +1,3271 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "entity_checks": [ + + ], + "fields": [ + { + "key_names": { + "required": true, + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "type": "array", + "default": [ + "apikey" + ], + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + } + }, + { + "auth_type": { + "required": true, + "description": "The type of authentication to be performed. Possible values are: 'openid-connect', 'key-auth', 'v2-strategies'.", + "one_of": [ + "openid-connect", + "key-auth", + "v2-strategies" + ], + "default": "openid-connect", + "type": "string" + } + }, + { + "scope": { + "unique": true, + "required": true, + "description": "The unique scope identifier for the plugin configuration.", + "type": "string" + } + }, + { + "v2_strategies": { + "required": false, + "description": "The map of v2 strategies.", + "fields": [ + { + "key_auth": { + "type": "array", + "required": false, + "description": "List of key_auth strategies.", + "elements": { + "fields": [ + { + "strategy_id": { + "required": true, + "description": "The strategy id the config is tied to.", + "type": "string" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "key_names": { + "required": true, + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "type": "array", + "default": [ + "apikey" + ], + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + }, + { + "openid_connect": { + "type": "array", + "required": false, + "description": "List of openid_connect strategies.", + "elements": { + "fields": [ + { + "strategy_id": { + "required": true, + "description": "The strategy id the config is tied to.", + "type": "string" + } + }, + { + "config": { + "description": "openid-connect plugin configuration.", + "fields": [ + { + "issuer": { + "required": true, + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "type": "string" + } + }, + { + "using_pseudo_issuer": { + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "discovery_headers_names": { + "type": "array", + "required": false, + "description": "Extra header names passed to the discovery endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "discovery_headers_values": { + "type": "array", + "required": false, + "description": "Extra header values passed to the discovery endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "extra_jwks_uris": { + "type": "set", + "required": false, + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "rediscovery_lifetime": { + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "required": false, + "default": 30, + "type": "number" + } + }, + { + "auth_methods": { + "required": false, + "description": "Types of credentials/grants to enable.", + "type": "array", + "default": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "type": "string" + } + } + }, + { + "client_id": { + "required": false, + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.", + "encrypted": true, + "type": "array", + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "client_secret": { + "required": false, + "description": "The client secret.", + "encrypted": true, + "type": "array", + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "client_auth": { + "type": "array", + "required": false, + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "elements": { + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "type": "string" + } + } + }, + { + "client_jwk": { + "type": "array", + "required": false, + "description": "The JWK used for the private_key_jwt authentication.", + "elements": { + "required": false, + "fields": [ + { + "issuer": { + "required": false, + "type": "string" + } + }, + { + "kty": { + "required": false, + "type": "string" + } + }, + { + "use": { + "required": false, + "type": "string" + } + }, + { + "key_ops": { + "required": false, + "type": "array", + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "alg": { + "required": false, + "type": "string" + } + }, + { + "kid": { + "required": false, + "type": "string" + } + }, + { + "x5u": { + "required": false, + "type": "string" + } + }, + { + "x5c": { + "required": false, + "type": "array", + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "x5t": { + "required": false, + "type": "string" + } + }, + { + "x5t#S256": { + "required": false, + "type": "string" + } + }, + { + "k": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "x": { + "required": false, + "type": "string" + } + }, + { + "y": { + "required": false, + "type": "string" + } + }, + { + "crv": { + "required": false, + "type": "string" + } + }, + { + "n": { + "required": false, + "type": "string" + } + }, + { + "e": { + "required": false, + "type": "string" + } + }, + { + "d": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "p": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "q": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "dp": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "dq": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "qi": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "oth": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "r": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "t": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + } + ], + "type": "record" + } + } + }, + { + "client_alg": { + "type": "array", + "required": false, + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "elements": { + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ], + "type": "string" + } + } + }, + { + "client_arg": { + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "required": false, + "default": "client_id", + "type": "string" + } + }, + { + "redirect_uri": { + "type": "array", + "required": false, + "description": "The redirect URI passed to the authorization and token endpoints.", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "login_redirect_uri": { + "type": "array", + "required": false, + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "elements": { + "referenceable": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "logout_redirect_uri": { + "type": "array", + "required": false, + "description": "Where to redirect the client after the logout.", + "elements": { + "referenceable": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "forbidden_redirect_uri": { + "type": "array", + "required": false, + "description": "Where to redirect the client on forbidden requests.", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "forbidden_error_message": { + "description": "The error message for the forbidden requests (when not using the redirection).", + "required": false, + "default": "Forbidden", + "type": "string" + } + }, + { + "forbidden_destroy_session": { + "description": "Destroy any active session for the forbidden requests.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "unauthorized_destroy_session": { + "description": "Destroy any active session for the unauthorized requests.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "unauthorized_redirect_uri": { + "type": "array", + "required": false, + "description": "Where to redirect the client on unauthorized requests.", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "unauthorized_error_message": { + "description": "The error message for the unauthorized requests (when not using the redirection).", + "required": false, + "default": "Unauthorized", + "type": "string" + } + }, + { + "unexpected_redirect_uri": { + "type": "array", + "required": false, + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "response_mode": { + "required": false, + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "one_of": [ + "query", + "form_post", + "fragment", + "query.jwt", + "form_post.jwt", + "fragment.jwt", + "jwt" + ], + "default": "query", + "type": "string" + } + }, + { + "response_type": { + "required": false, + "description": "The response type passed to the authorization endpoint.", + "type": "array", + "default": [ + "code" + ], + "elements": { + "type": "string" + } + } + }, + { + "scopes": { + "required": false, + "description": "The scopes passed to the authorization and token endpoints.", + "type": "array", + "default": [ + "openid" + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "audience": { + "type": "array", + "required": false, + "description": "The audience passed to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "issuers_allowed": { + "type": "array", + "required": false, + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "elements": { + "type": "string" + } + } + }, + { + "scopes_required": { + "type": "array", + "required": false, + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "scopes_claim": { + "required": false, + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "default": [ + "scope" + ], + "elements": { + "type": "string" + } + } + }, + { + "audience_required": { + "type": "array", + "required": false, + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "audience_claim": { + "required": false, + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "default": [ + "aud" + ], + "elements": { + "type": "string" + } + } + }, + { + "groups_required": { + "type": "array", + "required": false, + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "groups_claim": { + "required": false, + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "default": [ + "groups" + ], + "elements": { + "type": "string" + } + } + }, + { + "roles_required": { + "type": "array", + "required": false, + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "roles_claim": { + "required": false, + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "default": [ + "roles" + ], + "elements": { + "type": "string" + } + } + }, + { + "domains": { + "type": "array", + "required": false, + "description": "The allowed values for the `hd` claim.", + "elements": { + "type": "string" + } + } + }, + { + "max_age": { + "required": false, + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number" + } + }, + { + "authenticated_groups_claim": { + "type": "array", + "required": false, + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "pushed_authorization_request_endpoint": { + "required": false, + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "pushed_authorization_request_endpoint_auth_method": { + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false, + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string" + } + }, + { + "require_pushed_authorization_requests": { + "required": false, + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean" + } + }, + { + "require_proof_key_for_code_exchange": { + "required": false, + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean" + } + }, + { + "require_signed_request_object": { + "required": false, + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean" + } + }, + { + "authorization_endpoint": { + "required": false, + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "authorization_query_args_names": { + "type": "array", + "required": false, + "description": "Extra query argument names passed to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "authorization_query_args_values": { + "type": "array", + "required": false, + "description": "Extra query argument values passed to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "authorization_query_args_client": { + "type": "array", + "required": false, + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "authorization_rolling_timeout": { + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "required": false, + "default": 600, + "type": "number" + } + }, + { + "authorization_cookie_name": { + "description": "The authorization cookie name.", + "required": false, + "default": "authorization", + "type": "string" + } + }, + { + "authorization_cookie_path": { + "required": false, + "description": "The authorization cookie Path flag.", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "starts_with": "/", + "default": "/", + "type": "string" + } + }, + { + "authorization_cookie_domain": { + "required": false, + "description": "The authorization cookie Domain flag.", + "type": "string" + } + }, + { + "authorization_cookie_same_site": { + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "default": "Default", + "type": "string" + } + }, + { + "authorization_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "authorization_cookie_secure": { + "required": false, + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + } + }, + { + "preserve_query_args": { + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "token_endpoint": { + "required": false, + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "token_endpoint_auth_method": { + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false, + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string" + } + }, + { + "token_headers_names": { + "type": "array", + "required": false, + "description": "Extra header names passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_values": { + "type": "array", + "required": false, + "description": "Extra header values passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_client": { + "type": "array", + "required": false, + "description": "Extra headers passed from the client to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_replay": { + "type": "array", + "required": false, + "description": "The names of token endpoint response headers to forward to the downstream client.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_prefix": { + "required": false, + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string" + } + }, + { + "token_headers_grants": { + "type": "array", + "required": false, + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token" + ], + "type": "string" + } + } + }, + { + "token_post_args_names": { + "type": "array", + "required": false, + "description": "Extra post argument names passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_post_args_values": { + "type": "array", + "required": false, + "description": "Extra post argument values passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_post_args_client": { + "type": "array", + "required": false, + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_endpoint": { + "required": false, + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "introspection_endpoint_auth_method": { + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false, + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string" + } + }, + { + "introspection_hint": { + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "required": false, + "default": "access_token", + "type": "string" + } + }, + { + "introspection_check_active": { + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "introspection_accept": { + "required": false, + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "one_of": [ + "application/json", + "application/token-introspection+jwt", + "application/jwt" + ], + "default": "application/json", + "type": "string" + } + }, + { + "introspection_headers_names": { + "type": "array", + "required": false, + "description": "Extra header names passed to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_headers_values": { + "required": false, + "description": "Extra header values passed to the introspection endpoint.", + "encrypted": true, + "type": "array", + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "introspection_headers_client": { + "type": "array", + "required": false, + "description": "Extra headers passed from the client to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_names": { + "type": "array", + "required": false, + "description": "Extra post argument names passed to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_values": { + "type": "array", + "required": false, + "description": "Extra post argument values passed to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_client": { + "type": "array", + "required": false, + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_client_headers": { + "type": "array", + "required": false, + "description": "Extra post arguments passed from the client headers to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspect_jwt_tokens": { + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "revocation_endpoint": { + "required": false, + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "revocation_endpoint_auth_method": { + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false, + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string" + } + }, + { + "end_session_endpoint": { + "required": false, + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "userinfo_endpoint": { + "required": false, + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "userinfo_accept": { + "required": false, + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "one_of": [ + "application/json", + "application/jwt" + ], + "default": "application/json", + "type": "string" + } + }, + { + "userinfo_headers_names": { + "type": "array", + "required": false, + "description": "Extra header names passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_headers_values": { + "type": "array", + "required": false, + "description": "Extra header values passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_headers_client": { + "type": "array", + "required": false, + "description": "Extra headers passed from the client to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_names": { + "type": "array", + "required": false, + "description": "Extra query argument names passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_values": { + "type": "array", + "required": false, + "description": "Extra query argument values passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_client": { + "type": "array", + "required": false, + "description": "Extra query arguments passed from the client to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_exchange_endpoint": { + "required": false, + "description": "The token exchange endpoint.", + "type": "string" + } + }, + { + "session_secret": { + "required": false, + "description": "The session secret.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "session_audience": { + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "required": false, + "default": "default", + "type": "string" + } + }, + { + "session_cookie_name": { + "description": "The session cookie name.", + "required": false, + "default": "session", + "type": "string" + } + }, + { + "session_remember": { + "description": "Enables or disables persistent sessions.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "session_remember_cookie_name": { + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "required": false, + "default": "remember", + "type": "string" + } + }, + { + "session_remember_rolling_timeout": { + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "required": false, + "default": 604800, + "type": "number" + } + }, + { + "session_remember_absolute_timeout": { + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "required": false, + "default": 2592000, + "type": "number" + } + }, + { + "session_idling_timeout": { + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "required": false, + "default": 900, + "type": "number" + } + }, + { + "session_rolling_timeout": { + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "required": false, + "default": 3600, + "type": "number" + } + }, + { + "session_absolute_timeout": { + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "required": false, + "default": 86400, + "type": "number" + } + }, + { + "session_cookie_path": { + "required": false, + "description": "The session cookie Path flag.", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "starts_with": "/", + "default": "/", + "type": "string" + } + }, + { + "session_cookie_domain": { + "required": false, + "description": "The session cookie Domain flag.", + "type": "string" + } + }, + { + "session_cookie_same_site": { + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "default": "Lax", + "type": "string" + } + }, + { + "session_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "session_cookie_secure": { + "required": false, + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + } + }, + { + "session_request_headers": { + "elements": { + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ], + "type": "string" + }, + "required": false, + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "type": "set" + } + }, + { + "session_response_headers": { + "elements": { + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ], + "type": "string" + }, + "required": false, + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "type": "set" + } + }, + { + "session_storage": { + "required": false, + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "default": "cookie", + "type": "string" + } + }, + { + "session_store_metadata": { + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "session_enforce_same_subject": { + "description": "When set to `true`, audiences are forced to share the same subject.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "session_hash_subject": { + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "session_hash_storage_key": { + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "session_memcached_prefix": { + "required": false, + "description": "The memcached session key prefix.", + "type": "string" + } + }, + { + "session_memcached_socket": { + "required": false, + "description": "The memcached unix socket path.", + "type": "string" + } + }, + { + "session_memcached_host": { + "description": "The memcached host.", + "required": false, + "default": "127.0.0.1", + "type": "string" + } + }, + { + "session_memcached_port": { + "required": false, + "description": "The memcached port.", + "between": [ + 0, + 65535 + ], + "default": 11211, + "type": "integer" + } + }, + { + "redis": { + "required": true, + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer" + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer" + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer" + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer" + } + }, + { + "username": { + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string" + } + }, + { + "sentinel_username": { + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "referenceable": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "default": 256, + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1, + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer" + } + } + ], + "type": "record" + }, + "type": "array" + } + }, + { + "cluster_nodes": { + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1, + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer" + } + } + ], + "type": "record" + }, + "type": "array" + } + }, + { + "ssl": { + "default": false, + "required": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "required": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "required": false, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "required": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + } + }, + { + "prefix": { + "required": false, + "description": "The Redis session key prefix.", + "type": "string" + } + }, + { + "socket": { + "required": false, + "description": "The Redis unix socket path.", + "type": "string" + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "array" + } + }, + { + "cluster_addresses": { + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "array" + } + } + ], + "type": "record" + } + }, + { + "reverify": { + "description": "Specifies whether to always verify tokens stored in the session.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "jwt_session_claim": { + "description": "The claim to match against the JWT session cookie.", + "required": false, + "default": "sid", + "type": "string" + } + }, + { + "jwt_session_cookie": { + "required": false, + "description": "The name of the JWT session cookie.", + "type": "string" + } + }, + { + "bearer_token_param_type": { + "required": false, + "description": "Where to look for the bearer token: - `header`: search the `Authorization`, `access-token`, and `x-access-token` HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "one_of": [ + "header", + "cookie", + "query", + "body" + ], + "type": "string" + } + } + }, + { + "bearer_token_cookie_name": { + "required": false, + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string" + } + }, + { + "client_credentials_param_type": { + "required": false, + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "one_of": [ + "header", + "query", + "body" + ], + "type": "string" + } + } + }, + { + "password_param_type": { + "required": false, + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "one_of": [ + "header", + "query", + "body" + ], + "type": "string" + } + } + }, + { + "id_token_param_type": { + "required": false, + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "one_of": [ + "header", + "query", + "body" + ], + "type": "string" + } + } + }, + { + "id_token_param_name": { + "required": false, + "description": "The name of the parameter used to pass the id token.", + "type": "string" + } + }, + { + "refresh_token_param_type": { + "required": false, + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "one_of": [ + "header", + "query", + "body" + ], + "type": "string" + } + } + }, + { + "refresh_token_param_name": { + "required": false, + "description": "The name of the parameter used to pass the refresh token.", + "type": "string" + } + }, + { + "refresh_tokens": { + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "upstream_headers_claims": { + "type": "array", + "required": false, + "description": "The upstream header claims. Only top level claims are supported.", + "elements": { + "type": "string" + } + } + }, + { + "upstream_headers_names": { + "type": "array", + "required": false, + "description": "The upstream header names for the claim values.", + "elements": { + "type": "string" + } + } + }, + { + "upstream_access_token_header": { + "description": "The upstream access token header.", + "required": false, + "default": "authorization:bearer", + "type": "string" + } + }, + { + "upstream_access_token_jwk_header": { + "required": false, + "description": "The upstream access token JWK header.", + "type": "string" + } + }, + { + "upstream_id_token_header": { + "required": false, + "description": "The upstream id token header.", + "type": "string" + } + }, + { + "upstream_id_token_jwk_header": { + "required": false, + "description": "The upstream id token JWK header.", + "type": "string" + } + }, + { + "upstream_refresh_token_header": { + "required": false, + "description": "The upstream refresh token header.", + "type": "string" + } + }, + { + "upstream_user_info_header": { + "required": false, + "description": "The upstream user info header.", + "type": "string" + } + }, + { + "upstream_user_info_jwt_header": { + "required": false, + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + } + }, + { + "upstream_introspection_header": { + "required": false, + "description": "The upstream introspection header.", + "type": "string" + } + }, + { + "upstream_introspection_jwt_header": { + "required": false, + "description": "The upstream introspection JWT header.", + "type": "string" + } + }, + { + "upstream_session_id_header": { + "required": false, + "description": "The upstream session id header.", + "type": "string" + } + }, + { + "downstream_headers_claims": { + "type": "array", + "required": false, + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "downstream_headers_names": { + "type": "array", + "required": false, + "description": "The downstream header names for the claim values.", + "elements": { + "type": "string" + } + } + }, + { + "downstream_access_token_header": { + "required": false, + "description": "The downstream access token header.", + "type": "string" + } + }, + { + "downstream_access_token_jwk_header": { + "required": false, + "description": "The downstream access token JWK header.", + "type": "string" + } + }, + { + "downstream_id_token_header": { + "required": false, + "description": "The downstream id token header.", + "type": "string" + } + }, + { + "downstream_id_token_jwk_header": { + "required": false, + "description": "The downstream id token JWK header.", + "type": "string" + } + }, + { + "downstream_refresh_token_header": { + "required": false, + "description": "The downstream refresh token header.", + "type": "string" + } + }, + { + "downstream_user_info_header": { + "required": false, + "description": "The downstream user info header.", + "type": "string" + } + }, + { + "downstream_user_info_jwt_header": { + "required": false, + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + } + }, + { + "downstream_introspection_header": { + "required": false, + "description": "The downstream introspection header.", + "type": "string" + } + }, + { + "downstream_introspection_jwt_header": { + "required": false, + "description": "The downstream introspection JWT header.", + "type": "string" + } + }, + { + "downstream_session_id_header": { + "required": false, + "description": "The downstream session id header.", + "type": "string" + } + }, + { + "login_methods": { + "required": false, + "description": "Enable login functionality with specified grants.", + "type": "array", + "default": [ + "authorization_code" + ], + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "type": "string" + } + } + }, + { + "login_action": { + "required": false, + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "one_of": [ + "upstream", + "response", + "redirect" + ], + "default": "upstream", + "type": "string" + } + }, + { + "login_tokens": { + "required": false, + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "type": "array", + "default": [ + "id_token" + ], + "elements": { + "one_of": [ + "id_token", + "access_token", + "refresh_token", + "tokens", + "introspection" + ], + "type": "string" + } + } + }, + { + "login_redirect_mode": { + "required": false, + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "one_of": [ + "query", + "fragment" + ], + "default": "fragment", + "type": "string" + } + }, + { + "logout_query_arg": { + "required": false, + "description": "The request query argument that activates the logout.", + "type": "string" + } + }, + { + "logout_post_arg": { + "required": false, + "description": "The request body argument that activates the logout.", + "type": "string" + } + }, + { + "logout_uri_suffix": { + "required": false, + "description": "The request URI suffix that activates the logout.", + "type": "string" + } + }, + { + "logout_methods": { + "required": false, + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "type": "array", + "default": [ + "POST", + "DELETE" + ], + "elements": { + "one_of": [ + "POST", + "GET", + "DELETE" + ], + "type": "string" + } + } + }, + { + "logout_revoke": { + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "logout_revoke_access_token": { + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "logout_revoke_refresh_token": { + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "consumer_claim": { + "type": "array", + "required": false, + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "consumer_by": { + "required": false, + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "type": "array", + "default": [ + "username", + "custom_id" + ], + "elements": { + "one_of": [ + "id", + "username", + "custom_id" + ], + "type": "string" + } + } + }, + { + "consumer_optional": { + "description": "Do not terminate the request if consumer mapping fails.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "credential_claim": { + "required": false, + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "default": [ + "sub" + ], + "elements": { + "type": "string" + } + } + }, + { + "anonymous": { + "required": false, + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "run_on_preflight": { + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "leeway": { + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "required": false, + "default": 0, + "type": "number" + } + }, + { + "verify_parameters": { + "description": "Verify plugin configuration against discovery.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "verify_nonce": { + "description": "Verify nonce on authorization code flow.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "verify_claims": { + "description": "Verify tokens for standard claims.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "verify_signature": { + "description": "Verify signature of tokens.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "ignore_signature": { + "required": false, + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "type": "array", + "default": [ + + ], + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token", + "session", + "introspection", + "userinfo" + ], + "type": "string" + } + } + }, + { + "enable_hs_signatures": { + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "disable_session": { + "type": "array", + "required": false, + "description": "Disable issuing the session cookie with the specified grants.", + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "type": "string" + } + } + }, + { + "cache_ttl": { + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "required": false, + "default": 3600, + "type": "number" + } + }, + { + "cache_ttl_max": { + "required": false, + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number" + } + }, + { + "cache_ttl_min": { + "required": false, + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number" + } + }, + { + "cache_ttl_neg": { + "required": false, + "description": "The negative cache ttl in seconds.", + "type": "number" + } + }, + { + "cache_ttl_resurrect": { + "required": false, + "description": "The resurrection ttl in seconds.", + "type": "number" + } + }, + { + "cache_tokens": { + "description": "Cache the token endpoint requests.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "cache_tokens_salt": { + "type": "string", + "required": false, + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "auto": true + } + }, + { + "cache_introspection": { + "description": "Cache the introspection endpoint requests.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "cache_token_exchange": { + "description": "Cache the token exchange endpoint requests.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "cache_user_info": { + "description": "Cache the user info requests.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "search_user_info": { + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "hide_credentials": { + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "http_version": { + "default": 1.1, + "required": false, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "type": "number" + } + }, + { + "http_proxy": { + "required": false, + "description": "The HTTP proxy.", + "type": "string" + } + }, + { + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "https_proxy": { + "required": false, + "description": "The HTTPS proxy.", + "type": "string" + } + }, + { + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "no_proxy": { + "required": false, + "description": "Do not use proxy with these hosts.", + "type": "string" + } + }, + { + "keepalive": { + "description": "Use keepalive with the HTTP client.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "timeout": { + "description": "Network IO timeout in milliseconds.", + "required": false, + "default": 10000, + "type": "number" + } + }, + { + "display_errors": { + "description": "Display errors on failure responses.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "by_username_ignore_case": { + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "resolve_distributed_claims": { + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "expose_error_code": { + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "default": true, + "type": "boolean" + } + }, + { + "token_cache_key_include_scope": { + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "default": false, + "type": "boolean" + } + }, + { + "introspection_token_param_name": { + "description": "Designate token's parameter name for introspection.", + "required": false, + "default": "token", + "type": "string" + } + }, + { + "revocation_token_param_name": { + "description": "Designate token's parameter name for revocation.", + "required": false, + "default": "token", + "type": "string" + } + }, + { + "proof_of_possession_mtls": { + "required": false, + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "one_of": [ + "off", + "strict", + "optional" + ], + "default": "off", + "type": "string" + } + }, + { + "proof_of_possession_auth_methods_validation": { + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "tls_client_auth_cert_id": { + "required": false, + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "auto": false, + "uuid": true, + "type": "string" + } + }, + { + "tls_client_auth_ssl_verify": { + "description": "Verify identity provider server certificate during mTLS client authentication.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "mtls_token_endpoint": { + "required": false, + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "mtls_introspection_endpoint": { + "required": false, + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "mtls_revocation_endpoint": { + "required": false, + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "proof_of_possession_dpop": { + "required": false, + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "one_of": [ + "off", + "strict", + "optional" + ], + "default": "off", + "type": "string" + } + }, + { + "dpop_use_nonce": { + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "dpop_proof_lifetime": { + "default": 300, + "required": false, + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "type": "number" + } + }, + { + "claims_forbidden": { + "type": "array", + "required": false, + "description": "If given, these claims are forbidden in the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "cluster_cache_strategy": { + "required": false, + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "one_of": [ + "off", + "redis" + ], + "default": "off", + "type": "string" + } + }, + { + "cluster_cache_redis": { + "required": true, + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "cluster_nodes": { + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "default": 5, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "default": false, + "type": "boolean" + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + } + ], + "default": [ + + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/konnect-application-auth/3.12.x.json b/schemas/konnect-application-auth/3.12.x.json new file mode 100644 index 00000000..7ded305e --- /dev/null +++ b/schemas/konnect-application-auth/3.12.x.json @@ -0,0 +1,3263 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "key_names": { + "type": "array", + "required": true, + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "default": [ + "apikey" + ], + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + }, + { + "auth_type": { + "type": "string", + "required": true, + "description": "The type of authentication to be performed. Possible values are: 'openid-connect', 'key-auth', 'v2-strategies'.", + "default": "openid-connect", + "one_of": [ + "openid-connect", + "key-auth", + "v2-strategies" + ] + } + }, + { + "scope": { + "type": "string", + "unique": true, + "description": "The unique scope identifier for the plugin configuration.", + "required": true + } + }, + { + "v2_strategies": { + "type": "record", + "required": false, + "description": "The map of v2 strategies.", + "default": [], + "fields": [ + { + "key_auth": { + "description": "List of key_auth strategies.", + "elements": { + "type": "record", + "fields": [ + { + "strategy_id": { + "description": "The strategy id the config is tied to.", + "type": "string", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "key_names": { + "type": "array", + "required": true, + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "default": [ + "apikey" + ], + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + } + ], + "required": true + } + } + ] + }, + "type": "array", + "required": false + } + }, + { + "openid_connect": { + "description": "List of openid_connect strategies.", + "elements": { + "type": "record", + "fields": [ + { + "strategy_id": { + "description": "The strategy id the config is tied to.", + "type": "string", + "required": true + } + }, + { + "config": { + "description": "openid-connect plugin configuration.", + "fields": [ + { + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "type": "string", + "required": true + } + }, + { + "using_pseudo_issuer": { + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "set", + "required": false + } + }, + { + "rediscovery_lifetime": { + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "default": 30, + "type": "number", + "required": false + } + }, + { + "auth_methods": { + "type": "array", + "required": false, + "description": "Types of credentials/grants to enable.", + "default": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + } + } + }, + { + "client_id": { + "type": "array", + "required": false, + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.", + "encrypted": true, + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "client_secret": { + "type": "array", + "required": false, + "description": "The client secret.", + "encrypted": true, + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "client_auth": { + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "elements": { + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + }, + "type": "array", + "required": false + } + }, + { + "client_jwk": { + "description": "The JWK used for the private_key_jwt authentication.", + "elements": { + "type": "record", + "fields": [ + { + "issuer": { + "type": "string", + "required": false + } + }, + { + "kty": { + "type": "string", + "required": false + } + }, + { + "use": { + "type": "string", + "required": false + } + }, + { + "key_ops": { + "type": "array", + "elements": { + "type": "string", + "required": false + }, + "required": false + } + }, + { + "alg": { + "type": "string", + "required": false + } + }, + { + "kid": { + "type": "string", + "required": false + } + }, + { + "x5u": { + "type": "string", + "required": false + } + }, + { + "x5c": { + "type": "array", + "elements": { + "type": "string", + "required": false + }, + "required": false + } + }, + { + "x5t": { + "type": "string", + "required": false + } + }, + { + "x5t#S256": { + "type": "string", + "required": false + } + }, + { + "k": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "x": { + "type": "string", + "required": false + } + }, + { + "y": { + "type": "string", + "required": false + } + }, + { + "crv": { + "type": "string", + "required": false + } + }, + { + "n": { + "type": "string", + "required": false + } + }, + { + "e": { + "type": "string", + "required": false + } + }, + { + "d": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "p": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "q": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "dp": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "dq": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "qi": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "oth": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "r": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "t": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + } + ], + "required": false + }, + "type": "array", + "required": false + } + }, + { + "client_alg": { + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "elements": { + "type": "string", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ] + }, + "type": "array", + "required": false + } + }, + { + "client_arg": { + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "default": "client_id", + "type": "string", + "required": false + } + }, + { + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "array", + "required": false + } + }, + { + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "elements": { + "type": "string", + "referenceable": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "array", + "required": false + } + }, + { + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "elements": { + "type": "string", + "referenceable": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "array", + "required": false + } + }, + { + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "array", + "required": false + } + }, + { + "forbidden_error_message": { + "description": "The error message for the forbidden requests (when not using the redirection).", + "default": "Forbidden", + "type": "string", + "required": false + } + }, + { + "forbidden_destroy_session": { + "description": "Destroy any active session for the forbidden requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "unauthorized_destroy_session": { + "description": "Destroy any active session for the unauthorized requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "array", + "required": false + } + }, + { + "unauthorized_error_message": { + "description": "The error message for the unauthorized requests (when not using the redirection).", + "default": "Unauthorized", + "type": "string", + "required": false + } + }, + { + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "array", + "required": false + } + }, + { + "response_mode": { + "type": "string", + "required": false, + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "default": "query", + "one_of": [ + "query", + "form_post", + "fragment", + "query.jwt", + "form_post.jwt", + "fragment.jwt", + "jwt" + ] + } + }, + { + "response_type": { + "type": "array", + "required": false, + "description": "The response type passed to the authorization endpoint.", + "default": [ + "code" + ], + "elements": { + "type": "string" + } + } + }, + { + "scopes": { + "type": "array", + "required": false, + "description": "The scopes passed to the authorization and token endpoints.", + "default": [ + "openid" + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "audience": { + "description": "The audience passed to the authorization endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "scopes_claim": { + "type": "array", + "required": false, + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "scope" + ], + "elements": { + "type": "string" + } + } + }, + { + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "audience_claim": { + "type": "array", + "required": false, + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "aud" + ], + "elements": { + "type": "string" + } + } + }, + { + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "groups_claim": { + "type": "array", + "required": false, + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "groups" + ], + "elements": { + "type": "string" + } + } + }, + { + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "roles_claim": { + "type": "array", + "required": false, + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "roles" + ], + "elements": { + "type": "string" + } + } + }, + { + "domains": { + "description": "The allowed values for the `hd` claim.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number", + "required": false + } + }, + { + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "pushed_authorization_request_endpoint_auth_method": { + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false + } + }, + { + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean", + "required": false + } + }, + { + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean", + "required": false + } + }, + { + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean", + "required": false + } + }, + { + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "authorization_rolling_timeout": { + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "default": 600, + "type": "number", + "required": false + } + }, + { + "authorization_cookie_name": { + "description": "The authorization cookie name.", + "default": "authorization", + "type": "string", + "required": false + } + }, + { + "authorization_cookie_path": { + "type": "string", + "starts_with": "/", + "required": false, + "description": "The authorization cookie Path flag.", + "default": "/", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + }, + { + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string", + "required": false + } + }, + { + "authorization_cookie_same_site": { + "type": "string", + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "default": "Default", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "authorization_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean", + "required": false + } + }, + { + "preserve_query_args": { + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false + } + }, + { + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string", + "required": false + } + }, + { + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token" + ] + }, + "type": "array", + "required": false + } + }, + { + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false + } + }, + { + "introspection_hint": { + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "default": "access_token", + "type": "string", + "required": false + } + }, + { + "introspection_check_active": { + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "introspection_accept": { + "type": "string", + "required": false, + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "default": "application/json", + "one_of": [ + "application/json", + "application/token-introspection+jwt", + "application/jwt" + ] + } + }, + { + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "introspection_headers_values": { + "type": "array", + "required": false, + "encrypted": true, + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "Extra header values passed to the introspection endpoint." + } + }, + { + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "introspection_post_args_client_headers": { + "description": "Extra post arguments passed from the client headers to the introspection endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "introspect_jwt_tokens": { + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false + } + }, + { + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "userinfo_accept": { + "type": "string", + "required": false, + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "default": "application/json", + "one_of": [ + "application/json", + "application/jwt" + ] + } + }, + { + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "type": "string", + "required": false + } + }, + { + "session_secret": { + "type": "string", + "required": false, + "description": "The session secret.", + "referenceable": true, + "encrypted": true + } + }, + { + "session_audience": { + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "default": "default", + "type": "string", + "required": false + } + }, + { + "session_cookie_name": { + "description": "The session cookie name.", + "default": "session", + "type": "string", + "required": false + } + }, + { + "session_remember": { + "description": "Enables or disables persistent sessions.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_remember_cookie_name": { + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "default": "remember", + "type": "string", + "required": false + } + }, + { + "session_remember_rolling_timeout": { + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "default": 604800, + "type": "number", + "required": false + } + }, + { + "session_remember_absolute_timeout": { + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "default": 2592000, + "type": "number", + "required": false + } + }, + { + "session_idling_timeout": { + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "default": 900, + "type": "number", + "required": false + } + }, + { + "session_rolling_timeout": { + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "default": 3600, + "type": "number", + "required": false + } + }, + { + "session_absolute_timeout": { + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "default": 86400, + "type": "number", + "required": false + } + }, + { + "session_cookie_path": { + "type": "string", + "starts_with": "/", + "required": false, + "description": "The session cookie Path flag.", + "default": "/", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + }, + { + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string", + "required": false + } + }, + { + "session_cookie_same_site": { + "type": "string", + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "default": "Lax", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "session_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean", + "required": false + } + }, + { + "session_request_headers": { + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "type": "set", + "required": false + } + }, + { + "session_response_headers": { + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "type": "set", + "required": false + } + }, + { + "session_storage": { + "type": "string", + "required": false, + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "default": "cookie", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ] + } + }, + { + "session_store_metadata": { + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_enforce_same_subject": { + "description": "When set to `true`, audiences are forced to share the same subject.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_hash_subject": { + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_hash_storage_key": { + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string", + "required": false + } + }, + { + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string", + "required": false + } + }, + { + "session_memcached_host": { + "description": "The memcached host.", + "default": "127.0.0.1", + "type": "string", + "required": false + } + }, + { + "session_memcached_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "required": false, + "description": "The memcached port.", + "default": 11211 + } + }, + { + "redis": { + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "database", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + } + ], + "required": true, + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis." + } + }, + { + "sentinel_username": { + "type": "string", + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels." + } + }, + { + "database": { + "type": "integer", + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy" + } + }, + { + "keepalive_pool_size": { + "type": "integer", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low." + } + }, + { + "keepalive_backlog": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "type": "boolean", + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false + } + }, + { + "prefix": { + "description": "The Redis session key prefix.", + "type": "string", + "required": false + } + }, + { + "socket": { + "description": "The Redis unix socket path.", + "type": "string", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + } + } + }, + { + "cluster_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + } + } + } + ] + } + }, + { + "reverify": { + "description": "Specifies whether to always verify tokens stored in the session.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "jwt_session_claim": { + "description": "The claim to match against the JWT session cookie.", + "default": "sid", + "type": "string", + "required": false + } + }, + { + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string", + "required": false + } + }, + { + "bearer_token_param_type": { + "type": "array", + "required": false, + "description": "Where to look for the bearer token: - `header`: search the `Authorization`, `access-token`, and `x-access-token` HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "cookie", + "query", + "body" + ] + } + } + }, + { + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string", + "required": false + } + }, + { + "client_credentials_param_type": { + "type": "array", + "required": false, + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + } + } + }, + { + "password_param_type": { + "type": "array", + "required": false, + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + } + } + }, + { + "id_token_param_type": { + "type": "array", + "required": false, + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + } + } + }, + { + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string", + "required": false + } + }, + { + "refresh_token_param_type": { + "type": "array", + "required": false, + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + } + } + }, + { + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string", + "required": false + } + }, + { + "refresh_tokens": { + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "upstream_headers_claims": { + "description": "The upstream header claims. Only top level claims are supported.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "upstream_access_token_header": { + "description": "The upstream access token header.", + "default": "authorization:bearer", + "type": "string", + "required": false + } + }, + { + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string", + "required": false + } + }, + { + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string", + "required": false + } + }, + { + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string", + "required": false + } + }, + { + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string", + "required": false + } + }, + { + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string", + "required": false + } + }, + { + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string", + "required": false + } + }, + { + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string", + "required": false + } + }, + { + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "type": "string", + "required": false + } + }, + { + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string", + "required": false + } + }, + { + "downstream_headers_claims": { + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string", + "required": false + } + }, + { + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string", + "required": false + } + }, + { + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string", + "required": false + } + }, + { + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string", + "required": false + } + }, + { + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string", + "required": false + } + }, + { + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string", + "required": false + } + }, + { + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string", + "required": false + } + }, + { + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string", + "required": false + } + }, + { + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "type": "string", + "required": false + } + }, + { + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string", + "required": false + } + }, + { + "login_methods": { + "type": "array", + "required": false, + "description": "Enable login functionality with specified grants.", + "default": [ + "authorization_code" + ], + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + } + } + }, + { + "login_action": { + "type": "string", + "required": false, + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "default": "upstream", + "one_of": [ + "upstream", + "response", + "redirect" + ] + } + }, + { + "login_tokens": { + "type": "array", + "required": false, + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "default": [ + "id_token" + ], + "elements": { + "type": "string", + "one_of": [ + "id_token", + "access_token", + "refresh_token", + "tokens", + "introspection" + ] + } + } + }, + { + "login_redirect_mode": { + "type": "string", + "required": false, + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "default": "fragment", + "one_of": [ + "query", + "fragment" + ] + } + }, + { + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string", + "required": false + } + }, + { + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string", + "required": false + } + }, + { + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string", + "required": false + } + }, + { + "logout_methods": { + "type": "array", + "required": false, + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "default": [ + "POST", + "DELETE" + ], + "elements": { + "type": "string", + "one_of": [ + "POST", + "GET", + "DELETE" + ] + } + } + }, + { + "logout_revoke": { + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "logout_revoke_access_token": { + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "logout_revoke_refresh_token": { + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "consumer_claim": { + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "consumer_by": { + "type": "array", + "required": false, + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + } + } + }, + { + "consumer_optional": { + "description": "Do not terminate the request if consumer mapping fails.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "credential_claim": { + "type": "array", + "required": false, + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "sub" + ], + "elements": { + "type": "string" + } + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string", + "required": false + } + }, + { + "run_on_preflight": { + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "leeway": { + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "default": 0, + "type": "number", + "required": false + } + }, + { + "verify_parameters": { + "description": "Verify plugin configuration against discovery.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "verify_nonce": { + "description": "Verify nonce on authorization code flow.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "verify_claims": { + "description": "Verify tokens for standard claims.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "verify_signature": { + "description": "Verify signature of tokens.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "ignore_signature": { + "type": "array", + "required": false, + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "default": [], + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token", + "session", + "introspection", + "userinfo" + ] + } + } + }, + { + "enable_hs_signatures": { + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants.", + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "type": "array", + "required": false + } + }, + { + "cache_ttl": { + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "default": 3600, + "type": "number", + "required": false + } + }, + { + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number", + "required": false + } + }, + { + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number", + "required": false + } + }, + { + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number", + "required": false + } + }, + { + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number", + "required": false + } + }, + { + "cache_tokens": { + "description": "Cache the token endpoint requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "type": "string", + "auto": true, + "required": false + } + }, + { + "cache_introspection": { + "description": "Cache the introspection endpoint requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "cache_token_exchange": { + "description": "Cache the token exchange endpoint requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "cache_user_info": { + "description": "Cache the user info requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "search_user_info": { + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "hide_credentials": { + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "http_version": { + "type": "number", + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "required": false + } + }, + { + "http_proxy": { + "description": "The HTTP proxy.", + "type": "string", + "required": false + } + }, + { + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "https_proxy": { + "description": "The HTTPS proxy.", + "type": "string", + "required": false + } + }, + { + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string", + "required": false + } + }, + { + "keepalive": { + "description": "Use keepalive with the HTTP client.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "timeout": { + "description": "Network IO timeout in milliseconds.", + "default": 10000, + "type": "number", + "required": false + } + }, + { + "display_errors": { + "description": "Display errors on failure responses.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "by_username_ignore_case": { + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "resolve_distributed_claims": { + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "expose_error_code": { + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "default": true, + "type": "boolean" + } + }, + { + "token_cache_key_include_scope": { + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "default": false, + "type": "boolean" + } + }, + { + "introspection_token_param_name": { + "description": "Designate token's parameter name for introspection.", + "default": "token", + "type": "string", + "required": false + } + }, + { + "revocation_token_param_name": { + "description": "Designate token's parameter name for revocation.", + "default": "token", + "type": "string", + "required": false + } + }, + { + "proof_of_possession_mtls": { + "type": "string", + "required": false, + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "default": "off", + "one_of": [ + "off", + "strict", + "optional" + ] + } + }, + { + "proof_of_possession_auth_methods_validation": { + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "tls_client_auth_cert_id": { + "type": "string", + "required": false, + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "auto": false, + "uuid": true + } + }, + { + "tls_client_auth_ssl_verify": { + "description": "Verify identity provider server certificate during mTLS client authentication.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "proof_of_possession_dpop": { + "type": "string", + "required": false, + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "default": "off", + "one_of": [ + "off", + "strict", + "optional" + ] + } + }, + { + "dpop_use_nonce": { + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "dpop_proof_lifetime": { + "type": "number", + "default": 300, + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "required": false + } + }, + { + "claims_forbidden": { + "description": "If given, these claims are forbidden in the token payload.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "cluster_cache_strategy": { + "type": "string", + "required": false, + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "default": "off", + "one_of": [ + "off", + "redis" + ] + } + }, + { + "cluster_cache_redis": { + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "database", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + } + ], + "required": true, + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "type": "string", + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "type": "integer", + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy" + } + }, + { + "keepalive_pool_size": { + "type": "integer", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low." + } + }, + { + "keepalive_backlog": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "type": "boolean", + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "cluster_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + } + ] + } + } + ], + "type": "record" + } + } + ] + }, + "type": "array", + "required": false + } + } + ] + } + } + ], + "entity_checks": [], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/konnect-application-auth/3.4.x.json b/schemas/konnect-application-auth/3.4.x.json index b02fdd98..587877e6 100644 --- a/schemas/konnect-application-auth/3.4.x.json +++ b/schemas/konnect-application-auth/3.4.x.json @@ -2,15 +2,17 @@ "fields": [ { "consumer": { - "eq": null, "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, { "route": { - "eq": null, "reference": "routes", + "description": "A reference to the 'routes' table with a null value allowed.", + "eq": null, "type": "foreign" } }, @@ -22,59 +24,75 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, - "entity_checks": [ - - ], "fields": [ { "key_names": { - "elements": { - "type": "string" - }, "default": [ "apikey" ], + "type": "array", "required": true, - "type": "array" + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + } } }, { "auth_type": { "default": "openid-connect", + "type": "string", "one_of": [ "openid-connect", "key-auth" ], - "type": "string", - "required": true + "required": true, + "description": "The type of authentication to be performed. Possible values are: 'openid-connect', 'key-auth'." } }, { "scope": { + "description": "The unique scope identifier for the plugin configuration.", "required": true, "unique": true, "type": "string" } } ], - "type": "record" + "entity_checks": [ + + ], + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/konnect-application-auth/3.5.x.json b/schemas/konnect-application-auth/3.5.x.json new file mode 100644 index 00000000..cb644ba9 --- /dev/null +++ b/schemas/konnect-application-auth/3.5.x.json @@ -0,0 +1,98 @@ +{ + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "route": { + "type": "foreign", + "eq": null, + "reference": "routes", + "description": "A reference to the 'routes' table with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + + ], + "fields": [ + { + "key_names": { + "type": "array", + "required": true, + "default": [ + "apikey" + ], + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "description": "The names of the headers containing the API key. You can specify multiple header names." + } + }, + { + "auth_type": { + "type": "string", + "required": true, + "one_of": [ + "openid-connect", + "key-auth" + ], + "default": "openid-connect", + "description": "The type of authentication to be performed. Possible values are: 'openid-connect', 'key-auth'." + } + }, + { + "scope": { + "description": "The unique scope identifier for the plugin configuration.", + "unique": true, + "type": "string", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/konnect-application-auth/3.6.x.json b/schemas/konnect-application-auth/3.6.x.json new file mode 100644 index 00000000..7c28be4f --- /dev/null +++ b/schemas/konnect-application-auth/3.6.x.json @@ -0,0 +1,2584 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + + ], + "type": "record", + "fields": [ + { + "key_names": { + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "type": "array", + "default": [ + "apikey" + ], + "required": true, + "description": "The names of the headers containing the API key. You can specify multiple header names." + } + }, + { + "auth_type": { + "type": "string", + "default": "openid-connect", + "required": true, + "description": "The type of authentication to be performed. Possible values are: 'openid-connect', 'key-auth', 'v2-strategies'.", + "one_of": [ + "openid-connect", + "key-auth", + "v2-strategies" + ] + } + }, + { + "scope": { + "required": true, + "type": "string", + "description": "The unique scope identifier for the plugin configuration.", + "unique": true + } + }, + { + "v2_strategies": { + "type": "record", + "default": [ + + ], + "required": false, + "description": "The map of v2 strategies.", + "fields": [ + { + "key_auth": { + "required": false, + "type": "array", + "description": "List of key_auth strategies.", + "elements": { + "fields": [ + { + "strategy_id": { + "required": true, + "type": "string", + "description": "The strategy id the config is tied to." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "key_names": { + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "type": "array", + "default": [ + "apikey" + ], + "required": true, + "description": "The names of the headers containing the API key. You can specify multiple header names." + } + } + ] + } + } + ], + "type": "record" + } + } + }, + { + "openid_connect": { + "required": false, + "type": "array", + "description": "List of openid_connect strategies.", + "elements": { + "fields": [ + { + "strategy_id": { + "required": true, + "type": "string", + "description": "The strategy id the config is tied to." + } + }, + { + "config": { + "type": "record", + "description": "openid-connect plugin configuration.", + "fields": [ + { + "issuer": { + "required": true, + "type": "string", + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`." + } + }, + { + "using_pseudo_issuer": { + "required": false, + "type": "boolean", + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "default": false + } + }, + { + "discovery_headers_names": { + "required": false, + "type": "array", + "description": "Extra header names passed to the discovery endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "discovery_headers_values": { + "required": false, + "type": "array", + "description": "Extra header values passed to the discovery endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "extra_jwks_uris": { + "required": false, + "type": "set", + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "rediscovery_lifetime": { + "required": false, + "type": "number", + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "default": 30 + } + }, + { + "auth_methods": { + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "type": "string" + }, + "type": "array", + "default": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "required": false, + "description": "Types of credentials/grants to enable." + } + }, + { + "client_id": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "required": false, + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.", + "encrypted": true + } + }, + { + "client_secret": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "required": false, + "description": "The client secret.", + "encrypted": true + } + }, + { + "client_auth": { + "required": false, + "type": "array", + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "elements": { + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "type": "string" + } + } + }, + { + "client_jwk": { + "required": false, + "type": "array", + "description": "The JWK used for the private_key_jwt authentication.", + "elements": { + "required": false, + "type": "record", + "fields": [ + { + "issuer": { + "required": false, + "type": "string" + } + }, + { + "kty": { + "required": false, + "type": "string" + } + }, + { + "use": { + "required": false, + "type": "string" + } + }, + { + "key_ops": { + "required": false, + "type": "array", + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "alg": { + "required": false, + "type": "string" + } + }, + { + "kid": { + "required": false, + "type": "string" + } + }, + { + "x5u": { + "required": false, + "type": "string" + } + }, + { + "x5c": { + "required": false, + "type": "array", + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "x5t": { + "required": false, + "type": "string" + } + }, + { + "x5t#S256": { + "required": false, + "type": "string" + } + }, + { + "k": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "x": { + "required": false, + "type": "string" + } + }, + { + "y": { + "required": false, + "type": "string" + } + }, + { + "crv": { + "required": false, + "type": "string" + } + }, + { + "n": { + "required": false, + "type": "string" + } + }, + { + "e": { + "required": false, + "type": "string" + } + }, + { + "d": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "p": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "q": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "dp": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "dq": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "qi": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "oth": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "r": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "t": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + } + ] + } + } + }, + { + "client_alg": { + "required": false, + "type": "array", + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "elements": { + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ], + "type": "string" + } + } + }, + { + "client_arg": { + "required": false, + "type": "string", + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "default": "client_id" + } + }, + { + "redirect_uri": { + "required": false, + "type": "array", + "description": "The redirect URI passed to the authorization and token endpoints.", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "login_redirect_uri": { + "required": false, + "type": "array", + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "elements": { + "referenceable": true, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + } + }, + { + "logout_redirect_uri": { + "required": false, + "type": "array", + "description": "Where to redirect the client after the logout.", + "elements": { + "referenceable": true, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + } + }, + { + "forbidden_redirect_uri": { + "required": false, + "type": "array", + "description": "Where to redirect the client on forbidden requests.", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "forbidden_error_message": { + "required": false, + "type": "string", + "description": "The error message for the forbidden requests (when not using the redirection).", + "default": "Forbidden" + } + }, + { + "forbidden_destroy_session": { + "required": false, + "type": "boolean", + "description": "Destroy any active session for the forbidden requests.", + "default": true + } + }, + { + "unauthorized_destroy_session": { + "required": false, + "type": "boolean", + "description": "Destroy any active session for the unauthorized requests.", + "default": true + } + }, + { + "unauthorized_redirect_uri": { + "required": false, + "type": "array", + "description": "Where to redirect the client on unauthorized requests.", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "unauthorized_error_message": { + "required": false, + "type": "string", + "description": "The error message for the unauthorized requests (when not using the redirection).", + "default": "Unauthorized" + } + }, + { + "unexpected_redirect_uri": { + "required": false, + "type": "array", + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "response_mode": { + "type": "string", + "default": "query", + "required": false, + "description": "The response mode passed to the authorization endpoint: - `query`: Instructs the identity provider to pass parameters in query string - `form_post`: Instructs the identity provider to pass parameters in request body - `fragment`: Instructs the identity provider to pass parameters in uri fragment (rarely useful as the plugin itself cannot read it).", + "one_of": [ + "query", + "form_post", + "fragment" + ] + } + }, + { + "response_type": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "code" + ], + "required": false, + "description": "The response type passed to the authorization endpoint." + } + }, + { + "scopes": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "default": [ + "openid" + ], + "required": false, + "description": "The scopes passed to the authorization and token endpoints." + } + }, + { + "audience": { + "required": false, + "type": "array", + "description": "The audience passed to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "issuers_allowed": { + "required": false, + "type": "array", + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "elements": { + "type": "string" + } + } + }, + { + "scopes_required": { + "required": false, + "type": "array", + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "scopes_claim": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "scope" + ], + "required": false, + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload." + } + }, + { + "audience_required": { + "required": false, + "type": "array", + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "audience_claim": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "aud" + ], + "required": false, + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload." + } + }, + { + "groups_required": { + "required": false, + "type": "array", + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "groups_claim": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "groups" + ], + "required": false, + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload." + } + }, + { + "roles_required": { + "required": false, + "type": "array", + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "roles_claim": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "roles" + ], + "required": false, + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload." + } + }, + { + "domains": { + "required": false, + "type": "array", + "description": "The allowed values for the `hd` claim.", + "elements": { + "type": "string" + } + } + }, + { + "max_age": { + "required": false, + "type": "number", + "description": "The maximum age (in seconds) compared to the `auth_time` claim." + } + }, + { + "authenticated_groups_claim": { + "required": false, + "type": "array", + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "pushed_authorization_request_endpoint": { + "required": false, + "type": "string", + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint." + } + }, + { + "pushed_authorization_request_endpoint_auth_method": { + "required": false, + "type": "string", + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "require_pushed_authorization_requests": { + "required": false, + "type": "boolean", + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`)." + } + }, + { + "require_proof_key_for_code_exchange": { + "required": false, + "type": "boolean", + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled)." + } + }, + { + "authorization_endpoint": { + "required": false, + "type": "string", + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint." + } + }, + { + "authorization_query_args_names": { + "required": false, + "type": "array", + "description": "Extra query argument names passed to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "authorization_query_args_values": { + "required": false, + "type": "array", + "description": "Extra query argument values passed to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "authorization_query_args_client": { + "required": false, + "type": "array", + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "authorization_rolling_timeout": { + "required": false, + "type": "number", + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "default": 600 + } + }, + { + "authorization_cookie_name": { + "required": false, + "type": "string", + "description": "The authorization cookie name.", + "default": "authorization" + } + }, + { + "authorization_cookie_path": { + "type": "string", + "default": "/", + "starts_with": "/", + "required": false, + "description": "The authorization cookie Path flag.", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + }, + { + "authorization_cookie_domain": { + "required": false, + "type": "string", + "description": "The authorization cookie Domain flag." + } + }, + { + "authorization_cookie_same_site": { + "type": "string", + "default": "Default", + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "authorization_cookie_http_only": { + "required": false, + "type": "boolean", + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "default": true + } + }, + { + "authorization_cookie_secure": { + "required": false, + "type": "boolean", + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks." + } + }, + { + "preserve_query_args": { + "required": false, + "type": "boolean", + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "default": false + } + }, + { + "token_endpoint": { + "required": false, + "type": "string", + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint." + } + }, + { + "token_endpoint_auth_method": { + "required": false, + "type": "string", + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "token_headers_names": { + "required": false, + "type": "array", + "description": "Extra header names passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_values": { + "required": false, + "type": "array", + "description": "Extra header values passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_client": { + "required": false, + "type": "array", + "description": "Extra headers passed from the client to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_replay": { + "required": false, + "type": "array", + "description": "The names of token endpoint response headers to forward to the downstream client.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_prefix": { + "required": false, + "type": "string", + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client." + } + }, + { + "token_headers_grants": { + "required": false, + "type": "array", + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token" + ], + "type": "string" + } + } + }, + { + "token_post_args_names": { + "required": false, + "type": "array", + "description": "Extra post argument names passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_post_args_values": { + "required": false, + "type": "array", + "description": "Extra post argument values passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_post_args_client": { + "required": false, + "type": "array", + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Reqest Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_endpoint": { + "required": false, + "type": "string", + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint." + } + }, + { + "introspection_endpoint_auth_method": { + "required": false, + "type": "string", + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "introspection_hint": { + "required": false, + "type": "string", + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "default": "access_token" + } + }, + { + "introspection_check_active": { + "required": false, + "type": "boolean", + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "default": true + } + }, + { + "introspection_accept": { + "type": "string", + "default": "application/json", + "required": false, + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "one_of": [ + "application/json", + "application/token-introspection+jwt", + "application/jwt" + ] + } + }, + { + "introspection_headers_names": { + "required": false, + "type": "array", + "description": "Extra header names passed to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_headers_values": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "required": false, + "description": "Extra header values passed to the introspection endpoint.", + "encrypted": true + } + }, + { + "introspection_headers_client": { + "required": false, + "type": "array", + "description": "Extra headers passed from the client to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_names": { + "required": false, + "type": "array", + "description": "Extra post argument names passed to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_values": { + "required": false, + "type": "array", + "description": "Extra post argument values passed to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_client": { + "required": false, + "type": "array", + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspect_jwt_tokens": { + "required": false, + "type": "boolean", + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "default": false + } + }, + { + "revocation_endpoint": { + "required": false, + "type": "string", + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint." + } + }, + { + "revocation_endpoint_auth_method": { + "required": false, + "type": "string", + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "end_session_endpoint": { + "required": false, + "type": "string", + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint." + } + }, + { + "userinfo_endpoint": { + "required": false, + "type": "string", + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint." + } + }, + { + "userinfo_accept": { + "type": "string", + "default": "application/json", + "required": false, + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "one_of": [ + "application/json", + "application/jwt" + ] + } + }, + { + "userinfo_headers_names": { + "required": false, + "type": "array", + "description": "Extra header names passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_headers_values": { + "required": false, + "type": "array", + "description": "Extra header values passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_headers_client": { + "required": false, + "type": "array", + "description": "Extra headers passed from the client to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_names": { + "required": false, + "type": "array", + "description": "Extra query argument names passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_values": { + "required": false, + "type": "array", + "description": "Extra query argument values passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_client": { + "required": false, + "type": "array", + "description": "Extra query arguments passed from the client to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_exchange_endpoint": { + "required": false, + "type": "string", + "description": "The token exchange endpoint." + } + }, + { + "session_secret": { + "referenceable": true, + "type": "string", + "required": false, + "description": "The session secret.", + "encrypted": true + } + }, + { + "session_audience": { + "required": false, + "type": "string", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "default": "default" + } + }, + { + "session_cookie_name": { + "required": false, + "type": "string", + "description": "The session cookie name.", + "default": "session" + } + }, + { + "session_remember": { + "required": false, + "type": "boolean", + "description": "Enables or disables persistent sessions.", + "default": false + } + }, + { + "session_remember_cookie_name": { + "required": false, + "type": "string", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "default": "remember" + } + }, + { + "session_remember_rolling_timeout": { + "required": false, + "type": "number", + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "default": 604800 + } + }, + { + "session_remember_absolute_timeout": { + "required": false, + "type": "number", + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "default": 2592000 + } + }, + { + "session_idling_timeout": { + "required": false, + "type": "number", + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "default": 900 + } + }, + { + "session_rolling_timeout": { + "required": false, + "type": "number", + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "default": 3600 + } + }, + { + "session_absolute_timeout": { + "required": false, + "type": "number", + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "default": 86400 + } + }, + { + "session_cookie_path": { + "type": "string", + "default": "/", + "starts_with": "/", + "required": false, + "description": "The session cookie Path flag.", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + }, + { + "session_cookie_domain": { + "required": false, + "type": "string", + "description": "The session cookie Domain flag." + } + }, + { + "session_cookie_same_site": { + "type": "string", + "default": "Lax", + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "session_cookie_http_only": { + "required": false, + "type": "boolean", + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "default": true + } + }, + { + "session_cookie_secure": { + "required": false, + "type": "boolean", + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks." + } + }, + { + "session_request_headers": { + "required": false, + "type": "set", + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "elements": { + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ], + "type": "string" + } + } + }, + { + "session_response_headers": { + "required": false, + "type": "set", + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "elements": { + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ], + "type": "string" + } + } + }, + { + "session_storage": { + "type": "string", + "default": "cookie", + "required": false, + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ] + } + }, + { + "session_store_metadata": { + "required": false, + "type": "boolean", + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "default": false + } + }, + { + "session_enforce_same_subject": { + "required": false, + "type": "boolean", + "description": "When set to `true`, audiences are forced to share the same subject.", + "default": false + } + }, + { + "session_hash_subject": { + "required": false, + "type": "boolean", + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "default": false + } + }, + { + "session_hash_storage_key": { + "required": false, + "type": "boolean", + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "default": false + } + }, + { + "session_memcached_prefix": { + "required": false, + "type": "string", + "description": "The memcached session key prefix." + } + }, + { + "session_memcached_socket": { + "required": false, + "type": "string", + "description": "The memcached unix socket path." + } + }, + { + "session_memcached_host": { + "required": false, + "type": "string", + "description": "The memcached host.", + "default": "127.0.0.1" + } + }, + { + "session_memcached_port": { + "type": "integer", + "default": 11211, + "between": [ + 0, + 65535 + ], + "required": false, + "description": "The memcached port." + } + }, + { + "session_redis_prefix": { + "required": false, + "type": "string", + "description": "The Redis session key prefix." + } + }, + { + "session_redis_socket": { + "required": false, + "type": "string", + "description": "The Redis unix socket path." + } + }, + { + "session_redis_host": { + "required": false, + "type": "string", + "description": "The Redis host.", + "default": "127.0.0.1" + } + }, + { + "session_redis_port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "required": false, + "description": "The Redis port." + } + }, + { + "session_redis_username": { + "referenceable": true, + "type": "string", + "description": "Username to use for Redis connection when the `redis` session storage is defined and ACL authentication is desired. If undefined, ACL authentication will not be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "required": false + } + }, + { + "session_redis_password": { + "referenceable": true, + "type": "string", + "required": false, + "description": "Password to use for Redis connection when the `redis` session storage is defined. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true + } + }, + { + "session_redis_connect_timeout": { + "required": false, + "type": "integer", + "description": "Session redis connection timeout in milliseconds." + } + }, + { + "session_redis_read_timeout": { + "required": false, + "type": "integer", + "description": "Session redis read timeout in milliseconds." + } + }, + { + "session_redis_send_timeout": { + "required": false, + "type": "integer", + "description": "Session redis send timeout in milliseconds." + } + }, + { + "session_redis_ssl": { + "required": false, + "type": "boolean", + "description": "Use SSL/TLS for Redis connection.", + "default": false + } + }, + { + "session_redis_ssl_verify": { + "required": false, + "type": "boolean", + "description": "Verify identity provider server certificate.", + "default": false + } + }, + { + "session_redis_server_name": { + "required": false, + "type": "string", + "description": "The SNI used for connecting the Redis server." + } + }, + { + "session_redis_cluster_nodes": { + "required": false, + "type": "array", + "description": "The Redis cluster node host. Takes an array of host records, with either `ip` or `host`, and `port` values.", + "elements": { + "fields": [ + { + "ip": { + "required": true, + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + } + ], + "type": "record" + } + } + }, + { + "session_redis_cluster_max_redirections": { + "required": false, + "type": "integer", + "description": "The Redis cluster maximum redirects." + } + }, + { + "reverify": { + "required": false, + "type": "boolean", + "description": "Specifies whether to always verify tokens stored in the session.", + "default": false + } + }, + { + "jwt_session_claim": { + "required": false, + "type": "string", + "description": "The claim to match against the JWT session cookie.", + "default": "sid" + } + }, + { + "jwt_session_cookie": { + "required": false, + "type": "string", + "description": "The name of the JWT session cookie." + } + }, + { + "bearer_token_param_type": { + "elements": { + "one_of": [ + "header", + "cookie", + "query", + "body" + ], + "type": "string" + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "required": false, + "description": "Where to look for the bearer token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`." + } + }, + { + "bearer_token_cookie_name": { + "required": false, + "type": "string", + "description": "The name of the cookie in which the bearer token is passed." + } + }, + { + "client_credentials_param_type": { + "elements": { + "one_of": [ + "header", + "query", + "body" + ], + "type": "string" + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "required": false, + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body." + } + }, + { + "password_param_type": { + "elements": { + "one_of": [ + "header", + "query", + "body" + ], + "type": "string" + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "required": false, + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body." + } + }, + { + "id_token_param_type": { + "elements": { + "one_of": [ + "header", + "query", + "body" + ], + "type": "string" + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "required": false, + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body." + } + }, + { + "id_token_param_name": { + "required": false, + "type": "string", + "description": "The name of the parameter used to pass the id token." + } + }, + { + "refresh_token_param_type": { + "elements": { + "one_of": [ + "header", + "query", + "body" + ], + "type": "string" + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "required": false, + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body." + } + }, + { + "refresh_token_param_name": { + "required": false, + "type": "string", + "description": "The name of the parameter used to pass the refresh token." + } + }, + { + "refresh_tokens": { + "required": false, + "type": "boolean", + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "default": true + } + }, + { + "upstream_headers_claims": { + "required": false, + "type": "array", + "description": "The upstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "upstream_headers_names": { + "required": false, + "type": "array", + "description": "The upstream header names for the claim values.", + "elements": { + "type": "string" + } + } + }, + { + "upstream_access_token_header": { + "required": false, + "type": "string", + "description": "The upstream access token header.", + "default": "authorization:bearer" + } + }, + { + "upstream_access_token_jwk_header": { + "required": false, + "type": "string", + "description": "The upstream access token JWK header." + } + }, + { + "upstream_id_token_header": { + "required": false, + "type": "string", + "description": "The upstream id token header." + } + }, + { + "upstream_id_token_jwk_header": { + "required": false, + "type": "string", + "description": "The upstream id token JWK header." + } + }, + { + "upstream_refresh_token_header": { + "required": false, + "type": "string", + "description": "The upstream refresh token header." + } + }, + { + "upstream_user_info_header": { + "required": false, + "type": "string", + "description": "The upstream user info header." + } + }, + { + "upstream_user_info_jwt_header": { + "required": false, + "type": "string", + "description": "The upstream user info JWT header (in case the user info returns a JWT response)." + } + }, + { + "upstream_introspection_header": { + "required": false, + "type": "string", + "description": "The upstream introspection header." + } + }, + { + "upstream_introspection_jwt_header": { + "required": false, + "type": "string", + "description": "The upstream introspection JWT header." + } + }, + { + "upstream_session_id_header": { + "required": false, + "type": "string", + "description": "The upstream session id header." + } + }, + { + "downstream_headers_claims": { + "required": false, + "type": "array", + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "downstream_headers_names": { + "required": false, + "type": "array", + "description": "The downstream header names for the claim values.", + "elements": { + "type": "string" + } + } + }, + { + "downstream_access_token_header": { + "required": false, + "type": "string", + "description": "The downstream access token header." + } + }, + { + "downstream_access_token_jwk_header": { + "required": false, + "type": "string", + "description": "The downstream access token JWK header." + } + }, + { + "downstream_id_token_header": { + "required": false, + "type": "string", + "description": "The downstream id token header." + } + }, + { + "downstream_id_token_jwk_header": { + "required": false, + "type": "string", + "description": "The downstream id token JWK header." + } + }, + { + "downstream_refresh_token_header": { + "required": false, + "type": "string", + "description": "The downstream refresh token header." + } + }, + { + "downstream_user_info_header": { + "required": false, + "type": "string", + "description": "The downstream user info header." + } + }, + { + "downstream_user_info_jwt_header": { + "required": false, + "type": "string", + "description": "The downstream user info JWT header (in case the user info returns a JWT response)." + } + }, + { + "downstream_introspection_header": { + "required": false, + "type": "string", + "description": "The downstream introspection header." + } + }, + { + "downstream_introspection_jwt_header": { + "required": false, + "type": "string", + "description": "The downstream introspection JWT header." + } + }, + { + "downstream_session_id_header": { + "required": false, + "type": "string", + "description": "The downstream session id header." + } + }, + { + "login_methods": { + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "type": "string" + }, + "type": "array", + "default": [ + "authorization_code" + ], + "required": false, + "description": "Enable login functionality with specified grants." + } + }, + { + "login_action": { + "type": "string", + "default": "upstream", + "required": false, + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "one_of": [ + "upstream", + "response", + "redirect" + ] + } + }, + { + "login_tokens": { + "elements": { + "one_of": [ + "id_token", + "access_token", + "refresh_token", + "tokens", + "introspection" + ], + "type": "string" + }, + "type": "array", + "default": [ + "id_token" + ], + "required": false, + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response." + } + }, + { + "login_redirect_mode": { + "type": "string", + "default": "fragment", + "required": false, + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "one_of": [ + "query", + "fragment" + ] + } + }, + { + "logout_query_arg": { + "required": false, + "type": "string", + "description": "The request query argument that activates the logout." + } + }, + { + "logout_post_arg": { + "required": false, + "type": "string", + "description": "The request body argument that activates the logout." + } + }, + { + "logout_uri_suffix": { + "required": false, + "type": "string", + "description": "The request URI suffix that activates the logout." + } + }, + { + "logout_methods": { + "elements": { + "one_of": [ + "POST", + "GET", + "DELETE" + ], + "type": "string" + }, + "type": "array", + "default": [ + "POST", + "DELETE" + ], + "required": false, + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method." + } + }, + { + "logout_revoke": { + "required": false, + "type": "boolean", + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "default": false + } + }, + { + "logout_revoke_access_token": { + "required": false, + "type": "boolean", + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "default": true + } + }, + { + "logout_revoke_refresh_token": { + "required": false, + "type": "boolean", + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "default": true + } + }, + { + "consumer_claim": { + "required": false, + "type": "array", + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "consumer_by": { + "elements": { + "one_of": [ + "id", + "username", + "custom_id" + ], + "type": "string" + }, + "type": "array", + "default": [ + "username", + "custom_id" + ], + "required": false, + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`." + } + }, + { + "consumer_optional": { + "required": false, + "type": "boolean", + "description": "Do not terminate the request if consumer mapping fails.", + "default": false + } + }, + { + "credential_claim": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "sub" + ], + "required": false, + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload." + } + }, + { + "anonymous": { + "required": false, + "type": "string", + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "run_on_preflight": { + "required": false, + "type": "boolean", + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "default": true + } + }, + { + "leeway": { + "required": false, + "type": "number", + "description": "Allow some leeway (in seconds) on the iat claim and ttl / expiry verification.", + "default": 0 + } + }, + { + "verify_parameters": { + "required": false, + "type": "boolean", + "description": "Verify plugin configuration against discovery.", + "default": false + } + }, + { + "verify_nonce": { + "required": false, + "type": "boolean", + "description": "Verify nonce on authorization code flow.", + "default": true + } + }, + { + "verify_claims": { + "required": false, + "type": "boolean", + "description": "Verify tokens for standard claims.", + "default": true + } + }, + { + "verify_signature": { + "required": false, + "type": "boolean", + "description": "Verify signature of tokens.", + "default": true + } + }, + { + "ignore_signature": { + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token", + "session", + "introspection", + "userinfo" + ], + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": false, + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication." + } + }, + { + "enable_hs_signatures": { + "required": false, + "type": "boolean", + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "default": false + } + }, + { + "disable_session": { + "required": false, + "type": "array", + "description": "Disable issuing the session cookie with the specified grants.", + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "type": "string" + } + } + }, + { + "cache_ttl": { + "required": false, + "type": "number", + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "default": 3600 + } + }, + { + "cache_ttl_max": { + "required": false, + "type": "number", + "description": "The maximum cache ttl in seconds (enforced)." + } + }, + { + "cache_ttl_min": { + "required": false, + "type": "number", + "description": "The minimum cache ttl in seconds (enforced)." + } + }, + { + "cache_ttl_neg": { + "required": false, + "type": "number", + "description": "The negative cache ttl in seconds." + } + }, + { + "cache_ttl_resurrect": { + "required": false, + "type": "number", + "description": "The resurrection ttl in seconds." + } + }, + { + "cache_tokens": { + "required": false, + "type": "boolean", + "description": "Cache the token endpoint requests.", + "default": true + } + }, + { + "cache_tokens_salt": { + "auto": true, + "type": "string", + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "required": false + } + }, + { + "cache_introspection": { + "required": false, + "type": "boolean", + "description": "Cache the introspection endpoint requests.", + "default": true + } + }, + { + "cache_token_exchange": { + "required": false, + "type": "boolean", + "description": "Cache the token exchange endpoint requests.", + "default": true + } + }, + { + "cache_user_info": { + "required": false, + "type": "boolean", + "description": "Cache the user info requests.", + "default": true + } + }, + { + "search_user_info": { + "required": false, + "type": "boolean", + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "default": false + } + }, + { + "hide_credentials": { + "required": false, + "type": "boolean", + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "default": false + } + }, + { + "http_version": { + "required": false, + "type": "number", + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0." + } + }, + { + "http_proxy": { + "required": false, + "type": "string", + "description": "The HTTP proxy." + } + }, + { + "http_proxy_authorization": { + "required": false, + "type": "string", + "description": "The HTTP proxy authorization." + } + }, + { + "https_proxy": { + "required": false, + "type": "string", + "description": "The HTTPS proxy." + } + }, + { + "https_proxy_authorization": { + "required": false, + "type": "string", + "description": "The HTTPS proxy authorization." + } + }, + { + "no_proxy": { + "required": false, + "type": "string", + "description": "Do not use proxy with these hosts." + } + }, + { + "keepalive": { + "required": false, + "type": "boolean", + "description": "Use keepalive with the HTTP client.", + "default": true + } + }, + { + "ssl_verify": { + "required": false, + "type": "boolean", + "description": "Verify identity provider server certificate.", + "default": false + } + }, + { + "timeout": { + "required": false, + "type": "number", + "description": "Network IO timeout in milliseconds.", + "default": 10000 + } + }, + { + "display_errors": { + "required": false, + "type": "boolean", + "description": "Display errors on failure responses.", + "default": false + } + }, + { + "by_username_ignore_case": { + "required": false, + "type": "boolean", + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "default": false + } + }, + { + "resolve_distributed_claims": { + "required": false, + "type": "boolean", + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "default": false + } + }, + { + "expose_error_code": { + "type": "boolean", + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "default": true + } + }, + { + "token_cache_key_include_scope": { + "type": "boolean", + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "default": false + } + }, + { + "introspection_token_param_name": { + "required": false, + "type": "string", + "description": "Designate token's parameter name for introspection.", + "default": "token" + } + }, + { + "revocation_token_param_name": { + "required": false, + "type": "string", + "description": "Designate token's parameter name for revocation.", + "default": "token" + } + }, + { + "proof_of_possession_mtls": { + "type": "string", + "default": "off", + "required": false, + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "one_of": [ + "off", + "strict", + "optional" + ] + } + }, + { + "proof_of_possession_auth_methods_validation": { + "required": false, + "type": "boolean", + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "default": true + } + }, + { + "tls_client_auth_cert_id": { + "type": "string", + "uuid": true, + "auto": false, + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "required": false + } + }, + { + "tls_client_auth_ssl_verify": { + "required": false, + "type": "boolean", + "description": "Verify identity provider server certificate during mTLS client authentication.", + "default": true + } + }, + { + "mtls_token_endpoint": { + "required": false, + "type": "string", + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint." + } + }, + { + "mtls_introspection_endpoint": { + "required": false, + "type": "string", + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint." + } + }, + { + "mtls_revocation_endpoint": { + "required": false, + "type": "string", + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint." + } + } + ] + } + } + ], + "type": "record" + } + } + } + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/konnect-application-auth/3.7.x.json b/schemas/konnect-application-auth/3.7.x.json new file mode 100644 index 00000000..64fa1dc3 --- /dev/null +++ b/schemas/konnect-application-auth/3.7.x.json @@ -0,0 +1,2624 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "key_names": { + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "required": true, + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "type": "array", + "default": [ + "apikey" + ] + } + }, + { + "auth_type": { + "default": "openid-connect", + "required": true, + "description": "The type of authentication to be performed. Possible values are: 'openid-connect', 'key-auth', 'v2-strategies'.", + "type": "string", + "one_of": [ + "openid-connect", + "key-auth", + "v2-strategies" + ] + } + }, + { + "scope": { + "required": true, + "type": "string", + "description": "The unique scope identifier for the plugin configuration.", + "unique": true + } + }, + { + "v2_strategies": { + "type": "record", + "fields": [ + { + "key_auth": { + "required": false, + "elements": { + "type": "record", + "fields": [ + { + "strategy_id": { + "required": true, + "type": "string", + "description": "The strategy id the config is tied to." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "key_names": { + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "required": true, + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "type": "array", + "default": [ + "apikey" + ] + } + } + ] + } + } + ] + }, + "type": "array", + "description": "List of key_auth strategies." + } + }, + { + "openid_connect": { + "required": false, + "elements": { + "type": "record", + "fields": [ + { + "strategy_id": { + "required": true, + "type": "string", + "description": "The strategy id the config is tied to." + } + }, + { + "config": { + "fields": [ + { + "issuer": { + "required": true, + "type": "string", + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`." + } + }, + { + "using_pseudo_issuer": { + "required": false, + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "type": "boolean", + "default": false + } + }, + { + "discovery_headers_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra header names passed to the discovery endpoint.", + "type": "array" + } + }, + { + "discovery_headers_values": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra header values passed to the discovery endpoint.", + "type": "array" + } + }, + { + "extra_jwks_uris": { + "required": false, + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "type": "set" + } + }, + { + "rediscovery_lifetime": { + "required": false, + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "type": "number", + "default": 30 + } + }, + { + "auth_methods": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "description": "Types of credentials/grants to enable.", + "default": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + } + }, + { + "client_id": { + "encrypted": true, + "required": false, + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.", + "type": "array" + } + }, + { + "client_secret": { + "encrypted": true, + "required": false, + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "The client secret.", + "type": "array" + } + }, + { + "client_auth": { + "required": false, + "elements": { + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + }, + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "type": "array" + } + }, + { + "client_jwk": { + "required": false, + "elements": { + "required": false, + "type": "record", + "fields": [ + { + "issuer": { + "type": "string", + "required": false + } + }, + { + "kty": { + "type": "string", + "required": false + } + }, + { + "use": { + "type": "string", + "required": false + } + }, + { + "key_ops": { + "required": false, + "elements": { + "type": "string", + "required": false + }, + "type": "array" + } + }, + { + "alg": { + "type": "string", + "required": false + } + }, + { + "kid": { + "type": "string", + "required": false + } + }, + { + "x5u": { + "type": "string", + "required": false + } + }, + { + "x5c": { + "required": false, + "elements": { + "type": "string", + "required": false + }, + "type": "array" + } + }, + { + "x5t": { + "type": "string", + "required": false + } + }, + { + "x5t#S256": { + "type": "string", + "required": false + } + }, + { + "k": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "x": { + "type": "string", + "required": false + } + }, + { + "y": { + "type": "string", + "required": false + } + }, + { + "crv": { + "type": "string", + "required": false + } + }, + { + "n": { + "type": "string", + "required": false + } + }, + { + "e": { + "type": "string", + "required": false + } + }, + { + "d": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "p": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "q": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "dp": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "dq": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "qi": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "oth": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "r": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "t": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + } + ] + }, + "description": "The JWK used for the private_key_jwt authentication.", + "type": "array" + } + }, + { + "client_alg": { + "required": false, + "elements": { + "type": "string", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ] + }, + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "type": "array" + } + }, + { + "client_arg": { + "required": false, + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "type": "string", + "default": "client_id" + } + }, + { + "redirect_uri": { + "required": false, + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "The redirect URI passed to the authorization and token endpoints.", + "type": "array" + } + }, + { + "login_redirect_uri": { + "required": false, + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "referenceable": true + }, + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "type": "array" + } + }, + { + "logout_redirect_uri": { + "required": false, + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "referenceable": true + }, + "description": "Where to redirect the client after the logout.", + "type": "array" + } + }, + { + "forbidden_redirect_uri": { + "required": false, + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "Where to redirect the client on forbidden requests.", + "type": "array" + } + }, + { + "forbidden_error_message": { + "required": false, + "description": "The error message for the forbidden requests (when not using the redirection).", + "type": "string", + "default": "Forbidden" + } + }, + { + "forbidden_destroy_session": { + "required": false, + "description": "Destroy any active session for the forbidden requests.", + "type": "boolean", + "default": true + } + }, + { + "unauthorized_destroy_session": { + "required": false, + "description": "Destroy any active session for the unauthorized requests.", + "type": "boolean", + "default": true + } + }, + { + "unauthorized_redirect_uri": { + "required": false, + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "Where to redirect the client on unauthorized requests.", + "type": "array" + } + }, + { + "unauthorized_error_message": { + "required": false, + "description": "The error message for the unauthorized requests (when not using the redirection).", + "type": "string", + "default": "Unauthorized" + } + }, + { + "unexpected_redirect_uri": { + "required": false, + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "type": "array" + } + }, + { + "response_mode": { + "default": "query", + "required": false, + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "type": "string", + "one_of": [ + "query", + "form_post", + "fragment", + "query.jwt", + "form_post.jwt", + "fragment.jwt", + "jwt" + ] + } + }, + { + "response_type": { + "type": "array", + "required": false, + "elements": { + "type": "string" + }, + "description": "The response type passed to the authorization endpoint.", + "default": [ + "code" + ] + } + }, + { + "scopes": { + "type": "array", + "required": false, + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "The scopes passed to the authorization and token endpoints.", + "default": [ + "openid" + ] + } + }, + { + "audience": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The audience passed to the authorization endpoint.", + "type": "array" + } + }, + { + "issuers_allowed": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "type": "array" + } + }, + { + "scopes_required": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array" + } + }, + { + "scopes_claim": { + "type": "array", + "required": false, + "elements": { + "type": "string" + }, + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "scope" + ] + } + }, + { + "audience_required": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array" + } + }, + { + "audience_claim": { + "type": "array", + "required": false, + "elements": { + "type": "string" + }, + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "aud" + ] + } + }, + { + "groups_required": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array" + } + }, + { + "groups_claim": { + "type": "array", + "required": false, + "elements": { + "type": "string" + }, + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "groups" + ] + } + }, + { + "roles_required": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array" + } + }, + { + "roles_claim": { + "type": "array", + "required": false, + "elements": { + "type": "string" + }, + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "roles" + ] + } + }, + { + "domains": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The allowed values for the `hd` claim.", + "type": "array" + } + }, + { + "max_age": { + "required": false, + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number" + } + }, + { + "authenticated_groups_claim": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array" + } + }, + { + "pushed_authorization_request_endpoint": { + "required": false, + "type": "string", + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint." + } + }, + { + "pushed_authorization_request_endpoint_auth_method": { + "required": false, + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "require_pushed_authorization_requests": { + "required": false, + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean" + } + }, + { + "require_proof_key_for_code_exchange": { + "required": false, + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean" + } + }, + { + "require_signed_request_object": { + "required": false, + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean" + } + }, + { + "authorization_endpoint": { + "required": false, + "type": "string", + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint." + } + }, + { + "authorization_query_args_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra query argument names passed to the authorization endpoint.", + "type": "array" + } + }, + { + "authorization_query_args_values": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra query argument values passed to the authorization endpoint.", + "type": "array" + } + }, + { + "authorization_query_args_client": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "type": "array" + } + }, + { + "authorization_rolling_timeout": { + "required": false, + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number", + "default": 600 + } + }, + { + "authorization_cookie_name": { + "required": false, + "description": "The authorization cookie name.", + "type": "string", + "default": "authorization" + } + }, + { + "authorization_cookie_path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "description": "The authorization cookie Path flag.", + "required": false, + "type": "string", + "starts_with": "/", + "default": "/" + } + }, + { + "authorization_cookie_domain": { + "required": false, + "description": "The authorization cookie Domain flag.", + "type": "string" + } + }, + { + "authorization_cookie_same_site": { + "default": "Default", + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "type": "string", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "authorization_cookie_http_only": { + "required": false, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean", + "default": true + } + }, + { + "authorization_cookie_secure": { + "required": false, + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + } + }, + { + "preserve_query_args": { + "required": false, + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "type": "boolean", + "default": false + } + }, + { + "token_endpoint": { + "required": false, + "type": "string", + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint." + } + }, + { + "token_endpoint_auth_method": { + "required": false, + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "token_headers_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra header names passed to the token endpoint.", + "type": "array" + } + }, + { + "token_headers_values": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra header values passed to the token endpoint.", + "type": "array" + } + }, + { + "token_headers_client": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra headers passed from the client to the token endpoint.", + "type": "array" + } + }, + { + "token_headers_replay": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The names of token endpoint response headers to forward to the downstream client.", + "type": "array" + } + }, + { + "token_headers_prefix": { + "required": false, + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string" + } + }, + { + "token_headers_grants": { + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token" + ] + }, + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "type": "array" + } + }, + { + "token_post_args_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra post argument names passed to the token endpoint.", + "type": "array" + } + }, + { + "token_post_args_values": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra post argument values passed to the token endpoint.", + "type": "array" + } + }, + { + "token_post_args_client": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "type": "array" + } + }, + { + "introspection_endpoint": { + "required": false, + "type": "string", + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint." + } + }, + { + "introspection_endpoint_auth_method": { + "required": false, + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "introspection_hint": { + "required": false, + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "type": "string", + "default": "access_token" + } + }, + { + "introspection_check_active": { + "required": false, + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "type": "boolean", + "default": true + } + }, + { + "introspection_accept": { + "default": "application/json", + "required": false, + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "type": "string", + "one_of": [ + "application/json", + "application/token-introspection+jwt", + "application/jwt" + ] + } + }, + { + "introspection_headers_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra header names passed to the introspection endpoint.", + "type": "array" + } + }, + { + "introspection_headers_values": { + "encrypted": true, + "required": false, + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "Extra header values passed to the introspection endpoint.", + "type": "array" + } + }, + { + "introspection_headers_client": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra headers passed from the client to the introspection endpoint.", + "type": "array" + } + }, + { + "introspection_post_args_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra post argument names passed to the introspection endpoint.", + "type": "array" + } + }, + { + "introspection_post_args_values": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra post argument values passed to the introspection endpoint.", + "type": "array" + } + }, + { + "introspection_post_args_client": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "type": "array" + } + }, + { + "introspect_jwt_tokens": { + "required": false, + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "type": "boolean", + "default": false + } + }, + { + "revocation_endpoint": { + "required": false, + "type": "string", + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint." + } + }, + { + "revocation_endpoint_auth_method": { + "required": false, + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "end_session_endpoint": { + "required": false, + "type": "string", + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint." + } + }, + { + "userinfo_endpoint": { + "required": false, + "type": "string", + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint." + } + }, + { + "userinfo_accept": { + "default": "application/json", + "required": false, + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "type": "string", + "one_of": [ + "application/json", + "application/jwt" + ] + } + }, + { + "userinfo_headers_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra header names passed to the user info endpoint.", + "type": "array" + } + }, + { + "userinfo_headers_values": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra header values passed to the user info endpoint.", + "type": "array" + } + }, + { + "userinfo_headers_client": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra headers passed from the client to the user info endpoint.", + "type": "array" + } + }, + { + "userinfo_query_args_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra query argument names passed to the user info endpoint.", + "type": "array" + } + }, + { + "userinfo_query_args_values": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra query argument values passed to the user info endpoint.", + "type": "array" + } + }, + { + "userinfo_query_args_client": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra query arguments passed from the client to the user info endpoint.", + "type": "array" + } + }, + { + "token_exchange_endpoint": { + "required": false, + "type": "string", + "description": "The token exchange endpoint." + } + }, + { + "session_secret": { + "encrypted": true, + "referenceable": true, + "required": false, + "description": "The session secret.", + "type": "string" + } + }, + { + "session_audience": { + "required": false, + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string", + "default": "default" + } + }, + { + "session_cookie_name": { + "required": false, + "description": "The session cookie name.", + "type": "string", + "default": "session" + } + }, + { + "session_remember": { + "required": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean", + "default": false + } + }, + { + "session_remember_cookie_name": { + "required": false, + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string", + "default": "remember" + } + }, + { + "session_remember_rolling_timeout": { + "required": false, + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "type": "number", + "default": 604800 + } + }, + { + "session_remember_absolute_timeout": { + "required": false, + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number", + "default": 2592000 + } + }, + { + "session_idling_timeout": { + "required": false, + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "type": "number", + "default": 900 + } + }, + { + "session_rolling_timeout": { + "required": false, + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number", + "default": 3600 + } + }, + { + "session_absolute_timeout": { + "required": false, + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number", + "default": 86400 + } + }, + { + "session_cookie_path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "description": "The session cookie Path flag.", + "required": false, + "type": "string", + "starts_with": "/", + "default": "/" + } + }, + { + "session_cookie_domain": { + "required": false, + "description": "The session cookie Domain flag.", + "type": "string" + } + }, + { + "session_cookie_same_site": { + "default": "Lax", + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "type": "string", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "session_cookie_http_only": { + "required": false, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean", + "default": true + } + }, + { + "session_cookie_secure": { + "required": false, + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + } + }, + { + "session_request_headers": { + "required": false, + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "type": "set" + } + }, + { + "session_response_headers": { + "required": false, + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "type": "set" + } + }, + { + "session_storage": { + "default": "cookie", + "required": false, + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "type": "string", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ] + } + }, + { + "session_store_metadata": { + "required": false, + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "type": "boolean", + "default": false + } + }, + { + "session_enforce_same_subject": { + "required": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean", + "default": false + } + }, + { + "session_hash_subject": { + "required": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean", + "default": false + } + }, + { + "session_hash_storage_key": { + "required": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean", + "default": false + } + }, + { + "session_memcached_prefix": { + "required": false, + "description": "The memcached session key prefix.", + "type": "string" + } + }, + { + "session_memcached_socket": { + "required": false, + "description": "The memcached unix socket path.", + "type": "string" + } + }, + { + "session_memcached_host": { + "required": false, + "description": "The memcached host.", + "type": "string", + "default": "127.0.0.1" + } + }, + { + "session_memcached_port": { + "default": 11211, + "required": false, + "description": "The memcached port.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "session_redis_prefix": { + "required": false, + "description": "The Redis session key prefix.", + "type": "string" + } + }, + { + "session_redis_socket": { + "required": false, + "description": "The Redis unix socket path.", + "type": "string" + } + }, + { + "session_redis_host": { + "required": false, + "description": "The Redis host.", + "type": "string", + "default": "127.0.0.1" + } + }, + { + "session_redis_port": { + "default": 6379, + "required": false, + "description": "The Redis port.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "session_redis_username": { + "required": false, + "description": "Username to use for Redis connection when the `redis` session storage is defined and ACL authentication is desired. If undefined, ACL authentication will not be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "session_redis_password": { + "encrypted": true, + "referenceable": true, + "required": false, + "description": "Password to use for Redis connection when the `redis` session storage is defined. If undefined, no AUTH commands are sent to Redis.", + "type": "string" + } + }, + { + "session_redis_connect_timeout": { + "required": false, + "description": "Session redis connection timeout in milliseconds.", + "type": "integer" + } + }, + { + "session_redis_read_timeout": { + "required": false, + "description": "Session redis read timeout in milliseconds.", + "type": "integer" + } + }, + { + "session_redis_send_timeout": { + "required": false, + "description": "Session redis send timeout in milliseconds.", + "type": "integer" + } + }, + { + "session_redis_ssl": { + "required": false, + "description": "Use SSL/TLS for Redis connection.", + "type": "boolean", + "default": false + } + }, + { + "session_redis_ssl_verify": { + "required": false, + "description": "Verify identity provider server certificate.", + "type": "boolean", + "default": false + } + }, + { + "session_redis_server_name": { + "required": false, + "description": "The SNI used for connecting the Redis server.", + "type": "string" + } + }, + { + "session_redis_cluster_nodes": { + "required": false, + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "required": true, + "type": "string", + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + } + ] + }, + "description": "The Redis cluster node host. Takes an array of host records, with either `ip` or `host`, and `port` values.", + "type": "array" + } + }, + { + "session_redis_cluster_max_redirections": { + "required": false, + "description": "The Redis cluster maximum redirects.", + "type": "integer" + } + }, + { + "reverify": { + "required": false, + "description": "Specifies whether to always verify tokens stored in the session.", + "type": "boolean", + "default": false + } + }, + { + "jwt_session_claim": { + "required": false, + "description": "The claim to match against the JWT session cookie.", + "type": "string", + "default": "sid" + } + }, + { + "jwt_session_cookie": { + "required": false, + "description": "The name of the JWT session cookie.", + "type": "string" + } + }, + { + "bearer_token_param_type": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "cookie", + "query", + "body" + ] + }, + "description": "Where to look for the bearer token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "bearer_token_cookie_name": { + "required": false, + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string" + } + }, + { + "client_credentials_param_type": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "password_param_type": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "id_token_param_type": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "id_token_param_name": { + "required": false, + "description": "The name of the parameter used to pass the id token.", + "type": "string" + } + }, + { + "refresh_token_param_type": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "refresh_token_param_name": { + "required": false, + "description": "The name of the parameter used to pass the refresh token.", + "type": "string" + } + }, + { + "refresh_tokens": { + "required": false, + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "type": "boolean", + "default": true + } + }, + { + "upstream_headers_claims": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The upstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array" + } + }, + { + "upstream_headers_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The upstream header names for the claim values.", + "type": "array" + } + }, + { + "upstream_access_token_header": { + "required": false, + "description": "The upstream access token header.", + "type": "string", + "default": "authorization:bearer" + } + }, + { + "upstream_access_token_jwk_header": { + "required": false, + "description": "The upstream access token JWK header.", + "type": "string" + } + }, + { + "upstream_id_token_header": { + "required": false, + "description": "The upstream id token header.", + "type": "string" + } + }, + { + "upstream_id_token_jwk_header": { + "required": false, + "description": "The upstream id token JWK header.", + "type": "string" + } + }, + { + "upstream_refresh_token_header": { + "required": false, + "description": "The upstream refresh token header.", + "type": "string" + } + }, + { + "upstream_user_info_header": { + "required": false, + "description": "The upstream user info header.", + "type": "string" + } + }, + { + "upstream_user_info_jwt_header": { + "required": false, + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + } + }, + { + "upstream_introspection_header": { + "required": false, + "description": "The upstream introspection header.", + "type": "string" + } + }, + { + "upstream_introspection_jwt_header": { + "required": false, + "description": "The upstream introspection JWT header.", + "type": "string" + } + }, + { + "upstream_session_id_header": { + "required": false, + "description": "The upstream session id header.", + "type": "string" + } + }, + { + "downstream_headers_claims": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array" + } + }, + { + "downstream_headers_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The downstream header names for the claim values.", + "type": "array" + } + }, + { + "downstream_access_token_header": { + "required": false, + "description": "The downstream access token header.", + "type": "string" + } + }, + { + "downstream_access_token_jwk_header": { + "required": false, + "description": "The downstream access token JWK header.", + "type": "string" + } + }, + { + "downstream_id_token_header": { + "required": false, + "description": "The downstream id token header.", + "type": "string" + } + }, + { + "downstream_id_token_jwk_header": { + "required": false, + "description": "The downstream id token JWK header.", + "type": "string" + } + }, + { + "downstream_refresh_token_header": { + "required": false, + "description": "The downstream refresh token header.", + "type": "string" + } + }, + { + "downstream_user_info_header": { + "required": false, + "description": "The downstream user info header.", + "type": "string" + } + }, + { + "downstream_user_info_jwt_header": { + "required": false, + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + } + }, + { + "downstream_introspection_header": { + "required": false, + "description": "The downstream introspection header.", + "type": "string" + } + }, + { + "downstream_introspection_jwt_header": { + "required": false, + "description": "The downstream introspection JWT header.", + "type": "string" + } + }, + { + "downstream_session_id_header": { + "required": false, + "description": "The downstream session id header.", + "type": "string" + } + }, + { + "login_methods": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "description": "Enable login functionality with specified grants.", + "default": [ + "authorization_code" + ] + } + }, + { + "login_action": { + "default": "upstream", + "required": false, + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "type": "string", + "one_of": [ + "upstream", + "response", + "redirect" + ] + } + }, + { + "login_tokens": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "id_token", + "access_token", + "refresh_token", + "tokens", + "introspection" + ] + }, + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "default": [ + "id_token" + ] + } + }, + { + "login_redirect_mode": { + "default": "fragment", + "required": false, + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "type": "string", + "one_of": [ + "query", + "fragment" + ] + } + }, + { + "logout_query_arg": { + "required": false, + "description": "The request query argument that activates the logout.", + "type": "string" + } + }, + { + "logout_post_arg": { + "required": false, + "description": "The request body argument that activates the logout.", + "type": "string" + } + }, + { + "logout_uri_suffix": { + "required": false, + "description": "The request URI suffix that activates the logout.", + "type": "string" + } + }, + { + "logout_methods": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "POST", + "GET", + "DELETE" + ] + }, + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "default": [ + "POST", + "DELETE" + ] + } + }, + { + "logout_revoke": { + "required": false, + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "type": "boolean", + "default": false + } + }, + { + "logout_revoke_access_token": { + "required": false, + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean", + "default": true + } + }, + { + "logout_revoke_refresh_token": { + "required": false, + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean", + "default": true + } + }, + { + "consumer_claim": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array" + } + }, + { + "consumer_by": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "consumer_optional": { + "required": false, + "description": "Do not terminate the request if consumer mapping fails.", + "type": "boolean", + "default": false + } + }, + { + "credential_claim": { + "type": "array", + "required": false, + "elements": { + "type": "string" + }, + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "sub" + ] + } + }, + { + "anonymous": { + "required": false, + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "run_on_preflight": { + "required": false, + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "type": "boolean", + "default": true + } + }, + { + "leeway": { + "required": false, + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "type": "number", + "default": 0 + } + }, + { + "verify_parameters": { + "required": false, + "description": "Verify plugin configuration against discovery.", + "type": "boolean", + "default": false + } + }, + { + "verify_nonce": { + "required": false, + "description": "Verify nonce on authorization code flow.", + "type": "boolean", + "default": true + } + }, + { + "verify_claims": { + "required": false, + "description": "Verify tokens for standard claims.", + "type": "boolean", + "default": true + } + }, + { + "verify_signature": { + "required": false, + "description": "Verify signature of tokens.", + "type": "boolean", + "default": true + } + }, + { + "ignore_signature": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token", + "session", + "introspection", + "userinfo" + ] + }, + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "default": [ + + ] + } + }, + { + "enable_hs_signatures": { + "required": false, + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "type": "boolean", + "default": false + } + }, + { + "disable_session": { + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "description": "Disable issuing the session cookie with the specified grants.", + "type": "array" + } + }, + { + "cache_ttl": { + "required": false, + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "type": "number", + "default": 3600 + } + }, + { + "cache_ttl_max": { + "required": false, + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number" + } + }, + { + "cache_ttl_min": { + "required": false, + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number" + } + }, + { + "cache_ttl_neg": { + "required": false, + "description": "The negative cache ttl in seconds.", + "type": "number" + } + }, + { + "cache_ttl_resurrect": { + "required": false, + "description": "The resurrection ttl in seconds.", + "type": "number" + } + }, + { + "cache_tokens": { + "required": false, + "description": "Cache the token endpoint requests.", + "type": "boolean", + "default": true + } + }, + { + "cache_tokens_salt": { + "required": false, + "auto": true, + "type": "string", + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests." + } + }, + { + "cache_introspection": { + "required": false, + "description": "Cache the introspection endpoint requests.", + "type": "boolean", + "default": true + } + }, + { + "cache_token_exchange": { + "required": false, + "description": "Cache the token exchange endpoint requests.", + "type": "boolean", + "default": true + } + }, + { + "cache_user_info": { + "required": false, + "description": "Cache the user info requests.", + "type": "boolean", + "default": true + } + }, + { + "search_user_info": { + "required": false, + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "type": "boolean", + "default": false + } + }, + { + "hide_credentials": { + "required": false, + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "type": "boolean", + "default": false + } + }, + { + "http_version": { + "required": false, + "type": "number", + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "default": 1.1 + } + }, + { + "http_proxy": { + "required": false, + "type": "string", + "description": "The HTTP proxy." + } + }, + { + "http_proxy_authorization": { + "required": false, + "description": "The HTTP proxy authorization.", + "type": "string" + } + }, + { + "https_proxy": { + "required": false, + "type": "string", + "description": "The HTTPS proxy." + } + }, + { + "https_proxy_authorization": { + "required": false, + "description": "The HTTPS proxy authorization.", + "type": "string" + } + }, + { + "no_proxy": { + "required": false, + "description": "Do not use proxy with these hosts.", + "type": "string" + } + }, + { + "keepalive": { + "required": false, + "description": "Use keepalive with the HTTP client.", + "type": "boolean", + "default": true + } + }, + { + "ssl_verify": { + "required": false, + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "type": "boolean", + "default": false + } + }, + { + "timeout": { + "required": false, + "description": "Network IO timeout in milliseconds.", + "type": "number", + "default": 10000 + } + }, + { + "display_errors": { + "required": false, + "description": "Display errors on failure responses.", + "type": "boolean", + "default": false + } + }, + { + "by_username_ignore_case": { + "required": false, + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "type": "boolean", + "default": false + } + }, + { + "resolve_distributed_claims": { + "required": false, + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "type": "boolean", + "default": false + } + }, + { + "expose_error_code": { + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "type": "boolean", + "default": true + } + }, + { + "token_cache_key_include_scope": { + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean", + "default": false + } + }, + { + "introspection_token_param_name": { + "required": false, + "description": "Designate token's parameter name for introspection.", + "type": "string", + "default": "token" + } + }, + { + "revocation_token_param_name": { + "required": false, + "description": "Designate token's parameter name for revocation.", + "type": "string", + "default": "token" + } + }, + { + "proof_of_possession_mtls": { + "default": "off", + "required": false, + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "type": "string", + "one_of": [ + "off", + "strict", + "optional" + ] + } + }, + { + "proof_of_possession_auth_methods_validation": { + "required": false, + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "type": "boolean", + "default": true + } + }, + { + "tls_client_auth_cert_id": { + "uuid": true, + "required": false, + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "type": "string", + "auto": false + } + }, + { + "tls_client_auth_ssl_verify": { + "required": false, + "description": "Verify identity provider server certificate during mTLS client authentication.", + "type": "boolean", + "default": true + } + }, + { + "mtls_token_endpoint": { + "required": false, + "type": "string", + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint." + } + }, + { + "mtls_introspection_endpoint": { + "required": false, + "type": "string", + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint." + } + }, + { + "mtls_revocation_endpoint": { + "required": false, + "type": "string", + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint." + } + }, + { + "proof_of_possession_dpop": { + "default": "off", + "required": false, + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "type": "string", + "one_of": [ + "off", + "strict", + "optional" + ] + } + }, + { + "dpop_use_nonce": { + "required": false, + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "type": "boolean", + "default": false + } + }, + { + "dpop_proof_lifetime": { + "required": false, + "type": "number", + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "default": 300 + } + } + ], + "type": "record", + "description": "openid-connect plugin configuration." + } + } + ] + }, + "type": "array", + "description": "List of openid_connect strategies." + } + } + ], + "required": false, + "description": "The map of v2 strategies.", + "default": [ + + ] + } + } + ], + "entity_checks": [ + + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/konnect-application-auth/3.8.x.json b/schemas/konnect-application-auth/3.8.x.json new file mode 100644 index 00000000..3ab638a1 --- /dev/null +++ b/schemas/konnect-application-auth/3.8.x.json @@ -0,0 +1,3333 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "key_names": { + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "required": true, + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "type": "array", + "default": [ + "apikey" + ] + } + }, + { + "auth_type": { + "description": "The type of authentication to be performed. Possible values are: 'openid-connect', 'key-auth', 'v2-strategies'.", + "required": true, + "one_of": [ + "openid-connect", + "key-auth", + "v2-strategies" + ], + "type": "string", + "default": "openid-connect" + } + }, + { + "scope": { + "description": "The unique scope identifier for the plugin configuration.", + "unique": true, + "required": true, + "type": "string" + } + }, + { + "v2_strategies": { + "description": "The map of v2 strategies.", + "required": false, + "type": "record", + "fields": [ + { + "key_auth": { + "description": "List of key_auth strategies.", + "required": false, + "type": "array", + "elements": { + "fields": [ + { + "strategy_id": { + "description": "The strategy id the config is tied to.", + "required": true, + "type": "string" + } + }, + { + "config": { + "fields": [ + { + "key_names": { + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "required": true, + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "type": "array", + "default": [ + "apikey" + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record" + } + } + }, + { + "openid_connect": { + "description": "List of openid_connect strategies.", + "required": false, + "type": "array", + "elements": { + "fields": [ + { + "strategy_id": { + "description": "The strategy id the config is tied to.", + "required": true, + "type": "string" + } + }, + { + "config": { + "description": "openid-connect plugin configuration.", + "type": "record", + "fields": [ + { + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "required": true, + "type": "string" + } + }, + { + "using_pseudo_issuer": { + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "type": "set", + "required": false, + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "rediscovery_lifetime": { + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "type": "number", + "required": false, + "default": 30 + } + }, + { + "auth_methods": { + "description": "Types of credentials/grants to enable.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "type": "array", + "default": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + } + }, + { + "client_id": { + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.", + "required": false, + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "encrypted": true + } + }, + { + "client_secret": { + "description": "The client secret.", + "required": false, + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "encrypted": true + } + }, + { + "client_auth": { + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + } + }, + { + "client_jwk": { + "description": "The JWK used for the private_key_jwt authentication.", + "type": "array", + "required": false, + "elements": { + "fields": [ + { + "issuer": { + "required": false, + "type": "string" + } + }, + { + "kty": { + "required": false, + "type": "string" + } + }, + { + "use": { + "required": false, + "type": "string" + } + }, + { + "key_ops": { + "required": false, + "type": "array", + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "alg": { + "required": false, + "type": "string" + } + }, + { + "kid": { + "required": false, + "type": "string" + } + }, + { + "x5u": { + "required": false, + "type": "string" + } + }, + { + "x5c": { + "required": false, + "type": "array", + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "x5t": { + "required": false, + "type": "string" + } + }, + { + "x5t#S256": { + "required": false, + "type": "string" + } + }, + { + "k": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "x": { + "required": false, + "type": "string" + } + }, + { + "y": { + "required": false, + "type": "string" + } + }, + { + "crv": { + "required": false, + "type": "string" + } + }, + { + "n": { + "required": false, + "type": "string" + } + }, + { + "e": { + "required": false, + "type": "string" + } + }, + { + "d": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "p": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "q": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "dp": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "dq": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "qi": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "oth": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "r": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "t": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + } + ], + "type": "record", + "required": false + } + } + }, + { + "client_alg": { + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ] + } + } + }, + { + "client_arg": { + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "type": "string", + "required": false, + "default": "client_id" + } + }, + { + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "type": "array", + "required": false, + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "type": "array", + "required": false, + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string", + "referenceable": true + } + } + }, + { + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "type": "array", + "required": false, + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string", + "referenceable": true + } + } + }, + { + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "type": "array", + "required": false, + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "forbidden_error_message": { + "description": "The error message for the forbidden requests (when not using the redirection).", + "type": "string", + "required": false, + "default": "Forbidden" + } + }, + { + "forbidden_destroy_session": { + "description": "Destroy any active session for the forbidden requests.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "unauthorized_destroy_session": { + "description": "Destroy any active session for the unauthorized requests.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "type": "array", + "required": false, + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "unauthorized_error_message": { + "description": "The error message for the unauthorized requests (when not using the redirection).", + "type": "string", + "required": false, + "default": "Unauthorized" + } + }, + { + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "type": "array", + "required": false, + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "response_mode": { + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "required": false, + "one_of": [ + "query", + "form_post", + "fragment", + "query.jwt", + "form_post.jwt", + "fragment.jwt", + "jwt" + ], + "type": "string", + "default": "query" + } + }, + { + "response_type": { + "description": "The response type passed to the authorization endpoint.", + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "code" + ] + } + }, + { + "scopes": { + "description": "The scopes passed to the authorization and token endpoints.", + "required": false, + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "default": [ + "openid" + ] + } + }, + { + "audience": { + "description": "The audience passed to the authorization endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "scopes_claim": { + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "scope" + ] + } + }, + { + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "audience_claim": { + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "aud" + ] + } + }, + { + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "groups_claim": { + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "groups" + ] + } + }, + { + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "roles_claim": { + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "roles" + ] + } + }, + { + "domains": { + "description": "The allowed values for the `hd` claim.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number", + "required": false + } + }, + { + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "pushed_authorization_request_endpoint_auth_method": { + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "required": false, + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean", + "required": false + } + }, + { + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean", + "required": false + } + }, + { + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean", + "required": false + } + }, + { + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "authorization_rolling_timeout": { + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number", + "required": false, + "default": 600 + } + }, + { + "authorization_cookie_name": { + "description": "The authorization cookie name.", + "type": "string", + "required": false, + "default": "authorization" + } + }, + { + "authorization_cookie_path": { + "description": "The authorization cookie Path flag.", + "required": false, + "starts_with": "/", + "type": "string", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "default": "/" + } + }, + { + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string", + "required": false + } + }, + { + "authorization_cookie_same_site": { + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "required": false, + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "type": "string", + "default": "Default" + } + }, + { + "authorization_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean", + "required": false + } + }, + { + "preserve_query_args": { + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "required": false, + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string", + "required": false + } + }, + { + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token" + ] + } + } + }, + { + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "required": false, + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "introspection_hint": { + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "type": "string", + "required": false, + "default": "access_token" + } + }, + { + "introspection_check_active": { + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "introspection_accept": { + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "required": false, + "one_of": [ + "application/json", + "application/token-introspection+jwt", + "application/jwt" + ], + "type": "string", + "default": "application/json" + } + }, + { + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "introspection_headers_values": { + "description": "Extra header values passed to the introspection endpoint.", + "required": false, + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "encrypted": true + } + }, + { + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "introspect_jwt_tokens": { + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "required": false, + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "userinfo_accept": { + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "required": false, + "one_of": [ + "application/json", + "application/jwt" + ], + "type": "string", + "default": "application/json" + } + }, + { + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "required": false, + "type": "string" + } + }, + { + "session_secret": { + "description": "The session secret.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "session_audience": { + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string", + "required": false, + "default": "default" + } + }, + { + "session_cookie_name": { + "description": "The session cookie name.", + "type": "string", + "required": false, + "default": "session" + } + }, + { + "session_remember": { + "description": "Enables or disables persistent sessions.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "session_remember_cookie_name": { + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string", + "required": false, + "default": "remember" + } + }, + { + "session_remember_rolling_timeout": { + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "type": "number", + "required": false, + "default": 604800 + } + }, + { + "session_remember_absolute_timeout": { + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number", + "required": false, + "default": 2592000 + } + }, + { + "session_idling_timeout": { + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "type": "number", + "required": false, + "default": 900 + } + }, + { + "session_rolling_timeout": { + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number", + "required": false, + "default": 3600 + } + }, + { + "session_absolute_timeout": { + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number", + "required": false, + "default": 86400 + } + }, + { + "session_cookie_path": { + "description": "The session cookie Path flag.", + "required": false, + "starts_with": "/", + "type": "string", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "default": "/" + } + }, + { + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string", + "required": false + } + }, + { + "session_cookie_same_site": { + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "required": false, + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "type": "string", + "default": "Lax" + } + }, + { + "session_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean", + "required": false + } + }, + { + "session_request_headers": { + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "required": false, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "session_response_headers": { + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "required": false, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "session_storage": { + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "required": false, + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string", + "default": "cookie" + } + }, + { + "session_store_metadata": { + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "session_enforce_same_subject": { + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "session_hash_subject": { + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "session_hash_storage_key": { + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string", + "required": false + } + }, + { + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string", + "required": false + } + }, + { + "session_memcached_host": { + "description": "The memcached host.", + "type": "string", + "required": false, + "default": "127.0.0.1" + } + }, + { + "session_memcached_port": { + "description": "The memcached port.", + "required": false, + "between": [ + 0, + 65535 + ], + "type": "integer", + "default": 11211 + } + }, + { + "redis": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer", + "between": [ + 1, + 2147483646 + ], + "default": 256 + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer", + "default": 5 + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "prefix": { + "description": "The Redis session key prefix.", + "type": "string", + "required": false + } + }, + { + "socket": { + "description": "The Redis unix socket path.", + "type": "string", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_nodes" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_nodes" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_field": "connection_is_proxied", + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host" + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "translate_backwards": [ + "connect_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "required": true, + "type": "record" + } + }, + { + "reverify": { + "description": "Specifies whether to always verify tokens stored in the session.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "jwt_session_claim": { + "description": "The claim to match against the JWT session cookie.", + "type": "string", + "required": false, + "default": "sid" + } + }, + { + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string", + "required": false + } + }, + { + "bearer_token_param_type": { + "description": "Where to look for the bearer token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "cookie", + "query", + "body" + ] + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string", + "required": false + } + }, + { + "client_credentials_param_type": { + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "password_param_type": { + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "id_token_param_type": { + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string", + "required": false + } + }, + { + "refresh_token_param_type": { + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string", + "required": false + } + }, + { + "refresh_tokens": { + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "upstream_headers_claims": { + "description": "The upstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "upstream_access_token_header": { + "description": "The upstream access token header.", + "type": "string", + "required": false, + "default": "authorization:bearer" + } + }, + { + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string", + "required": false + } + }, + { + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string", + "required": false + } + }, + { + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string", + "required": false + } + }, + { + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string", + "required": false + } + }, + { + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string", + "required": false + } + }, + { + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string", + "required": false + } + }, + { + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string", + "required": false + } + }, + { + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "type": "string", + "required": false + } + }, + { + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string", + "required": false + } + }, + { + "downstream_headers_claims": { + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string", + "required": false + } + }, + { + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string", + "required": false + } + }, + { + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string", + "required": false + } + }, + { + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string", + "required": false + } + }, + { + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string", + "required": false + } + }, + { + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string", + "required": false + } + }, + { + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string", + "required": false + } + }, + { + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string", + "required": false + } + }, + { + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "type": "string", + "required": false + } + }, + { + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string", + "required": false + } + }, + { + "login_methods": { + "description": "Enable login functionality with specified grants.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "type": "array", + "default": [ + "authorization_code" + ] + } + }, + { + "login_action": { + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "required": false, + "one_of": [ + "upstream", + "response", + "redirect" + ], + "type": "string", + "default": "upstream" + } + }, + { + "login_tokens": { + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "id_token", + "access_token", + "refresh_token", + "tokens", + "introspection" + ] + }, + "type": "array", + "default": [ + "id_token" + ] + } + }, + { + "login_redirect_mode": { + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "required": false, + "one_of": [ + "query", + "fragment" + ], + "type": "string", + "default": "fragment" + } + }, + { + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string", + "required": false + } + }, + { + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string", + "required": false + } + }, + { + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string", + "required": false + } + }, + { + "logout_methods": { + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "POST", + "GET", + "DELETE" + ] + }, + "type": "array", + "default": [ + "POST", + "DELETE" + ] + } + }, + { + "logout_revoke": { + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "logout_revoke_access_token": { + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "logout_revoke_refresh_token": { + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "consumer_claim": { + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "consumer_by": { + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "type": "array", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "consumer_optional": { + "description": "Do not terminate the request if consumer mapping fails.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "credential_claim": { + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "sub" + ] + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string", + "required": false + } + }, + { + "run_on_preflight": { + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "leeway": { + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "type": "number", + "required": false, + "default": 0 + } + }, + { + "verify_parameters": { + "description": "Verify plugin configuration against discovery.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "verify_nonce": { + "description": "Verify nonce on authorization code flow.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "verify_claims": { + "description": "Verify tokens for standard claims.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "verify_signature": { + "description": "Verify signature of tokens.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "ignore_signature": { + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token", + "session", + "introspection", + "userinfo" + ] + }, + "type": "array", + "default": [ + + ] + } + }, + { + "enable_hs_signatures": { + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants.", + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + } + } + }, + { + "cache_ttl": { + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "type": "number", + "required": false, + "default": 3600 + } + }, + { + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number", + "required": false + } + }, + { + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number", + "required": false + } + }, + { + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number", + "required": false + } + }, + { + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number", + "required": false + } + }, + { + "cache_tokens": { + "description": "Cache the token endpoint requests.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "auto": true, + "type": "string", + "required": false + } + }, + { + "cache_introspection": { + "description": "Cache the introspection endpoint requests.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "cache_token_exchange": { + "description": "Cache the token exchange endpoint requests.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "cache_user_info": { + "description": "Cache the user info requests.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "search_user_info": { + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "hide_credentials": { + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "http_version": { + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "required": false, + "type": "number", + "default": 1.1 + } + }, + { + "http_proxy": { + "description": "The HTTP proxy.", + "required": false, + "type": "string" + } + }, + { + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.", + "type": "string", + "required": false + } + }, + { + "https_proxy": { + "description": "The HTTPS proxy.", + "required": false, + "type": "string" + } + }, + { + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.", + "type": "string", + "required": false + } + }, + { + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string", + "required": false + } + }, + { + "keepalive": { + "description": "Use keepalive with the HTTP client.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "ssl_verify": { + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "timeout": { + "description": "Network IO timeout in milliseconds.", + "type": "number", + "required": false, + "default": 10000 + } + }, + { + "display_errors": { + "description": "Display errors on failure responses.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "by_username_ignore_case": { + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "resolve_distributed_claims": { + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "expose_error_code": { + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "type": "boolean", + "default": true + } + }, + { + "token_cache_key_include_scope": { + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean", + "default": false + } + }, + { + "introspection_token_param_name": { + "description": "Designate token's parameter name for introspection.", + "type": "string", + "required": false, + "default": "token" + } + }, + { + "revocation_token_param_name": { + "description": "Designate token's parameter name for revocation.", + "type": "string", + "required": false, + "default": "token" + } + }, + { + "proof_of_possession_mtls": { + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "required": false, + "one_of": [ + "off", + "strict", + "optional" + ], + "type": "string", + "default": "off" + } + }, + { + "proof_of_possession_auth_methods_validation": { + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "tls_client_auth_cert_id": { + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "auto": false, + "type": "string", + "uuid": true, + "required": false + } + }, + { + "tls_client_auth_ssl_verify": { + "description": "Verify identity provider server certificate during mTLS client authentication.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "proof_of_possession_dpop": { + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "required": false, + "one_of": [ + "off", + "strict", + "optional" + ], + "type": "string", + "default": "off" + } + }, + { + "dpop_use_nonce": { + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "dpop_proof_lifetime": { + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "type": "number", + "required": false, + "default": 300 + } + }, + { + "claims_forbidden": { + "description": "If given, these claims are forbidden in the token payload.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "cluster_cache_strategy": { + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "required": false, + "one_of": [ + "off", + "redis" + ], + "type": "string", + "default": "off" + } + }, + { + "cluster_cache_redis": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer", + "between": [ + 1, + 2147483646 + ], + "default": 256 + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer", + "default": 5 + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean", + "default": false + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_nodes" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_nodes" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_field": "connection_is_proxied", + "if_match": { + "eq": true + }, + "then_field": "host", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "translate_backwards": [ + "connect_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + } + ] + } + } + ], + "type": "record" + } + } + } + ], + "default": [ + + ] + } + } + ], + "type": "record", + "entity_checks": [ + + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/konnect-application-auth/3.9.x.json b/schemas/konnect-application-auth/3.9.x.json new file mode 100644 index 00000000..e7763990 --- /dev/null +++ b/schemas/konnect-application-auth/3.9.x.json @@ -0,0 +1,3271 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + + ], + "fields": [ + { + "key_names": { + "required": true, + "type": "array", + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "default": [ + "apikey" + ] + } + }, + { + "auth_type": { + "required": true, + "type": "string", + "default": "openid-connect", + "description": "The type of authentication to be performed. Possible values are: 'openid-connect', 'key-auth', 'v2-strategies'.", + "one_of": [ + "openid-connect", + "key-auth", + "v2-strategies" + ] + } + }, + { + "scope": { + "required": true, + "description": "The unique scope identifier for the plugin configuration.", + "unique": true, + "type": "string" + } + }, + { + "v2_strategies": { + "required": false, + "type": "record", + "default": [ + + ], + "description": "The map of v2 strategies.", + "fields": [ + { + "key_auth": { + "elements": { + "type": "record", + "fields": [ + { + "strategy_id": { + "description": "The strategy id the config is tied to.", + "required": true, + "type": "string" + } + }, + { + "config": { + "type": "record", + "required": true, + "fields": [ + { + "key_names": { + "required": true, + "type": "array", + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "description": "The names of the headers containing the API key. You can specify multiple header names.", + "default": [ + "apikey" + ] + } + } + ] + } + } + ] + }, + "description": "List of key_auth strategies.", + "required": false, + "type": "array" + } + }, + { + "openid_connect": { + "elements": { + "type": "record", + "fields": [ + { + "strategy_id": { + "description": "The strategy id the config is tied to.", + "required": true, + "type": "string" + } + }, + { + "config": { + "description": "openid-connect plugin configuration.", + "type": "record", + "fields": [ + { + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "required": true, + "type": "string" + } + }, + { + "using_pseudo_issuer": { + "default": false, + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "required": false, + "type": "boolean" + } + }, + { + "discovery_headers_names": { + "elements": { + "type": "string" + }, + "description": "Extra header names passed to the discovery endpoint.", + "required": false, + "type": "array" + } + }, + { + "discovery_headers_values": { + "elements": { + "type": "string" + }, + "description": "Extra header values passed to the discovery endpoint.", + "required": false, + "type": "array" + } + }, + { + "extra_jwks_uris": { + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "required": false, + "type": "set" + } + }, + { + "rediscovery_lifetime": { + "default": 30, + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "required": false, + "type": "number" + } + }, + { + "auth_methods": { + "required": false, + "type": "array", + "default": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "description": "Types of credentials/grants to enable.", + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + } + } + }, + { + "client_id": { + "encrypted": true, + "required": false, + "type": "array", + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider." + } + }, + { + "client_secret": { + "encrypted": true, + "required": false, + "type": "array", + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "The client secret." + } + }, + { + "client_auth": { + "elements": { + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + }, + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "required": false, + "type": "array" + } + }, + { + "client_jwk": { + "elements": { + "type": "record", + "required": false, + "fields": [ + { + "issuer": { + "required": false, + "type": "string" + } + }, + { + "kty": { + "required": false, + "type": "string" + } + }, + { + "use": { + "required": false, + "type": "string" + } + }, + { + "key_ops": { + "elements": { + "required": false, + "type": "string" + }, + "required": false, + "type": "array" + } + }, + { + "alg": { + "required": false, + "type": "string" + } + }, + { + "kid": { + "required": false, + "type": "string" + } + }, + { + "x5u": { + "required": false, + "type": "string" + } + }, + { + "x5c": { + "elements": { + "required": false, + "type": "string" + }, + "required": false, + "type": "array" + } + }, + { + "x5t": { + "required": false, + "type": "string" + } + }, + { + "x5t#S256": { + "required": false, + "type": "string" + } + }, + { + "k": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "x": { + "required": false, + "type": "string" + } + }, + { + "y": { + "required": false, + "type": "string" + } + }, + { + "crv": { + "required": false, + "type": "string" + } + }, + { + "n": { + "required": false, + "type": "string" + } + }, + { + "e": { + "required": false, + "type": "string" + } + }, + { + "d": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "p": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "q": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "dp": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "dq": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "qi": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "oth": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "r": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "t": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + } + ] + }, + "description": "The JWK used for the private_key_jwt authentication.", + "required": false, + "type": "array" + } + }, + { + "client_alg": { + "elements": { + "type": "string", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ] + }, + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "required": false, + "type": "array" + } + }, + { + "client_arg": { + "default": "client_id", + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "required": false, + "type": "string" + } + }, + { + "redirect_uri": { + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "The redirect URI passed to the authorization and token endpoints.", + "required": false, + "type": "array" + } + }, + { + "login_redirect_uri": { + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "referenceable": true, + "type": "string" + }, + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "required": false, + "type": "array" + } + }, + { + "logout_redirect_uri": { + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "referenceable": true, + "type": "string" + }, + "description": "Where to redirect the client after the logout.", + "required": false, + "type": "array" + } + }, + { + "forbidden_redirect_uri": { + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "Where to redirect the client on forbidden requests.", + "required": false, + "type": "array" + } + }, + { + "forbidden_error_message": { + "default": "Forbidden", + "description": "The error message for the forbidden requests (when not using the redirection).", + "required": false, + "type": "string" + } + }, + { + "forbidden_destroy_session": { + "default": true, + "description": "Destroy any active session for the forbidden requests.", + "required": false, + "type": "boolean" + } + }, + { + "unauthorized_destroy_session": { + "default": true, + "description": "Destroy any active session for the unauthorized requests.", + "required": false, + "type": "boolean" + } + }, + { + "unauthorized_redirect_uri": { + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "Where to redirect the client on unauthorized requests.", + "required": false, + "type": "array" + } + }, + { + "unauthorized_error_message": { + "default": "Unauthorized", + "description": "The error message for the unauthorized requests (when not using the redirection).", + "required": false, + "type": "string" + } + }, + { + "unexpected_redirect_uri": { + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "required": false, + "type": "array" + } + }, + { + "response_mode": { + "required": false, + "type": "string", + "default": "query", + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "one_of": [ + "query", + "form_post", + "fragment", + "query.jwt", + "form_post.jwt", + "fragment.jwt", + "jwt" + ] + } + }, + { + "response_type": { + "required": false, + "type": "array", + "default": [ + "code" + ], + "description": "The response type passed to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "scopes": { + "required": false, + "type": "array", + "default": [ + "openid" + ], + "description": "The scopes passed to the authorization and token endpoints.", + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "audience": { + "elements": { + "type": "string" + }, + "description": "The audience passed to the authorization endpoint.", + "required": false, + "type": "array" + } + }, + { + "issuers_allowed": { + "elements": { + "type": "string" + }, + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "required": false, + "type": "array" + } + }, + { + "scopes_required": { + "elements": { + "type": "string" + }, + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "required": false, + "type": "array" + } + }, + { + "scopes_claim": { + "required": false, + "type": "array", + "default": [ + "scope" + ], + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "audience_required": { + "elements": { + "type": "string" + }, + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "required": false, + "type": "array" + } + }, + { + "audience_claim": { + "required": false, + "type": "array", + "default": [ + "aud" + ], + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "groups_required": { + "elements": { + "type": "string" + }, + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "required": false, + "type": "array" + } + }, + { + "groups_claim": { + "required": false, + "type": "array", + "default": [ + "groups" + ], + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "roles_required": { + "elements": { + "type": "string" + }, + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "required": false, + "type": "array" + } + }, + { + "roles_claim": { + "required": false, + "type": "array", + "default": [ + "roles" + ], + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "domains": { + "elements": { + "type": "string" + }, + "description": "The allowed values for the `hd` claim.", + "required": false, + "type": "array" + } + }, + { + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "required": false, + "type": "number" + } + }, + { + "authenticated_groups_claim": { + "elements": { + "type": "string" + }, + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "required": false, + "type": "array" + } + }, + { + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "pushed_authorization_request_endpoint_auth_method": { + "type": "string", + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "required": false, + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "required": false, + "type": "boolean" + } + }, + { + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "required": false, + "type": "boolean" + } + }, + { + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "required": false, + "type": "boolean" + } + }, + { + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "authorization_query_args_names": { + "elements": { + "type": "string" + }, + "description": "Extra query argument names passed to the authorization endpoint.", + "required": false, + "type": "array" + } + }, + { + "authorization_query_args_values": { + "elements": { + "type": "string" + }, + "description": "Extra query argument values passed to the authorization endpoint.", + "required": false, + "type": "array" + } + }, + { + "authorization_query_args_client": { + "elements": { + "type": "string" + }, + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "required": false, + "type": "array" + } + }, + { + "authorization_rolling_timeout": { + "default": 600, + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "required": false, + "type": "number" + } + }, + { + "authorization_cookie_name": { + "default": "authorization", + "description": "The authorization cookie name.", + "required": false, + "type": "string" + } + }, + { + "authorization_cookie_path": { + "required": false, + "type": "string", + "default": "/", + "description": "The authorization cookie Path flag.", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "starts_with": "/" + } + }, + { + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "required": false, + "type": "string" + } + }, + { + "authorization_cookie_same_site": { + "required": false, + "type": "string", + "default": "Default", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "authorization_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "required": false, + "type": "boolean" + } + }, + { + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "required": false, + "type": "boolean" + } + }, + { + "preserve_query_args": { + "default": false, + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "required": false, + "type": "boolean" + } + }, + { + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "token_endpoint_auth_method": { + "type": "string", + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "required": false, + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "token_headers_names": { + "elements": { + "type": "string" + }, + "description": "Extra header names passed to the token endpoint.", + "required": false, + "type": "array" + } + }, + { + "token_headers_values": { + "elements": { + "type": "string" + }, + "description": "Extra header values passed to the token endpoint.", + "required": false, + "type": "array" + } + }, + { + "token_headers_client": { + "elements": { + "type": "string" + }, + "description": "Extra headers passed from the client to the token endpoint.", + "required": false, + "type": "array" + } + }, + { + "token_headers_replay": { + "elements": { + "type": "string" + }, + "description": "The names of token endpoint response headers to forward to the downstream client.", + "required": false, + "type": "array" + } + }, + { + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "required": false, + "type": "string" + } + }, + { + "token_headers_grants": { + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token" + ] + }, + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "required": false, + "type": "array" + } + }, + { + "token_post_args_names": { + "elements": { + "type": "string" + }, + "description": "Extra post argument names passed to the token endpoint.", + "required": false, + "type": "array" + } + }, + { + "token_post_args_values": { + "elements": { + "type": "string" + }, + "description": "Extra post argument values passed to the token endpoint.", + "required": false, + "type": "array" + } + }, + { + "token_post_args_client": { + "elements": { + "type": "string" + }, + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "required": false, + "type": "array" + } + }, + { + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "introspection_endpoint_auth_method": { + "type": "string", + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "required": false, + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "introspection_hint": { + "default": "access_token", + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "required": false, + "type": "string" + } + }, + { + "introspection_check_active": { + "default": true, + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "required": false, + "type": "boolean" + } + }, + { + "introspection_accept": { + "required": false, + "type": "string", + "default": "application/json", + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "one_of": [ + "application/json", + "application/token-introspection+jwt", + "application/jwt" + ] + } + }, + { + "introspection_headers_names": { + "elements": { + "type": "string" + }, + "description": "Extra header names passed to the introspection endpoint.", + "required": false, + "type": "array" + } + }, + { + "introspection_headers_values": { + "encrypted": true, + "required": false, + "type": "array", + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "Extra header values passed to the introspection endpoint." + } + }, + { + "introspection_headers_client": { + "elements": { + "type": "string" + }, + "description": "Extra headers passed from the client to the introspection endpoint.", + "required": false, + "type": "array" + } + }, + { + "introspection_post_args_names": { + "elements": { + "type": "string" + }, + "description": "Extra post argument names passed to the introspection endpoint.", + "required": false, + "type": "array" + } + }, + { + "introspection_post_args_values": { + "elements": { + "type": "string" + }, + "description": "Extra post argument values passed to the introspection endpoint.", + "required": false, + "type": "array" + } + }, + { + "introspection_post_args_client": { + "elements": { + "type": "string" + }, + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "required": false, + "type": "array" + } + }, + { + "introspection_post_args_client_headers": { + "elements": { + "type": "string" + }, + "description": "Extra post arguments passed from the client headers to the introspection endpoint.", + "required": false, + "type": "array" + } + }, + { + "introspect_jwt_tokens": { + "default": false, + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "required": false, + "type": "boolean" + } + }, + { + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "revocation_endpoint_auth_method": { + "type": "string", + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "required": false, + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "userinfo_accept": { + "required": false, + "type": "string", + "default": "application/json", + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "one_of": [ + "application/json", + "application/jwt" + ] + } + }, + { + "userinfo_headers_names": { + "elements": { + "type": "string" + }, + "description": "Extra header names passed to the user info endpoint.", + "required": false, + "type": "array" + } + }, + { + "userinfo_headers_values": { + "elements": { + "type": "string" + }, + "description": "Extra header values passed to the user info endpoint.", + "required": false, + "type": "array" + } + }, + { + "userinfo_headers_client": { + "elements": { + "type": "string" + }, + "description": "Extra headers passed from the client to the user info endpoint.", + "required": false, + "type": "array" + } + }, + { + "userinfo_query_args_names": { + "elements": { + "type": "string" + }, + "description": "Extra query argument names passed to the user info endpoint.", + "required": false, + "type": "array" + } + }, + { + "userinfo_query_args_values": { + "elements": { + "type": "string" + }, + "description": "Extra query argument values passed to the user info endpoint.", + "required": false, + "type": "array" + } + }, + { + "userinfo_query_args_client": { + "elements": { + "type": "string" + }, + "description": "Extra query arguments passed from the client to the user info endpoint.", + "required": false, + "type": "array" + } + }, + { + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "required": false, + "type": "string" + } + }, + { + "session_secret": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "The session secret.", + "required": false + } + }, + { + "session_audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "required": false, + "type": "string" + } + }, + { + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "required": false, + "type": "string" + } + }, + { + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "required": false, + "type": "boolean" + } + }, + { + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "required": false, + "type": "string" + } + }, + { + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "required": false, + "type": "number" + } + }, + { + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "required": false, + "type": "number" + } + }, + { + "session_idling_timeout": { + "default": 900, + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "required": false, + "type": "number" + } + }, + { + "session_rolling_timeout": { + "default": 3600, + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "required": false, + "type": "number" + } + }, + { + "session_absolute_timeout": { + "default": 86400, + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "required": false, + "type": "number" + } + }, + { + "session_cookie_path": { + "required": false, + "type": "string", + "default": "/", + "description": "The session cookie Path flag.", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "starts_with": "/" + } + }, + { + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "required": false, + "type": "string" + } + }, + { + "session_cookie_same_site": { + "required": false, + "type": "string", + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "required": false, + "type": "boolean" + } + }, + { + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "required": false, + "type": "boolean" + } + }, + { + "session_request_headers": { + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "required": false, + "type": "set" + } + }, + { + "session_response_headers": { + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "required": false, + "type": "set" + } + }, + { + "session_storage": { + "required": false, + "type": "string", + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ] + } + }, + { + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "required": false, + "type": "boolean" + } + }, + { + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "required": false, + "type": "boolean" + } + }, + { + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "required": false, + "type": "boolean" + } + }, + { + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "required": false, + "type": "boolean" + } + }, + { + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "required": false, + "type": "string" + } + }, + { + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "required": false, + "type": "string" + } + }, + { + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "required": false, + "type": "string" + } + }, + { + "session_memcached_port": { + "between": [ + 0, + 65535 + ], + "required": false, + "type": "integer", + "default": 11211, + "description": "The memcached port." + } + }, + { + "redis": { + "required": true, + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ] + } + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ] + }, + "len_min": 1, + "type": "array" + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ] + }, + "len_min": 1, + "type": "array" + } + } + ], + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "one_of": [ + "master", + "slave", + "any" + ], + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "type": "array", + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ], + "type": "record" + }, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "required": false, + "type": "array", + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ], + "type": "record" + }, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean" + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean" + } + }, + { + "prefix": { + "description": "The Redis session key prefix.", + "required": false, + "type": "string" + } + }, + { + "socket": { + "description": "The Redis unix socket path.", + "required": false, + "type": "string" + } + } + ] + } + }, + { + "reverify": { + "default": false, + "description": "Specifies whether to always verify tokens stored in the session.", + "required": false, + "type": "boolean" + } + }, + { + "jwt_session_claim": { + "default": "sid", + "description": "The claim to match against the JWT session cookie.", + "required": false, + "type": "string" + } + }, + { + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "required": false, + "type": "string" + } + }, + { + "bearer_token_param_type": { + "required": false, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "description": "Where to look for the bearer token: - `header`: search the `Authorization`, `access-token`, and `x-access-token` HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "elements": { + "type": "string", + "one_of": [ + "header", + "cookie", + "query", + "body" + ] + } + } + }, + { + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "required": false, + "type": "string" + } + }, + { + "client_credentials_param_type": { + "required": false, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + } + } + }, + { + "password_param_type": { + "required": false, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + } + } + }, + { + "id_token_param_type": { + "required": false, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + } + } + }, + { + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "required": false, + "type": "string" + } + }, + { + "refresh_token_param_type": { + "required": false, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + } + } + }, + { + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "required": false, + "type": "string" + } + }, + { + "refresh_tokens": { + "default": true, + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "required": false, + "type": "boolean" + } + }, + { + "upstream_headers_claims": { + "elements": { + "type": "string" + }, + "description": "The upstream header claims. Only top level claims are supported.", + "required": false, + "type": "array" + } + }, + { + "upstream_headers_names": { + "elements": { + "type": "string" + }, + "description": "The upstream header names for the claim values.", + "required": false, + "type": "array" + } + }, + { + "upstream_access_token_header": { + "default": "authorization:bearer", + "description": "The upstream access token header.", + "required": false, + "type": "string" + } + }, + { + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "required": false, + "type": "string" + } + }, + { + "upstream_id_token_header": { + "description": "The upstream id token header.", + "required": false, + "type": "string" + } + }, + { + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "required": false, + "type": "string" + } + }, + { + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "required": false, + "type": "string" + } + }, + { + "upstream_user_info_header": { + "description": "The upstream user info header.", + "required": false, + "type": "string" + } + }, + { + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "required": false, + "type": "string" + } + }, + { + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "required": false, + "type": "string" + } + }, + { + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "required": false, + "type": "string" + } + }, + { + "upstream_session_id_header": { + "description": "The upstream session id header.", + "required": false, + "type": "string" + } + }, + { + "downstream_headers_claims": { + "elements": { + "type": "string" + }, + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "required": false, + "type": "array" + } + }, + { + "downstream_headers_names": { + "elements": { + "type": "string" + }, + "description": "The downstream header names for the claim values.", + "required": false, + "type": "array" + } + }, + { + "downstream_access_token_header": { + "description": "The downstream access token header.", + "required": false, + "type": "string" + } + }, + { + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "required": false, + "type": "string" + } + }, + { + "downstream_id_token_header": { + "description": "The downstream id token header.", + "required": false, + "type": "string" + } + }, + { + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "required": false, + "type": "string" + } + }, + { + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "required": false, + "type": "string" + } + }, + { + "downstream_user_info_header": { + "description": "The downstream user info header.", + "required": false, + "type": "string" + } + }, + { + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "required": false, + "type": "string" + } + }, + { + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "required": false, + "type": "string" + } + }, + { + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "required": false, + "type": "string" + } + }, + { + "downstream_session_id_header": { + "description": "The downstream session id header.", + "required": false, + "type": "string" + } + }, + { + "login_methods": { + "required": false, + "type": "array", + "default": [ + "authorization_code" + ], + "description": "Enable login functionality with specified grants.", + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + } + } + }, + { + "login_action": { + "required": false, + "type": "string", + "default": "upstream", + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "one_of": [ + "upstream", + "response", + "redirect" + ] + } + }, + { + "login_tokens": { + "required": false, + "type": "array", + "default": [ + "id_token" + ], + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "elements": { + "type": "string", + "one_of": [ + "id_token", + "access_token", + "refresh_token", + "tokens", + "introspection" + ] + } + } + }, + { + "login_redirect_mode": { + "required": false, + "type": "string", + "default": "fragment", + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "one_of": [ + "query", + "fragment" + ] + } + }, + { + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "required": false, + "type": "string" + } + }, + { + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "required": false, + "type": "string" + } + }, + { + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "required": false, + "type": "string" + } + }, + { + "logout_methods": { + "required": false, + "type": "array", + "default": [ + "POST", + "DELETE" + ], + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "elements": { + "type": "string", + "one_of": [ + "POST", + "GET", + "DELETE" + ] + } + } + }, + { + "logout_revoke": { + "default": false, + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "required": false, + "type": "boolean" + } + }, + { + "logout_revoke_access_token": { + "default": true, + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "required": false, + "type": "boolean" + } + }, + { + "logout_revoke_refresh_token": { + "default": true, + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "required": false, + "type": "boolean" + } + }, + { + "consumer_claim": { + "elements": { + "type": "string" + }, + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "required": false, + "type": "array" + } + }, + { + "consumer_by": { + "required": false, + "type": "array", + "default": [ + "username", + "custom_id" + ], + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + } + } + }, + { + "consumer_optional": { + "default": false, + "description": "Do not terminate the request if consumer mapping fails.", + "required": false, + "type": "boolean" + } + }, + { + "credential_claim": { + "required": false, + "type": "array", + "default": [ + "sub" + ], + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "required": false, + "type": "string" + } + }, + { + "run_on_preflight": { + "default": true, + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "required": false, + "type": "boolean" + } + }, + { + "leeway": { + "default": 0, + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "required": false, + "type": "number" + } + }, + { + "verify_parameters": { + "default": false, + "description": "Verify plugin configuration against discovery.", + "required": false, + "type": "boolean" + } + }, + { + "verify_nonce": { + "default": true, + "description": "Verify nonce on authorization code flow.", + "required": false, + "type": "boolean" + } + }, + { + "verify_claims": { + "default": true, + "description": "Verify tokens for standard claims.", + "required": false, + "type": "boolean" + } + }, + { + "verify_signature": { + "default": true, + "description": "Verify signature of tokens.", + "required": false, + "type": "boolean" + } + }, + { + "ignore_signature": { + "required": false, + "type": "array", + "default": [ + + ], + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token", + "session", + "introspection", + "userinfo" + ] + } + } + }, + { + "enable_hs_signatures": { + "default": false, + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "required": false, + "type": "boolean" + } + }, + { + "disable_session": { + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "description": "Disable issuing the session cookie with the specified grants.", + "required": false, + "type": "array" + } + }, + { + "cache_ttl": { + "default": 3600, + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "required": false, + "type": "number" + } + }, + { + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "required": false, + "type": "number" + } + }, + { + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "required": false, + "type": "number" + } + }, + { + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "required": false, + "type": "number" + } + }, + { + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "required": false, + "type": "number" + } + }, + { + "cache_tokens": { + "default": true, + "description": "Cache the token endpoint requests.", + "required": false, + "type": "boolean" + } + }, + { + "cache_tokens_salt": { + "auto": true, + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "required": false, + "type": "string" + } + }, + { + "cache_introspection": { + "default": true, + "description": "Cache the introspection endpoint requests.", + "required": false, + "type": "boolean" + } + }, + { + "cache_token_exchange": { + "default": true, + "description": "Cache the token exchange endpoint requests.", + "required": false, + "type": "boolean" + } + }, + { + "cache_user_info": { + "default": true, + "description": "Cache the user info requests.", + "required": false, + "type": "boolean" + } + }, + { + "search_user_info": { + "default": false, + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "required": false, + "type": "boolean" + } + }, + { + "hide_credentials": { + "default": false, + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "required": false, + "type": "boolean" + } + }, + { + "http_version": { + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "required": false, + "type": "number" + } + }, + { + "http_proxy": { + "description": "The HTTP proxy.", + "required": false, + "type": "string" + } + }, + { + "http_proxy_authorization": { + "required": false, + "description": "The HTTP proxy authorization.", + "referenceable": true, + "type": "string" + } + }, + { + "https_proxy": { + "description": "The HTTPS proxy.", + "required": false, + "type": "string" + } + }, + { + "https_proxy_authorization": { + "required": false, + "description": "The HTTPS proxy authorization.", + "referenceable": true, + "type": "string" + } + }, + { + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "required": false, + "type": "string" + } + }, + { + "keepalive": { + "default": true, + "description": "Use keepalive with the HTTP client.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "required": false, + "type": "boolean" + } + }, + { + "timeout": { + "default": 10000, + "description": "Network IO timeout in milliseconds.", + "required": false, + "type": "number" + } + }, + { + "display_errors": { + "default": false, + "description": "Display errors on failure responses.", + "required": false, + "type": "boolean" + } + }, + { + "by_username_ignore_case": { + "default": false, + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "required": false, + "type": "boolean" + } + }, + { + "resolve_distributed_claims": { + "default": false, + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "required": false, + "type": "boolean" + } + }, + { + "expose_error_code": { + "default": true, + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "type": "boolean" + } + }, + { + "token_cache_key_include_scope": { + "default": false, + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean" + } + }, + { + "introspection_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for introspection.", + "required": false, + "type": "string" + } + }, + { + "revocation_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for revocation.", + "required": false, + "type": "string" + } + }, + { + "proof_of_possession_mtls": { + "required": false, + "type": "string", + "default": "off", + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "one_of": [ + "off", + "strict", + "optional" + ] + } + }, + { + "proof_of_possession_auth_methods_validation": { + "default": true, + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "required": false, + "type": "boolean" + } + }, + { + "tls_client_auth_cert_id": { + "auto": false, + "required": false, + "type": "string", + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "uuid": true + } + }, + { + "tls_client_auth_ssl_verify": { + "default": true, + "description": "Verify identity provider server certificate during mTLS client authentication.", + "required": false, + "type": "boolean" + } + }, + { + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "proof_of_possession_dpop": { + "required": false, + "type": "string", + "default": "off", + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "one_of": [ + "off", + "strict", + "optional" + ] + } + }, + { + "dpop_use_nonce": { + "default": false, + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "required": false, + "type": "boolean" + } + }, + { + "dpop_proof_lifetime": { + "default": 300, + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "required": false, + "type": "number" + } + }, + { + "claims_forbidden": { + "elements": { + "type": "string" + }, + "description": "If given, these claims are forbidden in the token payload.", + "required": false, + "type": "array" + } + }, + { + "cluster_cache_strategy": { + "required": false, + "type": "string", + "default": "off", + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "one_of": [ + "off", + "redis" + ] + } + }, + { + "cluster_cache_redis": { + "required": true, + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ] + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ] + }, + "type": "array" + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ] + }, + "type": "array" + } + } + ], + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "type": "string", + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean" + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean" + } + } + ] + } + } + ] + } + } + ] + }, + "description": "List of openid_connect strategies.", + "required": false, + "type": "array" + } + } + ] + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/ldap-auth-advanced/3.10.x.json b/schemas/ldap-auth-advanced/3.10.x.json new file mode 100644 index 00000000..b7da08d9 --- /dev/null +++ b/schemas/ldap-auth-advanced/3.10.x.json @@ -0,0 +1,243 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "ldap_host": { + "description": "Host on which the LDAP server is running.", + "type": "string", + "required": true + } + }, + { + "ldap_password": { + "description": "The password to the LDAP server.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "ldap_port": { + "description": "TCP port where the LDAP server is listening. 389 is the default port for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is configured, you must use port 636.", + "default": 389, + "type": "number" + } + }, + { + "bind_dn": { + "description": "The DN to bind to. Used to perform LDAP search of user. This `bind_dn` should have permissions to search for the user being authenticated.", + "type": "string", + "referenceable": true + } + }, + { + "ldaps": { + "description": "Set it to `true` to use `ldaps`, a secure protocol (that can be configured to TLS) to connect to the LDAP server. When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "start_tls": { + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "verify_ldap_host": { + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., 'dc=example,dc=com'.", + "type": "string", + "required": true + } + }, + { + "attribute": { + "description": "Attribute to be used to search the user; e.g., \"cn\".", + "type": "string", + "required": true + } + }, + { + "cache_ttl": { + "description": "Cache expiry time in seconds.", + "default": 60, + "type": "number", + "required": true + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "default": false, + "type": "boolean" + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "default": 10000, + "type": "number" + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "default": 60000, + "type": "number" + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "default": "", + "type": "string", + "len_min": 0 + } + }, + { + "header_type": { + "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this: `Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be `Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `'ldap'` and `'basic'`.", + "default": "ldap", + "type": "string" + } + }, + { + "consumer_optional": { + "description": "Whether consumer mapping is optional. If `consumer_optional=true`, the plugin will not attempt to associate a consumer with the LDAP authenticated user.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "consumer_by": { + "type": "array", + "description": "Whether to authenticate consumers based on `username`, `custom_id`, or both.", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "username", + "custom_id" + ] + }, + "required": false + } + }, + { + "group_base_dn": { + "description": "Sets a distinguished name (DN) for the entry where LDAP searches for groups begin. This field is case-insensitive.',dc=com'.", + "type": "string" + } + }, + { + "group_name_attribute": { + "description": "Sets the attribute holding the name of a group, typically called `name` (in Active Directory) or `cn` (in OpenLDAP). This field is case-insensitive.", + "type": "string" + } + }, + { + "group_member_attribute": { + "description": "Sets the attribute holding the members of the LDAP group. This field is case-sensitive.", + "default": "memberOf", + "type": "string" + } + }, + { + "log_search_results": { + "description": "Displays all the LDAP search results received from the LDAP server for debugging purposes. Not recommended to be enabled in a production environment.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "groups_required": { + "description": "The groups required to be present in the LDAP search result for successful authorization. This config parameter works in both **AND** / **OR** cases. - When `[\"group1 group2\"]` are in the same array indices, both `group1` AND `group2` need to be present in the LDAP search result. - When `[\"group1\", \"group2\"]` are in different array indices, either `group1` OR `group2` need to be present in the LDAP search result.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ldap-auth-advanced/3.11.x.json b/schemas/ldap-auth-advanced/3.11.x.json new file mode 100644 index 00000000..1d8e1c19 --- /dev/null +++ b/schemas/ldap-auth-advanced/3.11.x.json @@ -0,0 +1,243 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "ldap_host": { + "required": true, + "description": "Host on which the LDAP server is running.", + "type": "string" + } + }, + { + "ldap_password": { + "type": "string", + "description": "The password to the LDAP server.", + "referenceable": true, + "encrypted": true + } + }, + { + "ldap_port": { + "default": 389, + "description": "TCP port where the LDAP server is listening. 389 is the default port for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is configured, you must use port 636.", + "type": "number" + } + }, + { + "bind_dn": { + "referenceable": true, + "description": "The DN to bind to. Used to perform LDAP search of user. This `bind_dn` should have permissions to search for the user being authenticated.", + "type": "string" + } + }, + { + "ldaps": { + "default": false, + "required": true, + "description": "Set it to `true` to use `ldaps`, a secure protocol (that can be configured to TLS) to connect to the LDAP server. When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean" + } + }, + { + "start_tls": { + "default": false, + "required": true, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean" + } + }, + { + "verify_ldap_host": { + "default": false, + "required": true, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean" + } + }, + { + "base_dn": { + "required": true, + "description": "Base DN as the starting point for the search; e.g., 'dc=example,dc=com'.", + "type": "string" + } + }, + { + "attribute": { + "required": true, + "description": "Attribute to be used to search the user; e.g., \"cn\".", + "type": "string" + } + }, + { + "cache_ttl": { + "default": 60, + "required": true, + "description": "Cache expiry time in seconds.", + "type": "number" + } + }, + { + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean" + } + }, + { + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + } + }, + { + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + } + }, + { + "anonymous": { + "len_min": 0, + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this: `Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be `Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `'ldap'` and `'basic'`.", + "type": "string" + } + }, + { + "consumer_optional": { + "default": false, + "required": false, + "description": "Whether consumer mapping is optional. If `consumer_optional=true`, the plugin will not attempt to associate a consumer with the LDAP authenticated user.", + "type": "boolean" + } + }, + { + "consumer_by": { + "required": false, + "description": "Whether to authenticate consumers based on `username`, `custom_id`, or both.", + "type": "array", + "default": [ + "username", + "custom_id" + ], + "elements": { + "one_of": [ + "username", + "custom_id" + ], + "type": "string" + } + } + }, + { + "group_base_dn": { + "description": "Sets a distinguished name (DN) for the entry where LDAP searches for groups begin. This field is case-insensitive.',dc=com'.", + "type": "string" + } + }, + { + "group_name_attribute": { + "description": "Sets the attribute holding the name of a group, typically called `name` (in Active Directory) or `cn` (in OpenLDAP). This field is case-insensitive.", + "type": "string" + } + }, + { + "group_member_attribute": { + "default": "memberOf", + "description": "Sets the attribute holding the members of the LDAP group. This field is case-sensitive.", + "type": "string" + } + }, + { + "log_search_results": { + "default": false, + "required": false, + "description": "Displays all the LDAP search results received from the LDAP server for debugging purposes. Not recommended to be enabled in a production environment.", + "type": "boolean" + } + }, + { + "groups_required": { + "type": "array", + "required": false, + "description": "The groups required to be present in the LDAP search result for successful authorization. This config parameter works in both **AND** / **OR** cases. - When `[\"group1 group2\"]` are in the same array indices, both `group1` AND `group2` need to be present in the LDAP search result. - When `[\"group1\", \"group2\"]` are in different array indices, either `group1` OR `group2` need to be present in the LDAP search result.", + "elements": { + "type": "string" + } + } + }, + { + "realm": { + "required": false, + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/ldap-auth-advanced/3.12.x.json b/schemas/ldap-auth-advanced/3.12.x.json new file mode 100644 index 00000000..090ee49a --- /dev/null +++ b/schemas/ldap-auth-advanced/3.12.x.json @@ -0,0 +1,243 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "ldap_host": { + "description": "Host on which the LDAP server is running.", + "type": "string", + "required": true + } + }, + { + "ldap_password": { + "encrypted": true, + "description": "The password to the LDAP server.", + "referenceable": true, + "type": "string" + } + }, + { + "ldap_port": { + "description": "TCP port where the LDAP server is listening. 389 is the default port for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is configured, you must use port 636.", + "default": 389, + "type": "number" + } + }, + { + "bind_dn": { + "description": "The DN to bind to. Used to perform LDAP search of user. This `bind_dn` should have permissions to search for the user being authenticated.", + "referenceable": true, + "type": "string" + } + }, + { + "ldaps": { + "description": "Set it to `true` to use `ldaps`, a secure protocol (that can be configured to TLS) to connect to the LDAP server. When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "start_tls": { + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "verify_ldap_host": { + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., 'dc=example,dc=com'.", + "type": "string", + "required": true + } + }, + { + "attribute": { + "description": "Attribute to be used to search the user; e.g., \"cn\".", + "type": "string", + "required": true + } + }, + { + "cache_ttl": { + "description": "Cache expiry time in seconds.", + "default": 60, + "type": "number", + "required": true + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "default": false, + "type": "boolean" + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "default": 10000, + "type": "number" + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "default": 60000, + "type": "number" + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "default": "", + "len_min": 0, + "type": "string" + } + }, + { + "header_type": { + "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this: `Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be `Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `'ldap'` and `'basic'`.", + "default": "ldap", + "type": "string" + } + }, + { + "consumer_optional": { + "description": "Whether consumer mapping is optional. If `consumer_optional=true`, the plugin will not attempt to associate a consumer with the LDAP authenticated user.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "consumer_by": { + "type": "array", + "required": false, + "description": "Whether to authenticate consumers based on `username`, `custom_id`, or both.", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "username", + "custom_id" + ] + } + } + }, + { + "group_base_dn": { + "type": "string", + "description": "Sets a distinguished name (DN) for the entry where LDAP searches for groups begin. This field is case-insensitive.',dc=com'." + } + }, + { + "group_name_attribute": { + "type": "string", + "description": "Sets the attribute holding the name of a group, typically called `name` (in Active Directory) or `cn` (in OpenLDAP). This field is case-insensitive." + } + }, + { + "group_member_attribute": { + "description": "Sets the attribute holding the members of the LDAP group. This field is case-sensitive.", + "default": "memberOf", + "type": "string" + } + }, + { + "log_search_results": { + "description": "Displays all the LDAP search results received from the LDAP server for debugging purposes. Not recommended to be enabled in a production environment.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "groups_required": { + "type": "array", + "description": "The groups required to be present in the LDAP search result for successful authorization. This config parameter works in both **AND** / **OR** cases. - When `[\"group1 group2\"]` are in the same array indices, both `group1` AND `group2` need to be present in the LDAP search result. - When `[\"group1\", \"group2\"]` are in different array indices, either `group1` OR `group2` need to be present in the LDAP search result.", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ldap-auth-advanced/3.4.x.json b/schemas/ldap-auth-advanced/3.4.x.json index cb36db07..e52f9ab1 100644 --- a/schemas/ldap-auth-advanced/3.4.x.json +++ b/schemas/ldap-auth-advanced/3.4.x.json @@ -10,7 +10,10 @@ "ws", "wss" ], + "required": true, + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", @@ -18,15 +21,21 @@ "https", "ws", "wss" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" } }, { "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, "reference": "consumers", "type": "foreign" @@ -34,162 +43,193 @@ }, { "config": { - "required": true, "fields": [ { "ldap_host": { - "type": "string", - "required": true + "description": "Host on which the LDAP server is running.", + "required": true, + "type": "string" } }, { "ldap_password": { - "encrypted": true, + "description": "The password to the LDAP server.", "referenceable": true, - "type": "string" + "type": "string", + "encrypted": true } }, { "ldap_port": { + "default": 389, "type": "number", - "default": 389 + "description": "TCP port where the LDAP server is listening. 389 is the default port for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is configured, you must use port 636." } }, { "bind_dn": { - "type": "string", - "referenceable": true + "description": "The DN to bind to. Used to perform LDAP search of user. This `bind_dn` should have permissions to search for the user being authenticated.", + "referenceable": true, + "type": "string" } }, { "ldaps": { - "default": false, + "description": "Set it to `true` to use `ldaps`, a secure protocol (that can be configured to TLS) to connect to the LDAP server. When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", "required": true, - "type": "boolean" + "type": "boolean", + "default": false } }, { "start_tls": { - "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", "required": true, - "type": "boolean" + "type": "boolean", + "default": false } }, { "verify_ldap_host": { - "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", "required": true, - "type": "boolean" + "type": "boolean", + "default": false } }, { "base_dn": { - "type": "string", - "required": true + "description": "Base DN as the starting point for the search; e.g., 'dc=example,dc=com'.", + "required": true, + "type": "string" } }, { "attribute": { - "type": "string", - "required": true + "description": "Attribute to be used to search the user; e.g., \"cn\".", + "required": true, + "type": "string" } }, { "cache_ttl": { - "default": 60, + "description": "Cache expiry time in seconds.", "required": true, - "type": "number" + "type": "number", + "default": 60 } }, { "hide_credentials": { + "default": false, "type": "boolean", - "default": false + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request." } }, { "timeout": { + "default": 10000, "type": "number", - "default": 10000 + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server." } }, { "keepalive": { + "default": 60000, "type": "number", - "default": 60000 + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed." } }, { "anonymous": { "len_min": 0, + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", "type": "string", "default": "" } }, { "header_type": { + "default": "ldap", "type": "string", - "default": "ldap" + "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this: `Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be `Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `'ldap'` and `'basic'`." } }, { "consumer_optional": { - "default": false, + "description": "Whether consumer mapping is optional. If `consumer_optional=true`, the plugin will not attempt to associate a consumer with the LDAP authenticated user.", "required": false, - "type": "boolean" + "type": "boolean", + "default": false } }, { "consumer_by": { + "description": "Whether to authenticate consumers based on `username`, `custom_id`, or both.", "elements": { + "type": "string", "one_of": [ "username", "custom_id" - ], - "type": "string" + ] }, "default": [ "username", "custom_id" ], - "type": "array", - "required": false + "required": false, + "type": "array" } }, { "group_base_dn": { + "description": "Sets a distinguished name (DN) for the entry where LDAP searches for groups begin. This field is case-insensitive.',dc=com'.", "type": "string" } }, { "group_name_attribute": { + "description": "Sets the attribute holding the name of a group, typically called `name` (in Active Directory) or `cn` (in OpenLDAP). This field is case-insensitive.", "type": "string" } }, { "group_member_attribute": { + "default": "memberOf", "type": "string", - "default": "memberOf" + "description": "Sets the attribute holding the members of the LDAP group. This field is case-sensitive." } }, { "log_search_results": { - "default": false, + "description": "Displays all the LDAP search results received from the LDAP server for debugging purposes. Not recommended to be enabled in a production environment.", "required": false, - "type": "boolean" + "type": "boolean", + "default": false } }, { "groups_required": { - "type": "array", + "description": "The groups required to be present in the LDAP search result for successful authorization. This config parameter works in both **AND** / **OR** cases. - When `[\"group1 group2\"]` are in the same array indices, both `group1` AND `group2` need to be present in the LDAP search result. - When `[\"group1\", \"group2\"]` are in different array indices, either `group1` OR `group2` need to be present in the LDAP search result.", "required": false, + "type": "array", "elements": { "type": "string" } } } ], - "type": "record" + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] } } ] diff --git a/schemas/ldap-auth-advanced/3.5.x.json b/schemas/ldap-auth-advanced/3.5.x.json new file mode 100644 index 00000000..6c2f0e5d --- /dev/null +++ b/schemas/ldap-auth-advanced/3.5.x.json @@ -0,0 +1,236 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + }, + { + "consumer_group": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumer_groups" + } + }, + { + "consumer": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumers" + } + }, + { + "config": { + "fields": [ + { + "ldap_host": { + "required": true, + "description": "Host on which the LDAP server is running.", + "type": "string" + } + }, + { + "ldap_password": { + "referenceable": true, + "type": "string", + "description": "The password to the LDAP server.", + "encrypted": true + } + }, + { + "ldap_port": { + "description": "TCP port where the LDAP server is listening. 389 is the default port for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is configured, you must use port 636.", + "type": "number", + "default": 389 + } + }, + { + "bind_dn": { + "referenceable": true, + "description": "The DN to bind to. Used to perform LDAP search of user. This `bind_dn` should have permissions to search for the user being authenticated.", + "type": "string" + } + }, + { + "ldaps": { + "required": true, + "description": "Set it to `true` to use `ldaps`, a secure protocol (that can be configured to TLS) to connect to the LDAP server. When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean", + "default": false + } + }, + { + "start_tls": { + "required": true, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean", + "default": false + } + }, + { + "verify_ldap_host": { + "required": true, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean", + "default": false + } + }, + { + "base_dn": { + "required": true, + "description": "Base DN as the starting point for the search; e.g., 'dc=example,dc=com'.", + "type": "string" + } + }, + { + "attribute": { + "required": true, + "description": "Attribute to be used to search the user; e.g., \"cn\".", + "type": "string" + } + }, + { + "cache_ttl": { + "required": true, + "description": "Cache expiry time in seconds.", + "type": "number", + "default": 60 + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean", + "default": false + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number", + "default": 10000 + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number", + "default": 60000 + } + }, + { + "anonymous": { + "len_min": 0, + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string", + "default": "" + } + }, + { + "header_type": { + "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this: `Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be `Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `'ldap'` and `'basic'`.", + "type": "string", + "default": "ldap" + } + }, + { + "consumer_optional": { + "required": false, + "description": "Whether consumer mapping is optional. If `consumer_optional=true`, the plugin will not attempt to associate a consumer with the LDAP authenticated user.", + "type": "boolean", + "default": false + } + }, + { + "consumer_by": { + "required": false, + "type": "array", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "username", + "custom_id" + ] + }, + "description": "Whether to authenticate consumers based on `username`, `custom_id`, or both." + } + }, + { + "group_base_dn": { + "description": "Sets a distinguished name (DN) for the entry where LDAP searches for groups begin. This field is case-insensitive.',dc=com'.", + "type": "string" + } + }, + { + "group_name_attribute": { + "description": "Sets the attribute holding the name of a group, typically called `name` (in Active Directory) or `cn` (in OpenLDAP). This field is case-insensitive.", + "type": "string" + } + }, + { + "group_member_attribute": { + "description": "Sets the attribute holding the members of the LDAP group. This field is case-sensitive.", + "type": "string", + "default": "memberOf" + } + }, + { + "log_search_results": { + "required": false, + "description": "Displays all the LDAP search results received from the LDAP server for debugging purposes. Not recommended to be enabled in a production environment.", + "type": "boolean", + "default": false + } + }, + { + "groups_required": { + "required": false, + "type": "array", + "description": "The groups required to be present in the LDAP search result for successful authorization. This config parameter works in both **AND** / **OR** cases. - When `[\"group1 group2\"]` are in the same array indices, both `group1` AND `group2` need to be present in the LDAP search result. - When `[\"group1\", \"group2\"]` are in different array indices, either `group1` OR `group2` need to be present in the LDAP search result.", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ldap-auth-advanced/3.6.x.json b/schemas/ldap-auth-advanced/3.6.x.json new file mode 100644 index 00000000..8038366c --- /dev/null +++ b/schemas/ldap-auth-advanced/3.6.x.json @@ -0,0 +1,236 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "ldap_host": { + "description": "Host on which the LDAP server is running.", + "type": "string", + "required": true + } + }, + { + "ldap_password": { + "referenceable": true, + "type": "string", + "description": "The password to the LDAP server.", + "encrypted": true + } + }, + { + "ldap_port": { + "description": "TCP port where the LDAP server is listening. 389 is the default port for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is configured, you must use port 636.", + "type": "number", + "default": 389 + } + }, + { + "bind_dn": { + "referenceable": true, + "type": "string", + "description": "The DN to bind to. Used to perform LDAP search of user. This `bind_dn` should have permissions to search for the user being authenticated." + } + }, + { + "ldaps": { + "description": "Set it to `true` to use `ldaps`, a secure protocol (that can be configured to TLS) to connect to the LDAP server. When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "start_tls": { + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "verify_ldap_host": { + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., 'dc=example,dc=com'.", + "type": "string", + "required": true + } + }, + { + "attribute": { + "description": "Attribute to be used to search the user; e.g., \"cn\".", + "type": "string", + "required": true + } + }, + { + "cache_ttl": { + "description": "Cache expiry time in seconds.", + "type": "number", + "default": 60, + "required": true + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean", + "default": false + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number", + "default": 10000 + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number", + "default": 60000 + } + }, + { + "anonymous": { + "len_min": 0, + "type": "string", + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "header_type": { + "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this: `Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be `Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `'ldap'` and `'basic'`.", + "type": "string", + "default": "ldap" + } + }, + { + "consumer_optional": { + "description": "Whether consumer mapping is optional. If `consumer_optional=true`, the plugin will not attempt to associate a consumer with the LDAP authenticated user.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "consumer_by": { + "type": "array", + "required": false, + "description": "Whether to authenticate consumers based on `username`, `custom_id`, or both.", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "username", + "custom_id" + ] + } + } + }, + { + "group_base_dn": { + "description": "Sets a distinguished name (DN) for the entry where LDAP searches for groups begin. This field is case-insensitive.',dc=com'.", + "type": "string" + } + }, + { + "group_name_attribute": { + "description": "Sets the attribute holding the name of a group, typically called `name` (in Active Directory) or `cn` (in OpenLDAP). This field is case-insensitive.", + "type": "string" + } + }, + { + "group_member_attribute": { + "description": "Sets the attribute holding the members of the LDAP group. This field is case-sensitive.", + "type": "string", + "default": "memberOf" + } + }, + { + "log_search_results": { + "description": "Displays all the LDAP search results received from the LDAP server for debugging purposes. Not recommended to be enabled in a production environment.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "groups_required": { + "description": "The groups required to be present in the LDAP search result for successful authorization. This config parameter works in both **AND** / **OR** cases. - When `[\"group1 group2\"]` are in the same array indices, both `group1` AND `group2` need to be present in the LDAP search result. - When `[\"group1\", \"group2\"]` are in different array indices, either `group1` OR `group2` need to be present in the LDAP search result.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ldap-auth-advanced/3.7.x.json b/schemas/ldap-auth-advanced/3.7.x.json new file mode 100644 index 00000000..27b9b0cc --- /dev/null +++ b/schemas/ldap-auth-advanced/3.7.x.json @@ -0,0 +1,236 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "ldap_host": { + "required": true, + "description": "Host on which the LDAP server is running.", + "type": "string" + } + }, + { + "ldap_password": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "The password to the LDAP server." + } + }, + { + "ldap_port": { + "description": "TCP port where the LDAP server is listening. 389 is the default port for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is configured, you must use port 636.", + "type": "number", + "default": 389 + } + }, + { + "bind_dn": { + "type": "string", + "referenceable": true, + "description": "The DN to bind to. Used to perform LDAP search of user. This `bind_dn` should have permissions to search for the user being authenticated." + } + }, + { + "ldaps": { + "required": true, + "description": "Set it to `true` to use `ldaps`, a secure protocol (that can be configured to TLS) to connect to the LDAP server. When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean", + "default": false + } + }, + { + "start_tls": { + "required": true, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean", + "default": false + } + }, + { + "verify_ldap_host": { + "required": true, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean", + "default": false + } + }, + { + "base_dn": { + "required": true, + "description": "Base DN as the starting point for the search; e.g., 'dc=example,dc=com'.", + "type": "string" + } + }, + { + "attribute": { + "required": true, + "description": "Attribute to be used to search the user; e.g., \"cn\".", + "type": "string" + } + }, + { + "cache_ttl": { + "required": true, + "description": "Cache expiry time in seconds.", + "type": "number", + "default": 60 + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean", + "default": false + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number", + "default": 10000 + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number", + "default": 60000 + } + }, + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "len_min": 0, + "default": "" + } + }, + { + "header_type": { + "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this: `Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be `Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `'ldap'` and `'basic'`.", + "type": "string", + "default": "ldap" + } + }, + { + "consumer_optional": { + "required": false, + "description": "Whether consumer mapping is optional. If `consumer_optional=true`, the plugin will not attempt to associate a consumer with the LDAP authenticated user.", + "type": "boolean", + "default": false + } + }, + { + "consumer_by": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "username", + "custom_id" + ] + }, + "description": "Whether to authenticate consumers based on `username`, `custom_id`, or both.", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "group_base_dn": { + "type": "string", + "description": "Sets a distinguished name (DN) for the entry where LDAP searches for groups begin. This field is case-insensitive.',dc=com'." + } + }, + { + "group_name_attribute": { + "type": "string", + "description": "Sets the attribute holding the name of a group, typically called `name` (in Active Directory) or `cn` (in OpenLDAP). This field is case-insensitive." + } + }, + { + "group_member_attribute": { + "description": "Sets the attribute holding the members of the LDAP group. This field is case-sensitive.", + "type": "string", + "default": "memberOf" + } + }, + { + "log_search_results": { + "required": false, + "description": "Displays all the LDAP search results received from the LDAP server for debugging purposes. Not recommended to be enabled in a production environment.", + "type": "boolean", + "default": false + } + }, + { + "groups_required": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The groups required to be present in the LDAP search result for successful authorization. This config parameter works in both **AND** / **OR** cases. - When `[\"group1 group2\"]` are in the same array indices, both `group1` AND `group2` need to be present in the LDAP search result. - When `[\"group1\", \"group2\"]` are in different array indices, either `group1` OR `group2` need to be present in the LDAP search result.", + "type": "array" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/ldap-auth-advanced/3.8.x.json b/schemas/ldap-auth-advanced/3.8.x.json new file mode 100644 index 00000000..34b7b64a --- /dev/null +++ b/schemas/ldap-auth-advanced/3.8.x.json @@ -0,0 +1,243 @@ +{ + "fields": [ + { + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": true, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "ldap_host": { + "description": "Host on which the LDAP server is running.", + "type": "string", + "required": true + } + }, + { + "ldap_password": { + "description": "The password to the LDAP server.", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "ldap_port": { + "description": "TCP port where the LDAP server is listening. 389 is the default port for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is configured, you must use port 636.", + "type": "number", + "default": 389 + } + }, + { + "bind_dn": { + "description": "The DN to bind to. Used to perform LDAP search of user. This `bind_dn` should have permissions to search for the user being authenticated.", + "type": "string", + "referenceable": true + } + }, + { + "ldaps": { + "description": "Set it to `true` to use `ldaps`, a secure protocol (that can be configured to TLS) to connect to the LDAP server. When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "start_tls": { + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "verify_ldap_host": { + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., 'dc=example,dc=com'.", + "type": "string", + "required": true + } + }, + { + "attribute": { + "description": "Attribute to be used to search the user; e.g., \"cn\".", + "type": "string", + "required": true + } + }, + { + "cache_ttl": { + "description": "Cache expiry time in seconds.", + "type": "number", + "required": true, + "default": 60 + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean", + "default": false + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number", + "default": 10000 + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number", + "default": 60000 + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string", + "len_min": 0, + "default": "" + } + }, + { + "header_type": { + "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this: `Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be `Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `'ldap'` and `'basic'`.", + "type": "string", + "default": "ldap" + } + }, + { + "consumer_optional": { + "description": "Whether consumer mapping is optional. If `consumer_optional=true`, the plugin will not attempt to associate a consumer with the LDAP authenticated user.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "consumer_by": { + "description": "Whether to authenticate consumers based on `username`, `custom_id`, or both.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "username", + "custom_id" + ] + }, + "type": "array", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "group_base_dn": { + "description": "Sets a distinguished name (DN) for the entry where LDAP searches for groups begin. This field is case-insensitive.',dc=com'.", + "type": "string" + } + }, + { + "group_name_attribute": { + "description": "Sets the attribute holding the name of a group, typically called `name` (in Active Directory) or `cn` (in OpenLDAP). This field is case-insensitive.", + "type": "string" + } + }, + { + "group_member_attribute": { + "description": "Sets the attribute holding the members of the LDAP group. This field is case-sensitive.", + "type": "string", + "default": "memberOf" + } + }, + { + "log_search_results": { + "description": "Displays all the LDAP search results received from the LDAP server for debugging purposes. Not recommended to be enabled in a production environment.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "groups_required": { + "description": "The groups required to be present in the LDAP search result for successful authorization. This config parameter works in both **AND** / **OR** cases. - When `[\"group1 group2\"]` are in the same array indices, both `group1` AND `group2` need to be present in the LDAP search result. - When `[\"group1\", \"group2\"]` are in different array indices, either `group1` OR `group2` need to be present in the LDAP search result.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string", + "required": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/ldap-auth-advanced/3.9.x.json b/schemas/ldap-auth-advanced/3.9.x.json new file mode 100644 index 00000000..545178ce --- /dev/null +++ b/schemas/ldap-auth-advanced/3.9.x.json @@ -0,0 +1,243 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": true, + "type": "set" + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "ldap_host": { + "description": "Host on which the LDAP server is running.", + "required": true, + "type": "string" + } + }, + { + "ldap_password": { + "encrypted": true, + "description": "The password to the LDAP server.", + "referenceable": true, + "type": "string" + } + }, + { + "ldap_port": { + "default": 389, + "description": "TCP port where the LDAP server is listening. 389 is the default port for non-SSL LDAP and AD. 636 is the port required for SSL LDAP and AD. If `ldaps` is configured, you must use port 636.", + "type": "number" + } + }, + { + "bind_dn": { + "description": "The DN to bind to. Used to perform LDAP search of user. This `bind_dn` should have permissions to search for the user being authenticated.", + "referenceable": true, + "type": "string" + } + }, + { + "ldaps": { + "default": false, + "description": "Set it to `true` to use `ldaps`, a secure protocol (that can be configured to TLS) to connect to the LDAP server. When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "required": true, + "type": "boolean" + } + }, + { + "start_tls": { + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "required": true, + "type": "boolean" + } + }, + { + "verify_ldap_host": { + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "required": true, + "type": "boolean" + } + }, + { + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., 'dc=example,dc=com'.", + "required": true, + "type": "string" + } + }, + { + "attribute": { + "description": "Attribute to be used to search the user; e.g., \"cn\".", + "required": true, + "type": "string" + } + }, + { + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "required": true, + "type": "number" + } + }, + { + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean" + } + }, + { + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + } + }, + { + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + } + }, + { + "anonymous": { + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request will fail with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "len_min": 0, + "type": "string" + } + }, + { + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header. By default, a valid Authorization header looks like this: `Authorization: ldap base64(username:password)`. If `header_type` is set to \"basic\", then the Authorization header would be `Authorization: basic base64(username:password)`. Note that `header_type` can take any string, not just `'ldap'` and `'basic'`.", + "type": "string" + } + }, + { + "consumer_optional": { + "default": false, + "description": "Whether consumer mapping is optional. If `consumer_optional=true`, the plugin will not attempt to associate a consumer with the LDAP authenticated user.", + "required": false, + "type": "boolean" + } + }, + { + "consumer_by": { + "required": false, + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "username", + "custom_id" + ] + }, + "description": "Whether to authenticate consumers based on `username`, `custom_id`, or both.", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "group_base_dn": { + "description": "Sets a distinguished name (DN) for the entry where LDAP searches for groups begin. This field is case-insensitive.',dc=com'.", + "type": "string" + } + }, + { + "group_name_attribute": { + "description": "Sets the attribute holding the name of a group, typically called `name` (in Active Directory) or `cn` (in OpenLDAP). This field is case-insensitive.", + "type": "string" + } + }, + { + "group_member_attribute": { + "default": "memberOf", + "description": "Sets the attribute holding the members of the LDAP group. This field is case-sensitive.", + "type": "string" + } + }, + { + "log_search_results": { + "default": false, + "description": "Displays all the LDAP search results received from the LDAP server for debugging purposes. Not recommended to be enabled in a production environment.", + "required": false, + "type": "boolean" + } + }, + { + "groups_required": { + "elements": { + "type": "string" + }, + "description": "The groups required to be present in the LDAP search result for successful authorization. This config parameter works in both **AND** / **OR** cases. - When `[\"group1 group2\"]` are in the same array indices, both `group1` AND `group2` need to be present in the LDAP search result. - When `[\"group1\", \"group2\"]` are in different array indices, either `group1` OR `group2` need to be present in the LDAP search result.", + "required": false, + "type": "array" + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "required": false, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/ldap-auth/3.10.x.json b/schemas/ldap-auth/3.10.x.json new file mode 100644 index 00000000..ae60021d --- /dev/null +++ b/schemas/ldap-auth/3.10.x.json @@ -0,0 +1,178 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + { + "conditional": { + "then_err": "'ldaps' and 'start_tls' cannot be enabled simultaneously", + "if_match": { + "eq": true + }, + "then_field": "start_tls", + "if_field": "ldaps", + "then_match": { + "eq": false + } + } + } + ], + "type": "record", + "fields": [ + { + "ldap_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "required": true + } + }, + { + "ldap_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 389, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true + } + }, + { + "ldaps": { + "description": "Set to `true` to connect using the LDAPS protocol (LDAP over TLS). When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "start_tls": { + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "verify_ldap_host": { + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., dc=example,dc=com", + "type": "string", + "required": true + } + }, + { + "attribute": { + "description": "Attribute to be used to search the user; e.g. cn", + "type": "string", + "required": true + } + }, + { + "cache_ttl": { + "description": "Cache expiry time in seconds.", + "default": 60, + "type": "number", + "required": true + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "default": 10000, + "type": "number" + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "default": 60000, + "type": "number" + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`.", + "type": "string" + } + }, + { + "header_type": { + "description": "An optional string to use as part of the Authorization header", + "default": "ldap", + "type": "string" + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ldap-auth/3.11.x.json b/schemas/ldap-auth/3.11.x.json new file mode 100644 index 00000000..9068e7c8 --- /dev/null +++ b/schemas/ldap-auth/3.11.x.json @@ -0,0 +1,178 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "entity_checks": [ + { + "conditional": { + "then_err": "'ldaps' and 'start_tls' cannot be enabled simultaneously", + "if_match": { + "eq": true + }, + "then_field": "start_tls", + "if_field": "ldaps", + "then_match": { + "eq": false + } + } + } + ], + "fields": [ + { + "ldap_host": { + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "ldap_port": { + "required": true, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 389, + "type": "integer" + } + }, + { + "ldaps": { + "default": false, + "required": true, + "description": "Set to `true` to connect using the LDAPS protocol (LDAP over TLS). When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean" + } + }, + { + "start_tls": { + "default": false, + "required": true, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean" + } + }, + { + "verify_ldap_host": { + "default": false, + "required": true, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean" + } + }, + { + "base_dn": { + "required": true, + "description": "Base DN as the starting point for the search; e.g., dc=example,dc=com", + "type": "string" + } + }, + { + "attribute": { + "required": true, + "description": "Attribute to be used to search the user; e.g. cn", + "type": "string" + } + }, + { + "cache_ttl": { + "default": 60, + "required": true, + "description": "Cache expiry time in seconds.", + "type": "number" + } + }, + { + "hide_credentials": { + "default": false, + "required": true, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean" + } + }, + { + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + } + }, + { + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`.", + "type": "string" + } + }, + { + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header", + "type": "string" + } + }, + { + "realm": { + "required": false, + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/ldap-auth/3.12.x.json b/schemas/ldap-auth/3.12.x.json new file mode 100644 index 00000000..c65a5482 --- /dev/null +++ b/schemas/ldap-auth/3.12.x.json @@ -0,0 +1,176 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "ldap_host": { + "type": "string", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "ldap_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "required": true, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "default": 389 + } + }, + { + "ldaps": { + "type": "boolean", + "default": false, + "description": "Set to `true` to connect using the LDAPS protocol (LDAP over TLS). When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "required": true + } + }, + { + "start_tls": { + "type": "boolean", + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "required": true + } + }, + { + "verify_ldap_host": { + "type": "boolean", + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "required": true + } + }, + { + "base_dn": { + "type": "string", + "description": "Base DN as the starting point for the search; e.g., dc=example,dc=com", + "required": true + } + }, + { + "attribute": { + "type": "string", + "description": "Attribute to be used to search the user; e.g. cn", + "required": true + } + }, + { + "cache_ttl": { + "type": "number", + "default": 60, + "description": "Cache expiry time in seconds.", + "required": true + } + }, + { + "hide_credentials": { + "type": "boolean", + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "required": true + } + }, + { + "timeout": { + "type": "number", + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server." + } + }, + { + "keepalive": { + "type": "number", + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed." + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`.", + "type": "string" + } + }, + { + "header_type": { + "type": "string", + "default": "ldap", + "description": "An optional string to use as part of the Authorization header" + } + }, + { + "realm": { + "type": "string", + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "required": false + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "start_tls", + "if_field": "ldaps", + "then_match": { + "eq": false + }, + "then_err": "'ldaps' and 'start_tls' cannot be enabled simultaneously" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ldap-auth/3.4.x.json b/schemas/ldap-auth/3.4.x.json index 41b527b8..ece1547b 100644 --- a/schemas/ldap-auth/3.4.x.json +++ b/schemas/ldap-auth/3.4.x.json @@ -2,8 +2,9 @@ "fields": [ { "consumer": { - "eq": null, "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, @@ -17,7 +18,10 @@ "ws", "wss" ], + "required": true, + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", @@ -25,78 +29,74 @@ "https", "ws", "wss" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, - "entity_checks": [ - { - "conditional": { - "then_err": "'ldaps' and 'start_tls' cannot be enabled simultaneously", - "if_match": { - "eq": true - }, - "then_field": "start_tls", - "if_field": "ldaps", - "then_match": { - "eq": false - } - } - } - ], "fields": [ { "ldap_host": { + "description": "A string representing a host name, such as example.com.", "type": "string", "required": true } }, { "ldap_port": { + "default": 389, "type": "integer", "between": [ 0, 65535 ], "required": true, - "default": 389 + "description": "An integer representing a port number between 0 and 65535, inclusive." } }, { "ldaps": { "default": false, - "required": true, - "type": "boolean" + "description": "Set to `true` to connect using the LDAPS protocol (LDAP over TLS). When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "type": "boolean", + "required": true } }, { "start_tls": { "default": false, - "required": true, - "type": "boolean" + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "type": "boolean", + "required": true } }, { "verify_ldap_host": { "default": false, - "required": true, - "type": "boolean" + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "type": "boolean", + "required": true } }, { "base_dn": { + "description": "Base DN as the starting point for the search; e.g., dc=example,dc=com", "required": true, "type": "string" } }, { "attribute": { + "description": "Attribute to be used to search the user; e.g. cn", "required": true, "type": "string" } @@ -104,43 +104,68 @@ { "cache_ttl": { "default": 60, - "required": true, - "type": "number" + "description": "Cache expiry time in seconds.", + "type": "number", + "required": true } }, { "hide_credentials": { "default": false, - "required": true, - "type": "boolean" + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "type": "boolean", + "required": true } }, { "timeout": { "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", "type": "number" } }, { "keepalive": { "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", "type": "number" } }, { "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`.", "type": "string" } }, { "header_type": { "default": "ldap", + "description": "An optional string to use as part of the Authorization header", "type": "string" } } ], - "type": "record" + "entity_checks": [ + { + "conditional": { + "then_match": { + "eq": false + }, + "then_field": "start_tls", + "if_match": { + "eq": true + }, + "if_field": "ldaps", + "then_err": "'ldaps' and 'start_tls' cannot be enabled simultaneously" + } + } + ], + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/ldap-auth/3.5.x.json b/schemas/ldap-auth/3.5.x.json new file mode 100644 index 00000000..847e2f28 --- /dev/null +++ b/schemas/ldap-auth/3.5.x.json @@ -0,0 +1,171 @@ +{ + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "conditional": { + "then_match": { + "eq": false + }, + "then_field": "start_tls", + "if_match": { + "eq": true + }, + "if_field": "ldaps", + "then_err": "'ldaps' and 'start_tls' cannot be enabled simultaneously" + } + } + ], + "fields": [ + { + "ldap_host": { + "required": true, + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "ldap_port": { + "type": "integer", + "required": true, + "between": [ + 0, + 65535 + ], + "default": 389, + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "ldaps": { + "description": "Set to `true` to connect using the LDAPS protocol (LDAP over TLS). When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "start_tls": { + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "verify_ldap_host": { + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., dc=example,dc=com", + "type": "string", + "required": true + } + }, + { + "attribute": { + "description": "Attribute to be used to search the user; e.g. cn", + "type": "string", + "required": true + } + }, + { + "cache_ttl": { + "description": "Cache expiry time in seconds.", + "default": 60, + "type": "number", + "required": true + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "timeout": { + "default": 10000, + "type": "number", + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server." + } + }, + { + "keepalive": { + "default": 60000, + "type": "number", + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed." + } + }, + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`." + } + }, + { + "header_type": { + "default": "ldap", + "type": "string", + "description": "An optional string to use as part of the Authorization header" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/ldap-auth/3.6.x.json b/schemas/ldap-auth/3.6.x.json new file mode 100644 index 00000000..340ad75f --- /dev/null +++ b/schemas/ldap-auth/3.6.x.json @@ -0,0 +1,171 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "conditional": { + "then_match": { + "eq": false + }, + "then_err": "'ldaps' and 'start_tls' cannot be enabled simultaneously", + "if_match": { + "eq": true + }, + "if_field": "ldaps", + "then_field": "start_tls" + } + } + ], + "type": "record", + "fields": [ + { + "ldap_host": { + "required": true, + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "ldap_port": { + "type": "integer", + "default": 389, + "between": [ + 0, + 65535 + ], + "required": true, + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "ldaps": { + "required": true, + "type": "boolean", + "default": false, + "description": "Set to `true` to connect using the LDAPS protocol (LDAP over TLS). When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled." + } + }, + { + "start_tls": { + "required": true, + "type": "boolean", + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled." + } + }, + { + "verify_ldap_host": { + "required": true, + "type": "boolean", + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive." + } + }, + { + "base_dn": { + "required": true, + "type": "string", + "description": "Base DN as the starting point for the search; e.g., dc=example,dc=com" + } + }, + { + "attribute": { + "required": true, + "type": "string", + "description": "Attribute to be used to search the user; e.g. cn" + } + }, + { + "cache_ttl": { + "required": true, + "type": "number", + "default": 60, + "description": "Cache expiry time in seconds." + } + }, + { + "hide_credentials": { + "required": true, + "type": "boolean", + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request." + } + }, + { + "timeout": { + "type": "number", + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server." + } + }, + { + "keepalive": { + "type": "number", + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed." + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`.", + "type": "string" + } + }, + { + "header_type": { + "type": "string", + "default": "ldap", + "description": "An optional string to use as part of the Authorization header" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/ldap-auth/3.7.x.json b/schemas/ldap-auth/3.7.x.json new file mode 100644 index 00000000..7ed76d47 --- /dev/null +++ b/schemas/ldap-auth/3.7.x.json @@ -0,0 +1,171 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "ldap_host": { + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "ldap_port": { + "default": 389, + "required": true, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "ldaps": { + "required": true, + "type": "boolean", + "description": "Set to `true` to connect using the LDAPS protocol (LDAP over TLS). When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "default": false + } + }, + { + "start_tls": { + "required": true, + "type": "boolean", + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "default": false + } + }, + { + "verify_ldap_host": { + "required": true, + "type": "boolean", + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "default": false + } + }, + { + "base_dn": { + "required": true, + "type": "string", + "description": "Base DN as the starting point for the search; e.g., dc=example,dc=com" + } + }, + { + "attribute": { + "required": true, + "type": "string", + "description": "Attribute to be used to search the user; e.g. cn" + } + }, + { + "cache_ttl": { + "required": true, + "type": "number", + "description": "Cache expiry time in seconds.", + "default": 60 + } + }, + { + "hide_credentials": { + "required": true, + "type": "boolean", + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "default": false + } + }, + { + "timeout": { + "type": "number", + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "default": 10000 + } + }, + { + "keepalive": { + "type": "number", + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "default": 60000 + } + }, + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`." + } + }, + { + "header_type": { + "type": "string", + "description": "An optional string to use as part of the Authorization header", + "default": "ldap" + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_field": "ldaps", + "then_err": "'ldaps' and 'start_tls' cannot be enabled simultaneously", + "if_match": { + "eq": true + }, + "then_field": "start_tls", + "then_match": { + "eq": false + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/ldap-auth/3.8.x.json b/schemas/ldap-auth/3.8.x.json new file mode 100644 index 00000000..109c2af9 --- /dev/null +++ b/schemas/ldap-auth/3.8.x.json @@ -0,0 +1,178 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": true, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "ldap_host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "ldap_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true, + "between": [ + 0, + 65535 + ], + "type": "integer", + "default": 389 + } + }, + { + "ldaps": { + "description": "Set to `true` to connect using the LDAPS protocol (LDAP over TLS). When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "start_tls": { + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "verify_ldap_host": { + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., dc=example,dc=com", + "required": true, + "type": "string" + } + }, + { + "attribute": { + "description": "Attribute to be used to search the user; e.g. cn", + "required": true, + "type": "string" + } + }, + { + "cache_ttl": { + "description": "Cache expiry time in seconds.", + "required": true, + "type": "number", + "default": 60 + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number", + "default": 10000 + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number", + "default": 60000 + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`.", + "type": "string" + } + }, + { + "header_type": { + "description": "An optional string to use as part of the Authorization header", + "type": "string", + "default": "ldap" + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "required": false, + "type": "string" + } + } + ], + "type": "record", + "entity_checks": [ + { + "conditional": { + "then_field": "start_tls", + "if_field": "ldaps", + "then_err": "'ldaps' and 'start_tls' cannot be enabled simultaneously", + "if_match": { + "eq": true + }, + "then_match": { + "eq": false + } + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/ldap-auth/3.9.x.json b/schemas/ldap-auth/3.9.x.json new file mode 100644 index 00000000..c165cd47 --- /dev/null +++ b/schemas/ldap-auth/3.9.x.json @@ -0,0 +1,178 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": true, + "type": "set" + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "conditional": { + "then_err": "'ldaps' and 'start_tls' cannot be enabled simultaneously", + "if_match": { + "eq": true + }, + "then_field": "start_tls", + "if_field": "ldaps", + "then_match": { + "eq": false + } + } + } + ], + "fields": [ + { + "ldap_host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "ldap_port": { + "between": [ + 0, + 65535 + ], + "required": true, + "type": "integer", + "default": 389, + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "ldaps": { + "default": false, + "description": "Set to `true` to connect using the LDAPS protocol (LDAP over TLS). When `ldaps` is configured, you must use port 636. If the `ldap` setting is enabled, ensure the `start_tls` setting is disabled.", + "required": true, + "type": "boolean" + } + }, + { + "start_tls": { + "default": false, + "description": "Set it to `true` to issue StartTLS (Transport Layer Security) extended operation over `ldap` connection. If the `start_tls` setting is enabled, ensure the `ldaps` setting is disabled.", + "required": true, + "type": "boolean" + } + }, + { + "verify_ldap_host": { + "default": false, + "description": "Set to `true` to authenticate LDAP server. The server certificate will be verified according to the CA certificates specified by the `lua_ssl_trusted_certificate` directive.", + "required": true, + "type": "boolean" + } + }, + { + "base_dn": { + "description": "Base DN as the starting point for the search; e.g., dc=example,dc=com", + "required": true, + "type": "string" + } + }, + { + "attribute": { + "description": "Attribute to be used to search the user; e.g. cn", + "required": true, + "type": "string" + } + }, + { + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "required": true, + "type": "number" + } + }, + { + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream server. It will be removed by Kong before proxying the request.", + "required": true, + "type": "boolean" + } + }, + { + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when waiting for connection with LDAP server.", + "type": "number" + } + }, + { + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection to LDAP server will live before being closed.", + "type": "number" + } + }, + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`." + } + }, + { + "header_type": { + "default": "ldap", + "description": "An optional string to use as part of the Authorization header", + "type": "string" + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "required": false, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/llm-as-judge/.gitkeep b/schemas/llm-as-judge/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/schemas/loggly/3.10.x.json b/schemas/loggly/3.10.x.json new file mode 100644 index 00000000..a8ec52da --- /dev/null +++ b/schemas/loggly/3.10.x.json @@ -0,0 +1,173 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "logs-01.loggly.com", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 514, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "key": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": true + } + }, + { + "tags": { + "default": [ + "kong" + ], + "elements": { + "type": "string" + }, + "type": "set" + } + }, + { + "log_level": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "default": "info", + "type": "string" + } + }, + { + "successful_severity": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "default": "info", + "type": "string" + } + }, + { + "client_errors_severity": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "default": "info", + "type": "string" + } + }, + { + "server_errors_severity": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "default": "info", + "type": "string" + } + }, + { + "timeout": { + "default": 10000, + "type": "number" + } + }, + { + "custom_fields_by_lua": { + "description": "Lua code as a key-value map", + "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "type": "string", + "len_min": 1 + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/loggly/3.11.x.json b/schemas/loggly/3.11.x.json new file mode 100644 index 00000000..21485572 --- /dev/null +++ b/schemas/loggly/3.11.x.json @@ -0,0 +1,173 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "host": { + "default": "logs-01.loggly.com", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 514, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "key": { + "encrypted": true, + "required": true, + "referenceable": true, + "type": "string" + } + }, + { + "tags": { + "type": "set", + "default": [ + "kong" + ], + "elements": { + "type": "string" + } + } + }, + { + "log_level": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "default": "info", + "type": "string" + } + }, + { + "successful_severity": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "default": "info", + "type": "string" + } + }, + { + "client_errors_severity": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "default": "info", + "type": "string" + } + }, + { + "server_errors_severity": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "default": "info", + "type": "string" + } + }, + { + "timeout": { + "default": 10000, + "type": "number" + } + }, + { + "custom_fields_by_lua": { + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "len_min": 1, + "type": "string" + }, + "description": "Lua code as a key-value map", + "type": "map" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/loggly/3.12.x.json b/schemas/loggly/3.12.x.json new file mode 100644 index 00000000..0498c898 --- /dev/null +++ b/schemas/loggly/3.12.x.json @@ -0,0 +1,171 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "logs-01.loggly.com", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 514, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "key": { + "type": "string", + "encrypted": true, + "referenceable": true, + "required": true + } + }, + { + "tags": { + "type": "set", + "default": [ + "kong" + ], + "elements": { + "type": "string" + } + } + }, + { + "log_level": { + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "successful_severity": { + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "client_errors_severity": { + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "server_errors_severity": { + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "timeout": { + "type": "number", + "default": 10000 + } + }, + { + "custom_fields_by_lua": { + "type": "map", + "description": "Lua code as a key-value map", + "values": { + "type": "string", + "len_min": 1 + }, + "keys": { + "type": "string", + "len_min": 1 + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/loggly/3.4.x.json b/schemas/loggly/3.4.x.json index ed600985..7d6520ed 100644 --- a/schemas/loggly/3.4.x.json +++ b/schemas/loggly/3.4.x.json @@ -8,6 +8,9 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", "elements": { "one_of": [ "grpc", @@ -21,46 +24,54 @@ "ws", "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "host": { - "type": "string", - "default": "logs-01.loggly.com" + "default": "logs-01.loggly.com", + "description": "A string representing a host name, such as example.com.", + "type": "string" } }, { "port": { + "default": 514, + "description": "An integer representing a port number between 0 and 65535, inclusive.", "between": [ 0, 65535 ], - "type": "integer", - "default": 514 + "type": "integer" } }, { "key": { - "type": "string", - "required": true, "encrypted": true, - "referenceable": true + "referenceable": true, + "required": true, + "type": "string" } }, { "tags": { - "type": "set", "default": [ "kong" ], + "type": "set", "elements": { "type": "string" } @@ -68,7 +79,6 @@ }, { "log_level": { - "type": "string", "default": "info", "one_of": [ "debug", @@ -79,12 +89,12 @@ "crit", "alert", "emerg" - ] + ], + "type": "string" } }, { "successful_severity": { - "type": "string", "default": "info", "one_of": [ "debug", @@ -95,12 +105,12 @@ "crit", "alert", "emerg" - ] + ], + "type": "string" } }, { "client_errors_severity": { - "type": "string", "default": "info", "one_of": [ "debug", @@ -111,12 +121,12 @@ "crit", "alert", "emerg" - ] + ], + "type": "string" } }, { "server_errors_severity": { - "type": "string", "default": "info", "one_of": [ "debug", @@ -127,7 +137,8 @@ "crit", "alert", "emerg" - ] + ], + "type": "string" } }, { @@ -138,20 +149,25 @@ }, { "custom_fields_by_lua": { - "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, "keys": { "len_min": 1, "type": "string" }, - "values": { - "type": "string", - "len_min": 1 - } + "type": "map", + "description": "Lua code as a key-value map" } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/loggly/3.5.x.json b/schemas/loggly/3.5.x.json new file mode 100644 index 00000000..69e34b16 --- /dev/null +++ b/schemas/loggly/3.5.x.json @@ -0,0 +1,173 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "host": { + "default": "logs-01.loggly.com", + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 514, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "key": { + "encrypted": true, + "referenceable": true, + "type": "string", + "required": true + } + }, + { + "tags": { + "default": [ + "kong" + ], + "type": "set", + "elements": { + "type": "string" + } + } + }, + { + "log_level": { + "default": "info", + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "successful_severity": { + "default": "info", + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "client_errors_severity": { + "default": "info", + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "server_errors_severity": { + "default": "info", + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "timeout": { + "type": "number", + "default": 10000 + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, + "description": "Lua code as a key-value map" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/loggly/3.6.x.json b/schemas/loggly/3.6.x.json new file mode 100644 index 00000000..f837a43a --- /dev/null +++ b/schemas/loggly/3.6.x.json @@ -0,0 +1,173 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "logs-01.loggly.com", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "default": 514, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "key": { + "required": true, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "tags": { + "elements": { + "type": "string" + }, + "type": "set", + "default": [ + "kong" + ] + } + }, + { + "log_level": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "type": "string", + "default": "info" + } + }, + { + "successful_severity": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "type": "string", + "default": "info" + } + }, + { + "client_errors_severity": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "type": "string", + "default": "info" + } + }, + { + "server_errors_severity": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "type": "string", + "default": "info" + } + }, + { + "timeout": { + "default": 10000, + "type": "number" + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "description": "Lua code as a key-value map", + "values": { + "len_min": 1, + "type": "string" + } + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/loggly/3.7.x.json b/schemas/loggly/3.7.x.json new file mode 100644 index 00000000..7f635842 --- /dev/null +++ b/schemas/loggly/3.7.x.json @@ -0,0 +1,173 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com.", + "default": "logs-01.loggly.com" + } + }, + { + "port": { + "default": 514, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "key": { + "required": true, + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "tags": { + "elements": { + "type": "string" + }, + "type": "set", + "default": [ + "kong" + ] + } + }, + { + "log_level": { + "default": "info", + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "successful_severity": { + "default": "info", + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "client_errors_severity": { + "default": "info", + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "server_errors_severity": { + "default": "info", + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "timeout": { + "type": "number", + "default": 10000 + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "description": "Lua code as a key-value map", + "values": { + "type": "string", + "len_min": 1 + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/loggly/3.8.x.json b/schemas/loggly/3.8.x.json new file mode 100644 index 00000000..a9bae72c --- /dev/null +++ b/schemas/loggly/3.8.x.json @@ -0,0 +1,173 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "logs-01.loggly.com" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 514 + } + }, + { + "key": { + "referenceable": true, + "required": true, + "type": "string", + "encrypted": true + } + }, + { + "tags": { + "type": "set", + "default": [ + "kong" + ], + "elements": { + "type": "string" + } + } + }, + { + "log_level": { + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "successful_severity": { + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "client_errors_severity": { + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "server_errors_severity": { + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "timeout": { + "default": 10000, + "type": "number" + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "values": { + "type": "string", + "len_min": 1 + }, + "description": "Lua code as a key-value map" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/loggly/3.9.x.json b/schemas/loggly/3.9.x.json new file mode 100644 index 00000000..7f4564c6 --- /dev/null +++ b/schemas/loggly/3.9.x.json @@ -0,0 +1,173 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "host": { + "default": "logs-01.loggly.com", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 514, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "key": { + "encrypted": true, + "referenceable": true, + "required": true, + "type": "string" + } + }, + { + "tags": { + "default": [ + "kong" + ], + "elements": { + "type": "string" + }, + "type": "set" + } + }, + { + "log_level": { + "default": "info", + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "successful_severity": { + "default": "info", + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "client_errors_severity": { + "default": "info", + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "server_errors_severity": { + "default": "info", + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "timeout": { + "default": 10000, + "type": "number" + } + }, + { + "custom_fields_by_lua": { + "description": "Lua code as a key-value map", + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/mocking/3.10.x.json b/schemas/mocking/3.10.x.json new file mode 100644 index 00000000..786685d0 --- /dev/null +++ b/schemas/mocking/3.10.x.json @@ -0,0 +1,131 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.api_specification_filename", + "config.api_specification" + ] + } + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "api_specification_filename": { + "description": "The path and name of the specification file loaded into Kong Gateway's database. You cannot use this option for DB-less or hybrid mode.", + "type": "string", + "required": false + } + }, + { + "api_specification": { + "description": "The contents of the specification file. You must use this option for hybrid or DB-less mode. You can include the full specification as part of the configuration. In Kong Manager, you can copy and paste the contents of the spec directly into the `Config.Api Specification` text field.", + "type": "string", + "required": false + } + }, + { + "random_delay": { + "description": "Enables a random delay in the mocked response. Introduces delays to simulate real-time response times by APIs.", + "default": false, + "type": "boolean" + } + }, + { + "max_delay_time": { + "description": "The maximum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be greater than the `min_delay_time`.", + "default": 1, + "type": "number" + } + }, + { + "min_delay_time": { + "description": "The minimum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be less than the `max_delay_time`.", + "default": 0.001, + "type": "number" + } + }, + { + "random_examples": { + "description": "Randomly selects one example and returns it. This parameter requires the spec to have multiple examples configured.", + "default": false, + "type": "boolean" + } + }, + { + "included_status_codes": { + "description": "A global list of the HTTP status codes that can only be selected and returned.", + "type": "array", + "elements": { + "type": "integer" + } + } + }, + { + "random_status_code": { + "description": "Determines whether to randomly select an HTTP status code from the responses of the corresponding API method. The default value is `false`, which means the minimum HTTP status code is always selected and returned.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "include_base_path": { + "description": "Indicates whether to include the base path when performing path match evaluation.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "custom_base_path": { + "type": "string", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "starts_with": "/", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/mocking/3.11.x.json b/schemas/mocking/3.11.x.json new file mode 100644 index 00000000..03b96c37 --- /dev/null +++ b/schemas/mocking/3.11.x.json @@ -0,0 +1,131 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "api_specification_filename": { + "required": false, + "description": "The path and name of the specification file loaded into Kong Gateway's database. You cannot use this option for DB-less or hybrid mode.", + "type": "string" + } + }, + { + "api_specification": { + "required": false, + "description": "The contents of the specification file. You must use this option for hybrid or DB-less mode. You can include the full specification as part of the configuration. In Kong Manager, you can copy and paste the contents of the spec directly into the `Config.Api Specification` text field.", + "type": "string" + } + }, + { + "random_delay": { + "default": false, + "description": "Enables a random delay in the mocked response. Introduces delays to simulate real-time response times by APIs.", + "type": "boolean" + } + }, + { + "max_delay_time": { + "default": 1, + "description": "The maximum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be greater than the `min_delay_time`.", + "type": "number" + } + }, + { + "min_delay_time": { + "default": 0.001, + "description": "The minimum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be less than the `max_delay_time`.", + "type": "number" + } + }, + { + "random_examples": { + "default": false, + "description": "Randomly selects one example and returns it. This parameter requires the spec to have multiple examples configured.", + "type": "boolean" + } + }, + { + "included_status_codes": { + "type": "array", + "description": "A global list of the HTTP status codes that can only be selected and returned.", + "elements": { + "type": "integer" + } + } + }, + { + "random_status_code": { + "description": "Determines whether to randomly select an HTTP status code from the responses of the corresponding API method. The default value is `false`, which means the minimum HTTP status code is always selected and returned.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "include_base_path": { + "description": "Indicates whether to include the base path when performing path match evaluation.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "custom_base_path": { + "required": false, + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "starts_with": "/", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.api_specification_filename", + "config.api_specification" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/mocking/3.12.x.json b/schemas/mocking/3.12.x.json new file mode 100644 index 00000000..68ff8ad2 --- /dev/null +++ b/schemas/mocking/3.12.x.json @@ -0,0 +1,131 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.api_specification_filename", + "config.api_specification" + ] + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "api_specification_filename": { + "description": "The path and name of the specification file loaded into Kong Gateway's database. You cannot use this option for DB-less or hybrid mode.", + "type": "string", + "required": false + } + }, + { + "api_specification": { + "description": "The contents of the specification file. You must use this option for hybrid or DB-less mode. You can include the full specification as part of the configuration. In Kong Manager, you can copy and paste the contents of the spec directly into the `Config.Api Specification` text field.", + "type": "string", + "required": false + } + }, + { + "random_delay": { + "description": "Enables a random delay in the mocked response. Introduces delays to simulate real-time response times by APIs.", + "default": false, + "type": "boolean" + } + }, + { + "max_delay_time": { + "description": "The maximum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be greater than the `min_delay_time`.", + "default": 1, + "type": "number" + } + }, + { + "min_delay_time": { + "description": "The minimum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be less than the `max_delay_time`.", + "default": 0.001, + "type": "number" + } + }, + { + "random_examples": { + "description": "Randomly selects one example and returns it. This parameter requires the spec to have multiple examples configured.", + "default": false, + "type": "boolean" + } + }, + { + "included_status_codes": { + "description": "A global list of the HTTP status codes that can only be selected and returned.", + "type": "array", + "elements": { + "type": "integer" + } + } + }, + { + "random_status_code": { + "description": "Determines whether to randomly select an HTTP status code from the responses of the corresponding API method. The default value is `false`, which means the minimum HTTP status code is always selected and returned.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "include_base_path": { + "description": "Indicates whether to include the base path when performing path match evaluation.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "custom_base_path": { + "type": "string", + "starts_with": "/", + "required": false, + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/mocking/3.4.x.json b/schemas/mocking/3.4.x.json index 6c2bfd09..5a53d3f9 100644 --- a/schemas/mocking/3.4.x.json +++ b/schemas/mocking/3.4.x.json @@ -8,77 +8,102 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "api_specification_filename": { + "required": false, "type": "string", - "required": false + "description": "The path and name of the specification file loaded into Kong Gateway's database. You cannot use this option for DB-less or hybrid mode." } }, { "api_specification": { + "description": "The contents of the specification file. You must use this option for hybrid or DB-less mode. You can include the full specification as part of the configuration. In Kong Manager, you can copy and paste the contents of the spec directly into the `Config.Api Specification` text field.", "required": false, "type": "string" } }, { "random_delay": { - "type": "boolean", - "default": false + "default": false, + "description": "Enables a random delay in the mocked response. Introduces delays to simulate real-time response times by APIs.", + "type": "boolean" } }, { "max_delay_time": { - "type": "number", - "default": 1 + "default": 1, + "description": "The maximum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be greater than the `min_delay_time`.", + "type": "number" } }, { "min_delay_time": { - "type": "number", - "default": 0.001 + "default": 0.001, + "description": "The minimum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be less than the `max_delay_time`.", + "type": "number" } }, { "random_examples": { - "type": "boolean", - "default": false + "default": false, + "description": "Randomly selects one example and returns it. This parameter requires the spec to have multiple examples configured.", + "type": "boolean" } }, { "included_status_codes": { + "type": "array", "elements": { "type": "integer" }, - "type": "array" + "description": "A global list of the HTTP status codes that can only be selected and returned." } }, { "random_status_code": { - "required": true, "default": false, + "required": true, + "description": "Determines whether to randomly select an HTTP status code from the responses of the corresponding API method. The default value is `false`, which means the minimum HTTP status code is always selected and returned.", "type": "boolean" } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.api_specification_filename", + "config.api_specification" + ] + } ] } \ No newline at end of file diff --git a/schemas/mocking/3.5.x.json b/schemas/mocking/3.5.x.json new file mode 100644 index 00000000..508b44bc --- /dev/null +++ b/schemas/mocking/3.5.x.json @@ -0,0 +1,117 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "api_specification_filename": { + "required": false, + "type": "string", + "description": "The path and name of the specification file loaded into Kong Gateway's database. You cannot use this option for DB-less or hybrid mode." + } + }, + { + "api_specification": { + "required": false, + "type": "string", + "description": "The contents of the specification file. You must use this option for hybrid or DB-less mode. You can include the full specification as part of the configuration. In Kong Manager, you can copy and paste the contents of the spec directly into the `Config.Api Specification` text field." + } + }, + { + "random_delay": { + "default": false, + "type": "boolean", + "description": "Enables a random delay in the mocked response. Introduces delays to simulate real-time response times by APIs." + } + }, + { + "max_delay_time": { + "default": 1, + "type": "number", + "description": "The maximum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be greater than the `min_delay_time`." + } + }, + { + "min_delay_time": { + "default": 0.001, + "type": "number", + "description": "The minimum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be less than the `max_delay_time`." + } + }, + { + "random_examples": { + "default": false, + "type": "boolean", + "description": "Randomly selects one example and returns it. This parameter requires the spec to have multiple examples configured." + } + }, + { + "included_status_codes": { + "description": "A global list of the HTTP status codes that can only be selected and returned.", + "type": "array", + "elements": { + "type": "integer" + } + } + }, + { + "random_status_code": { + "required": true, + "default": false, + "type": "boolean", + "description": "Determines whether to randomly select an HTTP status code from the responses of the corresponding API method. The default value is `false`, which means the minimum HTTP status code is always selected and returned." + } + }, + { + "include_base_path": { + "required": true, + "default": false, + "type": "boolean", + "description": "Indicates whether to include the base path when performing path match evaluation." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.api_specification_filename", + "config.api_specification" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/mocking/3.6.x.json b/schemas/mocking/3.6.x.json new file mode 100644 index 00000000..339afb19 --- /dev/null +++ b/schemas/mocking/3.6.x.json @@ -0,0 +1,117 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.api_specification_filename", + "config.api_specification" + ] + } + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "api_specification_filename": { + "required": false, + "type": "string", + "description": "The path and name of the specification file loaded into Kong Gateway's database. You cannot use this option for DB-less or hybrid mode." + } + }, + { + "api_specification": { + "required": false, + "type": "string", + "description": "The contents of the specification file. You must use this option for hybrid or DB-less mode. You can include the full specification as part of the configuration. In Kong Manager, you can copy and paste the contents of the spec directly into the `Config.Api Specification` text field." + } + }, + { + "random_delay": { + "type": "boolean", + "default": false, + "description": "Enables a random delay in the mocked response. Introduces delays to simulate real-time response times by APIs." + } + }, + { + "max_delay_time": { + "type": "number", + "default": 1, + "description": "The maximum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be greater than the `min_delay_time`." + } + }, + { + "min_delay_time": { + "type": "number", + "default": 0.001, + "description": "The minimum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be less than the `max_delay_time`." + } + }, + { + "random_examples": { + "type": "boolean", + "default": false, + "description": "Randomly selects one example and returns it. This parameter requires the spec to have multiple examples configured." + } + }, + { + "included_status_codes": { + "elements": { + "type": "integer" + }, + "type": "array", + "description": "A global list of the HTTP status codes that can only be selected and returned." + } + }, + { + "random_status_code": { + "required": true, + "type": "boolean", + "default": false, + "description": "Determines whether to randomly select an HTTP status code from the responses of the corresponding API method. The default value is `false`, which means the minimum HTTP status code is always selected and returned." + } + }, + { + "include_base_path": { + "required": true, + "type": "boolean", + "default": false, + "description": "Indicates whether to include the base path when performing path match evaluation." + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/mocking/3.7.x.json b/schemas/mocking/3.7.x.json new file mode 100644 index 00000000..20ed3e0d --- /dev/null +++ b/schemas/mocking/3.7.x.json @@ -0,0 +1,131 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "api_specification_filename": { + "required": false, + "description": "The path and name of the specification file loaded into Kong Gateway's database. You cannot use this option for DB-less or hybrid mode.", + "type": "string" + } + }, + { + "api_specification": { + "required": false, + "description": "The contents of the specification file. You must use this option for hybrid or DB-less mode. You can include the full specification as part of the configuration. In Kong Manager, you can copy and paste the contents of the spec directly into the `Config.Api Specification` text field.", + "type": "string" + } + }, + { + "random_delay": { + "description": "Enables a random delay in the mocked response. Introduces delays to simulate real-time response times by APIs.", + "type": "boolean", + "default": false + } + }, + { + "max_delay_time": { + "description": "The maximum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be greater than the `min_delay_time`.", + "type": "number", + "default": 1 + } + }, + { + "min_delay_time": { + "description": "The minimum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be less than the `max_delay_time`.", + "type": "number", + "default": 0.001 + } + }, + { + "random_examples": { + "description": "Randomly selects one example and returns it. This parameter requires the spec to have multiple examples configured.", + "type": "boolean", + "default": false + } + }, + { + "included_status_codes": { + "elements": { + "type": "integer" + }, + "description": "A global list of the HTTP status codes that can only be selected and returned.", + "type": "array" + } + }, + { + "random_status_code": { + "required": true, + "description": "Determines whether to randomly select an HTTP status code from the responses of the corresponding API method. The default value is `false`, which means the minimum HTTP status code is always selected and returned.", + "type": "boolean", + "default": false + } + }, + { + "include_base_path": { + "required": true, + "description": "Indicates whether to include the base path when performing path match evaluation.", + "type": "boolean", + "default": false + } + }, + { + "custom_base_path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "required": false, + "type": "string", + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "starts_with": "/" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.api_specification_filename", + "config.api_specification" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/mocking/3.8.x.json b/schemas/mocking/3.8.x.json new file mode 100644 index 00000000..1901c745 --- /dev/null +++ b/schemas/mocking/3.8.x.json @@ -0,0 +1,131 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "api_specification_filename": { + "description": "The path and name of the specification file loaded into Kong Gateway's database. You cannot use this option for DB-less or hybrid mode.", + "required": false, + "type": "string" + } + }, + { + "api_specification": { + "description": "The contents of the specification file. You must use this option for hybrid or DB-less mode. You can include the full specification as part of the configuration. In Kong Manager, you can copy and paste the contents of the spec directly into the `Config.Api Specification` text field.", + "required": false, + "type": "string" + } + }, + { + "random_delay": { + "description": "Enables a random delay in the mocked response. Introduces delays to simulate real-time response times by APIs.", + "type": "boolean", + "default": false + } + }, + { + "max_delay_time": { + "description": "The maximum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be greater than the `min_delay_time`.", + "type": "number", + "default": 1 + } + }, + { + "min_delay_time": { + "description": "The minimum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be less than the `max_delay_time`.", + "type": "number", + "default": 0.001 + } + }, + { + "random_examples": { + "description": "Randomly selects one example and returns it. This parameter requires the spec to have multiple examples configured.", + "type": "boolean", + "default": false + } + }, + { + "included_status_codes": { + "description": "A global list of the HTTP status codes that can only be selected and returned.", + "type": "array", + "elements": { + "type": "integer" + } + } + }, + { + "random_status_code": { + "description": "Determines whether to randomly select an HTTP status code from the responses of the corresponding API method. The default value is `false`, which means the minimum HTTP status code is always selected and returned.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "include_base_path": { + "description": "Indicates whether to include the base path when performing path match evaluation.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "custom_base_path": { + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "required": false, + "starts_with": "/", + "type": "string", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.api_specification_filename", + "config.api_specification" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/mocking/3.9.x.json b/schemas/mocking/3.9.x.json new file mode 100644 index 00000000..246c1047 --- /dev/null +++ b/schemas/mocking/3.9.x.json @@ -0,0 +1,131 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.api_specification_filename", + "config.api_specification" + ] + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "api_specification_filename": { + "description": "The path and name of the specification file loaded into Kong Gateway's database. You cannot use this option for DB-less or hybrid mode.", + "required": false, + "type": "string" + } + }, + { + "api_specification": { + "description": "The contents of the specification file. You must use this option for hybrid or DB-less mode. You can include the full specification as part of the configuration. In Kong Manager, you can copy and paste the contents of the spec directly into the `Config.Api Specification` text field.", + "required": false, + "type": "string" + } + }, + { + "random_delay": { + "default": false, + "description": "Enables a random delay in the mocked response. Introduces delays to simulate real-time response times by APIs.", + "type": "boolean" + } + }, + { + "max_delay_time": { + "default": 1, + "description": "The maximum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be greater than the `min_delay_time`.", + "type": "number" + } + }, + { + "min_delay_time": { + "default": 0.001, + "description": "The minimum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be less than the `max_delay_time`.", + "type": "number" + } + }, + { + "random_examples": { + "default": false, + "description": "Randomly selects one example and returns it. This parameter requires the spec to have multiple examples configured.", + "type": "boolean" + } + }, + { + "included_status_codes": { + "elements": { + "type": "integer" + }, + "description": "A global list of the HTTP status codes that can only be selected and returned.", + "type": "array" + } + }, + { + "random_status_code": { + "default": false, + "description": "Determines whether to randomly select an HTTP status code from the responses of the corresponding API method. The default value is `false`, which means the minimum HTTP status code is always selected and returned.", + "required": true, + "type": "boolean" + } + }, + { + "include_base_path": { + "default": false, + "description": "Indicates whether to include the base path when performing path match evaluation.", + "required": true, + "type": "boolean" + } + }, + { + "custom_base_path": { + "required": false, + "type": "string", + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "starts_with": "/" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/mtls-auth/3.10.x.json b/schemas/mtls-auth/3.10.x.json new file mode 100644 index 00000000..c413ea03 --- /dev/null +++ b/schemas/mtls-auth/3.10.x.json @@ -0,0 +1,210 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "type": "record", + "fields": [ + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "consumer_by": { + "type": "array", + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "username", + "custom_id" + ] + }, + "required": false + } + }, + { + "ca_certificates": { + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "type": "array", + "elements": { + "uuid": true, + "type": "string" + }, + "required": true + } + }, + { + "cache_ttl": { + "description": "Cache expiry time in seconds.", + "type": "number", + "default": 60, + "required": true + } + }, + { + "skip_consumer_lookup": { + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "allow_partial_chain": { + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "authenticated_group_by": { + "type": "string", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "one_of": [ + "CN", + "DN" + ], + "default": "CN", + "required": false + } + }, + { + "revocation_check_mode": { + "type": "string", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "one_of": [ + "SKIP", + "IGNORE_CA_ERROR", + "STRICT" + ], + "default": "IGNORE_CA_ERROR", + "required": false + } + }, + { + "http_timeout": { + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number", + "default": 30000 + } + }, + { + "cert_cache_ttl": { + "description": "The length of time in seconds between refreshes of the revocation check status cache.", + "type": "number", + "default": 60000 + } + }, + { + "send_ca_dn": { + "description": "Sends the distinguished names (DN) of the configured CA list in the TLS handshake message.", + "type": "boolean", + "default": false + } + }, + { + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "http_proxy_port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "https_proxy_port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/mtls-auth/3.11.x.json b/schemas/mtls-auth/3.11.x.json new file mode 100644 index 00000000..565d507b --- /dev/null +++ b/schemas/mtls-auth/3.11.x.json @@ -0,0 +1,210 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "entity_checks": [ + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "fields": [ + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "consumer_by": { + "required": false, + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "type": "array", + "default": [ + "username", + "custom_id" + ], + "elements": { + "one_of": [ + "username", + "custom_id" + ], + "type": "string" + } + } + }, + { + "ca_certificates": { + "type": "array", + "required": true, + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "elements": { + "type": "string", + "uuid": true + } + } + }, + { + "cache_ttl": { + "default": 60, + "required": true, + "description": "Cache expiry time in seconds.", + "type": "number" + } + }, + { + "skip_consumer_lookup": { + "default": false, + "required": true, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "type": "boolean" + } + }, + { + "allow_partial_chain": { + "default": false, + "required": true, + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "type": "boolean" + } + }, + { + "authenticated_group_by": { + "required": false, + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "one_of": [ + "CN", + "DN" + ], + "default": "CN", + "type": "string" + } + }, + { + "revocation_check_mode": { + "required": false, + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "one_of": [ + "SKIP", + "IGNORE_CA_ERROR", + "STRICT" + ], + "default": "IGNORE_CA_ERROR", + "type": "string" + } + }, + { + "http_timeout": { + "default": 30000, + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number" + } + }, + { + "cert_cache_ttl": { + "default": 60000, + "description": "The length of time in seconds between refreshes of the revocation check status cache.", + "type": "number" + } + }, + { + "send_ca_dn": { + "default": false, + "description": "Sends the distinguished names (DN) of the configured CA list in the TLS handshake message.", + "type": "boolean" + } + }, + { + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "http_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "https_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/mtls-auth/3.12.x.json b/schemas/mtls-auth/3.12.x.json new file mode 100644 index 00000000..fcedb714 --- /dev/null +++ b/schemas/mtls-auth/3.12.x.json @@ -0,0 +1,208 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "consumer_by": { + "type": "array", + "required": false, + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "username", + "custom_id" + ] + } + } + }, + { + "ca_certificates": { + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "elements": { + "uuid": true, + "type": "string" + }, + "type": "array", + "required": true + } + }, + { + "cache_ttl": { + "description": "Cache expiry time in seconds.", + "default": 60, + "type": "number", + "required": true + } + }, + { + "skip_consumer_lookup": { + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "allow_partial_chain": { + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "authenticated_group_by": { + "type": "string", + "required": false, + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "default": "CN", + "one_of": [ + "CN", + "DN" + ] + } + }, + { + "revocation_check_mode": { + "type": "string", + "required": false, + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "default": "IGNORE_CA_ERROR", + "one_of": [ + "SKIP", + "IGNORE_CA_ERROR", + "STRICT" + ] + } + }, + { + "http_timeout": { + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "default": 30000, + "type": "number" + } + }, + { + "cert_cache_ttl": { + "description": "The length of time in seconds between refreshes of the revocation check status cache.", + "default": 60000, + "type": "number" + } + }, + { + "send_ca_dn": { + "description": "Sends the distinguished names (DN) of the configured CA list in the TLS handshake message.", + "default": false, + "type": "boolean" + } + }, + { + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "http_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "http_proxy_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "https_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "https_proxy_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/mtls-auth/3.4.x.json b/schemas/mtls-auth/3.4.x.json index 369d2ebd..10382655 100644 --- a/schemas/mtls-auth/3.4.x.json +++ b/schemas/mtls-auth/3.4.x.json @@ -2,6 +2,7 @@ "fields": [ { "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, "reference": "consumers", "type": "foreign" @@ -9,28 +10,36 @@ }, { "protocols": { - "default": [ - "grpc", - "grpcs", - "http", - "https" - ], + "description": "A set of strings representing HTTP protocols.", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" + ] }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], "required": true, "type": "set" } }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, { "config": { - "required": true, "entity_checks": [ { "mutually_required": [ @@ -48,17 +57,19 @@ "fields": [ { "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", "type": "string" } }, { "consumer_by": { + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", "elements": { + "type": "string", "one_of": [ "username", "custom_id" - ], - "type": "string" + ] }, "default": [ "username", @@ -70,78 +81,94 @@ }, { "ca_certificates": { + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", "required": true, "type": "array", "elements": { - "uuid": true, - "type": "string" + "type": "string", + "uuid": true } } }, { "cache_ttl": { - "type": "number", + "description": "Cache expiry time in seconds.", "required": true, + "type": "number", "default": 60 } }, { "skip_consumer_lookup": { - "type": "boolean", + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", "required": true, + "type": "boolean", "default": false } }, { "allow_partial_chain": { - "type": "boolean", + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", "required": true, + "type": "boolean", "default": false } }, { "authenticated_group_by": { - "default": "CN", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", "one_of": [ "CN", "DN" ], - "type": "string", - "required": false + "default": "CN", + "required": false, + "type": "string" } }, { "revocation_check_mode": { - "default": "IGNORE_CA_ERROR", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", "one_of": [ "SKIP", "IGNORE_CA_ERROR", "STRICT" ], - "type": "string", - "required": false + "default": "IGNORE_CA_ERROR", + "required": false, + "type": "string" } }, { "http_timeout": { - "default": 30000, - "type": "number" + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number", + "default": 30000 } }, { "cert_cache_ttl": { - "default": 60000, - "type": "number" + "description": "The length of time in milliseconds between refreshes of the revocation check status cache.", + "type": "number", + "default": 60000 } }, { "send_ca_dn": { - "default": false, - "type": "boolean" + "description": "Sends the distinguished names (DN) of the configured CA list in the TLS handshake message.", + "type": "boolean", + "default": false + } + }, + { + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" } }, { "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", "type": "string" } }, @@ -151,11 +178,13 @@ 0, 65535 ], - "type": "integer" + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." } }, { "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", "type": "string" } }, @@ -165,12 +194,17 @@ 0, 65535 ], - "type": "integer" + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/mtls-auth/3.5.x.json b/schemas/mtls-auth/3.5.x.json new file mode 100644 index 00000000..1a3adb56 --- /dev/null +++ b/schemas/mtls-auth/3.5.x.json @@ -0,0 +1,210 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumers" + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumer_groups" + } + }, + { + "config": { + "fields": [ + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "consumer_by": { + "required": false, + "type": "array", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "username", + "custom_id" + ] + }, + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled." + } + }, + { + "ca_certificates": { + "required": true, + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "type": "array", + "elements": { + "type": "string", + "uuid": true + } + } + }, + { + "cache_ttl": { + "required": true, + "type": "number", + "description": "Cache expiry time in seconds.", + "default": 60 + } + }, + { + "skip_consumer_lookup": { + "required": true, + "type": "boolean", + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "default": false + } + }, + { + "allow_partial_chain": { + "required": true, + "type": "boolean", + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "default": false + } + }, + { + "authenticated_group_by": { + "required": false, + "type": "string", + "default": "CN", + "one_of": [ + "CN", + "DN" + ], + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users." + } + }, + { + "revocation_check_mode": { + "required": false, + "type": "string", + "default": "IGNORE_CA_ERROR", + "one_of": [ + "SKIP", + "IGNORE_CA_ERROR", + "STRICT" + ], + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status." + } + }, + { + "http_timeout": { + "type": "number", + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "default": 30000 + } + }, + { + "cert_cache_ttl": { + "type": "number", + "description": "The length of time in milliseconds between refreshes of the revocation check status cache.", + "default": 60000 + } + }, + { + "send_ca_dn": { + "type": "boolean", + "description": "Sends the distinguished names (DN) of the configured CA list in the TLS handshake message.", + "default": false + } + }, + { + "default_consumer": { + "type": "string", + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "http_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "http_proxy_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "https_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "https_proxy_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "type": "record", + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/mtls-auth/3.6.x.json b/schemas/mtls-auth/3.6.x.json new file mode 100644 index 00000000..2f36db97 --- /dev/null +++ b/schemas/mtls-auth/3.6.x.json @@ -0,0 +1,210 @@ +{ + "fields": [ + { + "consumer": { + "eq": null, + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "eq": null, + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "consumer_by": { + "required": false, + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "username", + "custom_id" + ] + }, + "type": "array", + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled." + } + }, + { + "ca_certificates": { + "required": true, + "type": "array", + "elements": { + "uuid": true, + "type": "string" + }, + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`)." + } + }, + { + "cache_ttl": { + "required": true, + "type": "number", + "default": 60, + "description": "Cache expiry time in seconds." + } + }, + { + "skip_consumer_lookup": { + "required": true, + "type": "boolean", + "default": false, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list." + } + }, + { + "allow_partial_chain": { + "required": true, + "type": "boolean", + "default": false, + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates." + } + }, + { + "authenticated_group_by": { + "required": false, + "default": "CN", + "type": "string", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "one_of": [ + "CN", + "DN" + ] + } + }, + { + "revocation_check_mode": { + "required": false, + "default": "IGNORE_CA_ERROR", + "type": "string", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "one_of": [ + "SKIP", + "IGNORE_CA_ERROR", + "STRICT" + ] + } + }, + { + "http_timeout": { + "default": 30000, + "type": "number", + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL." + } + }, + { + "cert_cache_ttl": { + "default": 60000, + "type": "number", + "description": "The length of time in milliseconds between refreshes of the revocation check status cache." + } + }, + { + "send_ca_dn": { + "default": false, + "type": "boolean", + "description": "Sends the distinguished names (DN) of the configured CA list in the TLS handshake message." + } + }, + { + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "http_proxy_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "https_proxy_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ], + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/mtls-auth/3.7.x.json b/schemas/mtls-auth/3.7.x.json new file mode 100644 index 00000000..d5b8d80d --- /dev/null +++ b/schemas/mtls-auth/3.7.x.json @@ -0,0 +1,210 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "consumer_by": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "username", + "custom_id" + ] + }, + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "ca_certificates": { + "required": true, + "elements": { + "uuid": true, + "type": "string" + }, + "type": "array", + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`)." + } + }, + { + "cache_ttl": { + "required": true, + "type": "number", + "description": "Cache expiry time in seconds.", + "default": 60 + } + }, + { + "skip_consumer_lookup": { + "required": true, + "type": "boolean", + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "default": false + } + }, + { + "allow_partial_chain": { + "required": true, + "type": "boolean", + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "default": false + } + }, + { + "authenticated_group_by": { + "default": "CN", + "required": false, + "type": "string", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "one_of": [ + "CN", + "DN" + ] + } + }, + { + "revocation_check_mode": { + "default": "IGNORE_CA_ERROR", + "required": false, + "type": "string", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "one_of": [ + "SKIP", + "IGNORE_CA_ERROR", + "STRICT" + ] + } + }, + { + "http_timeout": { + "type": "number", + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "default": 30000 + } + }, + { + "cert_cache_ttl": { + "type": "number", + "description": "The length of time in milliseconds between refreshes of the revocation check status cache.", + "default": 60000 + } + }, + { + "send_ca_dn": { + "type": "boolean", + "description": "Sends the distinguished names (DN) of the configured CA list in the TLS handshake message.", + "default": false + } + }, + { + "default_consumer": { + "type": "string", + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "http_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "http_proxy_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "https_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "https_proxy_port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/mtls-auth/3.8.x.json b/schemas/mtls-auth/3.8.x.json new file mode 100644 index 00000000..8def91e2 --- /dev/null +++ b/schemas/mtls-auth/3.8.x.json @@ -0,0 +1,210 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "consumer_by": { + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "username", + "custom_id" + ] + }, + "type": "array", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "ca_certificates": { + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "required": true, + "type": "array", + "elements": { + "type": "string", + "uuid": true + } + } + }, + { + "cache_ttl": { + "description": "Cache expiry time in seconds.", + "required": true, + "type": "number", + "default": 60 + } + }, + { + "skip_consumer_lookup": { + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "allow_partial_chain": { + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "authenticated_group_by": { + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "required": false, + "one_of": [ + "CN", + "DN" + ], + "type": "string", + "default": "CN" + } + }, + { + "revocation_check_mode": { + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "required": false, + "one_of": [ + "SKIP", + "IGNORE_CA_ERROR", + "STRICT" + ], + "type": "string", + "default": "IGNORE_CA_ERROR" + } + }, + { + "http_timeout": { + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number", + "default": 30000 + } + }, + { + "cert_cache_ttl": { + "description": "The length of time in milliseconds between refreshes of the revocation check status cache.", + "type": "number", + "default": 60000 + } + }, + { + "send_ca_dn": { + "description": "Sends the distinguished names (DN) of the configured CA list in the TLS handshake message.", + "type": "boolean", + "default": false + } + }, + { + "default_consumer": { + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "http_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "http_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "https_proxy_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "https_proxy_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + } + ], + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/mtls-auth/3.9.x.json b/schemas/mtls-auth/3.9.x.json new file mode 100644 index 00000000..d65a598b --- /dev/null +++ b/schemas/mtls-auth/3.9.x.json @@ -0,0 +1,210 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "mutually_required": [ + "http_proxy_host", + "http_proxy_port" + ] + }, + { + "mutually_required": [ + "https_proxy_host", + "https_proxy_port" + ] + } + ], + "fields": [ + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "consumer_by": { + "required": false, + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "username", + "custom_id" + ] + }, + "description": "Whether to match the subject name of the client-supplied certificate against consumer's `username` and/or `custom_id` attribute. If set to `[]` (the empty array), then auto-matching is disabled.", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "ca_certificates": { + "elements": { + "uuid": true, + "type": "string" + }, + "description": "List of CA Certificates strings to use as Certificate Authorities (CA) when validating a client certificate. At least one is required but you can specify as many as needed. The value of this array is comprised of primary keys (`id`).", + "required": true, + "type": "array" + } + }, + { + "cache_ttl": { + "default": 60, + "description": "Cache expiry time in seconds.", + "required": true, + "type": "number" + } + }, + { + "skip_consumer_lookup": { + "default": false, + "description": "Skip consumer lookup once certificate is trusted against the configured CA list.", + "required": true, + "type": "boolean" + } + }, + { + "allow_partial_chain": { + "default": false, + "description": "Allow certificate verification with only an intermediate certificate. When this is enabled, you don't need to upload the full chain to Kong Certificates.", + "required": true, + "type": "boolean" + } + }, + { + "authenticated_group_by": { + "required": false, + "type": "string", + "default": "CN", + "description": "Certificate property to use as the authenticated group. Valid values are `CN` (Common Name) or `DN` (Distinguished Name). Once `skip_consumer_lookup` is applied, any client with a valid certificate can access the Service/API. To restrict usage to only some of the authenticated users, also add the ACL plugin (not covered here) and create allowed or denied groups of users.", + "one_of": [ + "CN", + "DN" + ] + } + }, + { + "revocation_check_mode": { + "required": false, + "type": "string", + "default": "IGNORE_CA_ERROR", + "description": "Controls client certificate revocation check behavior. If set to `SKIP`, no revocation check is performed. If set to `IGNORE_CA_ERROR`, the plugin respects the revocation status when either OCSP or CRL URL is set, and doesn't fail on network issues. If set to `STRICT`, the plugin only treats the certificate as valid when it's able to verify the revocation status.", + "one_of": [ + "SKIP", + "IGNORE_CA_ERROR", + "STRICT" + ] + } + }, + { + "http_timeout": { + "default": 30000, + "description": "HTTP timeout threshold in milliseconds when communicating with the OCSP server or downloading CRL.", + "type": "number" + } + }, + { + "cert_cache_ttl": { + "default": 60000, + "description": "The length of time in seconds between refreshes of the revocation check status cache.", + "type": "number" + } + }, + { + "send_ca_dn": { + "default": false, + "description": "Sends the distinguished names (DN) of the configured CA list in the TLS handshake message.", + "type": "boolean" + } + }, + { + "default_consumer": { + "type": "string", + "description": "The UUID or username of the consumer to use when a trusted client certificate is presented but no consumer matches. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "http_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "http_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "https_proxy_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "https_proxy_port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/oas-validation/3.10.x.json b/schemas/oas-validation/3.10.x.json new file mode 100644 index 00000000..80b14ed5 --- /dev/null +++ b/schemas/oas-validation/3.10.x.json @@ -0,0 +1,170 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "api_spec": { + "description": "The API specification defined using either Swagger or the OpenAPI. This can be either a JSON or YAML based file. If using a YAML file, the spec needs to be URI-Encoded to preserve the YAML format.", + "type": "string", + "required": true + } + }, + { + "verbose_response": { + "description": "If set to true, returns a detailed error message for invalid requests & responses. This is useful while testing.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "validate_request_body": { + "description": "If set to true, validates the request body content against the API specification.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "notify_only_request_validation_failure": { + "description": "If set to true, notifications via event hooks are enabled, but request based validation failures don't affect the request flow.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "validate_request_header_params": { + "description": "If set to true, validates HTTP header parameters against the API specification.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "validate_request_query_params": { + "description": "If set to true, validates query parameters against the API specification.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "validate_request_uri_params": { + "description": "If set to true, validates URI parameters in the request against the API specification.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "validate_response_body": { + "description": "If set to true, validates the response from the upstream services against the API specification. If validation fails, it results in an `HTTP 406 Not Acceptable` status code.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "notify_only_response_body_validation_failure": { + "description": "If set to true, notifications via event hooks are enabled, but response validation failures don't affect the response flow.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "query_parameter_check": { + "description": "If set to true, checks if query parameters in the request exist in the API specification.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "header_parameter_check": { + "description": "If set to true, checks if HTTP header parameters in the request exist in the API specification.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "allowed_header_parameters": { + "description": "List of header parameters in the request that will be ignored when performing HTTP header validation. These are additional headers added to an API request beyond those defined in the API specification. For example, you might include the HTTP header `User-Agent`, which lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.", + "type": "string", + "default": "Host,Content-Type,User-Agent,Accept,Content-Length", + "required": false + } + }, + { + "include_base_path": { + "description": "Indicates whether to include the base path when performing path match evaluation.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "api_spec_encoded": { + "description": "Indicates whether the api_spec is URI-Encoded.", + "type": "boolean", + "default": true, + "required": true + } + }, + { + "custom_base_path": { + "type": "string", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "starts_with": "/", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/oas-validation/3.11.x.json b/schemas/oas-validation/3.11.x.json new file mode 100644 index 00000000..d77668a9 --- /dev/null +++ b/schemas/oas-validation/3.11.x.json @@ -0,0 +1,170 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "api_spec": { + "required": true, + "description": "The API specification defined using either Swagger or the OpenAPI. This can be either a JSON or YAML based file. If using a YAML file, the spec needs to be URI-Encoded to preserve the YAML format.", + "type": "string" + } + }, + { + "verbose_response": { + "description": "If set to true, returns a detailed error message for invalid requests & responses. This is useful while testing.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "validate_request_body": { + "description": "If set to true, validates the request body content against the API specification.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "notify_only_request_validation_failure": { + "description": "If set to true, notifications via event hooks are enabled, but request based validation failures don't affect the request flow.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "validate_request_header_params": { + "description": "If set to true, validates HTTP header parameters against the API specification.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "validate_request_query_params": { + "description": "If set to true, validates query parameters against the API specification.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "validate_request_uri_params": { + "description": "If set to true, validates URI parameters in the request against the API specification.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "validate_response_body": { + "description": "If set to true, validates the response from the upstream services against the API specification. If validation fails, it results in an `HTTP 406 Not Acceptable` status code.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "notify_only_response_body_validation_failure": { + "description": "If set to true, notifications via event hooks are enabled, but response validation failures don't affect the response flow.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "query_parameter_check": { + "description": "If set to true, checks if query parameters in the request exist in the API specification.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "header_parameter_check": { + "description": "If set to true, checks if HTTP header parameters in the request exist in the API specification.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "allowed_header_parameters": { + "description": "List of header parameters in the request that will be ignored when performing HTTP header validation. These are additional headers added to an API request beyond those defined in the API specification. For example, you might include the HTTP header `User-Agent`, which lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.", + "required": false, + "default": "Host,Content-Type,User-Agent,Accept,Content-Length", + "type": "string" + } + }, + { + "include_base_path": { + "description": "Indicates whether to include the base path when performing path match evaluation.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "api_spec_encoded": { + "description": "Indicates whether the api_spec is URI-Encoded.", + "required": true, + "default": true, + "type": "boolean" + } + }, + { + "custom_base_path": { + "required": false, + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "starts_with": "/", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/oas-validation/3.12.x.json b/schemas/oas-validation/3.12.x.json new file mode 100644 index 00000000..5f6d802a --- /dev/null +++ b/schemas/oas-validation/3.12.x.json @@ -0,0 +1,168 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "api_spec": { + "description": "The API specification defined using either Swagger or the OpenAPI. This can be either a JSON or YAML based file. If using a YAML file, the spec needs to be URI-Encoded to preserve the YAML format.", + "type": "string", + "required": true + } + }, + { + "verbose_response": { + "description": "If set to true, returns a detailed error message for invalid requests & responses. This is useful while testing.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "validate_request_body": { + "description": "If set to true, validates the request body content against the API specification.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "notify_only_request_validation_failure": { + "description": "If set to true, notifications via event hooks are enabled, but request based validation failures don't affect the request flow.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "validate_request_header_params": { + "description": "If set to true, validates HTTP header parameters against the API specification.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "validate_request_query_params": { + "description": "If set to true, validates query parameters against the API specification.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "validate_request_uri_params": { + "description": "If set to true, validates URI parameters in the request against the API specification.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "validate_response_body": { + "description": "If set to true, validates the response from the upstream services against the API specification. If validation fails, it results in an `HTTP 406 Not Acceptable` status code.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "notify_only_response_body_validation_failure": { + "description": "If set to true, notifications via event hooks are enabled, but response validation failures don't affect the response flow.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "query_parameter_check": { + "description": "If set to true, checks if query parameters in the request exist in the API specification.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "header_parameter_check": { + "description": "If set to true, checks if HTTP header parameters in the request exist in the API specification.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "allowed_header_parameters": { + "description": "List of header parameters in the request that will be ignored when performing HTTP header validation. These are additional headers added to an API request beyond those defined in the API specification. For example, you might include the HTTP header `User-Agent`, which lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.", + "default": "Host,Content-Type,User-Agent,Accept,Content-Length", + "type": "string", + "required": false + } + }, + { + "include_base_path": { + "description": "Indicates whether to include the base path when performing path match evaluation.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "api_spec_encoded": { + "description": "Indicates whether the api_spec is URI-Encoded.", + "default": true, + "type": "boolean", + "required": true + } + }, + { + "custom_base_path": { + "type": "string", + "starts_with": "/", + "required": false, + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/oas-validation/3.4.x.json b/schemas/oas-validation/3.4.x.json index 97a7361e..f4f4483c 100644 --- a/schemas/oas-validation/3.4.x.json +++ b/schemas/oas-validation/3.4.x.json @@ -2,6 +2,8 @@ "fields": [ { "protocols": { + "type": "set", + "required": true, "default": [ "grpc", "grpcs", @@ -17,100 +19,138 @@ ], "type": "string" }, - "required": true, - "type": "set" + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." } }, { "config": { + "type": "record", "required": true, "fields": [ { "api_spec": { "type": "string", - "required": true + "required": true, + "description": "The API specification defined using either Swagger or the OpenAPI. This can be either a JSON or YAML based file. If using a YAML file, the spec needs to be URI-Encoded to preserve the YAML format." } }, { "verbose_response": { - "required": false, + "default": false, "type": "boolean", - "default": false + "description": "If set to true, returns a detailed error message for invalid requests & responses. This is useful while testing.", + "required": false } }, { "validate_request_body": { - "required": false, + "default": true, "type": "boolean", - "default": true + "description": "If set to true, validates the request body content against the API specification.", + "required": false } }, { "notify_only_request_validation_failure": { - "required": false, + "default": false, "type": "boolean", - "default": false + "description": "If set to true, notifications via event hooks are enabled, but request based validation failures don't affect the request flow.", + "required": false } }, { "validate_request_header_params": { - "required": false, + "default": true, "type": "boolean", - "default": true + "description": "If set to true, validates HTTP header parameters against the API specification.", + "required": false } }, { "validate_request_query_params": { - "required": false, + "default": true, "type": "boolean", - "default": true + "description": "If set to true, validates query parameters against the API specification.", + "required": false } }, { "validate_request_uri_params": { - "required": false, + "default": true, "type": "boolean", - "default": true + "description": "If set to true, validates URI parameters in the request against the API specification.", + "required": false } }, { "validate_response_body": { - "required": false, + "default": false, "type": "boolean", - "default": false + "description": "If set to true, validates the response from the upstream services against the API specification. If validation fails, it results in an `HTTP 406 Not Acceptable` status code.", + "required": false } }, { "notify_only_response_body_validation_failure": { - "required": false, + "default": false, "type": "boolean", - "default": false + "description": "If set to true, notifications via event hooks are enabled, but response validation failures don't affect the response flow.", + "required": false } }, { "query_parameter_check": { - "required": true, + "default": false, "type": "boolean", - "default": false + "description": "If set to true, checks if query parameters in the request exist in the API specification.", + "required": true } }, { "header_parameter_check": { - "required": true, + "default": false, "type": "boolean", - "default": false + "description": "If set to true, checks if HTTP header parameters in the request exist in the API specification.", + "required": true } }, { "allowed_header_parameters": { - "required": false, + "default": "Host,Content-Type,User-Agent,Accept,Content-Length", "type": "string", - "default": "Host,Content-Type,User-Agent,Accept,Content-Length" + "description": "List of header parameters in the request that will be ignored when performing HTTP header validation. These are additional headers added to an API request beyond those defined in the API specification. For example, you might include the HTTP header `User-Agent`, which lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.", + "required": false + } + }, + { + "include_base_path": { + "default": false, + "type": "boolean", + "description": "Indicates whether to include the base path when performing path match evaluation.", + "required": true + } + }, + { + "api_spec_encoded": { + "default": true, + "type": "boolean", + "description": "Indicates whether the api_spec is URI-Encoded.", + "required": true } } - ], - "type": "record" + ] } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/oas-validation/3.5.x.json b/schemas/oas-validation/3.5.x.json new file mode 100644 index 00000000..8fab93c8 --- /dev/null +++ b/schemas/oas-validation/3.5.x.json @@ -0,0 +1,156 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumer_groups" + } + }, + { + "config": { + "fields": [ + { + "api_spec": { + "required": true, + "description": "The API specification defined using either Swagger or the OpenAPI. This can be either a JSON or YAML based file. If using a YAML file, the spec needs to be URI-Encoded to preserve the YAML format.", + "type": "string" + } + }, + { + "verbose_response": { + "required": false, + "description": "If set to true, returns a detailed error message for invalid requests & responses. This is useful while testing.", + "type": "boolean", + "default": false + } + }, + { + "validate_request_body": { + "required": false, + "description": "If set to true, validates the request body content against the API specification.", + "type": "boolean", + "default": true + } + }, + { + "notify_only_request_validation_failure": { + "required": false, + "description": "If set to true, notifications via event hooks are enabled, but request based validation failures don't affect the request flow.", + "type": "boolean", + "default": false + } + }, + { + "validate_request_header_params": { + "required": false, + "description": "If set to true, validates HTTP header parameters against the API specification.", + "type": "boolean", + "default": true + } + }, + { + "validate_request_query_params": { + "required": false, + "description": "If set to true, validates query parameters against the API specification.", + "type": "boolean", + "default": true + } + }, + { + "validate_request_uri_params": { + "required": false, + "description": "If set to true, validates URI parameters in the request against the API specification.", + "type": "boolean", + "default": true + } + }, + { + "validate_response_body": { + "required": false, + "description": "If set to true, validates the response from the upstream services against the API specification. If validation fails, it results in an `HTTP 406 Not Acceptable` status code.", + "type": "boolean", + "default": false + } + }, + { + "notify_only_response_body_validation_failure": { + "required": false, + "description": "If set to true, notifications via event hooks are enabled, but response validation failures don't affect the response flow.", + "type": "boolean", + "default": false + } + }, + { + "query_parameter_check": { + "required": true, + "description": "If set to true, checks if query parameters in the request exist in the API specification.", + "type": "boolean", + "default": false + } + }, + { + "header_parameter_check": { + "required": true, + "description": "If set to true, checks if HTTP header parameters in the request exist in the API specification.", + "type": "boolean", + "default": false + } + }, + { + "allowed_header_parameters": { + "required": false, + "description": "List of header parameters in the request that will be ignored when performing HTTP header validation. These are additional headers added to an API request beyond those defined in the API specification. For example, you might include the HTTP header `User-Agent`, which lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.", + "type": "string", + "default": "Host,Content-Type,User-Agent,Accept,Content-Length" + } + }, + { + "include_base_path": { + "required": true, + "description": "Indicates whether to include the base path when performing path match evaluation.", + "type": "boolean", + "default": false + } + }, + { + "api_spec_encoded": { + "required": true, + "description": "Indicates whether the api_spec is URI-Encoded.", + "type": "boolean", + "default": true + } + } + ], + "type": "record", + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/oas-validation/3.6.x.json b/schemas/oas-validation/3.6.x.json new file mode 100644 index 00000000..01ab03de --- /dev/null +++ b/schemas/oas-validation/3.6.x.json @@ -0,0 +1,156 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "eq": null, + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "api_spec": { + "required": true, + "type": "string", + "description": "The API specification defined using either Swagger or the OpenAPI. This can be either a JSON or YAML based file. If using a YAML file, the spec needs to be URI-Encoded to preserve the YAML format." + } + }, + { + "verbose_response": { + "required": false, + "default": false, + "type": "boolean", + "description": "If set to true, returns a detailed error message for invalid requests & responses. This is useful while testing." + } + }, + { + "validate_request_body": { + "required": false, + "default": true, + "type": "boolean", + "description": "If set to true, validates the request body content against the API specification." + } + }, + { + "notify_only_request_validation_failure": { + "required": false, + "default": false, + "type": "boolean", + "description": "If set to true, notifications via event hooks are enabled, but request based validation failures don't affect the request flow." + } + }, + { + "validate_request_header_params": { + "required": false, + "default": true, + "type": "boolean", + "description": "If set to true, validates HTTP header parameters against the API specification." + } + }, + { + "validate_request_query_params": { + "required": false, + "default": true, + "type": "boolean", + "description": "If set to true, validates query parameters against the API specification." + } + }, + { + "validate_request_uri_params": { + "required": false, + "default": true, + "type": "boolean", + "description": "If set to true, validates URI parameters in the request against the API specification." + } + }, + { + "validate_response_body": { + "required": false, + "default": false, + "type": "boolean", + "description": "If set to true, validates the response from the upstream services against the API specification. If validation fails, it results in an `HTTP 406 Not Acceptable` status code." + } + }, + { + "notify_only_response_body_validation_failure": { + "required": false, + "default": false, + "type": "boolean", + "description": "If set to true, notifications via event hooks are enabled, but response validation failures don't affect the response flow." + } + }, + { + "query_parameter_check": { + "required": true, + "default": false, + "type": "boolean", + "description": "If set to true, checks if query parameters in the request exist in the API specification." + } + }, + { + "header_parameter_check": { + "required": true, + "default": false, + "type": "boolean", + "description": "If set to true, checks if HTTP header parameters in the request exist in the API specification." + } + }, + { + "allowed_header_parameters": { + "required": false, + "default": "Host,Content-Type,User-Agent,Accept,Content-Length", + "type": "string", + "description": "List of header parameters in the request that will be ignored when performing HTTP header validation. These are additional headers added to an API request beyond those defined in the API specification. For example, you might include the HTTP header `User-Agent`, which lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent." + } + }, + { + "include_base_path": { + "required": true, + "default": false, + "type": "boolean", + "description": "Indicates whether to include the base path when performing path match evaluation." + } + }, + { + "api_spec_encoded": { + "required": true, + "default": true, + "type": "boolean", + "description": "Indicates whether the api_spec is URI-Encoded." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/oas-validation/3.7.x.json b/schemas/oas-validation/3.7.x.json new file mode 100644 index 00000000..6eaf71b8 --- /dev/null +++ b/schemas/oas-validation/3.7.x.json @@ -0,0 +1,170 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "api_spec": { + "required": true, + "type": "string", + "description": "The API specification defined using either Swagger or the OpenAPI. This can be either a JSON or YAML based file. If using a YAML file, the spec needs to be URI-Encoded to preserve the YAML format." + } + }, + { + "verbose_response": { + "required": false, + "type": "boolean", + "description": "If set to true, returns a detailed error message for invalid requests & responses. This is useful while testing.", + "default": false + } + }, + { + "validate_request_body": { + "required": false, + "type": "boolean", + "description": "If set to true, validates the request body content against the API specification.", + "default": true + } + }, + { + "notify_only_request_validation_failure": { + "required": false, + "type": "boolean", + "description": "If set to true, notifications via event hooks are enabled, but request based validation failures don't affect the request flow.", + "default": false + } + }, + { + "validate_request_header_params": { + "required": false, + "type": "boolean", + "description": "If set to true, validates HTTP header parameters against the API specification.", + "default": true + } + }, + { + "validate_request_query_params": { + "required": false, + "type": "boolean", + "description": "If set to true, validates query parameters against the API specification.", + "default": true + } + }, + { + "validate_request_uri_params": { + "required": false, + "type": "boolean", + "description": "If set to true, validates URI parameters in the request against the API specification.", + "default": true + } + }, + { + "validate_response_body": { + "required": false, + "type": "boolean", + "description": "If set to true, validates the response from the upstream services against the API specification. If validation fails, it results in an `HTTP 406 Not Acceptable` status code.", + "default": false + } + }, + { + "notify_only_response_body_validation_failure": { + "required": false, + "type": "boolean", + "description": "If set to true, notifications via event hooks are enabled, but response validation failures don't affect the response flow.", + "default": false + } + }, + { + "query_parameter_check": { + "required": true, + "type": "boolean", + "description": "If set to true, checks if query parameters in the request exist in the API specification.", + "default": false + } + }, + { + "header_parameter_check": { + "required": true, + "type": "boolean", + "description": "If set to true, checks if HTTP header parameters in the request exist in the API specification.", + "default": false + } + }, + { + "allowed_header_parameters": { + "required": false, + "type": "string", + "description": "List of header parameters in the request that will be ignored when performing HTTP header validation. These are additional headers added to an API request beyond those defined in the API specification. For example, you might include the HTTP header `User-Agent`, which lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.", + "default": "Host,Content-Type,User-Agent,Accept,Content-Length" + } + }, + { + "include_base_path": { + "required": true, + "type": "boolean", + "description": "Indicates whether to include the base path when performing path match evaluation.", + "default": false + } + }, + { + "api_spec_encoded": { + "required": true, + "type": "boolean", + "description": "Indicates whether the api_spec is URI-Encoded.", + "default": true + } + }, + { + "custom_base_path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "required": false, + "type": "string", + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "starts_with": "/" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/oas-validation/3.8.x.json b/schemas/oas-validation/3.8.x.json new file mode 100644 index 00000000..307e1a6d --- /dev/null +++ b/schemas/oas-validation/3.8.x.json @@ -0,0 +1,170 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "api_spec": { + "description": "The API specification defined using either Swagger or the OpenAPI. This can be either a JSON or YAML based file. If using a YAML file, the spec needs to be URI-Encoded to preserve the YAML format.", + "required": true, + "type": "string" + } + }, + { + "verbose_response": { + "description": "If set to true, returns a detailed error message for invalid requests & responses. This is useful while testing.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "validate_request_body": { + "description": "If set to true, validates the request body content against the API specification.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "notify_only_request_validation_failure": { + "description": "If set to true, notifications via event hooks are enabled, but request based validation failures don't affect the request flow.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "validate_request_header_params": { + "description": "If set to true, validates HTTP header parameters against the API specification.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "validate_request_query_params": { + "description": "If set to true, validates query parameters against the API specification.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "validate_request_uri_params": { + "description": "If set to true, validates URI parameters in the request against the API specification.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "validate_response_body": { + "description": "If set to true, validates the response from the upstream services against the API specification. If validation fails, it results in an `HTTP 406 Not Acceptable` status code.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "notify_only_response_body_validation_failure": { + "description": "If set to true, notifications via event hooks are enabled, but response validation failures don't affect the response flow.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "query_parameter_check": { + "description": "If set to true, checks if query parameters in the request exist in the API specification.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "header_parameter_check": { + "description": "If set to true, checks if HTTP header parameters in the request exist in the API specification.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "allowed_header_parameters": { + "description": "List of header parameters in the request that will be ignored when performing HTTP header validation. These are additional headers added to an API request beyond those defined in the API specification. For example, you might include the HTTP header `User-Agent`, which lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.", + "type": "string", + "required": false, + "default": "Host,Content-Type,User-Agent,Accept,Content-Length" + } + }, + { + "include_base_path": { + "description": "Indicates whether to include the base path when performing path match evaluation.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "api_spec_encoded": { + "description": "Indicates whether the api_spec is URI-Encoded.", + "type": "boolean", + "required": true, + "default": true + } + }, + { + "custom_base_path": { + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "required": false, + "starts_with": "/", + "type": "string", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/oas-validation/3.9.x.json b/schemas/oas-validation/3.9.x.json new file mode 100644 index 00000000..ada2985b --- /dev/null +++ b/schemas/oas-validation/3.9.x.json @@ -0,0 +1,170 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "api_spec": { + "description": "The API specification defined using either Swagger or the OpenAPI. This can be either a JSON or YAML based file. If using a YAML file, the spec needs to be URI-Encoded to preserve the YAML format.", + "required": true, + "type": "string" + } + }, + { + "verbose_response": { + "default": false, + "description": "If set to true, returns a detailed error message for invalid requests & responses. This is useful while testing.", + "required": false, + "type": "boolean" + } + }, + { + "validate_request_body": { + "default": true, + "description": "If set to true, validates the request body content against the API specification.", + "required": false, + "type": "boolean" + } + }, + { + "notify_only_request_validation_failure": { + "default": false, + "description": "If set to true, notifications via event hooks are enabled, but request based validation failures don't affect the request flow.", + "required": false, + "type": "boolean" + } + }, + { + "validate_request_header_params": { + "default": true, + "description": "If set to true, validates HTTP header parameters against the API specification.", + "required": false, + "type": "boolean" + } + }, + { + "validate_request_query_params": { + "default": true, + "description": "If set to true, validates query parameters against the API specification.", + "required": false, + "type": "boolean" + } + }, + { + "validate_request_uri_params": { + "default": true, + "description": "If set to true, validates URI parameters in the request against the API specification.", + "required": false, + "type": "boolean" + } + }, + { + "validate_response_body": { + "default": false, + "description": "If set to true, validates the response from the upstream services against the API specification. If validation fails, it results in an `HTTP 406 Not Acceptable` status code.", + "required": false, + "type": "boolean" + } + }, + { + "notify_only_response_body_validation_failure": { + "default": false, + "description": "If set to true, notifications via event hooks are enabled, but response validation failures don't affect the response flow.", + "required": false, + "type": "boolean" + } + }, + { + "query_parameter_check": { + "default": false, + "description": "If set to true, checks if query parameters in the request exist in the API specification.", + "required": true, + "type": "boolean" + } + }, + { + "header_parameter_check": { + "default": false, + "description": "If set to true, checks if HTTP header parameters in the request exist in the API specification.", + "required": true, + "type": "boolean" + } + }, + { + "allowed_header_parameters": { + "default": "Host,Content-Type,User-Agent,Accept,Content-Length", + "description": "List of header parameters in the request that will be ignored when performing HTTP header validation. These are additional headers added to an API request beyond those defined in the API specification. For example, you might include the HTTP header `User-Agent`, which lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.", + "required": false, + "type": "string" + } + }, + { + "include_base_path": { + "default": false, + "description": "Indicates whether to include the base path when performing path match evaluation.", + "required": true, + "type": "boolean" + } + }, + { + "api_spec_encoded": { + "default": true, + "description": "Indicates whether the api_spec is URI-Encoded.", + "required": true, + "type": "boolean" + } + }, + { + "custom_base_path": { + "required": false, + "type": "string", + "description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "starts_with": "/" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/oauth2-introspection/3.10.x.json b/schemas/oauth2-introspection/3.10.x.json new file mode 100644 index 00000000..3b4172e8 --- /dev/null +++ b/schemas/oauth2-introspection/3.10.x.json @@ -0,0 +1,167 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "introspection_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string", + "required": true + } + }, + { + "ttl": { + "description": "The TTL in seconds for the introspection response. Set to 0 to disable the expiration.", + "type": "number", + "default": 30 + } + }, + { + "token_type_hint": { + "description": "The `token_type_hint` value to associate to introspection requests.", + "type": "string" + } + }, + { + "authorization_value": { + "type": "string", + "referenceable": true, + "description": "The value to set as the `Authorization` header when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is the `client_id` and `client_secret` as a Base64-encoded Basic Auth string (`Basic MG9hNWl...`).", + "encrypted": true, + "required": true + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "integer", + "default": 10000 + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "integer", + "default": 60000 + } + }, + { + "introspect_request": { + "description": "A boolean indicating whether to forward information about the current downstream request to the introspect endpoint. If true, headers `X-Request-Path` and `X-Request-Http-Method` will be inserted into the introspect request.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to hide the credential to the upstream API server. It will be removed by Kong before proxying the request.", + "type": "boolean", + "default": false + } + }, + { + "run_on_preflight": { + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean", + "default": true + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string", + "default": "", + "len_min": 0 + } + }, + { + "consumer_by": { + "type": "string", + "description": "A string indicating whether to associate OAuth2 `username` or `client_id` with the consumer's username. OAuth2 `username` is mapped to a consumer's `username` field, while an OAuth2 `client_id` maps to a consumer's `custom_id`.", + "one_of": [ + "username", + "client_id" + ], + "default": "username", + "required": true + } + }, + { + "custom_introspection_headers": { + "type": "map", + "keys": { + "type": "string" + }, + "description": "A list of custom headers to be added in the introspection request.", + "values": { + "type": "string" + }, + "default": [ + + ], + "required": true + } + }, + { + "custom_claims_forward": { + "type": "set", + "description": "A list of custom claims to be forwarded from the introspection response to the upstream request. Claims are forwarded in headers with prefix `X-Credential-{claim-name}`.", + "default": [ + + ], + "elements": { + "type": "string" + }, + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/oauth2-introspection/3.11.x.json b/schemas/oauth2-introspection/3.11.x.json new file mode 100644 index 00000000..d1ceeab6 --- /dev/null +++ b/schemas/oauth2-introspection/3.11.x.json @@ -0,0 +1,167 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "introspection_url": { + "required": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "ttl": { + "default": 30, + "description": "The TTL in seconds for the introspection response. Set to 0 to disable the expiration.", + "type": "number" + } + }, + { + "token_type_hint": { + "description": "The `token_type_hint` value to associate to introspection requests.", + "type": "string" + } + }, + { + "authorization_value": { + "required": true, + "description": "The value to set as the `Authorization` header when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is the `client_id` and `client_secret` as a Base64-encoded Basic Auth string (`Basic MG9hNWl...`).", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "integer" + } + }, + { + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "integer" + } + }, + { + "introspect_request": { + "default": false, + "required": true, + "description": "A boolean indicating whether to forward information about the current downstream request to the introspect endpoint. If true, headers `X-Request-Path` and `X-Request-Http-Method` will be inserted into the introspect request.", + "type": "boolean" + } + }, + { + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream API server. It will be removed by Kong before proxying the request.", + "type": "boolean" + } + }, + { + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + } + }, + { + "anonymous": { + "len_min": 0, + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "consumer_by": { + "required": true, + "description": "A string indicating whether to associate OAuth2 `username` or `client_id` with the consumer's username. OAuth2 `username` is mapped to a consumer's `username` field, while an OAuth2 `client_id` maps to a consumer's `custom_id`.", + "one_of": [ + "username", + "client_id" + ], + "default": "username", + "type": "string" + } + }, + { + "custom_introspection_headers": { + "required": true, + "description": "A list of custom headers to be added in the introspection request.", + "values": { + "type": "string" + }, + "keys": { + "type": "string" + }, + "default": [ + + ], + "type": "map" + } + }, + { + "custom_claims_forward": { + "required": true, + "description": "A list of custom claims to be forwarded from the introspection response to the upstream request. Claims are forwarded in headers with prefix `X-Credential-{claim-name}`.", + "type": "set", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/oauth2-introspection/3.12.x.json b/schemas/oauth2-introspection/3.12.x.json new file mode 100644 index 00000000..8075800d --- /dev/null +++ b/schemas/oauth2-introspection/3.12.x.json @@ -0,0 +1,161 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "introspection_url": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": true + } + }, + { + "ttl": { + "type": "number", + "default": 30, + "description": "The TTL in seconds for the introspection response. Set to 0 to disable the expiration." + } + }, + { + "token_type_hint": { + "type": "string", + "description": "The `token_type_hint` value to associate to introspection requests." + } + }, + { + "authorization_value": { + "type": "string", + "required": true, + "description": "The value to set as the `Authorization` header when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is the `client_id` and `client_secret` as a Base64-encoded Basic Auth string (`Basic MG9hNWl...`).", + "referenceable": true, + "encrypted": true + } + }, + { + "timeout": { + "type": "integer", + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server." + } + }, + { + "keepalive": { + "type": "integer", + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed." + } + }, + { + "introspect_request": { + "type": "boolean", + "default": false, + "description": "A boolean indicating whether to forward information about the current downstream request to the introspect endpoint. If true, headers `X-Request-Path` and `X-Request-Http-Method` will be inserted into the introspect request.", + "required": true + } + }, + { + "hide_credentials": { + "type": "boolean", + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream API server. It will be removed by Kong before proxying the request." + } + }, + { + "run_on_preflight": { + "type": "boolean", + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed." + } + }, + { + "anonymous": { + "type": "string", + "len_min": 0, + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "consumer_by": { + "type": "string", + "required": true, + "description": "A string indicating whether to associate OAuth2 `username` or `client_id` with the consumer's username. OAuth2 `username` is mapped to a consumer's `username` field, while an OAuth2 `client_id` maps to a consumer's `custom_id`.", + "default": "username", + "one_of": [ + "username", + "client_id" + ] + } + }, + { + "custom_introspection_headers": { + "type": "map", + "required": true, + "description": "A list of custom headers to be added in the introspection request.", + "default": [], + "values": { + "type": "string" + }, + "keys": { + "type": "string" + } + } + }, + { + "custom_claims_forward": { + "type": "set", + "required": true, + "description": "A list of custom claims to be forwarded from the introspection response to the upstream request. Claims are forwarded in headers with prefix `X-Credential-{claim-name}`.", + "default": [], + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/oauth2-introspection/3.4.x.json b/schemas/oauth2-introspection/3.4.x.json index 3157912f..a5891255 100644 --- a/schemas/oauth2-introspection/3.4.x.json +++ b/schemas/oauth2-introspection/3.4.x.json @@ -2,6 +2,7 @@ "fields": [ { "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, "reference": "consumers", "type": "foreign" @@ -9,131 +10,158 @@ }, { "protocols": { - "default": [ - "grpc", - "grpcs", - "http", - "https" - ], + "description": "A set of strings representing HTTP protocols.", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" + ] }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], "required": true, "type": "set" } }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, { "config": { - "required": true, "fields": [ { "introspection_url": { - "type": "string", - "required": true + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": true, + "type": "string" } }, { "ttl": { + "default": 30, "type": "number", - "default": 30 + "description": "The TTL in seconds for the introspection response. Set to 0 to disable the expiration." } }, { "token_type_hint": { - "type": "string" + "type": "string", + "description": "The `token_type_hint` value to associate to introspection requests." } }, { "authorization_value": { + "description": "The value to set as the `Authorization` header when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is the `client_id` and `client_secret` as a Base64-encoded Basic Auth string (`Basic MG9hNWl...`).", + "referenceable": true, + "encrypted": true, "type": "string", "required": true } }, { "timeout": { + "default": 10000, "type": "integer", - "default": 10000 + "description": "An optional timeout in milliseconds when sending data to the upstream server." } }, { "keepalive": { + "default": 60000, "type": "integer", - "default": 60000 + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed." } }, { "introspect_request": { - "required": true, "default": false, - "type": "boolean" + "required": true, + "type": "boolean", + "description": "A boolean indicating whether to forward information about the current downstream request to the introspect endpoint. If true, headers `X-Request-Path` and `X-Request-Http-Method` will be inserted into the introspect request." } }, { "hide_credentials": { + "default": false, "type": "boolean", - "default": false + "description": "An optional boolean value telling the plugin to hide the credential to the upstream API server. It will be removed by Kong before proxying the request." } }, { "run_on_preflight": { + "default": true, "type": "boolean", - "default": true + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed." } }, { "anonymous": { "len_min": 0, + "default": "", "type": "string", - "default": "" + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`." } }, { "consumer_by": { - "default": "username", + "description": "A string indicating whether to associate OAuth2 `username` or `client_id` with the consumer's username. OAuth2 `username` is mapped to a consumer's `username` field, while an OAuth2 `client_id` maps to a consumer's `custom_id`.", "one_of": [ "username", "client_id" ], - "type": "string", - "required": true + "default": "username", + "required": true, + "type": "string" } }, { "custom_introspection_headers": { - "values": { + "description": "A list of custom headers to be added in the introspection request.", + "keys": { "type": "string" }, "default": [ ], - "keys": { - "type": "string" - }, "required": true, - "type": "map" + "type": "map", + "values": { + "type": "string" + } } }, { "custom_claims_forward": { + "description": "A list of custom claims to be forwarded from the introspection response to the upstream request. Claims are forwarded in headers with prefix `X-Credential-{claim-name}`.", "elements": { "type": "string" }, "default": [ ], - "type": "set", - "required": true + "required": true, + "type": "set" } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/oauth2-introspection/3.5.x.json b/schemas/oauth2-introspection/3.5.x.json new file mode 100644 index 00000000..7d74b297 --- /dev/null +++ b/schemas/oauth2-introspection/3.5.x.json @@ -0,0 +1,167 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumers" + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumer_groups" + } + }, + { + "config": { + "fields": [ + { + "introspection_url": { + "required": true, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "ttl": { + "description": "The TTL in seconds for the introspection response. Set to 0 to disable the expiration.", + "type": "number", + "default": 30 + } + }, + { + "token_type_hint": { + "type": "string", + "description": "The `token_type_hint` value to associate to introspection requests." + } + }, + { + "authorization_value": { + "encrypted": true, + "type": "string", + "referenceable": true, + "description": "The value to set as the `Authorization` header when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is the `client_id` and `client_secret` as a Base64-encoded Basic Auth string (`Basic MG9hNWl...`).", + "required": true + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "integer", + "default": 10000 + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "integer", + "default": 60000 + } + }, + { + "introspect_request": { + "required": true, + "description": "A boolean indicating whether to forward information about the current downstream request to the introspect endpoint. If true, headers `X-Request-Path` and `X-Request-Http-Method` will be inserted into the introspect request.", + "type": "boolean", + "default": false + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to hide the credential to the upstream API server. It will be removed by Kong before proxying the request.", + "type": "boolean", + "default": false + } + }, + { + "run_on_preflight": { + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean", + "default": true + } + }, + { + "anonymous": { + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string", + "len_min": 0 + } + }, + { + "consumer_by": { + "required": true, + "type": "string", + "default": "username", + "one_of": [ + "username", + "client_id" + ], + "description": "A string indicating whether to associate OAuth2 `username` or `client_id` with the consumer's username. OAuth2 `username` is mapped to a consumer's `username` field, while an OAuth2 `client_id` maps to a consumer's `custom_id`." + } + }, + { + "custom_introspection_headers": { + "required": true, + "keys": { + "type": "string" + }, + "default": [ + + ], + "values": { + "type": "string" + }, + "description": "A list of custom headers to be added in the introspection request.", + "type": "map" + } + }, + { + "custom_claims_forward": { + "required": true, + "type": "set", + "default": [ + + ], + "elements": { + "type": "string" + }, + "description": "A list of custom claims to be forwarded from the introspection response to the upstream request. Claims are forwarded in headers with prefix `X-Credential-{claim-name}`." + } + } + ], + "type": "record", + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/oauth2-introspection/3.6.x.json b/schemas/oauth2-introspection/3.6.x.json new file mode 100644 index 00000000..e9b3fe27 --- /dev/null +++ b/schemas/oauth2-introspection/3.6.x.json @@ -0,0 +1,167 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "introspection_url": { + "required": true, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "ttl": { + "type": "number", + "description": "The TTL in seconds for the introspection response. Set to 0 to disable the expiration.", + "default": 30 + } + }, + { + "token_type_hint": { + "description": "The `token_type_hint` value to associate to introspection requests.", + "type": "string" + } + }, + { + "authorization_value": { + "referenceable": true, + "type": "string", + "required": true, + "description": "The value to set as the `Authorization` header when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is the `client_id` and `client_secret` as a Base64-encoded Basic Auth string (`Basic MG9hNWl...`).", + "encrypted": true + } + }, + { + "timeout": { + "type": "integer", + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "default": 10000 + } + }, + { + "keepalive": { + "type": "integer", + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "default": 60000 + } + }, + { + "introspect_request": { + "required": true, + "type": "boolean", + "description": "A boolean indicating whether to forward information about the current downstream request to the introspect endpoint. If true, headers `X-Request-Path` and `X-Request-Http-Method` will be inserted into the introspect request.", + "default": false + } + }, + { + "hide_credentials": { + "type": "boolean", + "description": "An optional boolean value telling the plugin to hide the credential to the upstream API server. It will be removed by Kong before proxying the request.", + "default": false + } + }, + { + "run_on_preflight": { + "type": "boolean", + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "default": true + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string", + "default": "", + "len_min": 0 + } + }, + { + "consumer_by": { + "type": "string", + "default": "username", + "required": true, + "description": "A string indicating whether to associate OAuth2 `username` or `client_id` with the consumer's username. OAuth2 `username` is mapped to a consumer's `username` field, while an OAuth2 `client_id` maps to a consumer's `custom_id`.", + "one_of": [ + "username", + "client_id" + ] + } + }, + { + "custom_introspection_headers": { + "keys": { + "type": "string" + }, + "type": "map", + "default": [ + + ], + "required": true, + "description": "A list of custom headers to be added in the introspection request.", + "values": { + "type": "string" + } + } + }, + { + "custom_claims_forward": { + "elements": { + "type": "string" + }, + "type": "set", + "default": [ + + ], + "required": true, + "description": "A list of custom claims to be forwarded from the introspection response to the upstream request. Claims are forwarded in headers with prefix `X-Credential-{claim-name}`." + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/oauth2-introspection/3.7.x.json b/schemas/oauth2-introspection/3.7.x.json new file mode 100644 index 00000000..8cca5e87 --- /dev/null +++ b/schemas/oauth2-introspection/3.7.x.json @@ -0,0 +1,167 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "introspection_url": { + "required": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "ttl": { + "type": "number", + "description": "The TTL in seconds for the introspection response. Set to 0 to disable the expiration.", + "default": 30 + } + }, + { + "token_type_hint": { + "type": "string", + "description": "The `token_type_hint` value to associate to introspection requests." + } + }, + { + "authorization_value": { + "encrypted": true, + "referenceable": true, + "required": true, + "type": "string", + "description": "The value to set as the `Authorization` header when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is the `client_id` and `client_secret` as a Base64-encoded Basic Auth string (`Basic MG9hNWl...`)." + } + }, + { + "timeout": { + "type": "integer", + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "default": 10000 + } + }, + { + "keepalive": { + "type": "integer", + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "default": 60000 + } + }, + { + "introspect_request": { + "required": true, + "type": "boolean", + "description": "A boolean indicating whether to forward information about the current downstream request to the introspect endpoint. If true, headers `X-Request-Path` and `X-Request-Http-Method` will be inserted into the introspect request.", + "default": false + } + }, + { + "hide_credentials": { + "type": "boolean", + "description": "An optional boolean value telling the plugin to hide the credential to the upstream API server. It will be removed by Kong before proxying the request.", + "default": false + } + }, + { + "run_on_preflight": { + "type": "boolean", + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "default": true + } + }, + { + "anonymous": { + "len_min": 0, + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "default": "" + } + }, + { + "consumer_by": { + "default": "username", + "required": true, + "type": "string", + "description": "A string indicating whether to associate OAuth2 `username` or `client_id` with the consumer's username. OAuth2 `username` is mapped to a consumer's `username` field, while an OAuth2 `client_id` maps to a consumer's `custom_id`.", + "one_of": [ + "username", + "client_id" + ] + } + }, + { + "custom_introspection_headers": { + "keys": { + "type": "string" + }, + "description": "A list of custom headers to be added in the introspection request.", + "required": true, + "values": { + "type": "string" + }, + "type": "map", + "default": [ + + ] + } + }, + { + "custom_claims_forward": { + "type": "set", + "required": true, + "elements": { + "type": "string" + }, + "description": "A list of custom claims to be forwarded from the introspection response to the upstream request. Claims are forwarded in headers with prefix `X-Credential-{claim-name}`.", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/oauth2-introspection/3.8.x.json b/schemas/oauth2-introspection/3.8.x.json new file mode 100644 index 00000000..95956e5b --- /dev/null +++ b/schemas/oauth2-introspection/3.8.x.json @@ -0,0 +1,167 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "introspection_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": true, + "type": "string" + } + }, + { + "ttl": { + "description": "The TTL in seconds for the introspection response. Set to 0 to disable the expiration.", + "type": "number", + "default": 30 + } + }, + { + "token_type_hint": { + "description": "The `token_type_hint` value to associate to introspection requests.", + "type": "string" + } + }, + { + "authorization_value": { + "description": "The value to set as the `Authorization` header when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is the `client_id` and `client_secret` as a Base64-encoded Basic Auth string (`Basic MG9hNWl...`).", + "required": true, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "integer", + "default": 10000 + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "integer", + "default": 60000 + } + }, + { + "introspect_request": { + "description": "A boolean indicating whether to forward information about the current downstream request to the introspect endpoint. If true, headers `X-Request-Path` and `X-Request-Http-Method` will be inserted into the introspect request.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to hide the credential to the upstream API server. It will be removed by Kong before proxying the request.", + "type": "boolean", + "default": false + } + }, + { + "run_on_preflight": { + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean", + "default": true + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "len_min": 0, + "type": "string", + "default": "" + } + }, + { + "consumer_by": { + "description": "A string indicating whether to associate OAuth2 `username` or `client_id` with the consumer's username. OAuth2 `username` is mapped to a consumer's `username` field, while an OAuth2 `client_id` maps to a consumer's `custom_id`.", + "required": true, + "one_of": [ + "username", + "client_id" + ], + "type": "string", + "default": "username" + } + }, + { + "custom_introspection_headers": { + "description": "A list of custom headers to be added in the introspection request.", + "required": true, + "values": { + "type": "string" + }, + "keys": { + "type": "string" + }, + "type": "map", + "default": [ + + ] + } + }, + { + "custom_claims_forward": { + "description": "A list of custom claims to be forwarded from the introspection response to the upstream request. Claims are forwarded in headers with prefix `X-Credential-{claim-name}`.", + "required": true, + "elements": { + "type": "string" + }, + "type": "set", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/oauth2-introspection/3.9.x.json b/schemas/oauth2-introspection/3.9.x.json new file mode 100644 index 00000000..8b041407 --- /dev/null +++ b/schemas/oauth2-introspection/3.9.x.json @@ -0,0 +1,167 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "introspection_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": true, + "type": "string" + } + }, + { + "ttl": { + "default": 30, + "description": "The TTL in seconds for the introspection response. Set to 0 to disable the expiration.", + "type": "number" + } + }, + { + "token_type_hint": { + "type": "string", + "description": "The `token_type_hint` value to associate to introspection requests." + } + }, + { + "authorization_value": { + "encrypted": true, + "required": true, + "type": "string", + "description": "The value to set as the `Authorization` header when querying the introspection endpoint. This depends on the OAuth 2.0 server, but usually is the `client_id` and `client_secret` as a Base64-encoded Basic Auth string (`Basic MG9hNWl...`).", + "referenceable": true + } + }, + { + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "integer" + } + }, + { + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "integer" + } + }, + { + "introspect_request": { + "default": false, + "description": "A boolean indicating whether to forward information about the current downstream request to the introspect endpoint. If true, headers `X-Request-Path` and `X-Request-Http-Method` will be inserted into the introspect request.", + "required": true, + "type": "boolean" + } + }, + { + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to hide the credential to the upstream API server. It will be removed by Kong before proxying the request.", + "type": "boolean" + } + }, + { + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + } + }, + { + "anonymous": { + "default": "", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "len_min": 0, + "type": "string" + } + }, + { + "consumer_by": { + "required": true, + "type": "string", + "default": "username", + "description": "A string indicating whether to associate OAuth2 `username` or `client_id` with the consumer's username. OAuth2 `username` is mapped to a consumer's `username` field, while an OAuth2 `client_id` maps to a consumer's `custom_id`.", + "one_of": [ + "username", + "client_id" + ] + } + }, + { + "custom_introspection_headers": { + "values": { + "type": "string" + }, + "required": true, + "type": "map", + "default": [ + + ], + "description": "A list of custom headers to be added in the introspection request.", + "keys": { + "type": "string" + } + } + }, + { + "custom_claims_forward": { + "required": true, + "type": "set", + "elements": { + "type": "string" + }, + "description": "A list of custom claims to be forwarded from the introspection response to the upstream request. Claims are forwarded in headers with prefix `X-Credential-{claim-name}`.", + "default": [ + + ] + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/oauth2/3.10.x.json b/schemas/oauth2/3.10.x.json new file mode 100644 index 00000000..b274e9d6 --- /dev/null +++ b/schemas/oauth2/3.10.x.json @@ -0,0 +1,221 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "scopes", + "if_field": "mandatory_scope", + "then_match": { + "required": true + } + } + } + ], + "type": "record", + "required": true, + "fields": [ + { + "scopes": { + "description": "Describes an array of scope names that will be available to the end user. If `mandatory_scope` is set to `true`, then `scopes` are required.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "mandatory_scope": { + "description": "An optional boolean value telling the plugin to require at least one `scope` to be authorized by the end user.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "provision_key": { + "type": "string", + "auto": true, + "description": "The unique key the plugin has generated when it has been added to the Service.", + "unique": true, + "encrypted": true, + "required": true + } + }, + { + "token_expiration": { + "description": "An optional integer value telling the plugin how many seconds a token should last, after which the client will need to refresh the token. Set to `0` to disable the expiration.", + "default": 7200, + "type": "number", + "required": true + } + }, + { + "enable_authorization_code": { + "description": "An optional boolean value to enable the three-legged Authorization Code flow (RFC 6742 Section 4.1).", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "enable_implicit_grant": { + "description": "An optional boolean value to enable the Implicit Grant flow which allows to provision a token as a result of the authorization process (RFC 6742 Section 4.2).", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "enable_client_credentials": { + "description": "An optional boolean value to enable the Client Credentials Grant flow (RFC 6742 Section 4.4).", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "enable_password_grant": { + "description": "An optional boolean value to enable the Resource Owner Password Credentials Grant flow (RFC 6742 Section 4.3).", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "accept_http_if_already_terminated": { + "description": "Accepts HTTPs requests that have already been terminated by a proxy or load balancer.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + } + }, + { + "global_credentials": { + "description": "An optional boolean value that allows using the same OAuth credentials generated by the plugin with any other service whose OAuth 2.0 plugin configuration also has `config.global_credentials=true`.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "auth_header_name": { + "description": "The name of the header that is supposed to carry the access token.", + "default": "authorization", + "type": "string" + } + }, + { + "refresh_token_ttl": { + "type": "number", + "between": [ + 0, + 100000000 + ], + "default": 1209600, + "description": "Time-to-live value for data", + "required": true + } + }, + { + "reuse_refresh_token": { + "description": "An optional boolean value that indicates whether an OAuth refresh token is reused when refreshing an access token.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "persistent_refresh_token": { + "type": "boolean", + "default": false, + "required": true + } + }, + { + "pkce": { + "type": "string", + "description": "Specifies a mode of how the Proof Key for Code Exchange (PKCE) should be handled by the plugin.", + "one_of": [ + "none", + "lax", + "strict" + ], + "default": "lax", + "required": false + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string", + "required": false + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/oauth2/3.11.x.json b/schemas/oauth2/3.11.x.json new file mode 100644 index 00000000..c35491d8 --- /dev/null +++ b/schemas/oauth2/3.11.x.json @@ -0,0 +1,221 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "entity_checks": [ + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "scopes", + "if_field": "mandatory_scope", + "then_match": { + "required": true + } + } + } + ], + "required": true, + "fields": [ + { + "scopes": { + "type": "array", + "description": "Describes an array of scope names that will be available to the end user. If `mandatory_scope` is set to `true`, then `scopes` are required.", + "elements": { + "type": "string" + } + } + }, + { + "mandatory_scope": { + "description": "An optional boolean value telling the plugin to require at least one `scope` to be authorized by the end user.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "provision_key": { + "unique": true, + "required": true, + "description": "The unique key the plugin has generated when it has been added to the Service.", + "encrypted": true, + "auto": true, + "type": "string" + } + }, + { + "token_expiration": { + "description": "An optional integer value telling the plugin how many seconds a token should last, after which the client will need to refresh the token. Set to `0` to disable the expiration.", + "required": true, + "default": 7200, + "type": "number" + } + }, + { + "enable_authorization_code": { + "description": "An optional boolean value to enable the three-legged Authorization Code flow (RFC 6742 Section 4.1).", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "enable_implicit_grant": { + "description": "An optional boolean value to enable the Implicit Grant flow which allows to provision a token as a result of the authorization process (RFC 6742 Section 4.2).", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "enable_client_credentials": { + "description": "An optional boolean value to enable the Client Credentials Grant flow (RFC 6742 Section 4.4).", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "enable_password_grant": { + "description": "An optional boolean value to enable the Resource Owner Password Credentials Grant flow (RFC 6742 Section 4.3).", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "accept_http_if_already_terminated": { + "description": "Accepts HTTPs requests that have already been terminated by a proxy or load balancer.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + } + }, + { + "global_credentials": { + "description": "An optional boolean value that allows using the same OAuth credentials generated by the plugin with any other service whose OAuth 2.0 plugin configuration also has `config.global_credentials=true`.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "auth_header_name": { + "description": "The name of the header that is supposed to carry the access token.", + "default": "authorization", + "type": "string" + } + }, + { + "refresh_token_ttl": { + "required": true, + "description": "Time-to-live value for data", + "between": [ + 0, + 100000000 + ], + "default": 1209600, + "type": "number" + } + }, + { + "reuse_refresh_token": { + "description": "An optional boolean value that indicates whether an OAuth refresh token is reused when refreshing an access token.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "persistent_refresh_token": { + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "pkce": { + "required": false, + "description": "Specifies a mode of how the Proof Key for Code Exchange (PKCE) should be handled by the plugin.", + "one_of": [ + "none", + "lax", + "strict" + ], + "default": "lax", + "type": "string" + } + }, + { + "realm": { + "required": false, + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/oauth2/3.12.x.json b/schemas/oauth2/3.12.x.json new file mode 100644 index 00000000..2092942a --- /dev/null +++ b/schemas/oauth2/3.12.x.json @@ -0,0 +1,219 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "scopes": { + "type": "array", + "description": "Describes an array of scope names that will be available to the end user. If `mandatory_scope` is set to `true`, then `scopes` are required.", + "elements": { + "type": "string" + } + } + }, + { + "mandatory_scope": { + "type": "boolean", + "default": false, + "description": "An optional boolean value telling the plugin to require at least one `scope` to be authorized by the end user.", + "required": true + } + }, + { + "provision_key": { + "type": "string", + "required": true, + "encrypted": true, + "description": "The unique key the plugin has generated when it has been added to the Service.", + "auto": true, + "unique": true + } + }, + { + "token_expiration": { + "type": "number", + "default": 7200, + "description": "An optional integer value telling the plugin how many seconds a token should last, after which the client will need to refresh the token. Set to `0` to disable the expiration.", + "required": true + } + }, + { + "enable_authorization_code": { + "type": "boolean", + "default": false, + "description": "An optional boolean value to enable the three-legged Authorization Code flow (RFC 6742 Section 4.1).", + "required": true + } + }, + { + "enable_implicit_grant": { + "type": "boolean", + "default": false, + "description": "An optional boolean value to enable the Implicit Grant flow which allows to provision a token as a result of the authorization process (RFC 6742 Section 4.2).", + "required": true + } + }, + { + "enable_client_credentials": { + "type": "boolean", + "default": false, + "description": "An optional boolean value to enable the Client Credentials Grant flow (RFC 6742 Section 4.4).", + "required": true + } + }, + { + "enable_password_grant": { + "type": "boolean", + "default": false, + "description": "An optional boolean value to enable the Resource Owner Password Credentials Grant flow (RFC 6742 Section 4.3).", + "required": true + } + }, + { + "hide_credentials": { + "type": "boolean", + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "required": true + } + }, + { + "accept_http_if_already_terminated": { + "type": "boolean", + "default": false, + "description": "Accepts HTTPs requests that have already been terminated by a proxy or load balancer.", + "required": true + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + } + }, + { + "global_credentials": { + "type": "boolean", + "default": false, + "description": "An optional boolean value that allows using the same OAuth credentials generated by the plugin with any other service whose OAuth 2.0 plugin configuration also has `config.global_credentials=true`.", + "required": true + } + }, + { + "auth_header_name": { + "type": "string", + "default": "authorization", + "description": "The name of the header that is supposed to carry the access token." + } + }, + { + "refresh_token_ttl": { + "type": "number", + "between": [ + 0, + 100000000 + ], + "required": true, + "description": "Time-to-live value for data", + "default": 1209600 + } + }, + { + "reuse_refresh_token": { + "type": "boolean", + "default": false, + "description": "An optional boolean value that indicates whether an OAuth refresh token is reused when refreshing an access token.", + "required": true + } + }, + { + "persistent_refresh_token": { + "type": "boolean", + "default": false, + "required": true + } + }, + { + "pkce": { + "type": "string", + "required": false, + "description": "Specifies a mode of how the Proof Key for Code Exchange (PKCE) should be handled by the plugin.", + "default": "lax", + "one_of": [ + "none", + "lax", + "strict" + ] + } + }, + { + "realm": { + "type": "string", + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "required": false + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "scopes", + "if_field": "mandatory_scope" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/oauth2/3.4.x.json b/schemas/oauth2/3.4.x.json index 92284103..99ce801e 100644 --- a/schemas/oauth2/3.4.x.json +++ b/schemas/oauth2/3.4.x.json @@ -2,8 +2,9 @@ "fields": [ { "consumer": { - "eq": null, "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, @@ -17,7 +18,10 @@ "ws", "wss" ], + "required": true, + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", @@ -25,33 +29,24 @@ "https", "ws", "wss" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "type": "record", - "entity_checks": [ - { - "conditional": { - "if_match": { - "eq": true - }, - "then_field": "scopes", - "if_field": "mandatory_scope", - "then_match": { - "required": true - } - } - } - ], "fields": [ { "scopes": { + "description": "Describes an array of scope names that will be available to the end user. If `mandatory_scope` is set to `true`, then `scopes` are required.", "elements": { "type": "string" }, @@ -60,8 +55,9 @@ }, { "mandatory_scope": { - "type": "boolean", "default": false, + "type": "boolean", + "description": "An optional boolean value telling the plugin to require at least one `scope` to be authorized by the end user.", "required": true } }, @@ -69,118 +65,150 @@ "provision_key": { "unique": true, "encrypted": true, - "required": true, "auto": true, + "description": "The unique key the plugin has generated when it has been added to the Service.", + "required": true, "type": "string" } }, { "token_expiration": { - "type": "number", "default": 7200, + "type": "number", + "description": "An optional integer value telling the plugin how many seconds a token should last, after which the client will need to refresh the token. Set to `0` to disable the expiration.", "required": true } }, { "enable_authorization_code": { - "type": "boolean", "default": false, + "type": "boolean", + "description": "An optional boolean value to enable the three-legged Authorization Code flow (RFC 6742 Section 4.1).", "required": true } }, { "enable_implicit_grant": { - "type": "boolean", "default": false, + "type": "boolean", + "description": "An optional boolean value to enable the Implicit Grant flow which allows to provision a token as a result of the authorization process (RFC 6742 Section 4.2).", "required": true } }, { "enable_client_credentials": { - "type": "boolean", "default": false, + "type": "boolean", + "description": "An optional boolean value to enable the Client Credentials Grant flow (RFC 6742 Section 4.4).", "required": true } }, { "enable_password_grant": { - "type": "boolean", "default": false, + "type": "boolean", + "description": "An optional boolean value to enable the Resource Owner Password Credentials Grant flow (RFC 6742 Section 4.3).", "required": true } }, { "hide_credentials": { - "type": "boolean", "default": false, + "type": "boolean", + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", "required": true } }, { "accept_http_if_already_terminated": { - "type": "boolean", "default": false, + "type": "boolean", + "description": "Accepts HTTPs requests that have already been terminated by a proxy or load balancer.", "required": true } }, { "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", "type": "string" } }, { "global_credentials": { - "type": "boolean", "default": false, + "type": "boolean", + "description": "An optional boolean value that allows using the same OAuth credentials generated by the plugin with any other service whose OAuth 2.0 plugin configuration also has `config.global_credentials=true`.", "required": true } }, { "auth_header_name": { "default": "authorization", - "type": "string" + "type": "string", + "description": "The name of the header that is supposed to carry the access token." } }, { "refresh_token_ttl": { + "default": 1209600, "type": "number", "between": [ 0, 100000000 ], - "default": 1209600, - "required": true + "required": true, + "description": "Time-to-live value for data" } }, { "reuse_refresh_token": { - "type": "boolean", "default": false, + "type": "boolean", + "description": "An optional boolean value that indicates whether an OAuth refresh token is reused when refreshing an access token.", "required": true } }, { "persistent_refresh_token": { - "type": "boolean", "default": false, + "type": "boolean", "required": true } }, { "pkce": { - "required": false, + "default": "lax", + "type": "string", "one_of": [ "none", "lax", "strict" ], - "default": "lax", - "type": "string" + "description": "Specifies a mode of how the Proof Key for Code Exchange (PKCE) should be handled by the plugin.", + "required": false + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_field": "scopes", + "if_match": { + "eq": true + }, + "then_match": { + "required": true + }, + "if_field": "mandatory_scope" } } ], - "required": true + "required": true, + "type": "record" } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/oauth2/3.5.x.json b/schemas/oauth2/3.5.x.json new file mode 100644 index 00000000..32335aa3 --- /dev/null +++ b/schemas/oauth2/3.5.x.json @@ -0,0 +1,214 @@ +{ + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "conditional": { + "then_field": "scopes", + "if_match": { + "eq": true + }, + "then_match": { + "required": true + }, + "if_field": "mandatory_scope" + } + } + ], + "fields": [ + { + "scopes": { + "description": "Describes an array of scope names that will be available to the end user. If `mandatory_scope` is set to `true`, then `scopes` are required.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "mandatory_scope": { + "required": true, + "default": false, + "type": "boolean", + "description": "An optional boolean value telling the plugin to require at least one `scope` to be authorized by the end user." + } + }, + { + "provision_key": { + "type": "string", + "unique": true, + "encrypted": true, + "required": true, + "auto": true, + "description": "The unique key the plugin has generated when it has been added to the Service." + } + }, + { + "token_expiration": { + "required": true, + "default": 7200, + "type": "number", + "description": "An optional integer value telling the plugin how many seconds a token should last, after which the client will need to refresh the token. Set to `0` to disable the expiration." + } + }, + { + "enable_authorization_code": { + "required": true, + "default": false, + "type": "boolean", + "description": "An optional boolean value to enable the three-legged Authorization Code flow (RFC 6742 Section 4.1)." + } + }, + { + "enable_implicit_grant": { + "required": true, + "default": false, + "type": "boolean", + "description": "An optional boolean value to enable the Implicit Grant flow which allows to provision a token as a result of the authorization process (RFC 6742 Section 4.2)." + } + }, + { + "enable_client_credentials": { + "required": true, + "default": false, + "type": "boolean", + "description": "An optional boolean value to enable the Client Credentials Grant flow (RFC 6742 Section 4.4)." + } + }, + { + "enable_password_grant": { + "required": true, + "default": false, + "type": "boolean", + "description": "An optional boolean value to enable the Resource Owner Password Credentials Grant flow (RFC 6742 Section 4.3)." + } + }, + { + "hide_credentials": { + "required": true, + "default": false, + "type": "boolean", + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service." + } + }, + { + "accept_http_if_already_terminated": { + "required": true, + "default": false, + "type": "boolean", + "description": "Accepts HTTPs requests that have already been terminated by a proxy or load balancer." + } + }, + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails." + } + }, + { + "global_credentials": { + "required": true, + "default": false, + "type": "boolean", + "description": "An optional boolean value that allows using the same OAuth credentials generated by the plugin with any other service whose OAuth 2.0 plugin configuration also has `config.global_credentials=true`." + } + }, + { + "auth_header_name": { + "default": "authorization", + "type": "string", + "description": "The name of the header that is supposed to carry the access token." + } + }, + { + "refresh_token_ttl": { + "type": "number", + "required": true, + "between": [ + 0, + 100000000 + ], + "default": 1209600, + "description": "Time-to-live value for data" + } + }, + { + "reuse_refresh_token": { + "required": true, + "default": false, + "type": "boolean", + "description": "An optional boolean value that indicates whether an OAuth refresh token is reused when refreshing an access token." + } + }, + { + "persistent_refresh_token": { + "default": false, + "type": "boolean", + "required": true + } + }, + { + "pkce": { + "type": "string", + "required": false, + "one_of": [ + "none", + "lax", + "strict" + ], + "default": "lax", + "description": "Specifies a mode of how the Proof Key for Code Exchange (PKCE) should be handled by the plugin." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/oauth2/3.6.x.json b/schemas/oauth2/3.6.x.json new file mode 100644 index 00000000..83c8bfbf --- /dev/null +++ b/schemas/oauth2/3.6.x.json @@ -0,0 +1,214 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "conditional": { + "then_field": "scopes", + "if_field": "mandatory_scope", + "then_match": { + "required": true + }, + "if_match": { + "eq": true + } + } + } + ], + "type": "record", + "fields": [ + { + "scopes": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Describes an array of scope names that will be available to the end user. If `mandatory_scope` is set to `true`, then `scopes` are required." + } + }, + { + "mandatory_scope": { + "required": true, + "type": "boolean", + "description": "An optional boolean value telling the plugin to require at least one `scope` to be authorized by the end user.", + "default": false + } + }, + { + "provision_key": { + "unique": true, + "encrypted": true, + "required": true, + "type": "string", + "description": "The unique key the plugin has generated when it has been added to the Service.", + "auto": true + } + }, + { + "token_expiration": { + "required": true, + "type": "number", + "description": "An optional integer value telling the plugin how many seconds a token should last, after which the client will need to refresh the token. Set to `0` to disable the expiration.", + "default": 7200 + } + }, + { + "enable_authorization_code": { + "required": true, + "type": "boolean", + "description": "An optional boolean value to enable the three-legged Authorization Code flow (RFC 6742 Section 4.1).", + "default": false + } + }, + { + "enable_implicit_grant": { + "required": true, + "type": "boolean", + "description": "An optional boolean value to enable the Implicit Grant flow which allows to provision a token as a result of the authorization process (RFC 6742 Section 4.2).", + "default": false + } + }, + { + "enable_client_credentials": { + "required": true, + "type": "boolean", + "description": "An optional boolean value to enable the Client Credentials Grant flow (RFC 6742 Section 4.4).", + "default": false + } + }, + { + "enable_password_grant": { + "required": true, + "type": "boolean", + "description": "An optional boolean value to enable the Resource Owner Password Credentials Grant flow (RFC 6742 Section 4.3).", + "default": false + } + }, + { + "hide_credentials": { + "required": true, + "type": "boolean", + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "default": false + } + }, + { + "accept_http_if_already_terminated": { + "required": true, + "type": "boolean", + "description": "Accepts HTTPs requests that have already been terminated by a proxy or load balancer.", + "default": false + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + } + }, + { + "global_credentials": { + "required": true, + "type": "boolean", + "description": "An optional boolean value that allows using the same OAuth credentials generated by the plugin with any other service whose OAuth 2.0 plugin configuration also has `config.global_credentials=true`.", + "default": false + } + }, + { + "auth_header_name": { + "type": "string", + "description": "The name of the header that is supposed to carry the access token.", + "default": "authorization" + } + }, + { + "refresh_token_ttl": { + "type": "number", + "default": 1209600, + "between": [ + 0, + 100000000 + ], + "required": true, + "description": "Time-to-live value for data" + } + }, + { + "reuse_refresh_token": { + "required": true, + "type": "boolean", + "description": "An optional boolean value that indicates whether an OAuth refresh token is reused when refreshing an access token.", + "default": false + } + }, + { + "persistent_refresh_token": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "pkce": { + "type": "string", + "default": "lax", + "required": false, + "description": "Specifies a mode of how the Proof Key for Code Exchange (PKCE) should be handled by the plugin.", + "one_of": [ + "none", + "lax", + "strict" + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/oauth2/3.7.x.json b/schemas/oauth2/3.7.x.json new file mode 100644 index 00000000..5e18a9f5 --- /dev/null +++ b/schemas/oauth2/3.7.x.json @@ -0,0 +1,214 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "scopes": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Describes an array of scope names that will be available to the end user. If `mandatory_scope` is set to `true`, then `scopes` are required." + } + }, + { + "mandatory_scope": { + "required": true, + "type": "boolean", + "description": "An optional boolean value telling the plugin to require at least one `scope` to be authorized by the end user.", + "default": false + } + }, + { + "provision_key": { + "encrypted": true, + "unique": true, + "required": true, + "auto": true, + "description": "The unique key the plugin has generated when it has been added to the Service.", + "type": "string" + } + }, + { + "token_expiration": { + "required": true, + "type": "number", + "description": "An optional integer value telling the plugin how many seconds a token should last, after which the client will need to refresh the token. Set to `0` to disable the expiration.", + "default": 7200 + } + }, + { + "enable_authorization_code": { + "required": true, + "type": "boolean", + "description": "An optional boolean value to enable the three-legged Authorization Code flow (RFC 6742 Section 4.1).", + "default": false + } + }, + { + "enable_implicit_grant": { + "required": true, + "type": "boolean", + "description": "An optional boolean value to enable the Implicit Grant flow which allows to provision a token as a result of the authorization process (RFC 6742 Section 4.2).", + "default": false + } + }, + { + "enable_client_credentials": { + "required": true, + "type": "boolean", + "description": "An optional boolean value to enable the Client Credentials Grant flow (RFC 6742 Section 4.4).", + "default": false + } + }, + { + "enable_password_grant": { + "required": true, + "type": "boolean", + "description": "An optional boolean value to enable the Resource Owner Password Credentials Grant flow (RFC 6742 Section 4.3).", + "default": false + } + }, + { + "hide_credentials": { + "required": true, + "type": "boolean", + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "default": false + } + }, + { + "accept_http_if_already_terminated": { + "required": true, + "type": "boolean", + "description": "Accepts HTTPs requests that have already been terminated by a proxy or load balancer.", + "default": false + } + }, + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails." + } + }, + { + "global_credentials": { + "required": true, + "type": "boolean", + "description": "An optional boolean value that allows using the same OAuth credentials generated by the plugin with any other service whose OAuth 2.0 plugin configuration also has `config.global_credentials=true`.", + "default": false + } + }, + { + "auth_header_name": { + "type": "string", + "description": "The name of the header that is supposed to carry the access token.", + "default": "authorization" + } + }, + { + "refresh_token_ttl": { + "default": 1209600, + "required": true, + "description": "Time-to-live value for data", + "type": "number", + "between": [ + 0, + 100000000 + ] + } + }, + { + "reuse_refresh_token": { + "required": true, + "type": "boolean", + "description": "An optional boolean value that indicates whether an OAuth refresh token is reused when refreshing an access token.", + "default": false + } + }, + { + "persistent_refresh_token": { + "required": true, + "type": "boolean", + "default": false + } + }, + { + "pkce": { + "default": "lax", + "required": false, + "type": "string", + "description": "Specifies a mode of how the Proof Key for Code Exchange (PKCE) should be handled by the plugin.", + "one_of": [ + "none", + "lax", + "strict" + ] + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_field": "mandatory_scope", + "if_match": { + "eq": true + }, + "then_field": "scopes", + "then_match": { + "required": true + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/oauth2/3.8.x.json b/schemas/oauth2/3.8.x.json new file mode 100644 index 00000000..4ae42794 --- /dev/null +++ b/schemas/oauth2/3.8.x.json @@ -0,0 +1,221 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "required": true, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "scopes": { + "description": "Describes an array of scope names that will be available to the end user. If `mandatory_scope` is set to `true`, then `scopes` are required.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "mandatory_scope": { + "description": "An optional boolean value telling the plugin to require at least one `scope` to be authorized by the end user.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "provision_key": { + "description": "The unique key the plugin has generated when it has been added to the Service.", + "required": true, + "unique": true, + "type": "string", + "auto": true, + "encrypted": true + } + }, + { + "token_expiration": { + "description": "An optional integer value telling the plugin how many seconds a token should last, after which the client will need to refresh the token. Set to `0` to disable the expiration.", + "required": true, + "type": "number", + "default": 7200 + } + }, + { + "enable_authorization_code": { + "description": "An optional boolean value to enable the three-legged Authorization Code flow (RFC 6742 Section 4.1).", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "enable_implicit_grant": { + "description": "An optional boolean value to enable the Implicit Grant flow which allows to provision a token as a result of the authorization process (RFC 6742 Section 4.2).", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "enable_client_credentials": { + "description": "An optional boolean value to enable the Client Credentials Grant flow (RFC 6742 Section 4.4).", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "enable_password_grant": { + "description": "An optional boolean value to enable the Resource Owner Password Credentials Grant flow (RFC 6742 Section 4.3).", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "accept_http_if_already_terminated": { + "description": "Accepts HTTPs requests that have already been terminated by a proxy or load balancer.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + } + }, + { + "global_credentials": { + "description": "An optional boolean value that allows using the same OAuth credentials generated by the plugin with any other service whose OAuth 2.0 plugin configuration also has `config.global_credentials=true`.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "auth_header_name": { + "description": "The name of the header that is supposed to carry the access token.", + "type": "string", + "default": "authorization" + } + }, + { + "refresh_token_ttl": { + "description": "Time-to-live value for data", + "required": true, + "between": [ + 0, + 100000000 + ], + "type": "number", + "default": 1209600 + } + }, + { + "reuse_refresh_token": { + "description": "An optional boolean value that indicates whether an OAuth refresh token is reused when refreshing an access token.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "persistent_refresh_token": { + "type": "boolean", + "required": true, + "default": false + } + }, + { + "pkce": { + "description": "Specifies a mode of how the Proof Key for Code Exchange (PKCE) should be handled by the plugin.", + "required": false, + "one_of": [ + "none", + "lax", + "strict" + ], + "type": "string", + "default": "lax" + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "required": false, + "type": "string" + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_field": "mandatory_scope", + "if_match": { + "eq": true + }, + "then_field": "scopes", + "then_match": { + "required": true + } + } + } + ], + "required": true, + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/oauth2/3.9.x.json b/schemas/oauth2/3.9.x.json new file mode 100644 index 00000000..2c0e00b3 --- /dev/null +++ b/schemas/oauth2/3.9.x.json @@ -0,0 +1,221 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": true, + "type": "set" + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "scopes", + "if_field": "mandatory_scope", + "then_match": { + "required": true + } + } + } + ], + "fields": [ + { + "scopes": { + "elements": { + "type": "string" + }, + "description": "Describes an array of scope names that will be available to the end user. If `mandatory_scope` is set to `true`, then `scopes` are required.", + "type": "array" + } + }, + { + "mandatory_scope": { + "default": false, + "description": "An optional boolean value telling the plugin to require at least one `scope` to be authorized by the end user.", + "required": true, + "type": "boolean" + } + }, + { + "provision_key": { + "encrypted": true, + "unique": true, + "type": "string", + "description": "The unique key the plugin has generated when it has been added to the Service.", + "required": true, + "auto": true + } + }, + { + "token_expiration": { + "default": 7200, + "description": "An optional integer value telling the plugin how many seconds a token should last, after which the client will need to refresh the token. Set to `0` to disable the expiration.", + "required": true, + "type": "number" + } + }, + { + "enable_authorization_code": { + "default": false, + "description": "An optional boolean value to enable the three-legged Authorization Code flow (RFC 6742 Section 4.1).", + "required": true, + "type": "boolean" + } + }, + { + "enable_implicit_grant": { + "default": false, + "description": "An optional boolean value to enable the Implicit Grant flow which allows to provision a token as a result of the authorization process (RFC 6742 Section 4.2).", + "required": true, + "type": "boolean" + } + }, + { + "enable_client_credentials": { + "default": false, + "description": "An optional boolean value to enable the Client Credentials Grant flow (RFC 6742 Section 4.4).", + "required": true, + "type": "boolean" + } + }, + { + "enable_password_grant": { + "default": false, + "description": "An optional boolean value to enable the Resource Owner Password Credentials Grant flow (RFC 6742 Section 4.3).", + "required": true, + "type": "boolean" + } + }, + { + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service.", + "required": true, + "type": "boolean" + } + }, + { + "accept_http_if_already_terminated": { + "default": false, + "description": "Accepts HTTPs requests that have already been terminated by a proxy or load balancer.", + "required": true, + "type": "boolean" + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails.", + "type": "string" + } + }, + { + "global_credentials": { + "default": false, + "description": "An optional boolean value that allows using the same OAuth credentials generated by the plugin with any other service whose OAuth 2.0 plugin configuration also has `config.global_credentials=true`.", + "required": true, + "type": "boolean" + } + }, + { + "auth_header_name": { + "default": "authorization", + "description": "The name of the header that is supposed to carry the access token.", + "type": "string" + } + }, + { + "refresh_token_ttl": { + "between": [ + 0, + 100000000 + ], + "required": true, + "type": "number", + "default": 1209600, + "description": "Time-to-live value for data" + } + }, + { + "reuse_refresh_token": { + "default": false, + "description": "An optional boolean value that indicates whether an OAuth refresh token is reused when refreshing an access token.", + "required": true, + "type": "boolean" + } + }, + { + "persistent_refresh_token": { + "default": false, + "required": true, + "type": "boolean" + } + }, + { + "pkce": { + "required": false, + "type": "string", + "default": "lax", + "description": "Specifies a mode of how the Proof Key for Code Exchange (PKCE) should be handled by the plugin.", + "one_of": [ + "none", + "lax", + "strict" + ] + } + }, + { + "realm": { + "description": "When authentication fails the plugin sends `WWW-Authenticate` header with `realm` attribute value.", + "required": false, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/opa/3.10.x.json b/schemas/opa/3.10.x.json new file mode 100644 index 00000000..f1c525f2 --- /dev/null +++ b/schemas/opa/3.10.x.json @@ -0,0 +1,147 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "opa_protocol": { + "description": "The protocol to use when talking to Open Policy Agent (OPA) server. Allowed protocols are `http` and `https`.", + "default": "http", + "type": "string", + "one_of": [ + "http", + "https" + ] + } + }, + { + "opa_host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "localhost", + "required": true + } + }, + { + "opa_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 8181, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true + } + }, + { + "opa_path": { + "type": "string", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "required": true + } + }, + { + "include_service_in_opa_input": { + "description": "If set to true, the Kong Gateway Service object in use for the current request is included as input to OPA.", + "default": false, + "type": "boolean" + } + }, + { + "include_route_in_opa_input": { + "description": "If set to true, the Kong Gateway Route object in use for the current request is included as input to OPA.", + "default": false, + "type": "boolean" + } + }, + { + "include_consumer_in_opa_input": { + "description": "If set to true, the Kong Gateway Consumer object in use for the current request (if any) is included as input to OPA.", + "default": false, + "type": "boolean" + } + }, + { + "include_body_in_opa_input": { + "default": false, + "type": "boolean" + } + }, + { + "include_parsed_json_body_in_opa_input": { + "description": "If set to true and the `Content-Type` header of the current request is `application/json`, the request body will be JSON decoded and the decoded struct is included as input to OPA.", + "default": false, + "type": "boolean" + } + }, + { + "include_uri_captures_in_opa_input": { + "description": "If set to true, the regex capture groups captured on the Kong Gateway Route's path field in the current request (if any) are included as input to OPA.", + "default": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "If set to true, the OPA certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "default": true, + "type": "boolean", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/opa/3.11.x.json b/schemas/opa/3.11.x.json new file mode 100644 index 00000000..d094e8bf --- /dev/null +++ b/schemas/opa/3.11.x.json @@ -0,0 +1,147 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "opa_protocol": { + "one_of": [ + "http", + "https" + ], + "description": "The protocol to use when talking to Open Policy Agent (OPA) server. Allowed protocols are `http` and `https`.", + "default": "http", + "type": "string" + } + }, + { + "opa_host": { + "default": "localhost", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "opa_port": { + "required": true, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 8181, + "type": "integer" + } + }, + { + "opa_path": { + "required": true, + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "starts_with": "/", + "type": "string" + } + }, + { + "include_service_in_opa_input": { + "description": "If set to true, the Kong Gateway Service object in use for the current request is included as input to OPA.", + "default": false, + "type": "boolean" + } + }, + { + "include_route_in_opa_input": { + "description": "If set to true, the Kong Gateway Route object in use for the current request is included as input to OPA.", + "default": false, + "type": "boolean" + } + }, + { + "include_consumer_in_opa_input": { + "description": "If set to true, the Kong Gateway Consumer object in use for the current request (if any) is included as input to OPA.", + "default": false, + "type": "boolean" + } + }, + { + "include_body_in_opa_input": { + "default": false, + "type": "boolean" + } + }, + { + "include_parsed_json_body_in_opa_input": { + "description": "If set to true and the `Content-Type` header of the current request is `application/json`, the request body will be JSON decoded and the decoded struct is included as input to OPA.", + "default": false, + "type": "boolean" + } + }, + { + "include_uri_captures_in_opa_input": { + "description": "If set to true, the regex capture groups captured on the Kong Gateway Route's path field in the current request (if any) are included as input to OPA.", + "default": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "If set to true, the OPA certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "required": true, + "default": true, + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/opa/3.12.x.json b/schemas/opa/3.12.x.json new file mode 100644 index 00000000..ee589315 --- /dev/null +++ b/schemas/opa/3.12.x.json @@ -0,0 +1,145 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "opa_protocol": { + "description": "The protocol to use when talking to Open Policy Agent (OPA) server. Allowed protocols are `http` and `https`.", + "default": "http", + "one_of": [ + "http", + "https" + ], + "type": "string" + } + }, + { + "opa_host": { + "type": "string", + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "opa_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "required": true, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "default": 8181 + } + }, + { + "opa_path": { + "type": "string", + "starts_with": "/", + "required": true, + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + }, + { + "include_service_in_opa_input": { + "description": "If set to true, the Kong Gateway Service object in use for the current request is included as input to OPA.", + "default": false, + "type": "boolean" + } + }, + { + "include_route_in_opa_input": { + "description": "If set to true, the Kong Gateway Route object in use for the current request is included as input to OPA.", + "default": false, + "type": "boolean" + } + }, + { + "include_consumer_in_opa_input": { + "description": "If set to true, the Kong Gateway Consumer object in use for the current request (if any) is included as input to OPA.", + "default": false, + "type": "boolean" + } + }, + { + "include_body_in_opa_input": { + "type": "boolean", + "default": false + } + }, + { + "include_parsed_json_body_in_opa_input": { + "description": "If set to true and the `Content-Type` header of the current request is `application/json`, the request body will be JSON decoded and the decoded struct is included as input to OPA.", + "default": false, + "type": "boolean" + } + }, + { + "include_uri_captures_in_opa_input": { + "description": "If set to true, the regex capture groups captured on the Kong Gateway Route's path field in the current request (if any) are included as input to OPA.", + "default": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "If set to true, the OPA certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "default": true, + "type": "boolean", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/opa/3.4.x.json b/schemas/opa/3.4.x.json index b80c5381..3188b58e 100644 --- a/schemas/opa/3.4.x.json +++ b/schemas/opa/3.4.x.json @@ -2,8 +2,9 @@ "fields": [ { "consumer": { - "eq": null, "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, @@ -15,110 +16,132 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "opa_protocol": { - "type": "string", "default": "http", "one_of": [ "http", "https" - ] + ], + "type": "string", + "description": "The protocol to use when talking to Open Policy Agent (OPA) server. Allowed protocols are `http` and `https`." } }, { "opa_host": { - "type": "string", + "default": "localhost", "required": true, - "default": "localhost" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { "opa_port": { + "default": 8181, "type": "integer", "between": [ 0, 65535 ], - "default": 8181, - "required": true + "required": true, + "description": "An integer representing a port number between 0 and 65535, inclusive." } }, { "opa_path": { "match_none": [ { - "err": "must not have empty segments", - "pattern": "//" + "pattern": "//", + "err": "must not have empty segments" } ], - "type": "string", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", "starts_with": "/", - "required": true + "required": true, + "type": "string" } }, { "include_service_in_opa_input": { + "default": false, "type": "boolean", - "default": false + "description": "If set to true, the Kong Gateway Service object in use for the current request is included as input to OPA." } }, { "include_route_in_opa_input": { + "default": false, "type": "boolean", - "default": false + "description": "If set to true, the Kong Gateway Route object in use for the current request is included as input to OPA." } }, { "include_consumer_in_opa_input": { + "default": false, "type": "boolean", - "default": false + "description": "If set to true, the Kong Gateway Consumer object in use for the current request (if any) is included as input to OPA." } }, { "include_body_in_opa_input": { - "type": "boolean", - "default": false + "default": false, + "type": "boolean" } }, { "include_parsed_json_body_in_opa_input": { + "default": false, "type": "boolean", - "default": false + "description": "If set to true and the `Content-Type` header of the current request is `application/json`, the request body will be JSON decoded and the decoded struct is included as input to OPA." } }, { "include_uri_captures_in_opa_input": { + "default": false, "type": "boolean", - "default": false + "description": "If set to true, the regex capture groups captured on the Kong Gateway Route's path field in the current request (if any) are included as input to OPA." } }, { "ssl_verify": { - "type": "boolean", + "default": true, "required": true, - "default": true + "type": "boolean", + "description": "If set to true, the OPA certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate." } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/opa/3.5.x.json b/schemas/opa/3.5.x.json new file mode 100644 index 00000000..b381dd6f --- /dev/null +++ b/schemas/opa/3.5.x.json @@ -0,0 +1,147 @@ +{ + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "opa_protocol": { + "one_of": [ + "http", + "https" + ], + "default": "http", + "type": "string", + "description": "The protocol to use when talking to Open Policy Agent (OPA) server. Allowed protocols are `http` and `https`." + } + }, + { + "opa_host": { + "description": "A string representing a host name, such as example.com.", + "default": "localhost", + "type": "string", + "required": true + } + }, + { + "opa_port": { + "type": "integer", + "required": true, + "between": [ + 0, + 65535 + ], + "default": 8181, + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "opa_path": { + "type": "string", + "required": true, + "starts_with": "/", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)." + } + }, + { + "include_service_in_opa_input": { + "default": false, + "type": "boolean", + "description": "If set to true, the Kong Gateway Service object in use for the current request is included as input to OPA." + } + }, + { + "include_route_in_opa_input": { + "default": false, + "type": "boolean", + "description": "If set to true, the Kong Gateway Route object in use for the current request is included as input to OPA." + } + }, + { + "include_consumer_in_opa_input": { + "default": false, + "type": "boolean", + "description": "If set to true, the Kong Gateway Consumer object in use for the current request (if any) is included as input to OPA." + } + }, + { + "include_body_in_opa_input": { + "type": "boolean", + "default": false + } + }, + { + "include_parsed_json_body_in_opa_input": { + "default": false, + "type": "boolean", + "description": "If set to true and the `Content-Type` header of the current request is `application/json`, the request body will be JSON decoded and the decoded struct is included as input to OPA." + } + }, + { + "include_uri_captures_in_opa_input": { + "default": false, + "type": "boolean", + "description": "If set to true, the regex capture groups captured on the Kong Gateway Route's path field in the current request (if any) are included as input to OPA." + } + }, + { + "ssl_verify": { + "required": true, + "default": true, + "type": "boolean", + "description": "If set to true, the OPA certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/opa/3.6.x.json b/schemas/opa/3.6.x.json new file mode 100644 index 00000000..b2baf7a3 --- /dev/null +++ b/schemas/opa/3.6.x.json @@ -0,0 +1,147 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "opa_protocol": { + "one_of": [ + "http", + "https" + ], + "type": "string", + "description": "The protocol to use when talking to Open Policy Agent (OPA) server. Allowed protocols are `http` and `https`.", + "default": "http" + } + }, + { + "opa_host": { + "required": true, + "type": "string", + "default": "localhost", + "description": "A string representing a host name, such as example.com." + } + }, + { + "opa_port": { + "type": "integer", + "default": 8181, + "between": [ + 0, + 65535 + ], + "required": true, + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "opa_path": { + "type": "string", + "starts_with": "/", + "required": true, + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + }, + { + "include_service_in_opa_input": { + "type": "boolean", + "description": "If set to true, the Kong Gateway Service object in use for the current request is included as input to OPA.", + "default": false + } + }, + { + "include_route_in_opa_input": { + "type": "boolean", + "description": "If set to true, the Kong Gateway Route object in use for the current request is included as input to OPA.", + "default": false + } + }, + { + "include_consumer_in_opa_input": { + "type": "boolean", + "description": "If set to true, the Kong Gateway Consumer object in use for the current request (if any) is included as input to OPA.", + "default": false + } + }, + { + "include_body_in_opa_input": { + "default": false, + "type": "boolean" + } + }, + { + "include_parsed_json_body_in_opa_input": { + "type": "boolean", + "description": "If set to true and the `Content-Type` header of the current request is `application/json`, the request body will be JSON decoded and the decoded struct is included as input to OPA.", + "default": false + } + }, + { + "include_uri_captures_in_opa_input": { + "type": "boolean", + "description": "If set to true, the regex capture groups captured on the Kong Gateway Route's path field in the current request (if any) are included as input to OPA.", + "default": false + } + }, + { + "ssl_verify": { + "required": true, + "type": "boolean", + "description": "If set to true, the OPA certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "default": true + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/opa/3.7.x.json b/schemas/opa/3.7.x.json new file mode 100644 index 00000000..cd3a0fb8 --- /dev/null +++ b/schemas/opa/3.7.x.json @@ -0,0 +1,147 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "opa_protocol": { + "default": "http", + "description": "The protocol to use when talking to Open Policy Agent (OPA) server. Allowed protocols are `http` and `https`.", + "type": "string", + "one_of": [ + "http", + "https" + ] + } + }, + { + "opa_host": { + "required": true, + "type": "string", + "description": "A string representing a host name, such as example.com.", + "default": "localhost" + } + }, + { + "opa_port": { + "default": 8181, + "required": true, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "opa_path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "required": true, + "type": "string", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "starts_with": "/" + } + }, + { + "include_service_in_opa_input": { + "description": "If set to true, the Kong Gateway Service object in use for the current request is included as input to OPA.", + "type": "boolean", + "default": false + } + }, + { + "include_route_in_opa_input": { + "description": "If set to true, the Kong Gateway Route object in use for the current request is included as input to OPA.", + "type": "boolean", + "default": false + } + }, + { + "include_consumer_in_opa_input": { + "description": "If set to true, the Kong Gateway Consumer object in use for the current request (if any) is included as input to OPA.", + "type": "boolean", + "default": false + } + }, + { + "include_body_in_opa_input": { + "type": "boolean", + "default": false + } + }, + { + "include_parsed_json_body_in_opa_input": { + "description": "If set to true and the `Content-Type` header of the current request is `application/json`, the request body will be JSON decoded and the decoded struct is included as input to OPA.", + "type": "boolean", + "default": false + } + }, + { + "include_uri_captures_in_opa_input": { + "description": "If set to true, the regex capture groups captured on the Kong Gateway Route's path field in the current request (if any) are included as input to OPA.", + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "required": true, + "description": "If set to true, the OPA certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "type": "boolean", + "default": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/opa/3.8.x.json b/schemas/opa/3.8.x.json new file mode 100644 index 00000000..e23d2064 --- /dev/null +++ b/schemas/opa/3.8.x.json @@ -0,0 +1,147 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "opa_protocol": { + "description": "The protocol to use when talking to Open Policy Agent (OPA) server. Allowed protocols are `http` and `https`.", + "type": "string", + "default": "http", + "one_of": [ + "http", + "https" + ] + } + }, + { + "opa_host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "localhost" + } + }, + { + "opa_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true, + "between": [ + 0, + 65535 + ], + "type": "integer", + "default": 8181 + } + }, + { + "opa_path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "required": true, + "starts_with": "/", + "type": "string", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)." + } + }, + { + "include_service_in_opa_input": { + "description": "If set to true, the Kong Gateway Service object in use for the current request is included as input to OPA.", + "type": "boolean", + "default": false + } + }, + { + "include_route_in_opa_input": { + "description": "If set to true, the Kong Gateway Route object in use for the current request is included as input to OPA.", + "type": "boolean", + "default": false + } + }, + { + "include_consumer_in_opa_input": { + "description": "If set to true, the Kong Gateway Consumer object in use for the current request (if any) is included as input to OPA.", + "type": "boolean", + "default": false + } + }, + { + "include_body_in_opa_input": { + "type": "boolean", + "default": false + } + }, + { + "include_parsed_json_body_in_opa_input": { + "description": "If set to true and the `Content-Type` header of the current request is `application/json`, the request body will be JSON decoded and the decoded struct is included as input to OPA.", + "type": "boolean", + "default": false + } + }, + { + "include_uri_captures_in_opa_input": { + "description": "If set to true, the regex capture groups captured on the Kong Gateway Route's path field in the current request (if any) are included as input to OPA.", + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "description": "If set to true, the OPA certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "type": "boolean", + "required": true, + "default": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/opa/3.9.x.json b/schemas/opa/3.9.x.json new file mode 100644 index 00000000..1b302c32 --- /dev/null +++ b/schemas/opa/3.9.x.json @@ -0,0 +1,147 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "opa_protocol": { + "default": "http", + "description": "The protocol to use when talking to Open Policy Agent (OPA) server. Allowed protocols are `http` and `https`.", + "type": "string", + "one_of": [ + "http", + "https" + ] + } + }, + { + "opa_host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "opa_port": { + "between": [ + 0, + 65535 + ], + "required": true, + "type": "integer", + "default": 8181, + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "opa_path": { + "required": true, + "type": "string", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "starts_with": "/" + } + }, + { + "include_service_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Service object in use for the current request is included as input to OPA.", + "type": "boolean" + } + }, + { + "include_route_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Route object in use for the current request is included as input to OPA.", + "type": "boolean" + } + }, + { + "include_consumer_in_opa_input": { + "default": false, + "description": "If set to true, the Kong Gateway Consumer object in use for the current request (if any) is included as input to OPA.", + "type": "boolean" + } + }, + { + "include_body_in_opa_input": { + "default": false, + "type": "boolean" + } + }, + { + "include_parsed_json_body_in_opa_input": { + "default": false, + "description": "If set to true and the `Content-Type` header of the current request is `application/json`, the request body will be JSON decoded and the decoded struct is included as input to OPA.", + "type": "boolean" + } + }, + { + "include_uri_captures_in_opa_input": { + "default": false, + "description": "If set to true, the regex capture groups captured on the Kong Gateway Route's path field in the current request (if any) are included as input to OPA.", + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": true, + "description": "If set to true, the OPA certificate will be verified according to the CA certificates specified in lua_ssl_trusted_certificate.", + "required": true, + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/openid-connect/2.8.x.json b/schemas/openid-connect/2.8.x.json index ce9aec67..03aee07a 100644 --- a/schemas/openid-connect/2.8.x.json +++ b/schemas/openid-connect/2.8.x.json @@ -449,6 +449,14 @@ "description": "Destroy any active session for the forbidden requests." } }, + { + "unauthorized_destroy_session": { + "description": "Destroy any active session for the unauthorized requests.", + "default": true, + "type": "boolean", + "required": false + } + }, { "unauthorized_redirect_uri": { "required": false, @@ -2237,4 +2245,4 @@ } } ] -} \ No newline at end of file +} diff --git a/schemas/openid-connect/3.10.x.json b/schemas/openid-connect/3.10.x.json new file mode 100644 index 00000000..f278e384 --- /dev/null +++ b/schemas/openid-connect/3.10.x.json @@ -0,0 +1,3563 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + }, + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "required": true, + "type": "record", + "shorthand_fields": [ + { + "authorization_cookie_lifetime": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.authorization_cookie_lifetime is deprecated, please use config.authorization_rolling_timeout instead" + }, + "type": "number" + } + }, + { + "authorization_cookie_samesite": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.authorization_cookie_samesite is deprecated, please use config.authorization_cookie_same_site instead" + }, + "type": "string" + } + }, + { + "authorization_cookie_httponly": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.authorization_cookie_httponly is deprecated, please use config.authorization_cookie_http_only instead" + }, + "type": "boolean" + } + }, + { + "session_cookie_lifetime": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_lifetime is deprecated, please use config.session_rolling_timeout instead" + }, + "type": "number" + } + }, + { + "session_cookie_idletime": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_idletime is deprecated, please use config.session_idling_timeout instead" + }, + "type": "number" + } + }, + { + "session_cookie_samesite": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_samesite is deprecated, please use config.session_cookie_same_site instead" + }, + "type": "string" + } + }, + { + "session_cookie_httponly": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_httponly is deprecated, please use config.session_cookie_http_only instead" + }, + "type": "boolean" + } + }, + { + "session_memcache_prefix": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_prefix is deprecated, please use config.session_memcached_prefix instead" + }, + "type": "string" + } + }, + { + "session_memcache_socket": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_socket is deprecated, please use config.session_memcached_socket instead" + }, + "type": "string" + } + }, + { + "session_memcache_host": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_host is deprecated, please use config.session_memcached_host instead" + }, + "type": "string" + } + }, + { + "session_memcache_port": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_port is deprecated, please use config.session_memcached_port instead" + }, + "type": "integer" + } + }, + { + "session_cookie_renew": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_renew option does not exist anymore" + }, + "type": "number" + } + }, + { + "session_cookie_maxsize": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_maxsize option does not exist anymore" + }, + "type": "integer" + } + }, + { + "session_strategy": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_strategy option does not exist anymore" + }, + "type": "string" + } + }, + { + "session_compressor": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_compressor option does not exist anymore" + }, + "type": "string" + } + }, + { + "session_redis_prefix": { + "deprecation": { + "message": "openid-connect: config.session_redis_prefix is deprecated, please use config.redis.prefix instead", + "replaced_with": [ + { + "path": [ + "redis", + "prefix" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_redis_socket": { + "deprecation": { + "message": "openid-connect: config.session_redis_socket is deprecated, please use config.redis.socket instead", + "replaced_with": [ + { + "path": [ + "redis", + "socket" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_redis_host": { + "deprecation": { + "message": "openid-connect: config.session_redis_host is deprecated, please use config.redis.host instead", + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_redis_port": { + "deprecation": { + "message": "openid-connect: config.session_redis_port is deprecated, please use config.redis.port instead", + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "session_redis_username": { + "deprecation": { + "message": "openid-connect: config.redis_host is deprecated, please use config.redis.host instead", + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_redis_password": { + "deprecation": { + "message": "openid-connect: config.session_redis_password is deprecated, please use config.redis.password instead", + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_redis_connect_timeout": { + "deprecation": { + "message": "openid-connect: config.session_redis_connect_timeout is deprecated, please use config.redis.connect_timeout instead", + "replaced_with": [ + { + "path": [ + "redis", + "connect_timeout" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "session_redis_read_timeout": { + "deprecation": { + "message": "openid-connect: config.session_redis_read_timeout is deprecated, please use config.redis.read_timeout instead", + "replaced_with": [ + { + "path": [ + "redis", + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "session_redis_send_timeout": { + "deprecation": { + "message": "openid-connect: config.session_redis_send_timeout is deprecated, please use config.redis.send_timeout instead", + "replaced_with": [ + { + "path": [ + "redis", + "send_timeout" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "session_redis_ssl": { + "deprecation": { + "message": "openid-connect: config.session_redis_ssl is deprecated, please use config.redis.ssl instead", + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "boolean" + } + }, + { + "session_redis_ssl_verify": { + "deprecation": { + "message": "openid-connect: config.session_redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead", + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "boolean" + } + }, + { + "session_redis_server_name": { + "deprecation": { + "message": "openid-connect: config.session_redis_server_name is deprecated, please use config.redis.server_name instead", + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_redis_cluster_nodes": { + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "type": "array", + "deprecation": { + "message": "openid-connect: config.session_redis_cluster_nodes is deprecated, please use config.redis.cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_cluster_max_redirections": { + "deprecation": { + "message": "openid-connect: config.session_redis_cluster_max_redirections is deprecated, please use config.redis.cluster_max_redirections instead", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_max_redirections" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + } + ], + "fields": [ + { + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "type": "string", + "required": true + } + }, + { + "using_pseudo_issuer": { + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "type": "set", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "required": false + } + }, + { + "rediscovery_lifetime": { + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "default": 30, + "type": "number", + "required": false + } + }, + { + "auth_methods": { + "type": "array", + "description": "Types of credentials/grants to enable.", + "default": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "required": false + } + }, + { + "client_id": { + "type": "array", + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.", + "encrypted": true, + "elements": { + "referenceable": true, + "type": "string" + }, + "required": false + } + }, + { + "client_secret": { + "type": "array", + "description": "The client secret.", + "encrypted": true, + "elements": { + "referenceable": true, + "type": "string" + }, + "required": false + } + }, + { + "client_auth": { + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + }, + "required": false + } + }, + { + "client_jwk": { + "description": "The JWK used for the private_key_jwt authentication.", + "type": "array", + "elements": { + "type": "record", + "required": false, + "fields": [ + { + "issuer": { + "required": false, + "type": "string" + } + }, + { + "kty": { + "required": false, + "type": "string" + } + }, + { + "use": { + "required": false, + "type": "string" + } + }, + { + "key_ops": { + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "alg": { + "required": false, + "type": "string" + } + }, + { + "kid": { + "required": false, + "type": "string" + } + }, + { + "x5u": { + "required": false, + "type": "string" + } + }, + { + "x5c": { + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "x5t": { + "required": false, + "type": "string" + } + }, + { + "x5t#S256": { + "required": false, + "type": "string" + } + }, + { + "k": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + }, + { + "x": { + "required": false, + "type": "string" + } + }, + { + "y": { + "required": false, + "type": "string" + } + }, + { + "crv": { + "required": false, + "type": "string" + } + }, + { + "n": { + "required": false, + "type": "string" + } + }, + { + "e": { + "required": false, + "type": "string" + } + }, + { + "d": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + }, + { + "p": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + }, + { + "q": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + }, + { + "dp": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + }, + { + "dq": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + }, + { + "qi": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + }, + { + "oth": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + }, + { + "r": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + }, + { + "t": { + "referenceable": true, + "type": "string", + "encrypted": true, + "required": false + } + } + ] + }, + "required": false + } + }, + { + "client_alg": { + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ] + }, + "required": false + } + }, + { + "client_arg": { + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "default": "client_id", + "type": "string", + "required": false + } + }, + { + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "type": "array", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "required": false + } + }, + { + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "type": "array", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string", + "referenceable": true + }, + "required": false + } + }, + { + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "type": "array", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string", + "referenceable": true + }, + "required": false + } + }, + { + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "type": "array", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "required": false + } + }, + { + "forbidden_error_message": { + "description": "The error message for the forbidden requests (when not using the redirection).", + "default": "Forbidden", + "type": "string", + "required": false + } + }, + { + "forbidden_destroy_session": { + "description": "Destroy any active session for the forbidden requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "unauthorized_destroy_session": { + "description": "Destroy any active session for the unauthorized requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "type": "array", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "required": false + } + }, + { + "unauthorized_error_message": { + "description": "The error message for the unauthorized requests (when not using the redirection).", + "default": "Unauthorized", + "type": "string", + "required": false + } + }, + { + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "type": "array", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + }, + "required": false + } + }, + { + "response_mode": { + "type": "string", + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "one_of": [ + "query", + "form_post", + "fragment", + "query.jwt", + "form_post.jwt", + "fragment.jwt", + "jwt" + ], + "default": "query", + "required": false + } + }, + { + "response_type": { + "type": "array", + "description": "The response type passed to the authorization endpoint.", + "default": [ + "code" + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "scopes": { + "type": "array", + "description": "The scopes passed to the authorization and token endpoints.", + "default": [ + "openid" + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "required": false + } + }, + { + "audience": { + "description": "The audience passed to the authorization endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "scopes_claim": { + "type": "array", + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "scope" + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "audience_claim": { + "type": "array", + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "aud" + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "groups_claim": { + "type": "array", + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "groups" + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "roles_claim": { + "type": "array", + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "roles" + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "domains": { + "description": "The allowed values for the `hd` claim.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number", + "required": false + } + }, + { + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "pushed_authorization_request_endpoint_auth_method": { + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false + } + }, + { + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean", + "required": false + } + }, + { + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean", + "required": false + } + }, + { + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean", + "required": false + } + }, + { + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "authorization_rolling_timeout": { + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "default": 600, + "type": "number", + "required": false + } + }, + { + "authorization_cookie_name": { + "description": "The authorization cookie name.", + "default": "authorization", + "type": "string", + "required": false + } + }, + { + "authorization_cookie_path": { + "type": "string", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "starts_with": "/", + "default": "/", + "description": "The authorization cookie Path flag.", + "required": false + } + }, + { + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string", + "required": false + } + }, + { + "authorization_cookie_same_site": { + "type": "string", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "default": "Default", + "required": false + } + }, + { + "authorization_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean", + "required": false + } + }, + { + "preserve_query_args": { + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false + } + }, + { + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string", + "required": false + } + }, + { + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token" + ] + }, + "required": false + } + }, + { + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false + } + }, + { + "introspection_hint": { + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "default": "access_token", + "type": "string", + "required": false + } + }, + { + "introspection_check_active": { + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "introspection_accept": { + "type": "string", + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "one_of": [ + "application/json", + "application/token-introspection+jwt", + "application/jwt" + ], + "default": "application/json", + "required": false + } + }, + { + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "introspection_headers_values": { + "type": "array", + "description": "Extra header values passed to the introspection endpoint.", + "encrypted": true, + "elements": { + "referenceable": true, + "type": "string" + }, + "required": false + } + }, + { + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "introspection_post_args_client_headers": { + "description": "Extra post arguments passed from the client headers to the introspection endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "introspect_jwt_tokens": { + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false + } + }, + { + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "userinfo_accept": { + "type": "string", + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "one_of": [ + "application/json", + "application/jwt" + ], + "default": "application/json", + "required": false + } + }, + { + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "type": "string", + "required": false + } + }, + { + "session_secret": { + "type": "string", + "referenceable": true, + "description": "The session secret.", + "encrypted": true, + "required": false + } + }, + { + "session_audience": { + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "default": "default", + "type": "string", + "required": false + } + }, + { + "session_cookie_name": { + "description": "The session cookie name.", + "default": "session", + "type": "string", + "required": false + } + }, + { + "session_remember": { + "description": "Enables or disables persistent sessions.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_remember_cookie_name": { + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "default": "remember", + "type": "string", + "required": false + } + }, + { + "session_remember_rolling_timeout": { + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "default": 604800, + "type": "number", + "required": false + } + }, + { + "session_remember_absolute_timeout": { + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "default": 2592000, + "type": "number", + "required": false + } + }, + { + "session_idling_timeout": { + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "default": 900, + "type": "number", + "required": false + } + }, + { + "session_rolling_timeout": { + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "default": 3600, + "type": "number", + "required": false + } + }, + { + "session_absolute_timeout": { + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "default": 86400, + "type": "number", + "required": false + } + }, + { + "session_cookie_path": { + "type": "string", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "starts_with": "/", + "default": "/", + "description": "The session cookie Path flag.", + "required": false + } + }, + { + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string", + "required": false + } + }, + { + "session_cookie_same_site": { + "type": "string", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "default": "Lax", + "required": false + } + }, + { + "session_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean", + "required": false + } + }, + { + "session_request_headers": { + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "type": "set", + "required": false + } + }, + { + "session_response_headers": { + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "type": "set", + "required": false + } + }, + { + "session_storage": { + "type": "string", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "default": "cookie", + "required": false + } + }, + { + "session_store_metadata": { + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_enforce_same_subject": { + "description": "When set to `true`, audiences are forced to share the same subject.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_hash_subject": { + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_hash_storage_key": { + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string", + "required": false + } + }, + { + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string", + "required": false + } + }, + { + "session_memcached_host": { + "description": "The memcached host.", + "default": "127.0.0.1", + "type": "string", + "required": false + } + }, + { + "session_memcached_port": { + "type": "integer", + "description": "The memcached port.", + "default": 11211, + "between": [ + 0, + 65535 + ], + "required": false + } + }, + { + "redis": { + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + }, + "required": false + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + }, + "required": false + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "prefix": { + "description": "The Redis session key prefix.", + "type": "string", + "required": false + } + }, + { + "socket": { + "description": "The Redis unix socket path.", + "type": "string", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "type": "array", + "elements": { + "type": "string" + }, + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "len_min": 1 + } + }, + { + "cluster_addresses": { + "type": "array", + "elements": { + "type": "string" + }, + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "len_min": 1 + } + } + ], + "required": true + } + }, + { + "reverify": { + "description": "Specifies whether to always verify tokens stored in the session.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "jwt_session_claim": { + "description": "The claim to match against the JWT session cookie.", + "default": "sid", + "type": "string", + "required": false + } + }, + { + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string", + "required": false + } + }, + { + "bearer_token_param_type": { + "type": "array", + "description": "Where to look for the bearer token: - `header`: search the `Authorization`, `access-token`, and `x-access-token` HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "cookie", + "query", + "body" + ] + }, + "required": false + } + }, + { + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string", + "required": false + } + }, + { + "client_credentials_param_type": { + "type": "array", + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "required": false + } + }, + { + "password_param_type": { + "type": "array", + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "required": false + } + }, + { + "id_token_param_type": { + "type": "array", + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "required": false + } + }, + { + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string", + "required": false + } + }, + { + "refresh_token_param_type": { + "type": "array", + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "required": false + } + }, + { + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string", + "required": false + } + }, + { + "refresh_tokens": { + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "upstream_headers_claims": { + "description": "The upstream header claims. Only top level claims are supported.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "upstream_access_token_header": { + "description": "The upstream access token header.", + "default": "authorization:bearer", + "type": "string", + "required": false + } + }, + { + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string", + "required": false + } + }, + { + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string", + "required": false + } + }, + { + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string", + "required": false + } + }, + { + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string", + "required": false + } + }, + { + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string", + "required": false + } + }, + { + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string", + "required": false + } + }, + { + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string", + "required": false + } + }, + { + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "type": "string", + "required": false + } + }, + { + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string", + "required": false + } + }, + { + "downstream_headers_claims": { + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string", + "required": false + } + }, + { + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string", + "required": false + } + }, + { + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string", + "required": false + } + }, + { + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string", + "required": false + } + }, + { + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string", + "required": false + } + }, + { + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string", + "required": false + } + }, + { + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string", + "required": false + } + }, + { + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string", + "required": false + } + }, + { + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "type": "string", + "required": false + } + }, + { + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string", + "required": false + } + }, + { + "login_methods": { + "type": "array", + "description": "Enable login functionality with specified grants.", + "default": [ + "authorization_code" + ], + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "required": false + } + }, + { + "login_action": { + "type": "string", + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "one_of": [ + "upstream", + "response", + "redirect" + ], + "default": "upstream", + "required": false + } + }, + { + "login_tokens": { + "type": "array", + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "default": [ + "id_token" + ], + "elements": { + "type": "string", + "one_of": [ + "id_token", + "access_token", + "refresh_token", + "tokens", + "introspection" + ] + }, + "required": false + } + }, + { + "login_redirect_mode": { + "type": "string", + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "one_of": [ + "query", + "fragment" + ], + "default": "fragment", + "required": false + } + }, + { + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string", + "required": false + } + }, + { + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string", + "required": false + } + }, + { + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string", + "required": false + } + }, + { + "logout_methods": { + "type": "array", + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "default": [ + "POST", + "DELETE" + ], + "elements": { + "type": "string", + "one_of": [ + "POST", + "GET", + "DELETE" + ] + }, + "required": false + } + }, + { + "logout_revoke": { + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "logout_revoke_access_token": { + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "logout_revoke_refresh_token": { + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "consumer_claim": { + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "consumer_by": { + "type": "array", + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "required": false + } + }, + { + "consumer_optional": { + "description": "Do not terminate the request if consumer mapping fails.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "credential_claim": { + "type": "array", + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "sub" + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string", + "required": false + } + }, + { + "run_on_preflight": { + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "leeway": { + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "default": 0, + "type": "number", + "required": false + } + }, + { + "verify_parameters": { + "description": "Verify plugin configuration against discovery.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "verify_nonce": { + "description": "Verify nonce on authorization code flow.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "verify_claims": { + "description": "Verify tokens for standard claims.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "verify_signature": { + "description": "Verify signature of tokens.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "ignore_signature": { + "type": "array", + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token", + "session", + "introspection", + "userinfo" + ] + }, + "required": false + } + }, + { + "enable_hs_signatures": { + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "required": false + } + }, + { + "cache_ttl": { + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "default": 3600, + "type": "number", + "required": false + } + }, + { + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number", + "required": false + } + }, + { + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number", + "required": false + } + }, + { + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number", + "required": false + } + }, + { + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number", + "required": false + } + }, + { + "cache_tokens": { + "description": "Cache the token endpoint requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "type": "string", + "required": false, + "auto": true + } + }, + { + "cache_introspection": { + "description": "Cache the introspection endpoint requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "cache_token_exchange": { + "description": "Cache the token exchange endpoint requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "cache_user_info": { + "description": "Cache the user info requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "search_user_info": { + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "hide_credentials": { + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "http_version": { + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "type": "number", + "default": 1.1, + "required": false + } + }, + { + "http_proxy": { + "description": "The HTTP proxy.", + "type": "string", + "required": false + } + }, + { + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "https_proxy": { + "description": "The HTTPS proxy.", + "type": "string", + "required": false + } + }, + { + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.", + "type": "string", + "required": false, + "referenceable": true + } + }, + { + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string", + "required": false + } + }, + { + "keepalive": { + "description": "Use keepalive with the HTTP client.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "timeout": { + "description": "Network IO timeout in milliseconds.", + "default": 10000, + "type": "number", + "required": false + } + }, + { + "display_errors": { + "description": "Display errors on failure responses.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "by_username_ignore_case": { + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "resolve_distributed_claims": { + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "expose_error_code": { + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "default": true, + "type": "boolean" + } + }, + { + "token_cache_key_include_scope": { + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "default": false, + "type": "boolean" + } + }, + { + "introspection_token_param_name": { + "description": "Designate token's parameter name for introspection.", + "default": "token", + "type": "string", + "required": false + } + }, + { + "revocation_token_param_name": { + "description": "Designate token's parameter name for revocation.", + "default": "token", + "type": "string", + "required": false + } + }, + { + "proof_of_possession_mtls": { + "type": "string", + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "one_of": [ + "off", + "strict", + "optional" + ], + "default": "off", + "required": false + } + }, + { + "proof_of_possession_auth_methods_validation": { + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "tls_client_auth_cert_id": { + "type": "string", + "auto": false, + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "required": false, + "uuid": true + } + }, + { + "tls_client_auth_ssl_verify": { + "description": "Verify identity provider server certificate during mTLS client authentication.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "proof_of_possession_dpop": { + "type": "string", + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "one_of": [ + "off", + "strict", + "optional" + ], + "default": "off", + "required": false + } + }, + { + "dpop_use_nonce": { + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "dpop_proof_lifetime": { + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "default": 300, + "type": "number", + "required": false + } + }, + { + "claims_forbidden": { + "description": "If given, these claims are forbidden in the token payload.", + "type": "array", + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "cluster_cache_strategy": { + "type": "string", + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "one_of": [ + "off", + "redis" + ], + "default": "off", + "required": false + } + }, + { + "cluster_cache_redis": { + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "default": 256, + "type": "integer", + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "default": false, + "type": "boolean", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + } + ], + "required": true + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/openid-connect/3.11.x.json b/schemas/openid-connect/3.11.x.json new file mode 100644 index 00000000..859ee8a3 --- /dev/null +++ b/schemas/openid-connect/3.11.x.json @@ -0,0 +1,3563 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "shorthand_fields": [ + { + "authorization_cookie_lifetime": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.authorization_cookie_lifetime is deprecated, please use config.authorization_rolling_timeout instead" + }, + "type": "number" + } + }, + { + "authorization_cookie_samesite": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.authorization_cookie_samesite is deprecated, please use config.authorization_cookie_same_site instead" + }, + "type": "string" + } + }, + { + "authorization_cookie_httponly": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.authorization_cookie_httponly is deprecated, please use config.authorization_cookie_http_only instead" + }, + "type": "boolean" + } + }, + { + "session_cookie_lifetime": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_lifetime is deprecated, please use config.session_rolling_timeout instead" + }, + "type": "number" + } + }, + { + "session_cookie_idletime": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_idletime is deprecated, please use config.session_idling_timeout instead" + }, + "type": "number" + } + }, + { + "session_cookie_samesite": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_samesite is deprecated, please use config.session_cookie_same_site instead" + }, + "type": "string" + } + }, + { + "session_cookie_httponly": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_httponly is deprecated, please use config.session_cookie_http_only instead" + }, + "type": "boolean" + } + }, + { + "session_memcache_prefix": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_prefix is deprecated, please use config.session_memcached_prefix instead" + }, + "type": "string" + } + }, + { + "session_memcache_socket": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_socket is deprecated, please use config.session_memcached_socket instead" + }, + "type": "string" + } + }, + { + "session_memcache_host": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_host is deprecated, please use config.session_memcached_host instead" + }, + "type": "string" + } + }, + { + "session_memcache_port": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_port is deprecated, please use config.session_memcached_port instead" + }, + "type": "integer" + } + }, + { + "session_cookie_renew": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_renew option does not exist anymore" + }, + "type": "number" + } + }, + { + "session_cookie_maxsize": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_maxsize option does not exist anymore" + }, + "type": "integer" + } + }, + { + "session_strategy": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_strategy option does not exist anymore" + }, + "type": "string" + } + }, + { + "session_compressor": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_compressor option does not exist anymore" + }, + "type": "string" + } + }, + { + "session_redis_prefix": { + "deprecation": { + "message": "openid-connect: config.session_redis_prefix is deprecated, please use config.redis.prefix instead", + "replaced_with": [ + { + "path": [ + "redis", + "prefix" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_redis_socket": { + "deprecation": { + "message": "openid-connect: config.session_redis_socket is deprecated, please use config.redis.socket instead", + "replaced_with": [ + { + "path": [ + "redis", + "socket" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_redis_host": { + "deprecation": { + "message": "openid-connect: config.session_redis_host is deprecated, please use config.redis.host instead", + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_redis_port": { + "deprecation": { + "message": "openid-connect: config.session_redis_port is deprecated, please use config.redis.port instead", + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "session_redis_username": { + "deprecation": { + "message": "openid-connect: config.redis_host is deprecated, please use config.redis.host instead", + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_redis_password": { + "deprecation": { + "message": "openid-connect: config.session_redis_password is deprecated, please use config.redis.password instead", + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_redis_connect_timeout": { + "deprecation": { + "message": "openid-connect: config.session_redis_connect_timeout is deprecated, please use config.redis.connect_timeout instead", + "replaced_with": [ + { + "path": [ + "redis", + "connect_timeout" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "session_redis_read_timeout": { + "deprecation": { + "message": "openid-connect: config.session_redis_read_timeout is deprecated, please use config.redis.read_timeout instead", + "replaced_with": [ + { + "path": [ + "redis", + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "session_redis_send_timeout": { + "deprecation": { + "message": "openid-connect: config.session_redis_send_timeout is deprecated, please use config.redis.send_timeout instead", + "replaced_with": [ + { + "path": [ + "redis", + "send_timeout" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "session_redis_ssl": { + "deprecation": { + "message": "openid-connect: config.session_redis_ssl is deprecated, please use config.redis.ssl instead", + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "boolean" + } + }, + { + "session_redis_ssl_verify": { + "deprecation": { + "message": "openid-connect: config.session_redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead", + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "boolean" + } + }, + { + "session_redis_server_name": { + "deprecation": { + "message": "openid-connect: config.session_redis_server_name is deprecated, please use config.redis.server_name instead", + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_redis_cluster_nodes": { + "deprecation": { + "message": "openid-connect: config.session_redis_cluster_nodes is deprecated, please use config.redis.cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "array", + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "session_redis_cluster_max_redirections": { + "deprecation": { + "message": "openid-connect: config.session_redis_cluster_max_redirections is deprecated, please use config.redis.cluster_max_redirections instead", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_max_redirections" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + } + ], + "required": true, + "fields": [ + { + "issuer": { + "required": true, + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "type": "string" + } + }, + { + "using_pseudo_issuer": { + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "discovery_headers_names": { + "type": "array", + "required": false, + "description": "Extra header names passed to the discovery endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "discovery_headers_values": { + "type": "array", + "required": false, + "description": "Extra header values passed to the discovery endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "extra_jwks_uris": { + "type": "set", + "required": false, + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "rediscovery_lifetime": { + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "required": false, + "default": 30, + "type": "number" + } + }, + { + "auth_methods": { + "required": false, + "description": "Types of credentials/grants to enable.", + "type": "array", + "default": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "type": "string" + } + } + }, + { + "client_id": { + "required": false, + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.", + "encrypted": true, + "type": "array", + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "client_secret": { + "required": false, + "description": "The client secret.", + "encrypted": true, + "type": "array", + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "client_auth": { + "type": "array", + "required": false, + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "elements": { + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "type": "string" + } + } + }, + { + "client_jwk": { + "type": "array", + "required": false, + "description": "The JWK used for the private_key_jwt authentication.", + "elements": { + "required": false, + "fields": [ + { + "issuer": { + "required": false, + "type": "string" + } + }, + { + "kty": { + "required": false, + "type": "string" + } + }, + { + "use": { + "required": false, + "type": "string" + } + }, + { + "key_ops": { + "required": false, + "type": "array", + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "alg": { + "required": false, + "type": "string" + } + }, + { + "kid": { + "required": false, + "type": "string" + } + }, + { + "x5u": { + "required": false, + "type": "string" + } + }, + { + "x5c": { + "required": false, + "type": "array", + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "x5t": { + "required": false, + "type": "string" + } + }, + { + "x5t#S256": { + "required": false, + "type": "string" + } + }, + { + "k": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "x": { + "required": false, + "type": "string" + } + }, + { + "y": { + "required": false, + "type": "string" + } + }, + { + "crv": { + "required": false, + "type": "string" + } + }, + { + "n": { + "required": false, + "type": "string" + } + }, + { + "e": { + "required": false, + "type": "string" + } + }, + { + "d": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "p": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "q": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "dp": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "dq": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "qi": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "oth": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "r": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "t": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + } + ], + "type": "record" + } + } + }, + { + "client_alg": { + "type": "array", + "required": false, + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "elements": { + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ], + "type": "string" + } + } + }, + { + "client_arg": { + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "required": false, + "default": "client_id", + "type": "string" + } + }, + { + "redirect_uri": { + "type": "array", + "required": false, + "description": "The redirect URI passed to the authorization and token endpoints.", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "login_redirect_uri": { + "type": "array", + "required": false, + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "elements": { + "referenceable": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "logout_redirect_uri": { + "type": "array", + "required": false, + "description": "Where to redirect the client after the logout.", + "elements": { + "referenceable": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "forbidden_redirect_uri": { + "type": "array", + "required": false, + "description": "Where to redirect the client on forbidden requests.", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "forbidden_error_message": { + "description": "The error message for the forbidden requests (when not using the redirection).", + "required": false, + "default": "Forbidden", + "type": "string" + } + }, + { + "forbidden_destroy_session": { + "description": "Destroy any active session for the forbidden requests.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "unauthorized_destroy_session": { + "description": "Destroy any active session for the unauthorized requests.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "unauthorized_redirect_uri": { + "type": "array", + "required": false, + "description": "Where to redirect the client on unauthorized requests.", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "unauthorized_error_message": { + "description": "The error message for the unauthorized requests (when not using the redirection).", + "required": false, + "default": "Unauthorized", + "type": "string" + } + }, + { + "unexpected_redirect_uri": { + "type": "array", + "required": false, + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "response_mode": { + "required": false, + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "one_of": [ + "query", + "form_post", + "fragment", + "query.jwt", + "form_post.jwt", + "fragment.jwt", + "jwt" + ], + "default": "query", + "type": "string" + } + }, + { + "response_type": { + "required": false, + "description": "The response type passed to the authorization endpoint.", + "type": "array", + "default": [ + "code" + ], + "elements": { + "type": "string" + } + } + }, + { + "scopes": { + "required": false, + "description": "The scopes passed to the authorization and token endpoints.", + "type": "array", + "default": [ + "openid" + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "audience": { + "type": "array", + "required": false, + "description": "The audience passed to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "issuers_allowed": { + "type": "array", + "required": false, + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "elements": { + "type": "string" + } + } + }, + { + "scopes_required": { + "type": "array", + "required": false, + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "scopes_claim": { + "required": false, + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "default": [ + "scope" + ], + "elements": { + "type": "string" + } + } + }, + { + "audience_required": { + "type": "array", + "required": false, + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "audience_claim": { + "required": false, + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "default": [ + "aud" + ], + "elements": { + "type": "string" + } + } + }, + { + "groups_required": { + "type": "array", + "required": false, + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "groups_claim": { + "required": false, + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "default": [ + "groups" + ], + "elements": { + "type": "string" + } + } + }, + { + "roles_required": { + "type": "array", + "required": false, + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "roles_claim": { + "required": false, + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "default": [ + "roles" + ], + "elements": { + "type": "string" + } + } + }, + { + "domains": { + "type": "array", + "required": false, + "description": "The allowed values for the `hd` claim.", + "elements": { + "type": "string" + } + } + }, + { + "max_age": { + "required": false, + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number" + } + }, + { + "authenticated_groups_claim": { + "type": "array", + "required": false, + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "pushed_authorization_request_endpoint": { + "required": false, + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "pushed_authorization_request_endpoint_auth_method": { + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false, + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string" + } + }, + { + "require_pushed_authorization_requests": { + "required": false, + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean" + } + }, + { + "require_proof_key_for_code_exchange": { + "required": false, + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean" + } + }, + { + "require_signed_request_object": { + "required": false, + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean" + } + }, + { + "authorization_endpoint": { + "required": false, + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "authorization_query_args_names": { + "type": "array", + "required": false, + "description": "Extra query argument names passed to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "authorization_query_args_values": { + "type": "array", + "required": false, + "description": "Extra query argument values passed to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "authorization_query_args_client": { + "type": "array", + "required": false, + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "authorization_rolling_timeout": { + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "required": false, + "default": 600, + "type": "number" + } + }, + { + "authorization_cookie_name": { + "description": "The authorization cookie name.", + "required": false, + "default": "authorization", + "type": "string" + } + }, + { + "authorization_cookie_path": { + "required": false, + "description": "The authorization cookie Path flag.", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "starts_with": "/", + "default": "/", + "type": "string" + } + }, + { + "authorization_cookie_domain": { + "required": false, + "description": "The authorization cookie Domain flag.", + "type": "string" + } + }, + { + "authorization_cookie_same_site": { + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "default": "Default", + "type": "string" + } + }, + { + "authorization_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "authorization_cookie_secure": { + "required": false, + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + } + }, + { + "preserve_query_args": { + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "token_endpoint": { + "required": false, + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "token_endpoint_auth_method": { + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false, + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string" + } + }, + { + "token_headers_names": { + "type": "array", + "required": false, + "description": "Extra header names passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_values": { + "type": "array", + "required": false, + "description": "Extra header values passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_client": { + "type": "array", + "required": false, + "description": "Extra headers passed from the client to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_replay": { + "type": "array", + "required": false, + "description": "The names of token endpoint response headers to forward to the downstream client.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_prefix": { + "required": false, + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string" + } + }, + { + "token_headers_grants": { + "type": "array", + "required": false, + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token" + ], + "type": "string" + } + } + }, + { + "token_post_args_names": { + "type": "array", + "required": false, + "description": "Extra post argument names passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_post_args_values": { + "type": "array", + "required": false, + "description": "Extra post argument values passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_post_args_client": { + "type": "array", + "required": false, + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_endpoint": { + "required": false, + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "introspection_endpoint_auth_method": { + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false, + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string" + } + }, + { + "introspection_hint": { + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "required": false, + "default": "access_token", + "type": "string" + } + }, + { + "introspection_check_active": { + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "introspection_accept": { + "required": false, + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "one_of": [ + "application/json", + "application/token-introspection+jwt", + "application/jwt" + ], + "default": "application/json", + "type": "string" + } + }, + { + "introspection_headers_names": { + "type": "array", + "required": false, + "description": "Extra header names passed to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_headers_values": { + "required": false, + "description": "Extra header values passed to the introspection endpoint.", + "encrypted": true, + "type": "array", + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "introspection_headers_client": { + "type": "array", + "required": false, + "description": "Extra headers passed from the client to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_names": { + "type": "array", + "required": false, + "description": "Extra post argument names passed to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_values": { + "type": "array", + "required": false, + "description": "Extra post argument values passed to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_client": { + "type": "array", + "required": false, + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_client_headers": { + "type": "array", + "required": false, + "description": "Extra post arguments passed from the client headers to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspect_jwt_tokens": { + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "revocation_endpoint": { + "required": false, + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "revocation_endpoint_auth_method": { + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false, + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string" + } + }, + { + "end_session_endpoint": { + "required": false, + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "userinfo_endpoint": { + "required": false, + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "userinfo_accept": { + "required": false, + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "one_of": [ + "application/json", + "application/jwt" + ], + "default": "application/json", + "type": "string" + } + }, + { + "userinfo_headers_names": { + "type": "array", + "required": false, + "description": "Extra header names passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_headers_values": { + "type": "array", + "required": false, + "description": "Extra header values passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_headers_client": { + "type": "array", + "required": false, + "description": "Extra headers passed from the client to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_names": { + "type": "array", + "required": false, + "description": "Extra query argument names passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_values": { + "type": "array", + "required": false, + "description": "Extra query argument values passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_client": { + "type": "array", + "required": false, + "description": "Extra query arguments passed from the client to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_exchange_endpoint": { + "required": false, + "description": "The token exchange endpoint.", + "type": "string" + } + }, + { + "session_secret": { + "required": false, + "description": "The session secret.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "session_audience": { + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "required": false, + "default": "default", + "type": "string" + } + }, + { + "session_cookie_name": { + "description": "The session cookie name.", + "required": false, + "default": "session", + "type": "string" + } + }, + { + "session_remember": { + "description": "Enables or disables persistent sessions.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "session_remember_cookie_name": { + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "required": false, + "default": "remember", + "type": "string" + } + }, + { + "session_remember_rolling_timeout": { + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "required": false, + "default": 604800, + "type": "number" + } + }, + { + "session_remember_absolute_timeout": { + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "required": false, + "default": 2592000, + "type": "number" + } + }, + { + "session_idling_timeout": { + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "required": false, + "default": 900, + "type": "number" + } + }, + { + "session_rolling_timeout": { + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "required": false, + "default": 3600, + "type": "number" + } + }, + { + "session_absolute_timeout": { + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "required": false, + "default": 86400, + "type": "number" + } + }, + { + "session_cookie_path": { + "required": false, + "description": "The session cookie Path flag.", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "starts_with": "/", + "default": "/", + "type": "string" + } + }, + { + "session_cookie_domain": { + "required": false, + "description": "The session cookie Domain flag.", + "type": "string" + } + }, + { + "session_cookie_same_site": { + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "default": "Lax", + "type": "string" + } + }, + { + "session_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "session_cookie_secure": { + "required": false, + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + } + }, + { + "session_request_headers": { + "elements": { + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ], + "type": "string" + }, + "required": false, + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "type": "set" + } + }, + { + "session_response_headers": { + "elements": { + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ], + "type": "string" + }, + "required": false, + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "type": "set" + } + }, + { + "session_storage": { + "required": false, + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "default": "cookie", + "type": "string" + } + }, + { + "session_store_metadata": { + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "session_enforce_same_subject": { + "description": "When set to `true`, audiences are forced to share the same subject.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "session_hash_subject": { + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "session_hash_storage_key": { + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "session_memcached_prefix": { + "required": false, + "description": "The memcached session key prefix.", + "type": "string" + } + }, + { + "session_memcached_socket": { + "required": false, + "description": "The memcached unix socket path.", + "type": "string" + } + }, + { + "session_memcached_host": { + "description": "The memcached host.", + "required": false, + "default": "127.0.0.1", + "type": "string" + } + }, + { + "session_memcached_port": { + "required": false, + "description": "The memcached port.", + "between": [ + 0, + 65535 + ], + "default": 11211, + "type": "integer" + } + }, + { + "redis": { + "required": true, + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer" + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer" + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer" + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer" + } + }, + { + "username": { + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string" + } + }, + { + "sentinel_username": { + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "referenceable": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "default": 256, + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1, + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer" + } + } + ], + "type": "record" + }, + "type": "array" + } + }, + { + "cluster_nodes": { + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1, + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer" + } + } + ], + "type": "record" + }, + "type": "array" + } + }, + { + "ssl": { + "default": false, + "required": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "required": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "required": false, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "required": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + } + }, + { + "prefix": { + "required": false, + "description": "The Redis session key prefix.", + "type": "string" + } + }, + { + "socket": { + "required": false, + "description": "The Redis unix socket path.", + "type": "string" + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "array" + } + }, + { + "cluster_addresses": { + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "array" + } + } + ], + "type": "record" + } + }, + { + "reverify": { + "description": "Specifies whether to always verify tokens stored in the session.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "jwt_session_claim": { + "description": "The claim to match against the JWT session cookie.", + "required": false, + "default": "sid", + "type": "string" + } + }, + { + "jwt_session_cookie": { + "required": false, + "description": "The name of the JWT session cookie.", + "type": "string" + } + }, + { + "bearer_token_param_type": { + "required": false, + "description": "Where to look for the bearer token: - `header`: search the `Authorization`, `access-token`, and `x-access-token` HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "one_of": [ + "header", + "cookie", + "query", + "body" + ], + "type": "string" + } + } + }, + { + "bearer_token_cookie_name": { + "required": false, + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string" + } + }, + { + "client_credentials_param_type": { + "required": false, + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "one_of": [ + "header", + "query", + "body" + ], + "type": "string" + } + } + }, + { + "password_param_type": { + "required": false, + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "one_of": [ + "header", + "query", + "body" + ], + "type": "string" + } + } + }, + { + "id_token_param_type": { + "required": false, + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "one_of": [ + "header", + "query", + "body" + ], + "type": "string" + } + } + }, + { + "id_token_param_name": { + "required": false, + "description": "The name of the parameter used to pass the id token.", + "type": "string" + } + }, + { + "refresh_token_param_type": { + "required": false, + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "one_of": [ + "header", + "query", + "body" + ], + "type": "string" + } + } + }, + { + "refresh_token_param_name": { + "required": false, + "description": "The name of the parameter used to pass the refresh token.", + "type": "string" + } + }, + { + "refresh_tokens": { + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "upstream_headers_claims": { + "type": "array", + "required": false, + "description": "The upstream header claims. Only top level claims are supported.", + "elements": { + "type": "string" + } + } + }, + { + "upstream_headers_names": { + "type": "array", + "required": false, + "description": "The upstream header names for the claim values.", + "elements": { + "type": "string" + } + } + }, + { + "upstream_access_token_header": { + "description": "The upstream access token header.", + "required": false, + "default": "authorization:bearer", + "type": "string" + } + }, + { + "upstream_access_token_jwk_header": { + "required": false, + "description": "The upstream access token JWK header.", + "type": "string" + } + }, + { + "upstream_id_token_header": { + "required": false, + "description": "The upstream id token header.", + "type": "string" + } + }, + { + "upstream_id_token_jwk_header": { + "required": false, + "description": "The upstream id token JWK header.", + "type": "string" + } + }, + { + "upstream_refresh_token_header": { + "required": false, + "description": "The upstream refresh token header.", + "type": "string" + } + }, + { + "upstream_user_info_header": { + "required": false, + "description": "The upstream user info header.", + "type": "string" + } + }, + { + "upstream_user_info_jwt_header": { + "required": false, + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + } + }, + { + "upstream_introspection_header": { + "required": false, + "description": "The upstream introspection header.", + "type": "string" + } + }, + { + "upstream_introspection_jwt_header": { + "required": false, + "description": "The upstream introspection JWT header.", + "type": "string" + } + }, + { + "upstream_session_id_header": { + "required": false, + "description": "The upstream session id header.", + "type": "string" + } + }, + { + "downstream_headers_claims": { + "type": "array", + "required": false, + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "downstream_headers_names": { + "type": "array", + "required": false, + "description": "The downstream header names for the claim values.", + "elements": { + "type": "string" + } + } + }, + { + "downstream_access_token_header": { + "required": false, + "description": "The downstream access token header.", + "type": "string" + } + }, + { + "downstream_access_token_jwk_header": { + "required": false, + "description": "The downstream access token JWK header.", + "type": "string" + } + }, + { + "downstream_id_token_header": { + "required": false, + "description": "The downstream id token header.", + "type": "string" + } + }, + { + "downstream_id_token_jwk_header": { + "required": false, + "description": "The downstream id token JWK header.", + "type": "string" + } + }, + { + "downstream_refresh_token_header": { + "required": false, + "description": "The downstream refresh token header.", + "type": "string" + } + }, + { + "downstream_user_info_header": { + "required": false, + "description": "The downstream user info header.", + "type": "string" + } + }, + { + "downstream_user_info_jwt_header": { + "required": false, + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + } + }, + { + "downstream_introspection_header": { + "required": false, + "description": "The downstream introspection header.", + "type": "string" + } + }, + { + "downstream_introspection_jwt_header": { + "required": false, + "description": "The downstream introspection JWT header.", + "type": "string" + } + }, + { + "downstream_session_id_header": { + "required": false, + "description": "The downstream session id header.", + "type": "string" + } + }, + { + "login_methods": { + "required": false, + "description": "Enable login functionality with specified grants.", + "type": "array", + "default": [ + "authorization_code" + ], + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "type": "string" + } + } + }, + { + "login_action": { + "required": false, + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "one_of": [ + "upstream", + "response", + "redirect" + ], + "default": "upstream", + "type": "string" + } + }, + { + "login_tokens": { + "required": false, + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "type": "array", + "default": [ + "id_token" + ], + "elements": { + "one_of": [ + "id_token", + "access_token", + "refresh_token", + "tokens", + "introspection" + ], + "type": "string" + } + } + }, + { + "login_redirect_mode": { + "required": false, + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "one_of": [ + "query", + "fragment" + ], + "default": "fragment", + "type": "string" + } + }, + { + "logout_query_arg": { + "required": false, + "description": "The request query argument that activates the logout.", + "type": "string" + } + }, + { + "logout_post_arg": { + "required": false, + "description": "The request body argument that activates the logout.", + "type": "string" + } + }, + { + "logout_uri_suffix": { + "required": false, + "description": "The request URI suffix that activates the logout.", + "type": "string" + } + }, + { + "logout_methods": { + "required": false, + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "type": "array", + "default": [ + "POST", + "DELETE" + ], + "elements": { + "one_of": [ + "POST", + "GET", + "DELETE" + ], + "type": "string" + } + } + }, + { + "logout_revoke": { + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "logout_revoke_access_token": { + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "logout_revoke_refresh_token": { + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "consumer_claim": { + "type": "array", + "required": false, + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "consumer_by": { + "required": false, + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "type": "array", + "default": [ + "username", + "custom_id" + ], + "elements": { + "one_of": [ + "id", + "username", + "custom_id" + ], + "type": "string" + } + } + }, + { + "consumer_optional": { + "description": "Do not terminate the request if consumer mapping fails.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "credential_claim": { + "required": false, + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "default": [ + "sub" + ], + "elements": { + "type": "string" + } + } + }, + { + "anonymous": { + "required": false, + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "run_on_preflight": { + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "leeway": { + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "required": false, + "default": 0, + "type": "number" + } + }, + { + "verify_parameters": { + "description": "Verify plugin configuration against discovery.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "verify_nonce": { + "description": "Verify nonce on authorization code flow.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "verify_claims": { + "description": "Verify tokens for standard claims.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "verify_signature": { + "description": "Verify signature of tokens.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "ignore_signature": { + "required": false, + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "type": "array", + "default": [ + + ], + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token", + "session", + "introspection", + "userinfo" + ], + "type": "string" + } + } + }, + { + "enable_hs_signatures": { + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "disable_session": { + "type": "array", + "required": false, + "description": "Disable issuing the session cookie with the specified grants.", + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "type": "string" + } + } + }, + { + "cache_ttl": { + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "required": false, + "default": 3600, + "type": "number" + } + }, + { + "cache_ttl_max": { + "required": false, + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number" + } + }, + { + "cache_ttl_min": { + "required": false, + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number" + } + }, + { + "cache_ttl_neg": { + "required": false, + "description": "The negative cache ttl in seconds.", + "type": "number" + } + }, + { + "cache_ttl_resurrect": { + "required": false, + "description": "The resurrection ttl in seconds.", + "type": "number" + } + }, + { + "cache_tokens": { + "description": "Cache the token endpoint requests.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "cache_tokens_salt": { + "type": "string", + "required": false, + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "auto": true + } + }, + { + "cache_introspection": { + "description": "Cache the introspection endpoint requests.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "cache_token_exchange": { + "description": "Cache the token exchange endpoint requests.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "cache_user_info": { + "description": "Cache the user info requests.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "search_user_info": { + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "hide_credentials": { + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "http_version": { + "default": 1.1, + "required": false, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "type": "number" + } + }, + { + "http_proxy": { + "required": false, + "description": "The HTTP proxy.", + "type": "string" + } + }, + { + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "https_proxy": { + "required": false, + "description": "The HTTPS proxy.", + "type": "string" + } + }, + { + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "no_proxy": { + "required": false, + "description": "Do not use proxy with these hosts.", + "type": "string" + } + }, + { + "keepalive": { + "description": "Use keepalive with the HTTP client.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "timeout": { + "description": "Network IO timeout in milliseconds.", + "required": false, + "default": 10000, + "type": "number" + } + }, + { + "display_errors": { + "description": "Display errors on failure responses.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "by_username_ignore_case": { + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "resolve_distributed_claims": { + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "expose_error_code": { + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "default": true, + "type": "boolean" + } + }, + { + "token_cache_key_include_scope": { + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "default": false, + "type": "boolean" + } + }, + { + "introspection_token_param_name": { + "description": "Designate token's parameter name for introspection.", + "required": false, + "default": "token", + "type": "string" + } + }, + { + "revocation_token_param_name": { + "description": "Designate token's parameter name for revocation.", + "required": false, + "default": "token", + "type": "string" + } + }, + { + "proof_of_possession_mtls": { + "required": false, + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "one_of": [ + "off", + "strict", + "optional" + ], + "default": "off", + "type": "string" + } + }, + { + "proof_of_possession_auth_methods_validation": { + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "tls_client_auth_cert_id": { + "required": false, + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "auto": false, + "uuid": true, + "type": "string" + } + }, + { + "tls_client_auth_ssl_verify": { + "description": "Verify identity provider server certificate during mTLS client authentication.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "mtls_token_endpoint": { + "required": false, + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "mtls_introspection_endpoint": { + "required": false, + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "mtls_revocation_endpoint": { + "required": false, + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string" + } + }, + { + "proof_of_possession_dpop": { + "required": false, + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "one_of": [ + "off", + "strict", + "optional" + ], + "default": "off", + "type": "string" + } + }, + { + "dpop_use_nonce": { + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "dpop_proof_lifetime": { + "default": 300, + "required": false, + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "type": "number" + } + }, + { + "claims_forbidden": { + "type": "array", + "required": false, + "description": "If given, these claims are forbidden in the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "cluster_cache_strategy": { + "required": false, + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "one_of": [ + "off", + "redis" + ], + "default": "off", + "type": "string" + } + }, + { + "cluster_cache_redis": { + "required": true, + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "cluster_nodes": { + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "default": 5, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "default": false, + "type": "boolean" + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + } +} \ No newline at end of file diff --git a/schemas/openid-connect/3.12.x.json b/schemas/openid-connect/3.12.x.json new file mode 100644 index 00000000..f011dd66 --- /dev/null +++ b/schemas/openid-connect/3.12.x.json @@ -0,0 +1,3561 @@ +{ + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + }, + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "type": "string", + "required": true + } + }, + { + "using_pseudo_issuer": { + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "set", + "required": false + } + }, + { + "rediscovery_lifetime": { + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "default": 30, + "type": "number", + "required": false + } + }, + { + "auth_methods": { + "type": "array", + "required": false, + "description": "Types of credentials/grants to enable.", + "default": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + } + } + }, + { + "client_id": { + "type": "array", + "required": false, + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.", + "encrypted": true, + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "client_secret": { + "type": "array", + "required": false, + "description": "The client secret.", + "encrypted": true, + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "client_auth": { + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "elements": { + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + }, + "type": "array", + "required": false + } + }, + { + "client_jwk": { + "description": "The JWK used for the private_key_jwt authentication.", + "elements": { + "type": "record", + "fields": [ + { + "issuer": { + "type": "string", + "required": false + } + }, + { + "kty": { + "type": "string", + "required": false + } + }, + { + "use": { + "type": "string", + "required": false + } + }, + { + "key_ops": { + "type": "array", + "elements": { + "type": "string", + "required": false + }, + "required": false + } + }, + { + "alg": { + "type": "string", + "required": false + } + }, + { + "kid": { + "type": "string", + "required": false + } + }, + { + "x5u": { + "type": "string", + "required": false + } + }, + { + "x5c": { + "type": "array", + "elements": { + "type": "string", + "required": false + }, + "required": false + } + }, + { + "x5t": { + "type": "string", + "required": false + } + }, + { + "x5t#S256": { + "type": "string", + "required": false + } + }, + { + "k": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "x": { + "type": "string", + "required": false + } + }, + { + "y": { + "type": "string", + "required": false + } + }, + { + "crv": { + "type": "string", + "required": false + } + }, + { + "n": { + "type": "string", + "required": false + } + }, + { + "e": { + "type": "string", + "required": false + } + }, + { + "d": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "p": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "q": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "dp": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "dq": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "qi": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "oth": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "r": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "t": { + "encrypted": true, + "type": "string", + "referenceable": true, + "required": false + } + } + ], + "required": false + }, + "type": "array", + "required": false + } + }, + { + "client_alg": { + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "elements": { + "type": "string", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ] + }, + "type": "array", + "required": false + } + }, + { + "client_arg": { + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "default": "client_id", + "type": "string", + "required": false + } + }, + { + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "array", + "required": false + } + }, + { + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "elements": { + "type": "string", + "referenceable": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "array", + "required": false + } + }, + { + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "elements": { + "type": "string", + "referenceable": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "array", + "required": false + } + }, + { + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "array", + "required": false + } + }, + { + "forbidden_error_message": { + "description": "The error message for the forbidden requests (when not using the redirection).", + "default": "Forbidden", + "type": "string", + "required": false + } + }, + { + "forbidden_destroy_session": { + "description": "Destroy any active session for the forbidden requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "unauthorized_destroy_session": { + "description": "Destroy any active session for the unauthorized requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "array", + "required": false + } + }, + { + "unauthorized_error_message": { + "description": "The error message for the unauthorized requests (when not using the redirection).", + "default": "Unauthorized", + "type": "string", + "required": false + } + }, + { + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "type": "array", + "required": false + } + }, + { + "response_mode": { + "type": "string", + "required": false, + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "default": "query", + "one_of": [ + "query", + "form_post", + "fragment", + "query.jwt", + "form_post.jwt", + "fragment.jwt", + "jwt" + ] + } + }, + { + "response_type": { + "type": "array", + "required": false, + "description": "The response type passed to the authorization endpoint.", + "default": [ + "code" + ], + "elements": { + "type": "string" + } + } + }, + { + "scopes": { + "type": "array", + "required": false, + "description": "The scopes passed to the authorization and token endpoints.", + "default": [ + "openid" + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "audience": { + "description": "The audience passed to the authorization endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "scopes_claim": { + "type": "array", + "required": false, + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "scope" + ], + "elements": { + "type": "string" + } + } + }, + { + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "audience_claim": { + "type": "array", + "required": false, + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "aud" + ], + "elements": { + "type": "string" + } + } + }, + { + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "groups_claim": { + "type": "array", + "required": false, + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "groups" + ], + "elements": { + "type": "string" + } + } + }, + { + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "roles_claim": { + "type": "array", + "required": false, + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "roles" + ], + "elements": { + "type": "string" + } + } + }, + { + "domains": { + "description": "The allowed values for the `hd` claim.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number", + "required": false + } + }, + { + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "pushed_authorization_request_endpoint_auth_method": { + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false + } + }, + { + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean", + "required": false + } + }, + { + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean", + "required": false + } + }, + { + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean", + "required": false + } + }, + { + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "authorization_rolling_timeout": { + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "default": 600, + "type": "number", + "required": false + } + }, + { + "authorization_cookie_name": { + "description": "The authorization cookie name.", + "default": "authorization", + "type": "string", + "required": false + } + }, + { + "authorization_cookie_path": { + "type": "string", + "starts_with": "/", + "required": false, + "description": "The authorization cookie Path flag.", + "default": "/", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + }, + { + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string", + "required": false + } + }, + { + "authorization_cookie_same_site": { + "type": "string", + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "default": "Default", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "authorization_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean", + "required": false + } + }, + { + "preserve_query_args": { + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false + } + }, + { + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string", + "required": false + } + }, + { + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token" + ] + }, + "type": "array", + "required": false + } + }, + { + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false + } + }, + { + "introspection_hint": { + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "default": "access_token", + "type": "string", + "required": false + } + }, + { + "introspection_check_active": { + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "introspection_accept": { + "type": "string", + "required": false, + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "default": "application/json", + "one_of": [ + "application/json", + "application/token-introspection+jwt", + "application/jwt" + ] + } + }, + { + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "introspection_headers_values": { + "type": "array", + "required": false, + "encrypted": true, + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "Extra header values passed to the introspection endpoint." + } + }, + { + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "introspection_post_args_client_headers": { + "description": "Extra post arguments passed from the client headers to the introspection endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "introspect_jwt_tokens": { + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "required": false + } + }, + { + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "userinfo_accept": { + "type": "string", + "required": false, + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "default": "application/json", + "one_of": [ + "application/json", + "application/jwt" + ] + } + }, + { + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "type": "string", + "required": false + } + }, + { + "session_secret": { + "type": "string", + "required": false, + "description": "The session secret.", + "referenceable": true, + "encrypted": true + } + }, + { + "session_audience": { + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "default": "default", + "type": "string", + "required": false + } + }, + { + "session_cookie_name": { + "description": "The session cookie name.", + "default": "session", + "type": "string", + "required": false + } + }, + { + "session_remember": { + "description": "Enables or disables persistent sessions.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_remember_cookie_name": { + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "default": "remember", + "type": "string", + "required": false + } + }, + { + "session_remember_rolling_timeout": { + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "default": 604800, + "type": "number", + "required": false + } + }, + { + "session_remember_absolute_timeout": { + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "default": 2592000, + "type": "number", + "required": false + } + }, + { + "session_idling_timeout": { + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "default": 900, + "type": "number", + "required": false + } + }, + { + "session_rolling_timeout": { + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "default": 3600, + "type": "number", + "required": false + } + }, + { + "session_absolute_timeout": { + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "default": 86400, + "type": "number", + "required": false + } + }, + { + "session_cookie_path": { + "type": "string", + "starts_with": "/", + "required": false, + "description": "The session cookie Path flag.", + "default": "/", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + }, + { + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string", + "required": false + } + }, + { + "session_cookie_same_site": { + "type": "string", + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "default": "Lax", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "session_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean", + "required": false + } + }, + { + "session_request_headers": { + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "type": "set", + "required": false + } + }, + { + "session_response_headers": { + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "type": "set", + "required": false + } + }, + { + "session_storage": { + "type": "string", + "required": false, + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "default": "cookie", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ] + } + }, + { + "session_store_metadata": { + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_enforce_same_subject": { + "description": "When set to `true`, audiences are forced to share the same subject.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_hash_subject": { + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_hash_storage_key": { + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string", + "required": false + } + }, + { + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string", + "required": false + } + }, + { + "session_memcached_host": { + "description": "The memcached host.", + "default": "127.0.0.1", + "type": "string", + "required": false + } + }, + { + "session_memcached_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "required": false, + "description": "The memcached port.", + "default": 11211 + } + }, + { + "redis": { + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "database", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + } + ], + "required": true, + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis." + } + }, + { + "sentinel_username": { + "type": "string", + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels." + } + }, + { + "database": { + "type": "integer", + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy" + } + }, + { + "keepalive_pool_size": { + "type": "integer", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low." + } + }, + { + "keepalive_backlog": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "type": "boolean", + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false + } + }, + { + "prefix": { + "description": "The Redis session key prefix.", + "type": "string", + "required": false + } + }, + { + "socket": { + "description": "The Redis unix socket path.", + "type": "string", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + } + } + }, + { + "cluster_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + } + } + } + ] + } + }, + { + "reverify": { + "description": "Specifies whether to always verify tokens stored in the session.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "jwt_session_claim": { + "description": "The claim to match against the JWT session cookie.", + "default": "sid", + "type": "string", + "required": false + } + }, + { + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string", + "required": false + } + }, + { + "bearer_token_param_type": { + "type": "array", + "required": false, + "description": "Where to look for the bearer token: - `header`: search the `Authorization`, `access-token`, and `x-access-token` HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "cookie", + "query", + "body" + ] + } + } + }, + { + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string", + "required": false + } + }, + { + "client_credentials_param_type": { + "type": "array", + "required": false, + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + } + } + }, + { + "password_param_type": { + "type": "array", + "required": false, + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + } + } + }, + { + "id_token_param_type": { + "type": "array", + "required": false, + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + } + } + }, + { + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string", + "required": false + } + }, + { + "refresh_token_param_type": { + "type": "array", + "required": false, + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + } + } + }, + { + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string", + "required": false + } + }, + { + "refresh_tokens": { + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "upstream_headers_claims": { + "description": "The upstream header claims. Only top level claims are supported.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "upstream_access_token_header": { + "description": "The upstream access token header.", + "default": "authorization:bearer", + "type": "string", + "required": false + } + }, + { + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string", + "required": false + } + }, + { + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string", + "required": false + } + }, + { + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string", + "required": false + } + }, + { + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string", + "required": false + } + }, + { + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string", + "required": false + } + }, + { + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string", + "required": false + } + }, + { + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string", + "required": false + } + }, + { + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "type": "string", + "required": false + } + }, + { + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string", + "required": false + } + }, + { + "downstream_headers_claims": { + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string", + "required": false + } + }, + { + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string", + "required": false + } + }, + { + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string", + "required": false + } + }, + { + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string", + "required": false + } + }, + { + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string", + "required": false + } + }, + { + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string", + "required": false + } + }, + { + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string", + "required": false + } + }, + { + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string", + "required": false + } + }, + { + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "type": "string", + "required": false + } + }, + { + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string", + "required": false + } + }, + { + "login_methods": { + "type": "array", + "required": false, + "description": "Enable login functionality with specified grants.", + "default": [ + "authorization_code" + ], + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + } + } + }, + { + "login_action": { + "type": "string", + "required": false, + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "default": "upstream", + "one_of": [ + "upstream", + "response", + "redirect" + ] + } + }, + { + "login_tokens": { + "type": "array", + "required": false, + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "default": [ + "id_token" + ], + "elements": { + "type": "string", + "one_of": [ + "id_token", + "access_token", + "refresh_token", + "tokens", + "introspection" + ] + } + } + }, + { + "login_redirect_mode": { + "type": "string", + "required": false, + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "default": "fragment", + "one_of": [ + "query", + "fragment" + ] + } + }, + { + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string", + "required": false + } + }, + { + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string", + "required": false + } + }, + { + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string", + "required": false + } + }, + { + "logout_methods": { + "type": "array", + "required": false, + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "default": [ + "POST", + "DELETE" + ], + "elements": { + "type": "string", + "one_of": [ + "POST", + "GET", + "DELETE" + ] + } + } + }, + { + "logout_revoke": { + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "logout_revoke_access_token": { + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "logout_revoke_refresh_token": { + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "consumer_claim": { + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "consumer_by": { + "type": "array", + "required": false, + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + } + } + }, + { + "consumer_optional": { + "description": "Do not terminate the request if consumer mapping fails.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "credential_claim": { + "type": "array", + "required": false, + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "sub" + ], + "elements": { + "type": "string" + } + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string", + "required": false + } + }, + { + "run_on_preflight": { + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "leeway": { + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "default": 0, + "type": "number", + "required": false + } + }, + { + "verify_parameters": { + "description": "Verify plugin configuration against discovery.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "verify_nonce": { + "description": "Verify nonce on authorization code flow.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "verify_claims": { + "description": "Verify tokens for standard claims.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "verify_signature": { + "description": "Verify signature of tokens.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "ignore_signature": { + "type": "array", + "required": false, + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "default": [], + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token", + "session", + "introspection", + "userinfo" + ] + } + } + }, + { + "enable_hs_signatures": { + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants.", + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "type": "array", + "required": false + } + }, + { + "cache_ttl": { + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "default": 3600, + "type": "number", + "required": false + } + }, + { + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number", + "required": false + } + }, + { + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number", + "required": false + } + }, + { + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number", + "required": false + } + }, + { + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number", + "required": false + } + }, + { + "cache_tokens": { + "description": "Cache the token endpoint requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "type": "string", + "auto": true, + "required": false + } + }, + { + "cache_introspection": { + "description": "Cache the introspection endpoint requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "cache_token_exchange": { + "description": "Cache the token exchange endpoint requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "cache_user_info": { + "description": "Cache the user info requests.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "search_user_info": { + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "hide_credentials": { + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "http_version": { + "type": "number", + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "required": false + } + }, + { + "http_proxy": { + "description": "The HTTP proxy.", + "type": "string", + "required": false + } + }, + { + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "https_proxy": { + "description": "The HTTPS proxy.", + "type": "string", + "required": false + } + }, + { + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string", + "required": false + } + }, + { + "keepalive": { + "description": "Use keepalive with the HTTP client.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "timeout": { + "description": "Network IO timeout in milliseconds.", + "default": 10000, + "type": "number", + "required": false + } + }, + { + "display_errors": { + "description": "Display errors on failure responses.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "by_username_ignore_case": { + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "resolve_distributed_claims": { + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "expose_error_code": { + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "default": true, + "type": "boolean" + } + }, + { + "token_cache_key_include_scope": { + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "default": false, + "type": "boolean" + } + }, + { + "introspection_token_param_name": { + "description": "Designate token's parameter name for introspection.", + "default": "token", + "type": "string", + "required": false + } + }, + { + "revocation_token_param_name": { + "description": "Designate token's parameter name for revocation.", + "default": "token", + "type": "string", + "required": false + } + }, + { + "proof_of_possession_mtls": { + "type": "string", + "required": false, + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "default": "off", + "one_of": [ + "off", + "strict", + "optional" + ] + } + }, + { + "proof_of_possession_auth_methods_validation": { + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "tls_client_auth_cert_id": { + "type": "string", + "required": false, + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "auto": false, + "uuid": true + } + }, + { + "tls_client_auth_ssl_verify": { + "description": "Verify identity provider server certificate during mTLS client authentication.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "type": "string", + "required": false + } + }, + { + "proof_of_possession_dpop": { + "type": "string", + "required": false, + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "default": "off", + "one_of": [ + "off", + "strict", + "optional" + ] + } + }, + { + "dpop_use_nonce": { + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "dpop_proof_lifetime": { + "type": "number", + "default": 300, + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "required": false + } + }, + { + "claims_forbidden": { + "description": "If given, these claims are forbidden in the token payload.", + "elements": { + "type": "string" + }, + "type": "array", + "required": false + } + }, + { + "cluster_cache_strategy": { + "type": "string", + "required": false, + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "default": "off", + "one_of": [ + "off", + "redis" + ] + } + }, + { + "cluster_cache_redis": { + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "database", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + } + ], + "required": true, + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "type": "string", + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "type": "integer", + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy" + } + }, + { + "keepalive_pool_size": { + "type": "integer", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low." + } + }, + { + "keepalive_backlog": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "type": "boolean", + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "cluster_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + } + ] + } + } + ], + "shorthand_fields": [ + { + "authorization_cookie_lifetime": { + "type": "number", + "deprecation": { + "message": "openid-connect: config.authorization_cookie_lifetime is deprecated, please use config.authorization_rolling_timeout instead", + "removal_in_version": "4.0" + } + } + }, + { + "authorization_cookie_samesite": { + "type": "string", + "deprecation": { + "message": "openid-connect: config.authorization_cookie_samesite is deprecated, please use config.authorization_cookie_same_site instead", + "removal_in_version": "4.0" + } + } + }, + { + "authorization_cookie_httponly": { + "type": "boolean", + "deprecation": { + "message": "openid-connect: config.authorization_cookie_httponly is deprecated, please use config.authorization_cookie_http_only instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_cookie_lifetime": { + "type": "number", + "deprecation": { + "message": "openid-connect: config.session_cookie_lifetime is deprecated, please use config.session_rolling_timeout instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_cookie_idletime": { + "type": "number", + "deprecation": { + "message": "openid-connect: config.session_cookie_idletime is deprecated, please use config.session_idling_timeout instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_cookie_samesite": { + "type": "string", + "deprecation": { + "message": "openid-connect: config.session_cookie_samesite is deprecated, please use config.session_cookie_same_site instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_cookie_httponly": { + "type": "boolean", + "deprecation": { + "message": "openid-connect: config.session_cookie_httponly is deprecated, please use config.session_cookie_http_only instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_memcache_prefix": { + "type": "string", + "deprecation": { + "message": "openid-connect: config.session_memcache_prefix is deprecated, please use config.session_memcached_prefix instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_memcache_socket": { + "type": "string", + "deprecation": { + "message": "openid-connect: config.session_memcache_socket is deprecated, please use config.session_memcached_socket instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_memcache_host": { + "type": "string", + "deprecation": { + "message": "openid-connect: config.session_memcache_host is deprecated, please use config.session_memcached_host instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_memcache_port": { + "type": "integer", + "deprecation": { + "message": "openid-connect: config.session_memcache_port is deprecated, please use config.session_memcached_port instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_cookie_renew": { + "type": "number", + "deprecation": { + "message": "openid-connect: config.session_cookie_renew option does not exist anymore", + "removal_in_version": "4.0" + } + } + }, + { + "session_cookie_maxsize": { + "type": "integer", + "deprecation": { + "message": "openid-connect: config.session_cookie_maxsize option does not exist anymore", + "removal_in_version": "4.0" + } + } + }, + { + "session_strategy": { + "type": "string", + "deprecation": { + "message": "openid-connect: config.session_strategy option does not exist anymore", + "removal_in_version": "4.0" + } + } + }, + { + "session_compressor": { + "type": "string", + "deprecation": { + "message": "openid-connect: config.session_compressor option does not exist anymore", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_prefix": { + "type": "string", + "deprecation": { + "message": "openid-connect: config.session_redis_prefix is deprecated, please use config.redis.prefix instead", + "replaced_with": [ + { + "path": [ + "redis", + "prefix" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_socket": { + "type": "string", + "deprecation": { + "message": "openid-connect: config.session_redis_socket is deprecated, please use config.redis.socket instead", + "replaced_with": [ + { + "path": [ + "redis", + "socket" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_host": { + "type": "string", + "deprecation": { + "message": "openid-connect: config.session_redis_host is deprecated, please use config.redis.host instead", + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_port": { + "type": "integer", + "deprecation": { + "message": "openid-connect: config.session_redis_port is deprecated, please use config.redis.port instead", + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_username": { + "type": "string", + "deprecation": { + "message": "openid-connect: config.redis_host is deprecated, please use config.redis.host instead", + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_password": { + "type": "string", + "deprecation": { + "message": "openid-connect: config.session_redis_password is deprecated, please use config.redis.password instead", + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_connect_timeout": { + "type": "integer", + "deprecation": { + "message": "openid-connect: config.session_redis_connect_timeout is deprecated, please use config.redis.connect_timeout instead", + "replaced_with": [ + { + "path": [ + "redis", + "connect_timeout" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_read_timeout": { + "type": "integer", + "deprecation": { + "message": "openid-connect: config.session_redis_read_timeout is deprecated, please use config.redis.read_timeout instead", + "replaced_with": [ + { + "path": [ + "redis", + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_send_timeout": { + "type": "integer", + "deprecation": { + "message": "openid-connect: config.session_redis_send_timeout is deprecated, please use config.redis.send_timeout instead", + "replaced_with": [ + { + "path": [ + "redis", + "send_timeout" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_ssl": { + "type": "boolean", + "deprecation": { + "message": "openid-connect: config.session_redis_ssl is deprecated, please use config.redis.ssl instead", + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_ssl_verify": { + "type": "boolean", + "deprecation": { + "message": "openid-connect: config.session_redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead", + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_server_name": { + "type": "string", + "deprecation": { + "message": "openid-connect: config.session_redis_server_name is deprecated, please use config.redis.server_name instead", + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_cluster_nodes": { + "type": "array", + "deprecation": { + "message": "openid-connect: config.session_redis_cluster_nodes is deprecated, please use config.redis.cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + }, + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "session_redis_cluster_max_redirections": { + "type": "integer", + "deprecation": { + "message": "openid-connect: config.session_redis_cluster_max_redirections is deprecated, please use config.redis.cluster_max_redirections instead", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_max_redirections" + ] + } + ], + "removal_in_version": "4.0" + } + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/openid-connect/3.4.x.json b/schemas/openid-connect/3.4.x.json index 5d6749fb..298280d2 100644 --- a/schemas/openid-connect/3.4.x.json +++ b/schemas/openid-connect/3.4.x.json @@ -2,6 +2,7 @@ "fields": [ { "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, "reference": "consumers", "type": "foreign" @@ -9,25 +10,34 @@ }, { "protocols": { - "default": [ - "grpc", - "grpcs", - "http", - "https" - ], + "description": "A set of strings representing HTTP protocols.", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" + ] }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], "required": true, "type": "set" } }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, { "config": { "shorthand_fields": [ @@ -112,18 +122,19 @@ } } ], - "type": "record", "fields": [ { "issuer": { - "type": "string", - "required": true + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": true, + "type": "string" } }, { "discovery_headers_names": { - "type": "array", + "description": "Extra header names passed to the discovery endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -131,8 +142,9 @@ }, { "discovery_headers_values": { - "type": "array", + "description": "Extra header values passed to the discovery endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -140,15 +152,18 @@ }, { "extra_jwks_uris": { - "type": "set", + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", "required": false, + "type": "set", "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", "type": "string" } } }, { "rediscovery_lifetime": { + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", "required": false, "type": "number", "default": 30 @@ -156,18 +171,9 @@ }, { "auth_methods": { - "default": [ - "password", - "client_credentials", - "authorization_code", - "bearer", - "introspection", - "userinfo", - "kong_oauth2", - "refresh_token", - "session" - ], + "description": "Types of credentials/grants to enable.", "elements": { + "type": "string", "one_of": [ "password", "client_credentials", @@ -178,57 +184,71 @@ "kong_oauth2", "refresh_token", "session" - ], - "type": "string" + ] }, + "default": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], "required": false, "type": "array" } }, { "client_id": { - "encrypted": true, + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.", "elements": { "type": "string", "referenceable": true }, + "required": false, "type": "array", - "required": false + "encrypted": true } }, { "client_secret": { - "encrypted": true, + "description": "The client secret.", "elements": { "type": "string", "referenceable": true }, + "required": false, "type": "array", - "required": false + "encrypted": true } }, { "client_auth": { - "type": "array", + "description": "The authentication method used by the client (plugin) when calling the endpoint.", "required": false, + "type": "array", "elements": { + "type": "string", "one_of": [ "client_secret_basic", "client_secret_post", "client_secret_jwt", "private_key_jwt", "none" - ], - "type": "string" + ] } } }, { "client_jwk": { - "type": "array", "required": false, + "type": "array", "elements": { "required": false, + "type": "record", "fields": [ { "issuer": { @@ -300,10 +320,10 @@ }, { "k": { - "required": false, - "type": "string", + "referenceable": true, "encrypted": true, - "referenceable": true + "type": "string", + "required": false } }, { @@ -338,86 +358,86 @@ }, { "d": { - "required": false, - "type": "string", + "referenceable": true, "encrypted": true, - "referenceable": true + "type": "string", + "required": false } }, { "p": { - "required": false, - "type": "string", + "referenceable": true, "encrypted": true, - "referenceable": true + "type": "string", + "required": false } }, { "q": { - "required": false, - "type": "string", + "referenceable": true, "encrypted": true, - "referenceable": true + "type": "string", + "required": false } }, { "dp": { - "required": false, - "type": "string", + "referenceable": true, "encrypted": true, - "referenceable": true + "type": "string", + "required": false } }, { "dq": { - "required": false, - "type": "string", + "referenceable": true, "encrypted": true, - "referenceable": true + "type": "string", + "required": false } }, { "qi": { - "required": false, - "type": "string", + "referenceable": true, "encrypted": true, - "referenceable": true + "type": "string", + "required": false } }, { "oth": { - "required": false, - "type": "string", + "referenceable": true, "encrypted": true, - "referenceable": true + "type": "string", + "required": false } }, { "r": { - "required": false, - "type": "string", + "referenceable": true, "encrypted": true, - "referenceable": true + "type": "string", + "required": false } }, { "t": { - "required": false, - "type": "string", + "referenceable": true, "encrypted": true, - "referenceable": true + "type": "string", + "required": false } } - ], - "type": "record" + ] } } }, { "client_alg": { - "type": "array", "required": false, + "type": "array", "elements": { + "type": "string", "one_of": [ "HS256", "HS384", @@ -432,13 +452,13 @@ "PS384", "PS512", "EdDSA" - ], - "type": "string" + ] } } }, { "client_arg": { + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", "required": false, "type": "string", "default": "client_id" @@ -446,42 +466,53 @@ }, { "redirect_uri": { - "type": "array", + "description": "The redirect URI passed to the authorization and token endpoints.", "required": false, + "type": "array", "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", "type": "string" } } }, { "login_redirect_uri": { - "type": "array", + "description": "Where to redirect the client when `login_action` is set to `redirect`.", "required": false, + "type": "array", "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "referenceable": true, "type": "string" } } }, { "logout_redirect_uri": { - "type": "array", + "description": "Where to redirect the client after the logout.", "required": false, + "type": "array", "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "referenceable": true, "type": "string" } } }, { "forbidden_redirect_uri": { - "type": "array", + "description": "Where to redirect the client on forbidden requests.", "required": false, + "type": "array", "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", "type": "string" } } }, { "forbidden_error_message": { + "description": "The error message for the forbidden requests (when not using the redirection).", "required": false, "type": "string", "default": "Forbidden" @@ -489,6 +520,15 @@ }, { "forbidden_destroy_session": { + "description": "Destroy any active session for the forbidden requests.", + "required": false, + "type": "boolean", + "default": true + } + }, + { + "unauthorized_destroy_session": { + "description": "Destroy any active session for the unauthorized requests.", "required": false, "type": "boolean", "default": true @@ -496,15 +536,18 @@ }, { "unauthorized_redirect_uri": { - "type": "array", + "description": "Where to redirect the client on unauthorized requests.", "required": false, + "type": "array", "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", "type": "string" } } }, { "unauthorized_error_message": { + "description": "The error message for the unauthorized requests (when not using the redirection).", "required": false, "type": "string", "default": "Unauthorized" @@ -512,53 +555,60 @@ }, { "unexpected_redirect_uri": { - "type": "array", + "description": "Where to redirect the client when unexpected errors happen with the requests.", "required": false, + "type": "array", "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", "type": "string" } } }, { "response_mode": { - "default": "query", + "description": "The response mode passed to the authorization endpoint: - `query`: Instructs the identity provider to pass parameters in query string - `form_post`: Instructs the identity provider to pass parameters in request body - `fragment`: Instructs the identity provider to pass parameters in uri fragment (rarely useful as the plugin itself cannot read it)", "one_of": [ "query", "form_post", "fragment" ], - "type": "string", - "required": false + "default": "query", + "required": false, + "type": "string" } }, { "response_type": { - "default": [ - "code" - ], + "description": "The response type passed to the authorization endpoint.", "elements": { "type": "string" }, + "default": [ + "code" + ], "required": false, "type": "array" } }, { "scopes": { + "description": "The scopes passed to the authorization and token endpoints.", + "elements": { + "type": "string", + "referenceable": true + }, "default": [ "openid" ], - "elements": { - "type": "string" - }, "required": false, "type": "array" } }, { "audience": { - "type": "array", + "description": "The audience passed to the authorization endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -566,8 +616,9 @@ }, { "issuers_allowed": { - "type": "array", + "description": "The issuers allowed to be present in the tokens (`iss` claim).", "required": false, + "type": "array", "elements": { "type": "string" } @@ -575,8 +626,9 @@ }, { "scopes_required": { - "type": "array", + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -584,20 +636,22 @@ }, { "scopes_claim": { - "default": [ - "scope" - ], + "description": "The claim that contains the scopes.", "elements": { "type": "string" }, + "default": [ + "scope" + ], "required": false, "type": "array" } }, { "audience_required": { - "type": "array", + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -605,20 +659,22 @@ }, { "audience_claim": { - "default": [ - "aud" - ], + "description": "The claim that contains the audience.", "elements": { "type": "string" }, + "default": [ + "aud" + ], "required": false, "type": "array" } }, { "groups_required": { - "type": "array", + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -626,20 +682,22 @@ }, { "groups_claim": { - "default": [ - "groups" - ], + "description": "The claim that contains the groups.", "elements": { "type": "string" }, + "default": [ + "groups" + ], "required": false, "type": "array" } }, { "roles_required": { - "type": "array", + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -647,20 +705,22 @@ }, { "roles_claim": { - "default": [ - "roles" - ], + "description": "The claim that contains the roles.", "elements": { "type": "string" }, + "default": [ + "roles" + ], "required": false, "type": "array" } }, { "domains": { - "type": "array", + "description": "The allowed values for the `hd` claim.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -668,14 +728,16 @@ }, { "max_age": { - "type": "number", - "required": false + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "required": false, + "type": "number" } }, { "authenticated_groups_claim": { - "type": "array", + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -683,14 +745,16 @@ }, { "authorization_endpoint": { - "type": "string", - "required": false + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": false, + "type": "string" } }, { "authorization_query_args_names": { - "type": "array", + "description": "Extra query argument names passed to the authorization endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -698,8 +762,9 @@ }, { "authorization_query_args_values": { - "type": "array", + "description": "Extra query argument values passed to the authorization endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -707,8 +772,9 @@ }, { "authorization_query_args_client": { - "type": "array", + "description": "Extra query arguments passed from the client to the authorization endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -716,6 +782,7 @@ }, { "authorization_rolling_timeout": { + "description": "Network IO timeout in milliseconds.", "required": false, "type": "number", "default": 600 @@ -723,6 +790,7 @@ }, { "authorization_cookie_name": { + "description": "The authorization cookie name.", "required": false, "type": "string", "default": "authorization" @@ -730,39 +798,43 @@ }, { "authorization_cookie_path": { + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "default": "/", + "required": false, "match_none": [ { "err": "must not have empty segments", "pattern": "//" } ], - "starts_with": "/", - "default": "/", - "required": false, "type": "string" } }, { "authorization_cookie_domain": { - "type": "string", - "required": false + "description": "The authorization cookie Domain flag.", + "required": false, + "type": "string" } }, { "authorization_cookie_same_site": { - "default": "Default", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", "one_of": [ "Strict", "Lax", "None", "Default" ], - "type": "string", - "required": false + "default": "Default", + "required": false, + "type": "string" } }, { "authorization_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", "required": false, "type": "boolean", "default": true @@ -770,12 +842,14 @@ }, { "authorization_cookie_secure": { - "type": "boolean", - "required": false + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "required": false, + "type": "boolean" } }, { "preserve_query_args": { + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", "required": false, "type": "boolean", "default": false @@ -783,14 +857,16 @@ }, { "token_endpoint": { - "type": "string", - "required": false + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": false, + "type": "string" } }, { "token_endpoint_auth_method": { - "type": "string", + "description": "The token endpoint authentication method: - `client_secret_basic`: send `client_id` and `client_secret` in `Authorization: Basic` header - `client_secret_post`: send `client_id` and `client_secret` as part of the body - `client_secret_jwt`: send client assertion signed with the `client_secret` as part of the body - `private_key_jwt`: send client assertion signed with the `private key` as part of the body - `none`: do not authenticate", "required": false, + "type": "string", "one_of": [ "client_secret_basic", "client_secret_post", @@ -802,8 +878,9 @@ }, { "token_headers_names": { - "type": "array", + "description": "Extra header names passed to the token endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -811,8 +888,9 @@ }, { "token_headers_values": { - "type": "array", + "description": "Extra header values passed to the token endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -820,8 +898,9 @@ }, { "token_headers_client": { - "type": "array", + "description": "Extra headers passed from the client to the token endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -829,8 +908,9 @@ }, { "token_headers_replay": { - "type": "array", + "description": "The names of token endpoint response headers to forward to the downstream client.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -838,29 +918,32 @@ }, { "token_headers_prefix": { - "type": "string", - "required": false + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "required": false, + "type": "string" } }, { "token_headers_grants": { - "type": "array", + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant", "required": false, + "type": "array", "elements": { + "type": "string", "one_of": [ "password", "client_credentials", "authorization_code", "refresh_token" - ], - "type": "string" + ] } } }, { "token_post_args_names": { - "type": "array", + "description": "Extra post argument names passed to the token endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -868,8 +951,9 @@ }, { "token_post_args_values": { - "type": "array", + "description": "Extra post argument values passed to the token endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -877,8 +961,9 @@ }, { "token_post_args_client": { - "type": "array", + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -886,14 +971,16 @@ }, { "introspection_endpoint": { - "type": "string", - "required": false + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": false, + "type": "string" } }, { "introspection_endpoint_auth_method": { - "type": "string", + "description": "The introspection endpoint authentication method: - `client_secret_basic`: send `client_id` and `client_secret` in `Authorization: Basic` header - `client_secret_post`: send `client_id` and `client_secret` as part of the body - `client_secret_jwt`: send client assertion signed with the `client_secret` as part of the body - `private_key_jwt`: send client assertion signed with the `private key` as part of the body - `none`: do not authenticate", "required": false, + "type": "string", "one_of": [ "client_secret_basic", "client_secret_post", @@ -905,6 +992,7 @@ }, { "introspection_hint": { + "description": "Introspection hint parameter value passed to the introspection endpoint.", "required": false, "type": "string", "default": "access_token" @@ -912,6 +1000,7 @@ }, { "introspection_check_active": { + "description": "Check that the introspection response has an `active` claim with a value of `true`.", "required": false, "type": "boolean", "default": true @@ -919,20 +1008,22 @@ }, { "introspection_accept": { - "default": "application/json", + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document)", "one_of": [ "application/json", "application/token-introspection+jwt", "application/jwt" ], - "type": "string", - "required": false + "default": "application/json", + "required": false, + "type": "string" } }, { "introspection_headers_names": { - "type": "array", + "description": "Extra header names passed to the introspection endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -940,17 +1031,21 @@ }, { "introspection_headers_values": { - "type": "array", - "required": false, + "description": "Extra header values passed to the introspection endpoint.", "elements": { - "type": "string" - } + "type": "string", + "referenceable": true + }, + "required": false, + "type": "array", + "encrypted": true } }, { "introspection_headers_client": { - "type": "array", + "description": "Extra headers passed from the client to the introspection endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -958,8 +1053,9 @@ }, { "introspection_post_args_names": { - "type": "array", + "description": "Extra post argument names passed to the introspection endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -967,8 +1063,9 @@ }, { "introspection_post_args_values": { - "type": "array", + "description": "Extra post argument values passed to the introspection endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -976,8 +1073,9 @@ }, { "introspection_post_args_client": { - "type": "array", + "description": "Extra post arguments passed from the client to the introspection endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -985,6 +1083,7 @@ }, { "introspect_jwt_tokens": { + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", "required": false, "type": "boolean", "default": false @@ -992,14 +1091,16 @@ }, { "revocation_endpoint": { - "type": "string", - "required": false + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": false, + "type": "string" } }, { "revocation_endpoint_auth_method": { - "type": "string", + "description": "The revocation endpoint authentication method: - `client_secret_basic`: send `client_id` and `client_secret` in `Authorization: Basic` header - `client_secret_post`: send `client_id` and `client_secret` as part of the body - `client_secret_jwt`: send client assertion signed with the `client_secret` as part of the body - `private_key_jwt`: send client assertion signed with the `private key` as part of the body - `none`: do not authenticate", "required": false, + "type": "string", "one_of": [ "client_secret_basic", "client_secret_post", @@ -1011,31 +1112,35 @@ }, { "end_session_endpoint": { - "type": "string", - "required": false + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": false, + "type": "string" } }, { "userinfo_endpoint": { - "type": "string", - "required": false + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": false, + "type": "string" } }, { "userinfo_accept": { - "default": "application/json", + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document)", "one_of": [ "application/json", "application/jwt" ], - "type": "string", - "required": false + "default": "application/json", + "required": false, + "type": "string" } }, { "userinfo_headers_names": { - "type": "array", + "description": "Extra header names passed to the user info endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -1043,8 +1148,9 @@ }, { "userinfo_headers_values": { - "type": "array", + "description": "Extra header values passed to the user info endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -1052,8 +1158,9 @@ }, { "userinfo_headers_client": { - "type": "array", + "description": "Extra headers passed from the client to the user info endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -1061,8 +1168,9 @@ }, { "userinfo_query_args_names": { - "type": "array", + "description": "Extra query argument names passed to the user info endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -1070,8 +1178,9 @@ }, { "userinfo_query_args_values": { - "type": "array", + "description": "Extra query argument values passed to the user info endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -1079,8 +1188,9 @@ }, { "userinfo_query_args_client": { - "type": "array", + "description": "Extra query arguments passed from the client to the user info endpoint.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -1088,20 +1198,23 @@ }, { "token_exchange_endpoint": { - "type": "string", - "required": false + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": false, + "type": "string" } }, { "session_secret": { - "required": false, - "encrypted": true, + "description": "The session secret.", "referenceable": true, - "type": "string" + "required": false, + "type": "string", + "encrypted": true } }, { "session_audience": { + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", "required": false, "type": "string", "default": "default" @@ -1109,6 +1222,7 @@ }, { "session_cookie_name": { + "description": "The session cookie name.", "required": false, "type": "string", "default": "session" @@ -1116,6 +1230,7 @@ }, { "session_remember": { + "description": "Enables or disables persistent sessions.", "required": false, "type": "boolean", "default": false @@ -1123,6 +1238,7 @@ }, { "session_remember_cookie_name": { + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", "required": false, "type": "string", "default": "remember" @@ -1130,6 +1246,7 @@ }, { "session_remember_rolling_timeout": { + "description": "Network IO timeout in milliseconds.", "required": false, "type": "number", "default": 604800 @@ -1137,6 +1254,7 @@ }, { "session_remember_absolute_timeout": { + "description": "Network IO timeout in milliseconds.", "required": false, "type": "number", "default": 2592000 @@ -1144,6 +1262,7 @@ }, { "session_idling_timeout": { + "description": "Network IO timeout in milliseconds.", "required": false, "type": "number", "default": 900 @@ -1151,6 +1270,7 @@ }, { "session_rolling_timeout": { + "description": "Network IO timeout in milliseconds.", "required": false, "type": "number", "default": 3600 @@ -1158,6 +1278,7 @@ }, { "session_absolute_timeout": { + "description": "Network IO timeout in milliseconds.", "required": false, "type": "number", "default": 86400 @@ -1165,39 +1286,43 @@ }, { "session_cookie_path": { + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "default": "/", + "required": false, "match_none": [ { "err": "must not have empty segments", "pattern": "//" } ], - "starts_with": "/", - "default": "/", - "required": false, "type": "string" } }, { "session_cookie_domain": { - "type": "string", - "required": false + "description": "The session cookie Domain flag.", + "required": false, + "type": "string" } }, { "session_cookie_same_site": { - "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", "one_of": [ "Strict", "Lax", "None", "Default" ], - "type": "string", - "required": false + "default": "Lax", + "required": false, + "type": "string" } }, { "session_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", "required": false, "type": "boolean", "default": true @@ -1205,13 +1330,16 @@ }, { "session_cookie_secure": { - "type": "boolean", - "required": false + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "required": false, + "type": "boolean" } }, { "session_request_headers": { + "type": "set", "elements": { + "type": "string", "one_of": [ "id", "audience", @@ -1220,15 +1348,15 @@ "idling-timeout", "rolling-timeout", "absolute-timeout" - ], - "type": "string" - }, - "type": "set" + ] + } } }, { "session_response_headers": { + "type": "set", "elements": { + "type": "string", "one_of": [ "id", "audience", @@ -1237,27 +1365,27 @@ "idling-timeout", "rolling-timeout", "absolute-timeout" - ], - "type": "string" - }, - "type": "set" + ] + } } }, { "session_storage": { - "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis", "one_of": [ "cookie", "memcache", "memcached", "redis" ], - "type": "string", - "required": false + "default": "cookie", + "required": false, + "type": "string" } }, { "session_store_metadata": { + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", "required": false, "type": "boolean", "default": false @@ -1265,6 +1393,7 @@ }, { "session_enforce_same_subject": { + "description": "When set to `true`, audiences are forced to share the same subject.", "required": false, "type": "boolean", "default": false @@ -1272,6 +1401,7 @@ }, { "session_hash_subject": { + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", "required": false, "type": "boolean", "default": false @@ -1279,6 +1409,7 @@ }, { "session_hash_storage_key": { + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", "required": false, "type": "boolean", "default": false @@ -1286,18 +1417,21 @@ }, { "session_memcached_prefix": { - "type": "string", - "required": false + "description": "The memcached session key prefix.", + "required": false, + "type": "string" } }, { "session_memcached_socket": { - "type": "string", - "required": false + "description": "The memcached unix socket path.", + "required": false, + "type": "string" } }, { "session_memcached_host": { + "description": "The memcached host.", "required": false, "type": "string", "default": "127.0.0.1" @@ -1305,29 +1439,33 @@ }, { "session_memcached_port": { - "type": "integer", "between": [ 0, 65535 ], + "default": 11211, "required": false, - "default": 11211 + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." } }, { "session_redis_prefix": { - "type": "string", - "required": false + "description": "The Redis session key prefix.", + "required": false, + "type": "string" } }, { "session_redis_socket": { - "type": "string", - "required": false + "description": "The Redis unix socket path.", + "required": false, + "type": "string" } }, { "session_redis_host": { + "description": "The Redis host", "required": false, "type": "string", "default": "127.0.0.1" @@ -1335,50 +1473,57 @@ }, { "session_redis_port": { - "type": "integer", "between": [ 0, 65535 ], + "default": 6379, "required": false, - "default": 6379 + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." } }, { "session_redis_username": { + "description": "Username to use for Redis connection when the `redis` session storage is defined and ACL authentication is desired. If undefined, ACL authentication will not be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`.", + "required": false, "type": "string", - "referenceable": true, - "required": false + "referenceable": true } }, { "session_redis_password": { - "required": false, - "encrypted": true, + "description": "Password to use for Redis connection when the `redis` session storage is defined. If undefined, no AUTH commands are sent to Redis.", "referenceable": true, - "type": "string" + "required": false, + "type": "string", + "encrypted": true } }, { "session_redis_connect_timeout": { - "type": "integer", - "required": false + "description": "Network IO timeout in milliseconds.", + "required": false, + "type": "integer" } }, { "session_redis_read_timeout": { - "type": "integer", - "required": false + "description": "Network IO timeout in milliseconds.", + "required": false, + "type": "integer" } }, { "session_redis_send_timeout": { - "type": "integer", - "required": false + "description": "Network IO timeout in milliseconds.", + "required": false, + "type": "integer" } }, { "session_redis_ssl": { + "description": "Use SSL/TLS for Redis connection.", "required": false, "type": "boolean", "default": false @@ -1386,6 +1531,7 @@ }, { "session_redis_ssl_verify": { + "description": "Verify identity provider server certificate.", "required": false, "type": "boolean", "default": false @@ -1393,46 +1539,52 @@ }, { "session_redis_server_name": { - "type": "string", - "required": false + "description": "The SNI used for connecting the Redis server.", + "required": false, + "type": "string" } }, { "session_redis_cluster_nodes": { - "type": "array", + "description": "The Redis cluster node host. Takes an array of host records, with either `ip` or `host`, and `port` values.", "required": false, + "type": "array", "elements": { + "type": "record", "fields": [ { "ip": { + "description": "A string representing a host name, such as example.com.", + "required": true, "type": "string", - "default": "127.0.0.1", - "required": true + "default": "127.0.0.1" } }, { "port": { + "default": 6379, "between": [ 0, 65535 ], "type": "integer", - "default": 6379 + "description": "An integer representing a port number between 0 and 65535, inclusive." } } - ], - "type": "record" + ] } } }, { "session_redis_cluster_max_redirections": { - "type": "integer", - "required": false + "description": "The Redis cluster maximum redirects.", + "required": false, + "type": "integer" } }, { "reverify": { + "description": "Specifies whether to always verify tokens stored in the session.", "required": false, "type": "boolean", "default": false @@ -1440,6 +1592,7 @@ }, { "jwt_session_claim": { + "description": "The claim to match against the JWT session cookie.", "required": false, "type": "string", "default": "sid" @@ -1447,126 +1600,136 @@ }, { "jwt_session_cookie": { - "type": "string", - "required": false + "description": "The name of the JWT session cookie.", + "required": false, + "type": "string" } }, { "bearer_token_param_type": { - "default": [ - "header", - "query", - "body" - ], + "description": "Where to look for the bearer token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`", "elements": { + "type": "string", "one_of": [ "header", "cookie", "query", "body" - ], - "type": "string" + ] }, + "default": [ + "header", + "query", + "body" + ], "required": false, "type": "array" } }, { "bearer_token_cookie_name": { - "type": "string", - "required": false + "description": "The name of the cookie in which the bearer token is passed.", + "required": false, + "type": "string" } }, { "client_credentials_param_type": { - "default": [ - "header", - "query", - "body" - ], + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body", "elements": { + "type": "string", "one_of": [ "header", "query", "body" - ], - "type": "string" + ] }, + "default": [ + "header", + "query", + "body" + ], "required": false, "type": "array" } }, { "password_param_type": { - "default": [ - "header", - "query", - "body" - ], + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body", "elements": { + "type": "string", "one_of": [ "header", "query", "body" - ], - "type": "string" + ] }, + "default": [ + "header", + "query", + "body" + ], "required": false, "type": "array" } }, { "id_token_param_type": { - "default": [ - "header", - "query", - "body" - ], + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body", "elements": { + "type": "string", "one_of": [ "header", "query", "body" - ], - "type": "string" + ] }, + "default": [ + "header", + "query", + "body" + ], "required": false, "type": "array" } }, { "id_token_param_name": { - "type": "string", - "required": false + "description": "The name of the parameter used to pass the id token.", + "required": false, + "type": "string" } }, { "refresh_token_param_type": { - "default": [ - "header", - "query", - "body" - ], + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body", "elements": { + "type": "string", "one_of": [ "header", "query", "body" - ], - "type": "string" + ] }, + "default": [ + "header", + "query", + "body" + ], "required": false, "type": "array" } }, { "refresh_token_param_name": { - "type": "string", - "required": false + "description": "The name of the parameter used to pass the refresh token.", + "required": false, + "type": "string" } }, { "refresh_tokens": { + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", "required": false, "type": "boolean", "default": true @@ -1574,8 +1737,9 @@ }, { "upstream_headers_claims": { - "type": "array", + "description": "The upstream header claims.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -1583,8 +1747,9 @@ }, { "upstream_headers_names": { - "type": "array", + "description": "The upstream header names for the claim values.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -1592,6 +1757,7 @@ }, { "upstream_access_token_header": { + "description": "The upstream access token header.", "required": false, "type": "string", "default": "authorization:bearer" @@ -1599,44 +1765,51 @@ }, { "upstream_access_token_jwk_header": { - "type": "string", - "required": false + "description": "The upstream access token JWK header.", + "required": false, + "type": "string" } }, { "upstream_id_token_header": { - "type": "string", - "required": false + "description": "The upstream id token header.", + "required": false, + "type": "string" } }, { "upstream_id_token_jwk_header": { - "type": "string", - "required": false + "description": "The upstream id token JWK header.", + "required": false, + "type": "string" } }, { "upstream_refresh_token_header": { - "type": "string", - "required": false + "description": "The upstream refresh token header.", + "required": false, + "type": "string" } }, { "upstream_user_info_header": { - "type": "string", - "required": false + "description": "The upstream user info header.", + "required": false, + "type": "string" } }, { "upstream_user_info_jwt_header": { - "type": "string", - "required": false + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "required": false, + "type": "string" } }, { "upstream_introspection_header": { - "type": "string", - "required": false + "description": "The upstream introspection header.", + "required": false, + "type": "string" } }, { @@ -1647,14 +1820,16 @@ }, { "upstream_session_id_header": { - "type": "string", - "required": false + "description": "The upstream session id header.", + "required": false, + "type": "string" } }, { "downstream_headers_claims": { - "type": "array", + "description": "The downstream header claims.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -1662,8 +1837,9 @@ }, { "downstream_headers_names": { - "type": "array", + "description": "The downstream header names for the claim values.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -1671,50 +1847,58 @@ }, { "downstream_access_token_header": { - "type": "string", - "required": false + "description": "The downstream access token header.", + "required": false, + "type": "string" } }, { "downstream_access_token_jwk_header": { - "type": "string", - "required": false + "description": "The downstream access token JWK header.", + "required": false, + "type": "string" } }, { "downstream_id_token_header": { - "type": "string", - "required": false + "description": "The downstream id token header.", + "required": false, + "type": "string" } }, { "downstream_id_token_jwk_header": { - "type": "string", - "required": false + "description": "The downstream id token JWK header.", + "required": false, + "type": "string" } }, { "downstream_refresh_token_header": { - "type": "string", - "required": false + "description": "The downstream refresh token header.", + "required": false, + "type": "string" } }, { "downstream_user_info_header": { - "type": "string", - "required": false + "description": "The downstream user info header.", + "required": false, + "type": "string" } }, { "downstream_user_info_jwt_header": { - "type": "string", - "required": false + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "required": false, + "type": "string" } }, { "downstream_introspection_header": { - "type": "string", - "required": false + "description": "The downstream introspection header.", + "required": false, + "type": "string" } }, { @@ -1725,16 +1909,16 @@ }, { "downstream_session_id_header": { - "type": "string", - "required": false + "description": "The downstream session id header.", + "required": false, + "type": "string" } }, { "login_methods": { - "default": [ - "authorization_code" - ], + "description": "Enable login functionality with specified grants.", "elements": { + "type": "string", "one_of": [ "password", "client_credentials", @@ -1745,93 +1929,103 @@ "kong_oauth2", "refresh_token", "session" - ], - "type": "string" + ] }, + "default": [ + "authorization_code" + ], "required": false, "type": "array" } }, { "login_action": { - "default": "upstream", + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location", "one_of": [ "upstream", "response", "redirect" ], - "type": "string", - "required": false + "default": "upstream", + "required": false, + "type": "string" } }, { "login_tokens": { - "default": [ - "id_token" - ], + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response", "elements": { + "type": "string", "one_of": [ "id_token", "access_token", "refresh_token", "tokens", "introspection" - ], - "type": "string" + ] }, + "default": [ + "id_token" + ], "required": false, "type": "array" } }, { "login_redirect_mode": { - "default": "fragment", + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers)", "one_of": [ "query", "fragment" ], - "type": "string", - "required": false + "default": "fragment", + "required": false, + "type": "string" } }, { "logout_query_arg": { - "type": "string", - "required": false + "description": "The request query argument that activates the logout.", + "required": false, + "type": "string" } }, { "logout_post_arg": { - "type": "string", - "required": false + "description": "The request body argument that activates the logout.", + "required": false, + "type": "string" } }, { "logout_uri_suffix": { - "type": "string", - "required": false + "description": "The request URI suffix that activates the logout.", + "required": false, + "type": "string" } }, { "logout_methods": { - "default": [ - "POST", - "DELETE" - ], + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method", "elements": { + "type": "string", "one_of": [ "POST", "GET", "DELETE" - ], - "type": "string" + ] }, + "default": [ + "POST", + "DELETE" + ], "required": false, "type": "array" } }, { "logout_revoke": { + "description": "Revoke tokens as part of the logout.", "required": false, "type": "boolean", "default": false @@ -1839,6 +2033,7 @@ }, { "logout_revoke_access_token": { + "description": "Revoke the access token as part of the logout.", "required": false, "type": "boolean", "default": true @@ -1846,6 +2041,7 @@ }, { "logout_revoke_refresh_token": { + "description": "Revoke the refresh token as part of the logout.", "required": false, "type": "boolean", "default": true @@ -1853,8 +2049,9 @@ }, { "consumer_claim": { - "type": "array", + "description": "The claim used for consumer mapping.", "required": false, + "type": "array", "elements": { "type": "string" } @@ -1862,24 +2059,26 @@ }, { "consumer_by": { - "default": [ - "username", - "custom_id" - ], + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`", "elements": { + "type": "string", "one_of": [ "id", "username", "custom_id" - ], - "type": "string" + ] }, + "default": [ + "username", + "custom_id" + ], "required": false, "type": "array" } }, { "consumer_optional": { + "description": "Do not terminate the request if consumer mapping fails.", "required": false, "type": "boolean", "default": false @@ -1887,24 +2086,27 @@ }, { "credential_claim": { - "default": [ - "sub" - ], + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used.", "elements": { "type": "string" }, + "default": [ + "sub" + ], "required": false, "type": "array" } }, { "anonymous": { - "type": "string", - "required": false + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "required": false, + "type": "string" } }, { "run_on_preflight": { + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", "required": false, "type": "boolean", "default": true @@ -1912,6 +2114,7 @@ }, { "leeway": { + "description": "Allow some leeway (in seconds) on the ttl / expiry verification.", "required": false, "type": "number", "default": 0 @@ -1919,6 +2122,7 @@ }, { "verify_parameters": { + "description": "Verify plugin configuration against discovery.", "required": false, "type": "boolean", "default": false @@ -1926,6 +2130,7 @@ }, { "verify_nonce": { + "description": "Verify nonce on authorization code flow.", "required": false, "type": "boolean", "default": true @@ -1933,6 +2138,7 @@ }, { "verify_claims": { + "description": "Verify tokens for standard claims.", "required": false, "type": "boolean", "default": true @@ -1940,6 +2146,7 @@ }, { "verify_signature": { + "description": "Verify signature of tokens.", "required": false, "type": "boolean", "default": true @@ -1947,10 +2154,9 @@ }, { "ignore_signature": { - "default": [ - - ], + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication", "elements": { + "type": "string", "one_of": [ "password", "client_credentials", @@ -1959,15 +2165,18 @@ "session", "introspection", "userinfo" - ], - "type": "string" + ] }, + "default": [ + + ], "required": false, "type": "array" } }, { "enable_hs_signatures": { + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", "required": false, "type": "boolean", "default": false @@ -1975,9 +2184,11 @@ }, { "disable_session": { - "type": "array", + "description": "Disable issuing the session cookie with the specified grants.", "required": false, + "type": "array", "elements": { + "type": "string", "one_of": [ "password", "client_credentials", @@ -1988,13 +2199,13 @@ "kong_oauth2", "refresh_token", "session" - ], - "type": "string" + ] } } }, { "cache_ttl": { + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", "required": false, "type": "number", "default": 3600 @@ -2002,30 +2213,35 @@ }, { "cache_ttl_max": { - "type": "number", - "required": false + "description": "The maximum cache ttl in seconds (enforced).", + "required": false, + "type": "number" } }, { "cache_ttl_min": { - "type": "number", - "required": false + "description": "The minimum cache ttl in seconds (enforced).", + "required": false, + "type": "number" } }, { "cache_ttl_neg": { - "type": "number", - "required": false + "description": "The negative cache ttl in seconds.", + "required": false, + "type": "number" } }, { "cache_ttl_resurrect": { - "type": "number", - "required": false + "description": "The resurrection ttl in seconds.", + "required": false, + "type": "number" } }, { "cache_tokens": { + "description": "Cache the token endpoint requests.", "required": false, "type": "boolean", "default": true @@ -2033,13 +2249,15 @@ }, { "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "required": false, "type": "string", - "auto": true, - "required": false + "auto": true } }, { "cache_introspection": { + "description": "Cache the introspection endpoint requests.", "required": false, "type": "boolean", "default": true @@ -2047,6 +2265,7 @@ }, { "cache_token_exchange": { + "description": "Cache the token exchange endpoint requests.", "required": false, "type": "boolean", "default": true @@ -2054,6 +2273,7 @@ }, { "cache_user_info": { + "description": "Cache the user info requests.", "required": false, "type": "boolean", "default": true @@ -2061,6 +2281,7 @@ }, { "search_user_info": { + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", "required": false, "type": "boolean", "default": false @@ -2068,6 +2289,7 @@ }, { "hide_credentials": { + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", "required": false, "type": "boolean", "default": false @@ -2075,43 +2297,50 @@ }, { "http_version": { - "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0", + "required": false, "type": "number", - "required": false + "default": 1.1 } }, { "http_proxy": { - "type": "string", - "required": false + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": false, + "type": "string" } }, { "http_proxy_authorization": { - "type": "string", - "required": false + "description": "The HTTP proxy authorization.", + "required": false, + "type": "string" } }, { "https_proxy": { - "type": "string", - "required": false + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": false, + "type": "string" } }, { "https_proxy_authorization": { - "type": "string", - "required": false + "description": "The HTTPS proxy authorization.", + "required": false, + "type": "string" } }, { "no_proxy": { - "type": "string", - "required": false + "description": "Do not use proxy with these hosts.", + "required": false, + "type": "string" } }, { "keepalive": { + "description": "Use keepalive with the HTTP client.", "required": false, "type": "boolean", "default": true @@ -2119,6 +2348,7 @@ }, { "ssl_verify": { + "description": "Verify identity provider server certificate.", "required": false, "type": "boolean", "default": false @@ -2126,6 +2356,7 @@ }, { "timeout": { + "description": "Network IO timeout in milliseconds.", "required": false, "type": "number", "default": 10000 @@ -2133,6 +2364,7 @@ }, { "display_errors": { + "description": "Display errors on failure responses.", "required": false, "type": "boolean", "default": false @@ -2140,6 +2372,7 @@ }, { "by_username_ignore_case": { + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", "required": false, "type": "boolean", "default": false @@ -2147,14 +2380,39 @@ }, { "resolve_distributed_claims": { + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", "required": false, "type": "boolean", "default": false } + }, + { + "expose_error_code": { + "default": true, + "type": "boolean" + } + }, + { + "token_cache_key_include_scope": { + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean", + "default": false + } + }, + { + "using_pseudo_issuer": { + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL.", + "type": "boolean", + "default": false + } } ], + "type": "record", "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/openid-connect/3.5.x.json b/schemas/openid-connect/3.5.x.json new file mode 100644 index 00000000..3bb53c89 --- /dev/null +++ b/schemas/openid-connect/3.5.x.json @@ -0,0 +1,2454 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumers" + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumer_groups" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "issuer": { + "required": true, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "discovery_headers_names": { + "required": false, + "type": "array", + "description": "Extra header names passed to the discovery endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "discovery_headers_values": { + "required": false, + "type": "array", + "description": "Extra header values passed to the discovery endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "extra_jwks_uris": { + "required": false, + "type": "set", + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + } + }, + { + "rediscovery_lifetime": { + "required": false, + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "type": "number", + "default": 30 + } + }, + { + "auth_methods": { + "required": false, + "type": "array", + "default": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "description": "Types of credentials/grants to enable." + } + }, + { + "client_id": { + "required": false, + "type": "array", + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.", + "encrypted": true + } + }, + { + "client_secret": { + "required": false, + "type": "array", + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "The client secret.", + "encrypted": true + } + }, + { + "client_auth": { + "required": false, + "type": "array", + "description": "The authentication method used by the client (plugin) when calling the endpoint.", + "elements": { + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "none" + ] + } + } + }, + { + "client_jwk": { + "required": false, + "type": "array", + "elements": { + "required": false, + "type": "record", + "fields": [ + { + "issuer": { + "type": "string", + "required": false + } + }, + { + "kty": { + "type": "string", + "required": false + } + }, + { + "use": { + "type": "string", + "required": false + } + }, + { + "key_ops": { + "required": false, + "type": "array", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "alg": { + "type": "string", + "required": false + } + }, + { + "kid": { + "type": "string", + "required": false + } + }, + { + "x5u": { + "type": "string", + "required": false + } + }, + { + "x5c": { + "required": false, + "type": "array", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "x5t": { + "type": "string", + "required": false + } + }, + { + "x5t#S256": { + "type": "string", + "required": false + } + }, + { + "k": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "x": { + "type": "string", + "required": false + } + }, + { + "y": { + "type": "string", + "required": false + } + }, + { + "crv": { + "type": "string", + "required": false + } + }, + { + "n": { + "type": "string", + "required": false + } + }, + { + "e": { + "type": "string", + "required": false + } + }, + { + "d": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "p": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "q": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "dp": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "dq": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "qi": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "oth": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "r": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "t": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + } + ] + } + } + }, + { + "client_alg": { + "required": false, + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ] + } + } + }, + { + "client_arg": { + "required": false, + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "type": "string", + "default": "client_id" + } + }, + { + "redirect_uri": { + "required": false, + "type": "array", + "description": "The redirect URI passed to the authorization and token endpoints.", + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + } + }, + { + "login_redirect_uri": { + "required": false, + "type": "array", + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "elements": { + "referenceable": true, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + } + }, + { + "logout_redirect_uri": { + "required": false, + "type": "array", + "description": "Where to redirect the client after the logout.", + "elements": { + "referenceable": true, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + } + }, + { + "forbidden_redirect_uri": { + "required": false, + "type": "array", + "description": "Where to redirect the client on forbidden requests.", + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + } + }, + { + "forbidden_error_message": { + "required": false, + "description": "The error message for the forbidden requests (when not using the redirection).", + "type": "string", + "default": "Forbidden" + } + }, + { + "forbidden_destroy_session": { + "required": false, + "description": "Destroy any active session for the forbidden requests.", + "type": "boolean", + "default": true + } + }, + { + "unauthorized_destroy_session": { + "required": false, + "description": "Destroy any active session for the unauthorized requests.", + "type": "boolean", + "default": true + } + }, + { + "unauthorized_redirect_uri": { + "required": false, + "type": "array", + "description": "Where to redirect the client on unauthorized requests.", + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + } + }, + { + "unauthorized_error_message": { + "required": false, + "description": "The error message for the unauthorized requests (when not using the redirection).", + "type": "string", + "default": "Unauthorized" + } + }, + { + "unexpected_redirect_uri": { + "required": false, + "type": "array", + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + } + }, + { + "response_mode": { + "required": false, + "type": "string", + "default": "query", + "one_of": [ + "query", + "form_post", + "fragment" + ], + "description": "The response mode passed to the authorization endpoint: - `query`: Instructs the identity provider to pass parameters in query string - `form_post`: Instructs the identity provider to pass parameters in request body - `fragment`: Instructs the identity provider to pass parameters in uri fragment (rarely useful as the plugin itself cannot read it)" + } + }, + { + "response_type": { + "required": false, + "type": "array", + "default": [ + "code" + ], + "elements": { + "type": "string" + }, + "description": "The response type passed to the authorization endpoint." + } + }, + { + "scopes": { + "required": false, + "type": "array", + "default": [ + "openid" + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "The scopes passed to the authorization and token endpoints." + } + }, + { + "audience": { + "required": false, + "type": "array", + "description": "The audience passed to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "issuers_allowed": { + "required": false, + "type": "array", + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "elements": { + "type": "string" + } + } + }, + { + "scopes_required": { + "required": false, + "type": "array", + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "scopes_claim": { + "required": false, + "type": "array", + "default": [ + "scope" + ], + "elements": { + "type": "string" + }, + "description": "The claim that contains the scopes." + } + }, + { + "audience_required": { + "required": false, + "type": "array", + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "audience_claim": { + "required": false, + "type": "array", + "default": [ + "aud" + ], + "elements": { + "type": "string" + }, + "description": "The claim that contains the audience." + } + }, + { + "groups_required": { + "required": false, + "type": "array", + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "groups_claim": { + "required": false, + "type": "array", + "default": [ + "groups" + ], + "elements": { + "type": "string" + }, + "description": "The claim that contains the groups." + } + }, + { + "roles_required": { + "required": false, + "type": "array", + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "roles_claim": { + "required": false, + "type": "array", + "default": [ + "roles" + ], + "elements": { + "type": "string" + }, + "description": "The claim that contains the roles." + } + }, + { + "domains": { + "required": false, + "type": "array", + "description": "The allowed values for the `hd` claim.", + "elements": { + "type": "string" + } + } + }, + { + "max_age": { + "required": false, + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number" + } + }, + { + "authenticated_groups_claim": { + "required": false, + "type": "array", + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations.", + "elements": { + "type": "string" + } + } + }, + { + "authorization_endpoint": { + "required": false, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "authorization_query_args_names": { + "required": false, + "type": "array", + "description": "Extra query argument names passed to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "authorization_query_args_values": { + "required": false, + "type": "array", + "description": "Extra query argument values passed to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "authorization_query_args_client": { + "required": false, + "type": "array", + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "authorization_rolling_timeout": { + "required": false, + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number", + "default": 600 + } + }, + { + "authorization_cookie_name": { + "required": false, + "description": "The authorization cookie name.", + "type": "string", + "default": "authorization" + } + }, + { + "authorization_cookie_path": { + "required": false, + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "type": "string", + "default": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "starts_with": "/" + } + }, + { + "authorization_cookie_domain": { + "required": false, + "description": "The authorization cookie Domain flag.", + "type": "string" + } + }, + { + "authorization_cookie_same_site": { + "required": false, + "type": "string", + "default": "Default", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks." + } + }, + { + "authorization_cookie_http_only": { + "required": false, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean", + "default": true + } + }, + { + "authorization_cookie_secure": { + "required": false, + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + } + }, + { + "preserve_query_args": { + "required": false, + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "type": "boolean", + "default": false + } + }, + { + "token_endpoint": { + "required": false, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "token_endpoint_auth_method": { + "required": false, + "type": "string", + "description": "The token endpoint authentication method: - `client_secret_basic`: send `client_id` and `client_secret` in `Authorization: Basic` header - `client_secret_post`: send `client_id` and `client_secret` as part of the body - `client_secret_jwt`: send client assertion signed with the `client_secret` as part of the body - `private_key_jwt`: send client assertion signed with the `private key` as part of the body - `none`: do not authenticate", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "none" + ] + } + }, + { + "token_headers_names": { + "required": false, + "type": "array", + "description": "Extra header names passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_values": { + "required": false, + "type": "array", + "description": "Extra header values passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_client": { + "required": false, + "type": "array", + "description": "Extra headers passed from the client to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_replay": { + "required": false, + "type": "array", + "description": "The names of token endpoint response headers to forward to the downstream client.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_prefix": { + "required": false, + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string" + } + }, + { + "token_headers_grants": { + "required": false, + "type": "array", + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant", + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token" + ] + } + } + }, + { + "token_post_args_names": { + "required": false, + "type": "array", + "description": "Extra post argument names passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_post_args_values": { + "required": false, + "type": "array", + "description": "Extra post argument values passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_post_args_client": { + "required": false, + "type": "array", + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_endpoint": { + "required": false, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "introspection_endpoint_auth_method": { + "required": false, + "type": "string", + "description": "The introspection endpoint authentication method: - `client_secret_basic`: send `client_id` and `client_secret` in `Authorization: Basic` header - `client_secret_post`: send `client_id` and `client_secret` as part of the body - `client_secret_jwt`: send client assertion signed with the `client_secret` as part of the body - `private_key_jwt`: send client assertion signed with the `private key` as part of the body - `none`: do not authenticate", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "none" + ] + } + }, + { + "introspection_hint": { + "required": false, + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "type": "string", + "default": "access_token" + } + }, + { + "introspection_check_active": { + "required": false, + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "type": "boolean", + "default": true + } + }, + { + "introspection_accept": { + "required": false, + "type": "string", + "default": "application/json", + "one_of": [ + "application/json", + "application/token-introspection+jwt", + "application/jwt" + ], + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document)" + } + }, + { + "introspection_headers_names": { + "required": false, + "type": "array", + "description": "Extra header names passed to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_headers_values": { + "required": false, + "type": "array", + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "Extra header values passed to the introspection endpoint.", + "encrypted": true + } + }, + { + "introspection_headers_client": { + "required": false, + "type": "array", + "description": "Extra headers passed from the client to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_names": { + "required": false, + "type": "array", + "description": "Extra post argument names passed to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_values": { + "required": false, + "type": "array", + "description": "Extra post argument values passed to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_client": { + "required": false, + "type": "array", + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspect_jwt_tokens": { + "required": false, + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "type": "boolean", + "default": false + } + }, + { + "revocation_endpoint": { + "required": false, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "revocation_endpoint_auth_method": { + "required": false, + "type": "string", + "description": "The revocation endpoint authentication method: - `client_secret_basic`: send `client_id` and `client_secret` in `Authorization: Basic` header - `client_secret_post`: send `client_id` and `client_secret` as part of the body - `client_secret_jwt`: send client assertion signed with the `client_secret` as part of the body - `private_key_jwt`: send client assertion signed with the `private key` as part of the body - `none`: do not authenticate", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "none" + ] + } + }, + { + "end_session_endpoint": { + "required": false, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "userinfo_endpoint": { + "required": false, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "userinfo_accept": { + "required": false, + "type": "string", + "default": "application/json", + "one_of": [ + "application/json", + "application/jwt" + ], + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document)" + } + }, + { + "userinfo_headers_names": { + "required": false, + "type": "array", + "description": "Extra header names passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_headers_values": { + "required": false, + "type": "array", + "description": "Extra header values passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_headers_client": { + "required": false, + "type": "array", + "description": "Extra headers passed from the client to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_names": { + "required": false, + "type": "array", + "description": "Extra query argument names passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_values": { + "required": false, + "type": "array", + "description": "Extra query argument values passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_client": { + "required": false, + "type": "array", + "description": "Extra query arguments passed from the client to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_exchange_endpoint": { + "required": false, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "session_secret": { + "required": false, + "type": "string", + "referenceable": true, + "description": "The session secret.", + "encrypted": true + } + }, + { + "session_audience": { + "required": false, + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string", + "default": "default" + } + }, + { + "session_cookie_name": { + "required": false, + "description": "The session cookie name.", + "type": "string", + "default": "session" + } + }, + { + "session_remember": { + "required": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean", + "default": false + } + }, + { + "session_remember_cookie_name": { + "required": false, + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string", + "default": "remember" + } + }, + { + "session_remember_rolling_timeout": { + "required": false, + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "type": "number", + "default": 604800 + } + }, + { + "session_remember_absolute_timeout": { + "required": false, + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number", + "default": 2592000 + } + }, + { + "session_idling_timeout": { + "required": false, + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "type": "number", + "default": 900 + } + }, + { + "session_rolling_timeout": { + "required": false, + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number", + "default": 3600 + } + }, + { + "session_absolute_timeout": { + "required": false, + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number", + "default": 86400 + } + }, + { + "session_cookie_path": { + "required": false, + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "type": "string", + "default": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "starts_with": "/" + } + }, + { + "session_cookie_domain": { + "required": false, + "description": "The session cookie Domain flag.", + "type": "string" + } + }, + { + "session_cookie_same_site": { + "required": false, + "type": "string", + "default": "Lax", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks." + } + }, + { + "session_cookie_http_only": { + "required": false, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean", + "default": true + } + }, + { + "session_cookie_secure": { + "required": false, + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + } + }, + { + "session_request_headers": { + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "session_response_headers": { + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "session_storage": { + "required": false, + "type": "string", + "default": "cookie", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis" + } + }, + { + "session_store_metadata": { + "required": false, + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "type": "boolean", + "default": false + } + }, + { + "session_enforce_same_subject": { + "required": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean", + "default": false + } + }, + { + "session_hash_subject": { + "required": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean", + "default": false + } + }, + { + "session_hash_storage_key": { + "required": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean", + "default": false + } + }, + { + "session_memcached_prefix": { + "required": false, + "description": "The memcached session key prefix.", + "type": "string" + } + }, + { + "session_memcached_socket": { + "required": false, + "description": "The memcached unix socket path.", + "type": "string" + } + }, + { + "session_memcached_host": { + "required": false, + "description": "The memcached host.", + "type": "string", + "default": "127.0.0.1" + } + }, + { + "session_memcached_port": { + "required": false, + "type": "integer", + "default": 11211, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "session_redis_prefix": { + "required": false, + "description": "The Redis session key prefix.", + "type": "string" + } + }, + { + "session_redis_socket": { + "required": false, + "description": "The Redis unix socket path.", + "type": "string" + } + }, + { + "session_redis_host": { + "required": false, + "description": "The Redis host", + "type": "string", + "default": "127.0.0.1" + } + }, + { + "session_redis_port": { + "required": false, + "type": "integer", + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "session_redis_username": { + "required": false, + "referenceable": true, + "type": "string", + "description": "Username to use for Redis connection when the `redis` session storage is defined and ACL authentication is desired. If undefined, ACL authentication will not be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`." + } + }, + { + "session_redis_password": { + "required": false, + "type": "string", + "referenceable": true, + "description": "Password to use for Redis connection when the `redis` session storage is defined. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true + } + }, + { + "session_redis_connect_timeout": { + "required": false, + "description": "Session redis connection timeout in milliseconds.", + "type": "integer" + } + }, + { + "session_redis_read_timeout": { + "required": false, + "description": "Session redis read timeout in milliseconds.", + "type": "integer" + } + }, + { + "session_redis_send_timeout": { + "required": false, + "description": "Session redis send timeout in milliseconds.", + "type": "integer" + } + }, + { + "session_redis_ssl": { + "required": false, + "description": "Use SSL/TLS for Redis connection.", + "type": "boolean", + "default": false + } + }, + { + "session_redis_ssl_verify": { + "required": false, + "description": "Verify identity provider server certificate.", + "type": "boolean", + "default": false + } + }, + { + "session_redis_server_name": { + "required": false, + "description": "The SNI used for connecting the Redis server.", + "type": "string" + } + }, + { + "session_redis_cluster_nodes": { + "required": false, + "type": "array", + "description": "The Redis cluster node host. Takes an array of host records, with either `ip` or `host`, and `port` values.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + } + ] + } + } + }, + { + "session_redis_cluster_max_redirections": { + "required": false, + "description": "The Redis cluster maximum redirects.", + "type": "integer" + } + }, + { + "reverify": { + "required": false, + "description": "Specifies whether to always verify tokens stored in the session.", + "type": "boolean", + "default": false + } + }, + { + "jwt_session_claim": { + "required": false, + "description": "The claim to match against the JWT session cookie.", + "type": "string", + "default": "sid" + } + }, + { + "jwt_session_cookie": { + "required": false, + "description": "The name of the JWT session cookie.", + "type": "string" + } + }, + { + "bearer_token_param_type": { + "required": false, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "cookie", + "query", + "body" + ] + }, + "description": "Where to look for the bearer token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`" + } + }, + { + "bearer_token_cookie_name": { + "required": false, + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string" + } + }, + { + "client_credentials_param_type": { + "required": false, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body" + } + }, + { + "password_param_type": { + "required": false, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body" + } + }, + { + "id_token_param_type": { + "required": false, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body" + } + }, + { + "id_token_param_name": { + "required": false, + "description": "The name of the parameter used to pass the id token.", + "type": "string" + } + }, + { + "refresh_token_param_type": { + "required": false, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body" + } + }, + { + "refresh_token_param_name": { + "required": false, + "description": "The name of the parameter used to pass the refresh token.", + "type": "string" + } + }, + { + "refresh_tokens": { + "required": false, + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "type": "boolean", + "default": true + } + }, + { + "upstream_headers_claims": { + "required": false, + "type": "array", + "description": "The upstream header claims.", + "elements": { + "type": "string" + } + } + }, + { + "upstream_headers_names": { + "required": false, + "type": "array", + "description": "The upstream header names for the claim values.", + "elements": { + "type": "string" + } + } + }, + { + "upstream_access_token_header": { + "required": false, + "description": "The upstream access token header.", + "type": "string", + "default": "authorization:bearer" + } + }, + { + "upstream_access_token_jwk_header": { + "required": false, + "description": "The upstream access token JWK header.", + "type": "string" + } + }, + { + "upstream_id_token_header": { + "required": false, + "description": "The upstream id token header.", + "type": "string" + } + }, + { + "upstream_id_token_jwk_header": { + "required": false, + "description": "The upstream id token JWK header.", + "type": "string" + } + }, + { + "upstream_refresh_token_header": { + "required": false, + "description": "The upstream refresh token header.", + "type": "string" + } + }, + { + "upstream_user_info_header": { + "required": false, + "description": "The upstream user info header.", + "type": "string" + } + }, + { + "upstream_user_info_jwt_header": { + "required": false, + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + } + }, + { + "upstream_introspection_header": { + "required": false, + "description": "The upstream introspection header.", + "type": "string" + } + }, + { + "upstream_introspection_jwt_header": { + "type": "string", + "required": false + } + }, + { + "upstream_session_id_header": { + "required": false, + "description": "The upstream session id header.", + "type": "string" + } + }, + { + "downstream_headers_claims": { + "required": false, + "type": "array", + "description": "The downstream header claims.", + "elements": { + "type": "string" + } + } + }, + { + "downstream_headers_names": { + "required": false, + "type": "array", + "description": "The downstream header names for the claim values.", + "elements": { + "type": "string" + } + } + }, + { + "downstream_access_token_header": { + "required": false, + "description": "The downstream access token header.", + "type": "string" + } + }, + { + "downstream_access_token_jwk_header": { + "required": false, + "description": "The downstream access token JWK header.", + "type": "string" + } + }, + { + "downstream_id_token_header": { + "required": false, + "description": "The downstream id token header.", + "type": "string" + } + }, + { + "downstream_id_token_jwk_header": { + "required": false, + "description": "The downstream id token JWK header.", + "type": "string" + } + }, + { + "downstream_refresh_token_header": { + "required": false, + "description": "The downstream refresh token header.", + "type": "string" + } + }, + { + "downstream_user_info_header": { + "required": false, + "description": "The downstream user info header.", + "type": "string" + } + }, + { + "downstream_user_info_jwt_header": { + "required": false, + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + } + }, + { + "downstream_introspection_header": { + "required": false, + "description": "The downstream introspection header.", + "type": "string" + } + }, + { + "downstream_introspection_jwt_header": { + "type": "string", + "required": false + } + }, + { + "downstream_session_id_header": { + "required": false, + "description": "The downstream session id header.", + "type": "string" + } + }, + { + "login_methods": { + "required": false, + "type": "array", + "default": [ + "authorization_code" + ], + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "description": "Enable login functionality with specified grants." + } + }, + { + "login_action": { + "required": false, + "type": "string", + "default": "upstream", + "one_of": [ + "upstream", + "response", + "redirect" + ], + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location" + } + }, + { + "login_tokens": { + "required": false, + "type": "array", + "default": [ + "id_token" + ], + "elements": { + "type": "string", + "one_of": [ + "id_token", + "access_token", + "refresh_token", + "tokens", + "introspection" + ] + }, + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response" + } + }, + { + "login_redirect_mode": { + "required": false, + "type": "string", + "default": "fragment", + "one_of": [ + "query", + "fragment" + ], + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers)" + } + }, + { + "logout_query_arg": { + "required": false, + "description": "The request query argument that activates the logout.", + "type": "string" + } + }, + { + "logout_post_arg": { + "required": false, + "description": "The request body argument that activates the logout.", + "type": "string" + } + }, + { + "logout_uri_suffix": { + "required": false, + "description": "The request URI suffix that activates the logout.", + "type": "string" + } + }, + { + "logout_methods": { + "required": false, + "type": "array", + "default": [ + "POST", + "DELETE" + ], + "elements": { + "type": "string", + "one_of": [ + "POST", + "GET", + "DELETE" + ] + }, + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method" + } + }, + { + "logout_revoke": { + "required": false, + "description": "Revoke tokens as part of the logout.", + "type": "boolean", + "default": false + } + }, + { + "logout_revoke_access_token": { + "required": false, + "description": "Revoke the access token as part of the logout.", + "type": "boolean", + "default": true + } + }, + { + "logout_revoke_refresh_token": { + "required": false, + "description": "Revoke the refresh token as part of the logout.", + "type": "boolean", + "default": true + } + }, + { + "consumer_claim": { + "required": false, + "type": "array", + "description": "The claim used for consumer mapping.", + "elements": { + "type": "string" + } + } + }, + { + "consumer_by": { + "required": false, + "type": "array", + "default": [ + "username", + "custom_id" + ], + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`" + } + }, + { + "consumer_optional": { + "required": false, + "description": "Do not terminate the request if consumer mapping fails.", + "type": "boolean", + "default": false + } + }, + { + "credential_claim": { + "required": false, + "type": "array", + "default": [ + "sub" + ], + "elements": { + "type": "string" + }, + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used." + } + }, + { + "anonymous": { + "required": false, + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "run_on_preflight": { + "required": false, + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "type": "boolean", + "default": true + } + }, + { + "leeway": { + "required": false, + "description": "Allow some leeway (in seconds) on the iat claim and ttl / expiry verification.", + "type": "number", + "default": 0 + } + }, + { + "verify_parameters": { + "required": false, + "description": "Verify plugin configuration against discovery.", + "type": "boolean", + "default": false + } + }, + { + "verify_nonce": { + "required": false, + "description": "Verify nonce on authorization code flow.", + "type": "boolean", + "default": true + } + }, + { + "verify_claims": { + "required": false, + "description": "Verify tokens for standard claims.", + "type": "boolean", + "default": true + } + }, + { + "verify_signature": { + "required": false, + "description": "Verify signature of tokens.", + "type": "boolean", + "default": true + } + }, + { + "ignore_signature": { + "required": false, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token", + "session", + "introspection", + "userinfo" + ] + }, + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication" + } + }, + { + "enable_hs_signatures": { + "required": false, + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "type": "boolean", + "default": false + } + }, + { + "disable_session": { + "required": false, + "type": "array", + "description": "Disable issuing the session cookie with the specified grants.", + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + } + } + }, + { + "cache_ttl": { + "required": false, + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "type": "number", + "default": 3600 + } + }, + { + "cache_ttl_max": { + "required": false, + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number" + } + }, + { + "cache_ttl_min": { + "required": false, + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number" + } + }, + { + "cache_ttl_neg": { + "required": false, + "description": "The negative cache ttl in seconds.", + "type": "number" + } + }, + { + "cache_ttl_resurrect": { + "required": false, + "description": "The resurrection ttl in seconds.", + "type": "number" + } + }, + { + "cache_tokens": { + "required": false, + "description": "Cache the token endpoint requests.", + "type": "boolean", + "default": true + } + }, + { + "cache_tokens_salt": { + "required": false, + "auto": true, + "type": "string", + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests." + } + }, + { + "cache_introspection": { + "required": false, + "description": "Cache the introspection endpoint requests.", + "type": "boolean", + "default": true + } + }, + { + "cache_token_exchange": { + "required": false, + "description": "Cache the token exchange endpoint requests.", + "type": "boolean", + "default": true + } + }, + { + "cache_user_info": { + "required": false, + "description": "Cache the user info requests.", + "type": "boolean", + "default": true + } + }, + { + "search_user_info": { + "required": false, + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "type": "boolean", + "default": false + } + }, + { + "hide_credentials": { + "required": false, + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "type": "boolean", + "default": false + } + }, + { + "http_version": { + "required": false, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0", + "type": "number", + "default": 1.1 + } + }, + { + "http_proxy": { + "required": false, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "http_proxy_authorization": { + "required": false, + "description": "The HTTP proxy authorization.", + "type": "string" + } + }, + { + "https_proxy": { + "required": false, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "https_proxy_authorization": { + "required": false, + "description": "The HTTPS proxy authorization.", + "type": "string" + } + }, + { + "no_proxy": { + "required": false, + "description": "Do not use proxy with these hosts.", + "type": "string" + } + }, + { + "keepalive": { + "required": false, + "description": "Use keepalive with the HTTP client.", + "type": "boolean", + "default": true + } + }, + { + "ssl_verify": { + "required": false, + "description": "Verify identity provider server certificate.", + "type": "boolean", + "default": false + } + }, + { + "timeout": { + "required": false, + "description": "Network IO timeout in milliseconds.", + "type": "number", + "default": 10000 + } + }, + { + "display_errors": { + "required": false, + "description": "Display errors on failure responses.", + "type": "boolean", + "default": false + } + }, + { + "by_username_ignore_case": { + "required": false, + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "type": "boolean", + "default": false + } + }, + { + "resolve_distributed_claims": { + "required": false, + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "type": "boolean", + "default": false + } + }, + { + "expose_error_code": { + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "type": "boolean", + "default": true + } + }, + { + "token_cache_key_include_scope": { + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean", + "default": false + } + }, + { + "introspection_token_param_name": { + "required": false, + "description": "Designate token's parameter name for introspection.", + "type": "string", + "default": "token" + } + }, + { + "using_pseudo_issuer": { + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL.", + "type": "boolean", + "default": false + } + }, + { + "revocation_token_param_name": { + "required": false, + "description": "Designate token's parameter name for revocation.", + "type": "string", + "default": "token" + } + }, + { + "proof_of_possession_mtls": { + "one_of": [ + "off", + "strict", + "optional" + ], + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "type": "string", + "default": "off" + } + }, + { + "proof_of_possession_auth_methods_validation": { + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "type": "boolean", + "default": true + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "authorization_cookie_lifetime": { + "type": "number" + } + }, + { + "authorization_cookie_samesite": { + "type": "string" + } + }, + { + "authorization_cookie_httponly": { + "type": "boolean" + } + }, + { + "session_cookie_lifetime": { + "type": "number" + } + }, + { + "session_cookie_idletime": { + "type": "number" + } + }, + { + "session_cookie_samesite": { + "type": "string" + } + }, + { + "session_cookie_httponly": { + "type": "boolean" + } + }, + { + "session_memcache_prefix": { + "type": "string" + } + }, + { + "session_memcache_socket": { + "type": "string" + } + }, + { + "session_memcache_host": { + "type": "string" + } + }, + { + "session_memcache_port": { + "type": "integer" + } + }, + { + "session_redis_cluster_maxredirections": { + "type": "integer" + } + }, + { + "session_cookie_renew": { + "type": "number" + } + }, + { + "session_cookie_maxsize": { + "type": "integer" + } + }, + { + "session_strategy": { + "type": "string" + } + }, + { + "session_compressor": { + "type": "string" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/openid-connect/3.6.x.json b/schemas/openid-connect/3.6.x.json new file mode 100644 index 00000000..207b10c8 --- /dev/null +++ b/schemas/openid-connect/3.6.x.json @@ -0,0 +1,2548 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "issuer": { + "required": true, + "type": "string", + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`." + } + }, + { + "using_pseudo_issuer": { + "required": false, + "type": "boolean", + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "default": false + } + }, + { + "discovery_headers_names": { + "required": false, + "type": "array", + "description": "Extra header names passed to the discovery endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "discovery_headers_values": { + "required": false, + "type": "array", + "description": "Extra header values passed to the discovery endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "extra_jwks_uris": { + "required": false, + "type": "set", + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "rediscovery_lifetime": { + "required": false, + "type": "number", + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "default": 30 + } + }, + { + "auth_methods": { + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "type": "string" + }, + "type": "array", + "default": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "required": false, + "description": "Types of credentials/grants to enable." + } + }, + { + "client_id": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "required": false, + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.", + "encrypted": true + } + }, + { + "client_secret": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "required": false, + "description": "The client secret.", + "encrypted": true + } + }, + { + "client_auth": { + "required": false, + "type": "array", + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "elements": { + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ], + "type": "string" + } + } + }, + { + "client_jwk": { + "required": false, + "type": "array", + "description": "The JWK used for the private_key_jwt authentication.", + "elements": { + "required": false, + "type": "record", + "fields": [ + { + "issuer": { + "required": false, + "type": "string" + } + }, + { + "kty": { + "required": false, + "type": "string" + } + }, + { + "use": { + "required": false, + "type": "string" + } + }, + { + "key_ops": { + "required": false, + "type": "array", + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "alg": { + "required": false, + "type": "string" + } + }, + { + "kid": { + "required": false, + "type": "string" + } + }, + { + "x5u": { + "required": false, + "type": "string" + } + }, + { + "x5c": { + "required": false, + "type": "array", + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "x5t": { + "required": false, + "type": "string" + } + }, + { + "x5t#S256": { + "required": false, + "type": "string" + } + }, + { + "k": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "x": { + "required": false, + "type": "string" + } + }, + { + "y": { + "required": false, + "type": "string" + } + }, + { + "crv": { + "required": false, + "type": "string" + } + }, + { + "n": { + "required": false, + "type": "string" + } + }, + { + "e": { + "required": false, + "type": "string" + } + }, + { + "d": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "p": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "q": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "dp": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "dq": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "qi": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "oth": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "r": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "t": { + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + } + ] + } + } + }, + { + "client_alg": { + "required": false, + "type": "array", + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "elements": { + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ], + "type": "string" + } + } + }, + { + "client_arg": { + "required": false, + "type": "string", + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "default": "client_id" + } + }, + { + "redirect_uri": { + "required": false, + "type": "array", + "description": "The redirect URI passed to the authorization and token endpoints.", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "login_redirect_uri": { + "required": false, + "type": "array", + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "elements": { + "referenceable": true, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + } + }, + { + "logout_redirect_uri": { + "required": false, + "type": "array", + "description": "Where to redirect the client after the logout.", + "elements": { + "referenceable": true, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + } + }, + { + "forbidden_redirect_uri": { + "required": false, + "type": "array", + "description": "Where to redirect the client on forbidden requests.", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "forbidden_error_message": { + "required": false, + "type": "string", + "description": "The error message for the forbidden requests (when not using the redirection).", + "default": "Forbidden" + } + }, + { + "forbidden_destroy_session": { + "required": false, + "type": "boolean", + "description": "Destroy any active session for the forbidden requests.", + "default": true + } + }, + { + "unauthorized_destroy_session": { + "required": false, + "type": "boolean", + "description": "Destroy any active session for the unauthorized requests.", + "default": true + } + }, + { + "unauthorized_redirect_uri": { + "required": false, + "type": "array", + "description": "Where to redirect the client on unauthorized requests.", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "unauthorized_error_message": { + "required": false, + "type": "string", + "description": "The error message for the unauthorized requests (when not using the redirection).", + "default": "Unauthorized" + } + }, + { + "unexpected_redirect_uri": { + "required": false, + "type": "array", + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "response_mode": { + "type": "string", + "default": "query", + "required": false, + "description": "The response mode passed to the authorization endpoint: - `query`: Instructs the identity provider to pass parameters in query string - `form_post`: Instructs the identity provider to pass parameters in request body - `fragment`: Instructs the identity provider to pass parameters in uri fragment (rarely useful as the plugin itself cannot read it).", + "one_of": [ + "query", + "form_post", + "fragment" + ] + } + }, + { + "response_type": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "code" + ], + "required": false, + "description": "The response type passed to the authorization endpoint." + } + }, + { + "scopes": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "default": [ + "openid" + ], + "required": false, + "description": "The scopes passed to the authorization and token endpoints." + } + }, + { + "audience": { + "required": false, + "type": "array", + "description": "The audience passed to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "issuers_allowed": { + "required": false, + "type": "array", + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "elements": { + "type": "string" + } + } + }, + { + "scopes_required": { + "required": false, + "type": "array", + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "scopes_claim": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "scope" + ], + "required": false, + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload." + } + }, + { + "audience_required": { + "required": false, + "type": "array", + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "audience_claim": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "aud" + ], + "required": false, + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload." + } + }, + { + "groups_required": { + "required": false, + "type": "array", + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "groups_claim": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "groups" + ], + "required": false, + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload." + } + }, + { + "roles_required": { + "required": false, + "type": "array", + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "elements": { + "type": "string" + } + } + }, + { + "roles_claim": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "roles" + ], + "required": false, + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload." + } + }, + { + "domains": { + "required": false, + "type": "array", + "description": "The allowed values for the `hd` claim.", + "elements": { + "type": "string" + } + } + }, + { + "max_age": { + "required": false, + "type": "number", + "description": "The maximum age (in seconds) compared to the `auth_time` claim." + } + }, + { + "authenticated_groups_claim": { + "required": false, + "type": "array", + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "pushed_authorization_request_endpoint": { + "required": false, + "type": "string", + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint." + } + }, + { + "pushed_authorization_request_endpoint_auth_method": { + "required": false, + "type": "string", + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "require_pushed_authorization_requests": { + "required": false, + "type": "boolean", + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`)." + } + }, + { + "require_proof_key_for_code_exchange": { + "required": false, + "type": "boolean", + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled)." + } + }, + { + "authorization_endpoint": { + "required": false, + "type": "string", + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint." + } + }, + { + "authorization_query_args_names": { + "required": false, + "type": "array", + "description": "Extra query argument names passed to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "authorization_query_args_values": { + "required": false, + "type": "array", + "description": "Extra query argument values passed to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "authorization_query_args_client": { + "required": false, + "type": "array", + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "authorization_rolling_timeout": { + "required": false, + "type": "number", + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "default": 600 + } + }, + { + "authorization_cookie_name": { + "required": false, + "type": "string", + "description": "The authorization cookie name.", + "default": "authorization" + } + }, + { + "authorization_cookie_path": { + "type": "string", + "default": "/", + "starts_with": "/", + "required": false, + "description": "The authorization cookie Path flag.", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + }, + { + "authorization_cookie_domain": { + "required": false, + "type": "string", + "description": "The authorization cookie Domain flag." + } + }, + { + "authorization_cookie_same_site": { + "type": "string", + "default": "Default", + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "authorization_cookie_http_only": { + "required": false, + "type": "boolean", + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "default": true + } + }, + { + "authorization_cookie_secure": { + "required": false, + "type": "boolean", + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks." + } + }, + { + "preserve_query_args": { + "required": false, + "type": "boolean", + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "default": false + } + }, + { + "token_endpoint": { + "required": false, + "type": "string", + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint." + } + }, + { + "token_endpoint_auth_method": { + "required": false, + "type": "string", + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "token_headers_names": { + "required": false, + "type": "array", + "description": "Extra header names passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_values": { + "required": false, + "type": "array", + "description": "Extra header values passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_client": { + "required": false, + "type": "array", + "description": "Extra headers passed from the client to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_replay": { + "required": false, + "type": "array", + "description": "The names of token endpoint response headers to forward to the downstream client.", + "elements": { + "type": "string" + } + } + }, + { + "token_headers_prefix": { + "required": false, + "type": "string", + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client." + } + }, + { + "token_headers_grants": { + "required": false, + "type": "array", + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token" + ], + "type": "string" + } + } + }, + { + "token_post_args_names": { + "required": false, + "type": "array", + "description": "Extra post argument names passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_post_args_values": { + "required": false, + "type": "array", + "description": "Extra post argument values passed to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_post_args_client": { + "required": false, + "type": "array", + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Reqest Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_endpoint": { + "required": false, + "type": "string", + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint." + } + }, + { + "introspection_endpoint_auth_method": { + "required": false, + "type": "string", + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "introspection_hint": { + "required": false, + "type": "string", + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "default": "access_token" + } + }, + { + "introspection_check_active": { + "required": false, + "type": "boolean", + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "default": true + } + }, + { + "introspection_accept": { + "type": "string", + "default": "application/json", + "required": false, + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "one_of": [ + "application/json", + "application/token-introspection+jwt", + "application/jwt" + ] + } + }, + { + "introspection_headers_names": { + "required": false, + "type": "array", + "description": "Extra header names passed to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_headers_values": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "required": false, + "description": "Extra header values passed to the introspection endpoint.", + "encrypted": true + } + }, + { + "introspection_headers_client": { + "required": false, + "type": "array", + "description": "Extra headers passed from the client to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_names": { + "required": false, + "type": "array", + "description": "Extra post argument names passed to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_values": { + "required": false, + "type": "array", + "description": "Extra post argument values passed to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_client": { + "required": false, + "type": "array", + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "introspect_jwt_tokens": { + "required": false, + "type": "boolean", + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "default": false + } + }, + { + "revocation_endpoint": { + "required": false, + "type": "string", + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint." + } + }, + { + "revocation_endpoint_auth_method": { + "required": false, + "type": "string", + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "end_session_endpoint": { + "required": false, + "type": "string", + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint." + } + }, + { + "userinfo_endpoint": { + "required": false, + "type": "string", + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint." + } + }, + { + "userinfo_accept": { + "type": "string", + "default": "application/json", + "required": false, + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "one_of": [ + "application/json", + "application/jwt" + ] + } + }, + { + "userinfo_headers_names": { + "required": false, + "type": "array", + "description": "Extra header names passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_headers_values": { + "required": false, + "type": "array", + "description": "Extra header values passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_headers_client": { + "required": false, + "type": "array", + "description": "Extra headers passed from the client to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_names": { + "required": false, + "type": "array", + "description": "Extra query argument names passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_values": { + "required": false, + "type": "array", + "description": "Extra query argument values passed to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_client": { + "required": false, + "type": "array", + "description": "Extra query arguments passed from the client to the user info endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "token_exchange_endpoint": { + "required": false, + "type": "string", + "description": "The token exchange endpoint." + } + }, + { + "session_secret": { + "referenceable": true, + "type": "string", + "required": false, + "description": "The session secret.", + "encrypted": true + } + }, + { + "session_audience": { + "required": false, + "type": "string", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "default": "default" + } + }, + { + "session_cookie_name": { + "required": false, + "type": "string", + "description": "The session cookie name.", + "default": "session" + } + }, + { + "session_remember": { + "required": false, + "type": "boolean", + "description": "Enables or disables persistent sessions.", + "default": false + } + }, + { + "session_remember_cookie_name": { + "required": false, + "type": "string", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "default": "remember" + } + }, + { + "session_remember_rolling_timeout": { + "required": false, + "type": "number", + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "default": 604800 + } + }, + { + "session_remember_absolute_timeout": { + "required": false, + "type": "number", + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "default": 2592000 + } + }, + { + "session_idling_timeout": { + "required": false, + "type": "number", + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "default": 900 + } + }, + { + "session_rolling_timeout": { + "required": false, + "type": "number", + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "default": 3600 + } + }, + { + "session_absolute_timeout": { + "required": false, + "type": "number", + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "default": 86400 + } + }, + { + "session_cookie_path": { + "type": "string", + "default": "/", + "starts_with": "/", + "required": false, + "description": "The session cookie Path flag.", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + }, + { + "session_cookie_domain": { + "required": false, + "type": "string", + "description": "The session cookie Domain flag." + } + }, + { + "session_cookie_same_site": { + "type": "string", + "default": "Lax", + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "session_cookie_http_only": { + "required": false, + "type": "boolean", + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "default": true + } + }, + { + "session_cookie_secure": { + "required": false, + "type": "boolean", + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks." + } + }, + { + "session_request_headers": { + "required": false, + "type": "set", + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "elements": { + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ], + "type": "string" + } + } + }, + { + "session_response_headers": { + "required": false, + "type": "set", + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "elements": { + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ], + "type": "string" + } + } + }, + { + "session_storage": { + "type": "string", + "default": "cookie", + "required": false, + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ] + } + }, + { + "session_store_metadata": { + "required": false, + "type": "boolean", + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "default": false + } + }, + { + "session_enforce_same_subject": { + "required": false, + "type": "boolean", + "description": "When set to `true`, audiences are forced to share the same subject.", + "default": false + } + }, + { + "session_hash_subject": { + "required": false, + "type": "boolean", + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "default": false + } + }, + { + "session_hash_storage_key": { + "required": false, + "type": "boolean", + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "default": false + } + }, + { + "session_memcached_prefix": { + "required": false, + "type": "string", + "description": "The memcached session key prefix." + } + }, + { + "session_memcached_socket": { + "required": false, + "type": "string", + "description": "The memcached unix socket path." + } + }, + { + "session_memcached_host": { + "required": false, + "type": "string", + "description": "The memcached host.", + "default": "127.0.0.1" + } + }, + { + "session_memcached_port": { + "type": "integer", + "default": 11211, + "between": [ + 0, + 65535 + ], + "required": false, + "description": "The memcached port." + } + }, + { + "session_redis_prefix": { + "required": false, + "type": "string", + "description": "The Redis session key prefix." + } + }, + { + "session_redis_socket": { + "required": false, + "type": "string", + "description": "The Redis unix socket path." + } + }, + { + "session_redis_host": { + "required": false, + "type": "string", + "description": "The Redis host.", + "default": "127.0.0.1" + } + }, + { + "session_redis_port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "required": false, + "description": "The Redis port." + } + }, + { + "session_redis_username": { + "referenceable": true, + "type": "string", + "description": "Username to use for Redis connection when the `redis` session storage is defined and ACL authentication is desired. If undefined, ACL authentication will not be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "required": false + } + }, + { + "session_redis_password": { + "referenceable": true, + "type": "string", + "required": false, + "description": "Password to use for Redis connection when the `redis` session storage is defined. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true + } + }, + { + "session_redis_connect_timeout": { + "required": false, + "type": "integer", + "description": "Session redis connection timeout in milliseconds." + } + }, + { + "session_redis_read_timeout": { + "required": false, + "type": "integer", + "description": "Session redis read timeout in milliseconds." + } + }, + { + "session_redis_send_timeout": { + "required": false, + "type": "integer", + "description": "Session redis send timeout in milliseconds." + } + }, + { + "session_redis_ssl": { + "required": false, + "type": "boolean", + "description": "Use SSL/TLS for Redis connection.", + "default": false + } + }, + { + "session_redis_ssl_verify": { + "required": false, + "type": "boolean", + "description": "Verify identity provider server certificate.", + "default": false + } + }, + { + "session_redis_server_name": { + "required": false, + "type": "string", + "description": "The SNI used for connecting the Redis server." + } + }, + { + "session_redis_cluster_nodes": { + "required": false, + "type": "array", + "description": "The Redis cluster node host. Takes an array of host records, with either `ip` or `host`, and `port` values.", + "elements": { + "fields": [ + { + "ip": { + "required": true, + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + } + ], + "type": "record" + } + } + }, + { + "session_redis_cluster_max_redirections": { + "required": false, + "type": "integer", + "description": "The Redis cluster maximum redirects." + } + }, + { + "reverify": { + "required": false, + "type": "boolean", + "description": "Specifies whether to always verify tokens stored in the session.", + "default": false + } + }, + { + "jwt_session_claim": { + "required": false, + "type": "string", + "description": "The claim to match against the JWT session cookie.", + "default": "sid" + } + }, + { + "jwt_session_cookie": { + "required": false, + "type": "string", + "description": "The name of the JWT session cookie." + } + }, + { + "bearer_token_param_type": { + "elements": { + "one_of": [ + "header", + "cookie", + "query", + "body" + ], + "type": "string" + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "required": false, + "description": "Where to look for the bearer token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`." + } + }, + { + "bearer_token_cookie_name": { + "required": false, + "type": "string", + "description": "The name of the cookie in which the bearer token is passed." + } + }, + { + "client_credentials_param_type": { + "elements": { + "one_of": [ + "header", + "query", + "body" + ], + "type": "string" + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "required": false, + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body." + } + }, + { + "password_param_type": { + "elements": { + "one_of": [ + "header", + "query", + "body" + ], + "type": "string" + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "required": false, + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body." + } + }, + { + "id_token_param_type": { + "elements": { + "one_of": [ + "header", + "query", + "body" + ], + "type": "string" + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "required": false, + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body." + } + }, + { + "id_token_param_name": { + "required": false, + "type": "string", + "description": "The name of the parameter used to pass the id token." + } + }, + { + "refresh_token_param_type": { + "elements": { + "one_of": [ + "header", + "query", + "body" + ], + "type": "string" + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "required": false, + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body." + } + }, + { + "refresh_token_param_name": { + "required": false, + "type": "string", + "description": "The name of the parameter used to pass the refresh token." + } + }, + { + "refresh_tokens": { + "required": false, + "type": "boolean", + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "default": true + } + }, + { + "upstream_headers_claims": { + "required": false, + "type": "array", + "description": "The upstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "upstream_headers_names": { + "required": false, + "type": "array", + "description": "The upstream header names for the claim values.", + "elements": { + "type": "string" + } + } + }, + { + "upstream_access_token_header": { + "required": false, + "type": "string", + "description": "The upstream access token header.", + "default": "authorization:bearer" + } + }, + { + "upstream_access_token_jwk_header": { + "required": false, + "type": "string", + "description": "The upstream access token JWK header." + } + }, + { + "upstream_id_token_header": { + "required": false, + "type": "string", + "description": "The upstream id token header." + } + }, + { + "upstream_id_token_jwk_header": { + "required": false, + "type": "string", + "description": "The upstream id token JWK header." + } + }, + { + "upstream_refresh_token_header": { + "required": false, + "type": "string", + "description": "The upstream refresh token header." + } + }, + { + "upstream_user_info_header": { + "required": false, + "type": "string", + "description": "The upstream user info header." + } + }, + { + "upstream_user_info_jwt_header": { + "required": false, + "type": "string", + "description": "The upstream user info JWT header (in case the user info returns a JWT response)." + } + }, + { + "upstream_introspection_header": { + "required": false, + "type": "string", + "description": "The upstream introspection header." + } + }, + { + "upstream_introspection_jwt_header": { + "required": false, + "type": "string", + "description": "The upstream introspection JWT header." + } + }, + { + "upstream_session_id_header": { + "required": false, + "type": "string", + "description": "The upstream session id header." + } + }, + { + "downstream_headers_claims": { + "required": false, + "type": "array", + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "downstream_headers_names": { + "required": false, + "type": "array", + "description": "The downstream header names for the claim values.", + "elements": { + "type": "string" + } + } + }, + { + "downstream_access_token_header": { + "required": false, + "type": "string", + "description": "The downstream access token header." + } + }, + { + "downstream_access_token_jwk_header": { + "required": false, + "type": "string", + "description": "The downstream access token JWK header." + } + }, + { + "downstream_id_token_header": { + "required": false, + "type": "string", + "description": "The downstream id token header." + } + }, + { + "downstream_id_token_jwk_header": { + "required": false, + "type": "string", + "description": "The downstream id token JWK header." + } + }, + { + "downstream_refresh_token_header": { + "required": false, + "type": "string", + "description": "The downstream refresh token header." + } + }, + { + "downstream_user_info_header": { + "required": false, + "type": "string", + "description": "The downstream user info header." + } + }, + { + "downstream_user_info_jwt_header": { + "required": false, + "type": "string", + "description": "The downstream user info JWT header (in case the user info returns a JWT response)." + } + }, + { + "downstream_introspection_header": { + "required": false, + "type": "string", + "description": "The downstream introspection header." + } + }, + { + "downstream_introspection_jwt_header": { + "required": false, + "type": "string", + "description": "The downstream introspection JWT header." + } + }, + { + "downstream_session_id_header": { + "required": false, + "type": "string", + "description": "The downstream session id header." + } + }, + { + "login_methods": { + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "type": "string" + }, + "type": "array", + "default": [ + "authorization_code" + ], + "required": false, + "description": "Enable login functionality with specified grants." + } + }, + { + "login_action": { + "type": "string", + "default": "upstream", + "required": false, + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "one_of": [ + "upstream", + "response", + "redirect" + ] + } + }, + { + "login_tokens": { + "elements": { + "one_of": [ + "id_token", + "access_token", + "refresh_token", + "tokens", + "introspection" + ], + "type": "string" + }, + "type": "array", + "default": [ + "id_token" + ], + "required": false, + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response." + } + }, + { + "login_redirect_mode": { + "type": "string", + "default": "fragment", + "required": false, + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "one_of": [ + "query", + "fragment" + ] + } + }, + { + "logout_query_arg": { + "required": false, + "type": "string", + "description": "The request query argument that activates the logout." + } + }, + { + "logout_post_arg": { + "required": false, + "type": "string", + "description": "The request body argument that activates the logout." + } + }, + { + "logout_uri_suffix": { + "required": false, + "type": "string", + "description": "The request URI suffix that activates the logout." + } + }, + { + "logout_methods": { + "elements": { + "one_of": [ + "POST", + "GET", + "DELETE" + ], + "type": "string" + }, + "type": "array", + "default": [ + "POST", + "DELETE" + ], + "required": false, + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method." + } + }, + { + "logout_revoke": { + "required": false, + "type": "boolean", + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "default": false + } + }, + { + "logout_revoke_access_token": { + "required": false, + "type": "boolean", + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "default": true + } + }, + { + "logout_revoke_refresh_token": { + "required": false, + "type": "boolean", + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "default": true + } + }, + { + "consumer_claim": { + "required": false, + "type": "array", + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "consumer_by": { + "elements": { + "one_of": [ + "id", + "username", + "custom_id" + ], + "type": "string" + }, + "type": "array", + "default": [ + "username", + "custom_id" + ], + "required": false, + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`." + } + }, + { + "consumer_optional": { + "required": false, + "type": "boolean", + "description": "Do not terminate the request if consumer mapping fails.", + "default": false + } + }, + { + "credential_claim": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "sub" + ], + "required": false, + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload." + } + }, + { + "anonymous": { + "required": false, + "type": "string", + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "run_on_preflight": { + "required": false, + "type": "boolean", + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "default": true + } + }, + { + "leeway": { + "required": false, + "type": "number", + "description": "Allow some leeway (in seconds) on the iat claim and ttl / expiry verification.", + "default": 0 + } + }, + { + "verify_parameters": { + "required": false, + "type": "boolean", + "description": "Verify plugin configuration against discovery.", + "default": false + } + }, + { + "verify_nonce": { + "required": false, + "type": "boolean", + "description": "Verify nonce on authorization code flow.", + "default": true + } + }, + { + "verify_claims": { + "required": false, + "type": "boolean", + "description": "Verify tokens for standard claims.", + "default": true + } + }, + { + "verify_signature": { + "required": false, + "type": "boolean", + "description": "Verify signature of tokens.", + "default": true + } + }, + { + "ignore_signature": { + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token", + "session", + "introspection", + "userinfo" + ], + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": false, + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication." + } + }, + { + "enable_hs_signatures": { + "required": false, + "type": "boolean", + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "default": false + } + }, + { + "disable_session": { + "required": false, + "type": "array", + "description": "Disable issuing the session cookie with the specified grants.", + "elements": { + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "type": "string" + } + } + }, + { + "cache_ttl": { + "required": false, + "type": "number", + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "default": 3600 + } + }, + { + "cache_ttl_max": { + "required": false, + "type": "number", + "description": "The maximum cache ttl in seconds (enforced)." + } + }, + { + "cache_ttl_min": { + "required": false, + "type": "number", + "description": "The minimum cache ttl in seconds (enforced)." + } + }, + { + "cache_ttl_neg": { + "required": false, + "type": "number", + "description": "The negative cache ttl in seconds." + } + }, + { + "cache_ttl_resurrect": { + "required": false, + "type": "number", + "description": "The resurrection ttl in seconds." + } + }, + { + "cache_tokens": { + "required": false, + "type": "boolean", + "description": "Cache the token endpoint requests.", + "default": true + } + }, + { + "cache_tokens_salt": { + "auto": true, + "type": "string", + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "required": false + } + }, + { + "cache_introspection": { + "required": false, + "type": "boolean", + "description": "Cache the introspection endpoint requests.", + "default": true + } + }, + { + "cache_token_exchange": { + "required": false, + "type": "boolean", + "description": "Cache the token exchange endpoint requests.", + "default": true + } + }, + { + "cache_user_info": { + "required": false, + "type": "boolean", + "description": "Cache the user info requests.", + "default": true + } + }, + { + "search_user_info": { + "required": false, + "type": "boolean", + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "default": false + } + }, + { + "hide_credentials": { + "required": false, + "type": "boolean", + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "default": false + } + }, + { + "http_version": { + "required": false, + "type": "number", + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0." + } + }, + { + "http_proxy": { + "required": false, + "type": "string", + "description": "The HTTP proxy." + } + }, + { + "http_proxy_authorization": { + "required": false, + "type": "string", + "description": "The HTTP proxy authorization." + } + }, + { + "https_proxy": { + "required": false, + "type": "string", + "description": "The HTTPS proxy." + } + }, + { + "https_proxy_authorization": { + "required": false, + "type": "string", + "description": "The HTTPS proxy authorization." + } + }, + { + "no_proxy": { + "required": false, + "type": "string", + "description": "Do not use proxy with these hosts." + } + }, + { + "keepalive": { + "required": false, + "type": "boolean", + "description": "Use keepalive with the HTTP client.", + "default": true + } + }, + { + "ssl_verify": { + "required": false, + "type": "boolean", + "description": "Verify identity provider server certificate.", + "default": false + } + }, + { + "timeout": { + "required": false, + "type": "number", + "description": "Network IO timeout in milliseconds.", + "default": 10000 + } + }, + { + "display_errors": { + "required": false, + "type": "boolean", + "description": "Display errors on failure responses.", + "default": false + } + }, + { + "by_username_ignore_case": { + "required": false, + "type": "boolean", + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "default": false + } + }, + { + "resolve_distributed_claims": { + "required": false, + "type": "boolean", + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "default": false + } + }, + { + "expose_error_code": { + "type": "boolean", + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "default": true + } + }, + { + "token_cache_key_include_scope": { + "type": "boolean", + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "default": false + } + }, + { + "introspection_token_param_name": { + "required": false, + "type": "string", + "description": "Designate token's parameter name for introspection.", + "default": "token" + } + }, + { + "revocation_token_param_name": { + "required": false, + "type": "string", + "description": "Designate token's parameter name for revocation.", + "default": "token" + } + }, + { + "proof_of_possession_mtls": { + "type": "string", + "default": "off", + "required": false, + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "one_of": [ + "off", + "strict", + "optional" + ] + } + }, + { + "proof_of_possession_auth_methods_validation": { + "required": false, + "type": "boolean", + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "default": true + } + }, + { + "tls_client_auth_cert_id": { + "type": "string", + "uuid": true, + "auto": false, + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "required": false + } + }, + { + "tls_client_auth_ssl_verify": { + "required": false, + "type": "boolean", + "description": "Verify identity provider server certificate during mTLS client authentication.", + "default": true + } + }, + { + "mtls_token_endpoint": { + "required": false, + "type": "string", + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint." + } + }, + { + "mtls_introspection_endpoint": { + "required": false, + "type": "string", + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint." + } + }, + { + "mtls_revocation_endpoint": { + "required": false, + "type": "string", + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint." + } + } + ], + "shorthand_fields": [ + { + "authorization_cookie_lifetime": { + "type": "number" + } + }, + { + "authorization_cookie_samesite": { + "type": "string" + } + }, + { + "authorization_cookie_httponly": { + "type": "boolean" + } + }, + { + "session_cookie_lifetime": { + "type": "number" + } + }, + { + "session_cookie_idletime": { + "type": "number" + } + }, + { + "session_cookie_samesite": { + "type": "string" + } + }, + { + "session_cookie_httponly": { + "type": "boolean" + } + }, + { + "session_memcache_prefix": { + "type": "string" + } + }, + { + "session_memcache_socket": { + "type": "string" + } + }, + { + "session_memcache_host": { + "type": "string" + } + }, + { + "session_memcache_port": { + "type": "integer" + } + }, + { + "session_redis_cluster_maxredirections": { + "type": "integer" + } + }, + { + "session_cookie_renew": { + "type": "number" + } + }, + { + "session_cookie_maxsize": { + "type": "integer" + } + }, + { + "session_strategy": { + "type": "string" + } + }, + { + "session_compressor": { + "type": "string" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/openid-connect/3.7.x.json b/schemas/openid-connect/3.7.x.json new file mode 100644 index 00000000..d9870d72 --- /dev/null +++ b/schemas/openid-connect/3.7.x.json @@ -0,0 +1,2652 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "issuer": { + "required": true, + "type": "string", + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`." + } + }, + { + "using_pseudo_issuer": { + "required": false, + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "type": "boolean", + "default": false + } + }, + { + "discovery_headers_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra header names passed to the discovery endpoint.", + "type": "array" + } + }, + { + "discovery_headers_values": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra header values passed to the discovery endpoint.", + "type": "array" + } + }, + { + "extra_jwks_uris": { + "required": false, + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "type": "set" + } + }, + { + "rediscovery_lifetime": { + "required": false, + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "type": "number", + "default": 30 + } + }, + { + "auth_methods": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "description": "Types of credentials/grants to enable.", + "default": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + } + }, + { + "client_id": { + "encrypted": true, + "required": false, + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.", + "type": "array" + } + }, + { + "client_secret": { + "encrypted": true, + "required": false, + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "The client secret.", + "type": "array" + } + }, + { + "client_auth": { + "required": false, + "elements": { + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + }, + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "type": "array" + } + }, + { + "client_jwk": { + "required": false, + "elements": { + "required": false, + "type": "record", + "fields": [ + { + "issuer": { + "type": "string", + "required": false + } + }, + { + "kty": { + "type": "string", + "required": false + } + }, + { + "use": { + "type": "string", + "required": false + } + }, + { + "key_ops": { + "required": false, + "elements": { + "type": "string", + "required": false + }, + "type": "array" + } + }, + { + "alg": { + "type": "string", + "required": false + } + }, + { + "kid": { + "type": "string", + "required": false + } + }, + { + "x5u": { + "type": "string", + "required": false + } + }, + { + "x5c": { + "required": false, + "elements": { + "type": "string", + "required": false + }, + "type": "array" + } + }, + { + "x5t": { + "type": "string", + "required": false + } + }, + { + "x5t#S256": { + "type": "string", + "required": false + } + }, + { + "k": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "x": { + "type": "string", + "required": false + } + }, + { + "y": { + "type": "string", + "required": false + } + }, + { + "crv": { + "type": "string", + "required": false + } + }, + { + "n": { + "type": "string", + "required": false + } + }, + { + "e": { + "type": "string", + "required": false + } + }, + { + "d": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "p": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "q": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "dp": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "dq": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "qi": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "oth": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "r": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "t": { + "required": false, + "encrypted": true, + "type": "string", + "referenceable": true + } + } + ] + }, + "description": "The JWK used for the private_key_jwt authentication.", + "type": "array" + } + }, + { + "client_alg": { + "required": false, + "elements": { + "type": "string", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ] + }, + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "type": "array" + } + }, + { + "client_arg": { + "required": false, + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "type": "string", + "default": "client_id" + } + }, + { + "redirect_uri": { + "required": false, + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "The redirect URI passed to the authorization and token endpoints.", + "type": "array" + } + }, + { + "login_redirect_uri": { + "required": false, + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "referenceable": true + }, + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "type": "array" + } + }, + { + "logout_redirect_uri": { + "required": false, + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "referenceable": true + }, + "description": "Where to redirect the client after the logout.", + "type": "array" + } + }, + { + "forbidden_redirect_uri": { + "required": false, + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "Where to redirect the client on forbidden requests.", + "type": "array" + } + }, + { + "forbidden_error_message": { + "required": false, + "description": "The error message for the forbidden requests (when not using the redirection).", + "type": "string", + "default": "Forbidden" + } + }, + { + "forbidden_destroy_session": { + "required": false, + "description": "Destroy any active session for the forbidden requests.", + "type": "boolean", + "default": true + } + }, + { + "unauthorized_destroy_session": { + "required": false, + "description": "Destroy any active session for the unauthorized requests.", + "type": "boolean", + "default": true + } + }, + { + "unauthorized_redirect_uri": { + "required": false, + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "Where to redirect the client on unauthorized requests.", + "type": "array" + } + }, + { + "unauthorized_error_message": { + "required": false, + "description": "The error message for the unauthorized requests (when not using the redirection).", + "type": "string", + "default": "Unauthorized" + } + }, + { + "unexpected_redirect_uri": { + "required": false, + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "type": "array" + } + }, + { + "response_mode": { + "default": "query", + "required": false, + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "type": "string", + "one_of": [ + "query", + "form_post", + "fragment", + "query.jwt", + "form_post.jwt", + "fragment.jwt", + "jwt" + ] + } + }, + { + "response_type": { + "type": "array", + "required": false, + "elements": { + "type": "string" + }, + "description": "The response type passed to the authorization endpoint.", + "default": [ + "code" + ] + } + }, + { + "scopes": { + "type": "array", + "required": false, + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "The scopes passed to the authorization and token endpoints.", + "default": [ + "openid" + ] + } + }, + { + "audience": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The audience passed to the authorization endpoint.", + "type": "array" + } + }, + { + "issuers_allowed": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "type": "array" + } + }, + { + "scopes_required": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array" + } + }, + { + "scopes_claim": { + "type": "array", + "required": false, + "elements": { + "type": "string" + }, + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "scope" + ] + } + }, + { + "audience_required": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array" + } + }, + { + "audience_claim": { + "type": "array", + "required": false, + "elements": { + "type": "string" + }, + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "aud" + ] + } + }, + { + "groups_required": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array" + } + }, + { + "groups_claim": { + "type": "array", + "required": false, + "elements": { + "type": "string" + }, + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "groups" + ] + } + }, + { + "roles_required": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array" + } + }, + { + "roles_claim": { + "type": "array", + "required": false, + "elements": { + "type": "string" + }, + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "roles" + ] + } + }, + { + "domains": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The allowed values for the `hd` claim.", + "type": "array" + } + }, + { + "max_age": { + "required": false, + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number" + } + }, + { + "authenticated_groups_claim": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array" + } + }, + { + "pushed_authorization_request_endpoint": { + "required": false, + "type": "string", + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint." + } + }, + { + "pushed_authorization_request_endpoint_auth_method": { + "required": false, + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "require_pushed_authorization_requests": { + "required": false, + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean" + } + }, + { + "require_proof_key_for_code_exchange": { + "required": false, + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean" + } + }, + { + "require_signed_request_object": { + "required": false, + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean" + } + }, + { + "authorization_endpoint": { + "required": false, + "type": "string", + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint." + } + }, + { + "authorization_query_args_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra query argument names passed to the authorization endpoint.", + "type": "array" + } + }, + { + "authorization_query_args_values": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra query argument values passed to the authorization endpoint.", + "type": "array" + } + }, + { + "authorization_query_args_client": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "type": "array" + } + }, + { + "authorization_rolling_timeout": { + "required": false, + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number", + "default": 600 + } + }, + { + "authorization_cookie_name": { + "required": false, + "description": "The authorization cookie name.", + "type": "string", + "default": "authorization" + } + }, + { + "authorization_cookie_path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "description": "The authorization cookie Path flag.", + "required": false, + "type": "string", + "starts_with": "/", + "default": "/" + } + }, + { + "authorization_cookie_domain": { + "required": false, + "description": "The authorization cookie Domain flag.", + "type": "string" + } + }, + { + "authorization_cookie_same_site": { + "default": "Default", + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "type": "string", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "authorization_cookie_http_only": { + "required": false, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean", + "default": true + } + }, + { + "authorization_cookie_secure": { + "required": false, + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + } + }, + { + "preserve_query_args": { + "required": false, + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "type": "boolean", + "default": false + } + }, + { + "token_endpoint": { + "required": false, + "type": "string", + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint." + } + }, + { + "token_endpoint_auth_method": { + "required": false, + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "token_headers_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra header names passed to the token endpoint.", + "type": "array" + } + }, + { + "token_headers_values": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra header values passed to the token endpoint.", + "type": "array" + } + }, + { + "token_headers_client": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra headers passed from the client to the token endpoint.", + "type": "array" + } + }, + { + "token_headers_replay": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The names of token endpoint response headers to forward to the downstream client.", + "type": "array" + } + }, + { + "token_headers_prefix": { + "required": false, + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string" + } + }, + { + "token_headers_grants": { + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token" + ] + }, + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "type": "array" + } + }, + { + "token_post_args_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra post argument names passed to the token endpoint.", + "type": "array" + } + }, + { + "token_post_args_values": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra post argument values passed to the token endpoint.", + "type": "array" + } + }, + { + "token_post_args_client": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "type": "array" + } + }, + { + "introspection_endpoint": { + "required": false, + "type": "string", + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint." + } + }, + { + "introspection_endpoint_auth_method": { + "required": false, + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "introspection_hint": { + "required": false, + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "type": "string", + "default": "access_token" + } + }, + { + "introspection_check_active": { + "required": false, + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "type": "boolean", + "default": true + } + }, + { + "introspection_accept": { + "default": "application/json", + "required": false, + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "type": "string", + "one_of": [ + "application/json", + "application/token-introspection+jwt", + "application/jwt" + ] + } + }, + { + "introspection_headers_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra header names passed to the introspection endpoint.", + "type": "array" + } + }, + { + "introspection_headers_values": { + "encrypted": true, + "required": false, + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "Extra header values passed to the introspection endpoint.", + "type": "array" + } + }, + { + "introspection_headers_client": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra headers passed from the client to the introspection endpoint.", + "type": "array" + } + }, + { + "introspection_post_args_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra post argument names passed to the introspection endpoint.", + "type": "array" + } + }, + { + "introspection_post_args_values": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra post argument values passed to the introspection endpoint.", + "type": "array" + } + }, + { + "introspection_post_args_client": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "type": "array" + } + }, + { + "introspect_jwt_tokens": { + "required": false, + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "type": "boolean", + "default": false + } + }, + { + "revocation_endpoint": { + "required": false, + "type": "string", + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint." + } + }, + { + "revocation_endpoint_auth_method": { + "required": false, + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "end_session_endpoint": { + "required": false, + "type": "string", + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint." + } + }, + { + "userinfo_endpoint": { + "required": false, + "type": "string", + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint." + } + }, + { + "userinfo_accept": { + "default": "application/json", + "required": false, + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "type": "string", + "one_of": [ + "application/json", + "application/jwt" + ] + } + }, + { + "userinfo_headers_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra header names passed to the user info endpoint.", + "type": "array" + } + }, + { + "userinfo_headers_values": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra header values passed to the user info endpoint.", + "type": "array" + } + }, + { + "userinfo_headers_client": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra headers passed from the client to the user info endpoint.", + "type": "array" + } + }, + { + "userinfo_query_args_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra query argument names passed to the user info endpoint.", + "type": "array" + } + }, + { + "userinfo_query_args_values": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra query argument values passed to the user info endpoint.", + "type": "array" + } + }, + { + "userinfo_query_args_client": { + "required": false, + "elements": { + "type": "string" + }, + "description": "Extra query arguments passed from the client to the user info endpoint.", + "type": "array" + } + }, + { + "token_exchange_endpoint": { + "required": false, + "type": "string", + "description": "The token exchange endpoint." + } + }, + { + "session_secret": { + "encrypted": true, + "referenceable": true, + "required": false, + "description": "The session secret.", + "type": "string" + } + }, + { + "session_audience": { + "required": false, + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string", + "default": "default" + } + }, + { + "session_cookie_name": { + "required": false, + "description": "The session cookie name.", + "type": "string", + "default": "session" + } + }, + { + "session_remember": { + "required": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean", + "default": false + } + }, + { + "session_remember_cookie_name": { + "required": false, + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string", + "default": "remember" + } + }, + { + "session_remember_rolling_timeout": { + "required": false, + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "type": "number", + "default": 604800 + } + }, + { + "session_remember_absolute_timeout": { + "required": false, + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number", + "default": 2592000 + } + }, + { + "session_idling_timeout": { + "required": false, + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "type": "number", + "default": 900 + } + }, + { + "session_rolling_timeout": { + "required": false, + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number", + "default": 3600 + } + }, + { + "session_absolute_timeout": { + "required": false, + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number", + "default": 86400 + } + }, + { + "session_cookie_path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "description": "The session cookie Path flag.", + "required": false, + "type": "string", + "starts_with": "/", + "default": "/" + } + }, + { + "session_cookie_domain": { + "required": false, + "description": "The session cookie Domain flag.", + "type": "string" + } + }, + { + "session_cookie_same_site": { + "default": "Lax", + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "type": "string", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "session_cookie_http_only": { + "required": false, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean", + "default": true + } + }, + { + "session_cookie_secure": { + "required": false, + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + } + }, + { + "session_request_headers": { + "required": false, + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "type": "set" + } + }, + { + "session_response_headers": { + "required": false, + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "type": "set" + } + }, + { + "session_storage": { + "default": "cookie", + "required": false, + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "type": "string", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ] + } + }, + { + "session_store_metadata": { + "required": false, + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "type": "boolean", + "default": false + } + }, + { + "session_enforce_same_subject": { + "required": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean", + "default": false + } + }, + { + "session_hash_subject": { + "required": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean", + "default": false + } + }, + { + "session_hash_storage_key": { + "required": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean", + "default": false + } + }, + { + "session_memcached_prefix": { + "required": false, + "description": "The memcached session key prefix.", + "type": "string" + } + }, + { + "session_memcached_socket": { + "required": false, + "description": "The memcached unix socket path.", + "type": "string" + } + }, + { + "session_memcached_host": { + "required": false, + "description": "The memcached host.", + "type": "string", + "default": "127.0.0.1" + } + }, + { + "session_memcached_port": { + "default": 11211, + "required": false, + "description": "The memcached port.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "session_redis_prefix": { + "required": false, + "description": "The Redis session key prefix.", + "type": "string" + } + }, + { + "session_redis_socket": { + "required": false, + "description": "The Redis unix socket path.", + "type": "string" + } + }, + { + "session_redis_host": { + "required": false, + "description": "The Redis host.", + "type": "string", + "default": "127.0.0.1" + } + }, + { + "session_redis_port": { + "default": 6379, + "required": false, + "description": "The Redis port.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "session_redis_username": { + "required": false, + "description": "Username to use for Redis connection when the `redis` session storage is defined and ACL authentication is desired. If undefined, ACL authentication will not be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "session_redis_password": { + "encrypted": true, + "referenceable": true, + "required": false, + "description": "Password to use for Redis connection when the `redis` session storage is defined. If undefined, no AUTH commands are sent to Redis.", + "type": "string" + } + }, + { + "session_redis_connect_timeout": { + "required": false, + "description": "Session redis connection timeout in milliseconds.", + "type": "integer" + } + }, + { + "session_redis_read_timeout": { + "required": false, + "description": "Session redis read timeout in milliseconds.", + "type": "integer" + } + }, + { + "session_redis_send_timeout": { + "required": false, + "description": "Session redis send timeout in milliseconds.", + "type": "integer" + } + }, + { + "session_redis_ssl": { + "required": false, + "description": "Use SSL/TLS for Redis connection.", + "type": "boolean", + "default": false + } + }, + { + "session_redis_ssl_verify": { + "required": false, + "description": "Verify identity provider server certificate.", + "type": "boolean", + "default": false + } + }, + { + "session_redis_server_name": { + "required": false, + "description": "The SNI used for connecting the Redis server.", + "type": "string" + } + }, + { + "session_redis_cluster_nodes": { + "required": false, + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "required": true, + "type": "string", + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + } + ] + }, + "description": "The Redis cluster node host. Takes an array of host records, with either `ip` or `host`, and `port` values.", + "type": "array" + } + }, + { + "session_redis_cluster_max_redirections": { + "required": false, + "description": "The Redis cluster maximum redirects.", + "type": "integer" + } + }, + { + "reverify": { + "required": false, + "description": "Specifies whether to always verify tokens stored in the session.", + "type": "boolean", + "default": false + } + }, + { + "jwt_session_claim": { + "required": false, + "description": "The claim to match against the JWT session cookie.", + "type": "string", + "default": "sid" + } + }, + { + "jwt_session_cookie": { + "required": false, + "description": "The name of the JWT session cookie.", + "type": "string" + } + }, + { + "bearer_token_param_type": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "cookie", + "query", + "body" + ] + }, + "description": "Where to look for the bearer token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "bearer_token_cookie_name": { + "required": false, + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string" + } + }, + { + "client_credentials_param_type": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "password_param_type": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "id_token_param_type": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "id_token_param_name": { + "required": false, + "description": "The name of the parameter used to pass the id token.", + "type": "string" + } + }, + { + "refresh_token_param_type": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "refresh_token_param_name": { + "required": false, + "description": "The name of the parameter used to pass the refresh token.", + "type": "string" + } + }, + { + "refresh_tokens": { + "required": false, + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "type": "boolean", + "default": true + } + }, + { + "upstream_headers_claims": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The upstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array" + } + }, + { + "upstream_headers_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The upstream header names for the claim values.", + "type": "array" + } + }, + { + "upstream_access_token_header": { + "required": false, + "description": "The upstream access token header.", + "type": "string", + "default": "authorization:bearer" + } + }, + { + "upstream_access_token_jwk_header": { + "required": false, + "description": "The upstream access token JWK header.", + "type": "string" + } + }, + { + "upstream_id_token_header": { + "required": false, + "description": "The upstream id token header.", + "type": "string" + } + }, + { + "upstream_id_token_jwk_header": { + "required": false, + "description": "The upstream id token JWK header.", + "type": "string" + } + }, + { + "upstream_refresh_token_header": { + "required": false, + "description": "The upstream refresh token header.", + "type": "string" + } + }, + { + "upstream_user_info_header": { + "required": false, + "description": "The upstream user info header.", + "type": "string" + } + }, + { + "upstream_user_info_jwt_header": { + "required": false, + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + } + }, + { + "upstream_introspection_header": { + "required": false, + "description": "The upstream introspection header.", + "type": "string" + } + }, + { + "upstream_introspection_jwt_header": { + "required": false, + "description": "The upstream introspection JWT header.", + "type": "string" + } + }, + { + "upstream_session_id_header": { + "required": false, + "description": "The upstream session id header.", + "type": "string" + } + }, + { + "downstream_headers_claims": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array" + } + }, + { + "downstream_headers_names": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The downstream header names for the claim values.", + "type": "array" + } + }, + { + "downstream_access_token_header": { + "required": false, + "description": "The downstream access token header.", + "type": "string" + } + }, + { + "downstream_access_token_jwk_header": { + "required": false, + "description": "The downstream access token JWK header.", + "type": "string" + } + }, + { + "downstream_id_token_header": { + "required": false, + "description": "The downstream id token header.", + "type": "string" + } + }, + { + "downstream_id_token_jwk_header": { + "required": false, + "description": "The downstream id token JWK header.", + "type": "string" + } + }, + { + "downstream_refresh_token_header": { + "required": false, + "description": "The downstream refresh token header.", + "type": "string" + } + }, + { + "downstream_user_info_header": { + "required": false, + "description": "The downstream user info header.", + "type": "string" + } + }, + { + "downstream_user_info_jwt_header": { + "required": false, + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string" + } + }, + { + "downstream_introspection_header": { + "required": false, + "description": "The downstream introspection header.", + "type": "string" + } + }, + { + "downstream_introspection_jwt_header": { + "required": false, + "description": "The downstream introspection JWT header.", + "type": "string" + } + }, + { + "downstream_session_id_header": { + "required": false, + "description": "The downstream session id header.", + "type": "string" + } + }, + { + "login_methods": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "description": "Enable login functionality with specified grants.", + "default": [ + "authorization_code" + ] + } + }, + { + "login_action": { + "default": "upstream", + "required": false, + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "type": "string", + "one_of": [ + "upstream", + "response", + "redirect" + ] + } + }, + { + "login_tokens": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "id_token", + "access_token", + "refresh_token", + "tokens", + "introspection" + ] + }, + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "default": [ + "id_token" + ] + } + }, + { + "login_redirect_mode": { + "default": "fragment", + "required": false, + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "type": "string", + "one_of": [ + "query", + "fragment" + ] + } + }, + { + "logout_query_arg": { + "required": false, + "description": "The request query argument that activates the logout.", + "type": "string" + } + }, + { + "logout_post_arg": { + "required": false, + "description": "The request body argument that activates the logout.", + "type": "string" + } + }, + { + "logout_uri_suffix": { + "required": false, + "description": "The request URI suffix that activates the logout.", + "type": "string" + } + }, + { + "logout_methods": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "POST", + "GET", + "DELETE" + ] + }, + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "default": [ + "POST", + "DELETE" + ] + } + }, + { + "logout_revoke": { + "required": false, + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "type": "boolean", + "default": false + } + }, + { + "logout_revoke_access_token": { + "required": false, + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean", + "default": true + } + }, + { + "logout_revoke_refresh_token": { + "required": false, + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean", + "default": true + } + }, + { + "consumer_claim": { + "required": false, + "elements": { + "type": "string" + }, + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array" + } + }, + { + "consumer_by": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "consumer_optional": { + "required": false, + "description": "Do not terminate the request if consumer mapping fails.", + "type": "boolean", + "default": false + } + }, + { + "credential_claim": { + "type": "array", + "required": false, + "elements": { + "type": "string" + }, + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "default": [ + "sub" + ] + } + }, + { + "anonymous": { + "required": false, + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "run_on_preflight": { + "required": false, + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "type": "boolean", + "default": true + } + }, + { + "leeway": { + "required": false, + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "type": "number", + "default": 0 + } + }, + { + "verify_parameters": { + "required": false, + "description": "Verify plugin configuration against discovery.", + "type": "boolean", + "default": false + } + }, + { + "verify_nonce": { + "required": false, + "description": "Verify nonce on authorization code flow.", + "type": "boolean", + "default": true + } + }, + { + "verify_claims": { + "required": false, + "description": "Verify tokens for standard claims.", + "type": "boolean", + "default": true + } + }, + { + "verify_signature": { + "required": false, + "description": "Verify signature of tokens.", + "type": "boolean", + "default": true + } + }, + { + "ignore_signature": { + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token", + "session", + "introspection", + "userinfo" + ] + }, + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "default": [ + + ] + } + }, + { + "enable_hs_signatures": { + "required": false, + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "type": "boolean", + "default": false + } + }, + { + "disable_session": { + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "description": "Disable issuing the session cookie with the specified grants.", + "type": "array" + } + }, + { + "cache_ttl": { + "required": false, + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "type": "number", + "default": 3600 + } + }, + { + "cache_ttl_max": { + "required": false, + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number" + } + }, + { + "cache_ttl_min": { + "required": false, + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number" + } + }, + { + "cache_ttl_neg": { + "required": false, + "description": "The negative cache ttl in seconds.", + "type": "number" + } + }, + { + "cache_ttl_resurrect": { + "required": false, + "description": "The resurrection ttl in seconds.", + "type": "number" + } + }, + { + "cache_tokens": { + "required": false, + "description": "Cache the token endpoint requests.", + "type": "boolean", + "default": true + } + }, + { + "cache_tokens_salt": { + "required": false, + "auto": true, + "type": "string", + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests." + } + }, + { + "cache_introspection": { + "required": false, + "description": "Cache the introspection endpoint requests.", + "type": "boolean", + "default": true + } + }, + { + "cache_token_exchange": { + "required": false, + "description": "Cache the token exchange endpoint requests.", + "type": "boolean", + "default": true + } + }, + { + "cache_user_info": { + "required": false, + "description": "Cache the user info requests.", + "type": "boolean", + "default": true + } + }, + { + "search_user_info": { + "required": false, + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "type": "boolean", + "default": false + } + }, + { + "hide_credentials": { + "required": false, + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "type": "boolean", + "default": false + } + }, + { + "http_version": { + "required": false, + "type": "number", + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "default": 1.1 + } + }, + { + "http_proxy": { + "required": false, + "type": "string", + "description": "The HTTP proxy." + } + }, + { + "http_proxy_authorization": { + "required": false, + "description": "The HTTP proxy authorization.", + "type": "string" + } + }, + { + "https_proxy": { + "required": false, + "type": "string", + "description": "The HTTPS proxy." + } + }, + { + "https_proxy_authorization": { + "required": false, + "description": "The HTTPS proxy authorization.", + "type": "string" + } + }, + { + "no_proxy": { + "required": false, + "description": "Do not use proxy with these hosts.", + "type": "string" + } + }, + { + "keepalive": { + "required": false, + "description": "Use keepalive with the HTTP client.", + "type": "boolean", + "default": true + } + }, + { + "ssl_verify": { + "required": false, + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "type": "boolean", + "default": false + } + }, + { + "timeout": { + "required": false, + "description": "Network IO timeout in milliseconds.", + "type": "number", + "default": 10000 + } + }, + { + "display_errors": { + "required": false, + "description": "Display errors on failure responses.", + "type": "boolean", + "default": false + } + }, + { + "by_username_ignore_case": { + "required": false, + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "type": "boolean", + "default": false + } + }, + { + "resolve_distributed_claims": { + "required": false, + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "type": "boolean", + "default": false + } + }, + { + "expose_error_code": { + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "type": "boolean", + "default": true + } + }, + { + "token_cache_key_include_scope": { + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean", + "default": false + } + }, + { + "introspection_token_param_name": { + "required": false, + "description": "Designate token's parameter name for introspection.", + "type": "string", + "default": "token" + } + }, + { + "revocation_token_param_name": { + "required": false, + "description": "Designate token's parameter name for revocation.", + "type": "string", + "default": "token" + } + }, + { + "proof_of_possession_mtls": { + "default": "off", + "required": false, + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "type": "string", + "one_of": [ + "off", + "strict", + "optional" + ] + } + }, + { + "proof_of_possession_auth_methods_validation": { + "required": false, + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "type": "boolean", + "default": true + } + }, + { + "tls_client_auth_cert_id": { + "uuid": true, + "required": false, + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "type": "string", + "auto": false + } + }, + { + "tls_client_auth_ssl_verify": { + "required": false, + "description": "Verify identity provider server certificate during mTLS client authentication.", + "type": "boolean", + "default": true + } + }, + { + "mtls_token_endpoint": { + "required": false, + "type": "string", + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint." + } + }, + { + "mtls_introspection_endpoint": { + "required": false, + "type": "string", + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint." + } + }, + { + "mtls_revocation_endpoint": { + "required": false, + "type": "string", + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint." + } + }, + { + "proof_of_possession_dpop": { + "default": "off", + "required": false, + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "type": "string", + "one_of": [ + "off", + "strict", + "optional" + ] + } + }, + { + "dpop_use_nonce": { + "required": false, + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "type": "boolean", + "default": false + } + }, + { + "dpop_proof_lifetime": { + "required": false, + "type": "number", + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "default": 300 + } + } + ], + "required": true, + "shorthand_fields": [ + { + "authorization_cookie_lifetime": { + "type": "number", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.authorization_cookie_lifetime is deprecated, please use config.authorization_rolling_timeout instead" + } + } + }, + { + "authorization_cookie_samesite": { + "type": "string", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.authorization_cookie_samesite is deprecated, please use config.authorization_cookie_same_site instead" + } + } + }, + { + "authorization_cookie_httponly": { + "type": "boolean", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.authorization_cookie_httponly is deprecated, please use config.authorization_cookie_http_only instead" + } + } + }, + { + "session_cookie_lifetime": { + "type": "number", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_lifetime is deprecated, please use config.session_rolling_timeout instead" + } + } + }, + { + "session_cookie_idletime": { + "type": "number", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_idletime is deprecated, please use config.session_idling_timeout instead" + } + } + }, + { + "session_cookie_samesite": { + "type": "string", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_samesite is deprecated, please use config.session_cookie_same_site instead" + } + } + }, + { + "session_cookie_httponly": { + "type": "boolean", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_httponly is deprecated, please use config.session_cookie_http_only instead" + } + } + }, + { + "session_memcache_prefix": { + "type": "string", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_prefix is deprecated, please use config.session_memcached_prefix instead" + } + } + }, + { + "session_memcache_socket": { + "type": "string", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_socket is deprecated, please use config.session_memcached_socket instead" + } + } + }, + { + "session_memcache_host": { + "type": "string", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_host is deprecated, please use config.session_memcached_host instead" + } + } + }, + { + "session_memcache_port": { + "type": "integer", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_port is deprecated, please use config.session_memcached_port instead" + } + } + }, + { + "session_redis_cluster_maxredirections": { + "type": "integer", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_redis_cluster_maxredirections is deprecated, please use config.session_redis_cluster_max_redirections instead" + } + } + }, + { + "session_cookie_renew": { + "type": "number", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_renew option does not exist anymore" + } + } + }, + { + "session_cookie_maxsize": { + "type": "integer", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_maxsize option does not exist anymore" + } + } + }, + { + "session_strategy": { + "type": "string", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_strategy option does not exist anymore" + } + } + }, + { + "session_compressor": { + "type": "string", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_compressor option does not exist anymore" + } + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/openid-connect/3.8.x.json b/schemas/openid-connect/3.8.x.json new file mode 100644 index 00000000..de68751a --- /dev/null +++ b/schemas/openid-connect/3.8.x.json @@ -0,0 +1,3676 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "required": true, + "type": "string" + } + }, + { + "using_pseudo_issuer": { + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "discovery_headers_names": { + "description": "Extra header names passed to the discovery endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "discovery_headers_values": { + "description": "Extra header values passed to the discovery endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "extra_jwks_uris": { + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "type": "set", + "required": false, + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "rediscovery_lifetime": { + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "type": "number", + "required": false, + "default": 30 + } + }, + { + "auth_methods": { + "description": "Types of credentials/grants to enable.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "type": "array", + "default": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + } + }, + { + "client_id": { + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.", + "required": false, + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "encrypted": true + } + }, + { + "client_secret": { + "description": "The client secret.", + "required": false, + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "encrypted": true + } + }, + { + "client_auth": { + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + } + }, + { + "client_jwk": { + "description": "The JWK used for the private_key_jwt authentication.", + "type": "array", + "required": false, + "elements": { + "fields": [ + { + "issuer": { + "required": false, + "type": "string" + } + }, + { + "kty": { + "required": false, + "type": "string" + } + }, + { + "use": { + "required": false, + "type": "string" + } + }, + { + "key_ops": { + "required": false, + "type": "array", + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "alg": { + "required": false, + "type": "string" + } + }, + { + "kid": { + "required": false, + "type": "string" + } + }, + { + "x5u": { + "required": false, + "type": "string" + } + }, + { + "x5c": { + "required": false, + "type": "array", + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "x5t": { + "required": false, + "type": "string" + } + }, + { + "x5t#S256": { + "required": false, + "type": "string" + } + }, + { + "k": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "x": { + "required": false, + "type": "string" + } + }, + { + "y": { + "required": false, + "type": "string" + } + }, + { + "crv": { + "required": false, + "type": "string" + } + }, + { + "n": { + "required": false, + "type": "string" + } + }, + { + "e": { + "required": false, + "type": "string" + } + }, + { + "d": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "p": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "q": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "dp": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "dq": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "qi": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "oth": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "r": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + }, + { + "t": { + "encrypted": true, + "required": false, + "type": "string", + "referenceable": true + } + } + ], + "type": "record", + "required": false + } + } + }, + { + "client_alg": { + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ] + } + } + }, + { + "client_arg": { + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "type": "string", + "required": false, + "default": "client_id" + } + }, + { + "redirect_uri": { + "description": "The redirect URI passed to the authorization and token endpoints.", + "type": "array", + "required": false, + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "login_redirect_uri": { + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "type": "array", + "required": false, + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string", + "referenceable": true + } + } + }, + { + "logout_redirect_uri": { + "description": "Where to redirect the client after the logout.", + "type": "array", + "required": false, + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string", + "referenceable": true + } + } + }, + { + "forbidden_redirect_uri": { + "description": "Where to redirect the client on forbidden requests.", + "type": "array", + "required": false, + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "forbidden_error_message": { + "description": "The error message for the forbidden requests (when not using the redirection).", + "type": "string", + "required": false, + "default": "Forbidden" + } + }, + { + "forbidden_destroy_session": { + "description": "Destroy any active session for the forbidden requests.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "unauthorized_destroy_session": { + "description": "Destroy any active session for the unauthorized requests.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "unauthorized_redirect_uri": { + "description": "Where to redirect the client on unauthorized requests.", + "type": "array", + "required": false, + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "unauthorized_error_message": { + "description": "The error message for the unauthorized requests (when not using the redirection).", + "type": "string", + "required": false, + "default": "Unauthorized" + } + }, + { + "unexpected_redirect_uri": { + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "type": "array", + "required": false, + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + }, + { + "response_mode": { + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "required": false, + "one_of": [ + "query", + "form_post", + "fragment", + "query.jwt", + "form_post.jwt", + "fragment.jwt", + "jwt" + ], + "type": "string", + "default": "query" + } + }, + { + "response_type": { + "description": "The response type passed to the authorization endpoint.", + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "code" + ] + } + }, + { + "scopes": { + "description": "The scopes passed to the authorization and token endpoints.", + "required": false, + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "default": [ + "openid" + ] + } + }, + { + "audience": { + "description": "The audience passed to the authorization endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "issuers_allowed": { + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "scopes_required": { + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "scopes_claim": { + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "scope" + ] + } + }, + { + "audience_required": { + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "audience_claim": { + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "aud" + ] + } + }, + { + "groups_required": { + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "groups_claim": { + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "groups" + ] + } + }, + { + "roles_required": { + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "roles_claim": { + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "roles" + ] + } + }, + { + "domains": { + "description": "The allowed values for the `hd` claim.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "type": "number", + "required": false + } + }, + { + "authenticated_groups_claim": { + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "pushed_authorization_request_endpoint_auth_method": { + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "required": false, + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "type": "boolean", + "required": false + } + }, + { + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "type": "boolean", + "required": false + } + }, + { + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "type": "boolean", + "required": false + } + }, + { + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "authorization_query_args_names": { + "description": "Extra query argument names passed to the authorization endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "authorization_query_args_values": { + "description": "Extra query argument values passed to the authorization endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "authorization_query_args_client": { + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "authorization_rolling_timeout": { + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number", + "required": false, + "default": 600 + } + }, + { + "authorization_cookie_name": { + "description": "The authorization cookie name.", + "type": "string", + "required": false, + "default": "authorization" + } + }, + { + "authorization_cookie_path": { + "description": "The authorization cookie Path flag.", + "required": false, + "starts_with": "/", + "type": "string", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "default": "/" + } + }, + { + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "type": "string", + "required": false + } + }, + { + "authorization_cookie_same_site": { + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "required": false, + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "type": "string", + "default": "Default" + } + }, + { + "authorization_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean", + "required": false + } + }, + { + "preserve_query_args": { + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "token_endpoint_auth_method": { + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "required": false, + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "token_headers_names": { + "description": "Extra header names passed to the token endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "token_headers_values": { + "description": "Extra header values passed to the token endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "token_headers_client": { + "description": "Extra headers passed from the client to the token endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "token_headers_replay": { + "description": "The names of token endpoint response headers to forward to the downstream client.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "type": "string", + "required": false + } + }, + { + "token_headers_grants": { + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token" + ] + } + } + }, + { + "token_post_args_names": { + "description": "Extra post argument names passed to the token endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "token_post_args_values": { + "description": "Extra post argument values passed to the token endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "token_post_args_client": { + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "introspection_endpoint_auth_method": { + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "required": false, + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "introspection_hint": { + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "type": "string", + "required": false, + "default": "access_token" + } + }, + { + "introspection_check_active": { + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "introspection_accept": { + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "required": false, + "one_of": [ + "application/json", + "application/token-introspection+jwt", + "application/jwt" + ], + "type": "string", + "default": "application/json" + } + }, + { + "introspection_headers_names": { + "description": "Extra header names passed to the introspection endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "introspection_headers_values": { + "description": "Extra header values passed to the introspection endpoint.", + "required": false, + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "encrypted": true + } + }, + { + "introspection_headers_client": { + "description": "Extra headers passed from the client to the introspection endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_names": { + "description": "Extra post argument names passed to the introspection endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_values": { + "description": "Extra post argument values passed to the introspection endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "introspection_post_args_client": { + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "introspect_jwt_tokens": { + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "revocation_endpoint_auth_method": { + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "type": "string", + "required": false, + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "userinfo_accept": { + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "required": false, + "one_of": [ + "application/json", + "application/jwt" + ], + "type": "string", + "default": "application/json" + } + }, + { + "userinfo_headers_names": { + "description": "Extra header names passed to the user info endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "userinfo_headers_values": { + "description": "Extra header values passed to the user info endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "userinfo_headers_client": { + "description": "Extra headers passed from the client to the user info endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_names": { + "description": "Extra query argument names passed to the user info endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_values": { + "description": "Extra query argument values passed to the user info endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "userinfo_query_args_client": { + "description": "Extra query arguments passed from the client to the user info endpoint.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "required": false, + "type": "string" + } + }, + { + "session_secret": { + "description": "The session secret.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "session_audience": { + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string", + "required": false, + "default": "default" + } + }, + { + "session_cookie_name": { + "description": "The session cookie name.", + "type": "string", + "required": false, + "default": "session" + } + }, + { + "session_remember": { + "description": "Enables or disables persistent sessions.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "session_remember_cookie_name": { + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string", + "required": false, + "default": "remember" + } + }, + { + "session_remember_rolling_timeout": { + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "type": "number", + "required": false, + "default": 604800 + } + }, + { + "session_remember_absolute_timeout": { + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number", + "required": false, + "default": 2592000 + } + }, + { + "session_idling_timeout": { + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "type": "number", + "required": false, + "default": 900 + } + }, + { + "session_rolling_timeout": { + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "type": "number", + "required": false, + "default": 3600 + } + }, + { + "session_absolute_timeout": { + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "type": "number", + "required": false, + "default": 86400 + } + }, + { + "session_cookie_path": { + "description": "The session cookie Path flag.", + "required": false, + "starts_with": "/", + "type": "string", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "default": "/" + } + }, + { + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "type": "string", + "required": false + } + }, + { + "session_cookie_same_site": { + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "required": false, + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "type": "string", + "default": "Lax" + } + }, + { + "session_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean", + "required": false + } + }, + { + "session_request_headers": { + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "required": false, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "session_response_headers": { + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "required": false, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "session_storage": { + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "required": false, + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string", + "default": "cookie" + } + }, + { + "session_store_metadata": { + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "session_enforce_same_subject": { + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "session_hash_subject": { + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "session_hash_storage_key": { + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string", + "required": false + } + }, + { + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string", + "required": false + } + }, + { + "session_memcached_host": { + "description": "The memcached host.", + "type": "string", + "required": false, + "default": "127.0.0.1" + } + }, + { + "session_memcached_port": { + "description": "The memcached port.", + "required": false, + "between": [ + 0, + 65535 + ], + "type": "integer", + "default": 11211 + } + }, + { + "redis": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer", + "between": [ + 1, + 2147483646 + ], + "default": 256 + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer", + "default": 5 + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "prefix": { + "description": "The Redis session key prefix.", + "type": "string", + "required": false + } + }, + { + "socket": { + "description": "The Redis unix socket path.", + "type": "string", + "required": false + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_nodes" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_nodes" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_field": "connection_is_proxied", + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host" + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "translate_backwards": [ + "connect_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "required": true, + "type": "record" + } + }, + { + "reverify": { + "description": "Specifies whether to always verify tokens stored in the session.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "jwt_session_claim": { + "description": "The claim to match against the JWT session cookie.", + "type": "string", + "required": false, + "default": "sid" + } + }, + { + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "type": "string", + "required": false + } + }, + { + "bearer_token_param_type": { + "description": "Where to look for the bearer token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "cookie", + "query", + "body" + ] + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "type": "string", + "required": false + } + }, + { + "client_credentials_param_type": { + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "password_param_type": { + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "id_token_param_type": { + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "type": "string", + "required": false + } + }, + { + "refresh_token_param_type": { + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + }, + "type": "array", + "default": [ + "header", + "query", + "body" + ] + } + }, + { + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "type": "string", + "required": false + } + }, + { + "refresh_tokens": { + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "upstream_headers_claims": { + "description": "The upstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "upstream_headers_names": { + "description": "The upstream header names for the claim values.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "upstream_access_token_header": { + "description": "The upstream access token header.", + "type": "string", + "required": false, + "default": "authorization:bearer" + } + }, + { + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "type": "string", + "required": false + } + }, + { + "upstream_id_token_header": { + "description": "The upstream id token header.", + "type": "string", + "required": false + } + }, + { + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "type": "string", + "required": false + } + }, + { + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "type": "string", + "required": false + } + }, + { + "upstream_user_info_header": { + "description": "The upstream user info header.", + "type": "string", + "required": false + } + }, + { + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "type": "string", + "required": false + } + }, + { + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "type": "string", + "required": false + } + }, + { + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "type": "string", + "required": false + } + }, + { + "upstream_session_id_header": { + "description": "The upstream session id header.", + "type": "string", + "required": false + } + }, + { + "downstream_headers_claims": { + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "downstream_headers_names": { + "description": "The downstream header names for the claim values.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "downstream_access_token_header": { + "description": "The downstream access token header.", + "type": "string", + "required": false + } + }, + { + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "type": "string", + "required": false + } + }, + { + "downstream_id_token_header": { + "description": "The downstream id token header.", + "type": "string", + "required": false + } + }, + { + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "type": "string", + "required": false + } + }, + { + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "type": "string", + "required": false + } + }, + { + "downstream_user_info_header": { + "description": "The downstream user info header.", + "type": "string", + "required": false + } + }, + { + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "type": "string", + "required": false + } + }, + { + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "type": "string", + "required": false + } + }, + { + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "type": "string", + "required": false + } + }, + { + "downstream_session_id_header": { + "description": "The downstream session id header.", + "type": "string", + "required": false + } + }, + { + "login_methods": { + "description": "Enable login functionality with specified grants.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "type": "array", + "default": [ + "authorization_code" + ] + } + }, + { + "login_action": { + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "required": false, + "one_of": [ + "upstream", + "response", + "redirect" + ], + "type": "string", + "default": "upstream" + } + }, + { + "login_tokens": { + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "id_token", + "access_token", + "refresh_token", + "tokens", + "introspection" + ] + }, + "type": "array", + "default": [ + "id_token" + ] + } + }, + { + "login_redirect_mode": { + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "required": false, + "one_of": [ + "query", + "fragment" + ], + "type": "string", + "default": "fragment" + } + }, + { + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "type": "string", + "required": false + } + }, + { + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "type": "string", + "required": false + } + }, + { + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "type": "string", + "required": false + } + }, + { + "logout_methods": { + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "POST", + "GET", + "DELETE" + ] + }, + "type": "array", + "default": [ + "POST", + "DELETE" + ] + } + }, + { + "logout_revoke": { + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "logout_revoke_access_token": { + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "logout_revoke_refresh_token": { + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "consumer_claim": { + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "consumer_by": { + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + }, + "type": "array", + "default": [ + "username", + "custom_id" + ] + } + }, + { + "consumer_optional": { + "description": "Do not terminate the request if consumer mapping fails.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "credential_claim": { + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "sub" + ] + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string", + "required": false + } + }, + { + "run_on_preflight": { + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "leeway": { + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "type": "number", + "required": false, + "default": 0 + } + }, + { + "verify_parameters": { + "description": "Verify plugin configuration against discovery.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "verify_nonce": { + "description": "Verify nonce on authorization code flow.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "verify_claims": { + "description": "Verify tokens for standard claims.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "verify_signature": { + "description": "Verify signature of tokens.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "ignore_signature": { + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token", + "session", + "introspection", + "userinfo" + ] + }, + "type": "array", + "default": [ + + ] + } + }, + { + "enable_hs_signatures": { + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "disable_session": { + "description": "Disable issuing the session cookie with the specified grants.", + "type": "array", + "required": false, + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + } + } + }, + { + "cache_ttl": { + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "type": "number", + "required": false, + "default": 3600 + } + }, + { + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "type": "number", + "required": false + } + }, + { + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "type": "number", + "required": false + } + }, + { + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "type": "number", + "required": false + } + }, + { + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "type": "number", + "required": false + } + }, + { + "cache_tokens": { + "description": "Cache the token endpoint requests.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "cache_tokens_salt": { + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "auto": true, + "type": "string", + "required": false + } + }, + { + "cache_introspection": { + "description": "Cache the introspection endpoint requests.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "cache_token_exchange": { + "description": "Cache the token exchange endpoint requests.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "cache_user_info": { + "description": "Cache the user info requests.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "search_user_info": { + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "hide_credentials": { + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "http_version": { + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "required": false, + "type": "number", + "default": 1.1 + } + }, + { + "http_proxy": { + "description": "The HTTP proxy.", + "required": false, + "type": "string" + } + }, + { + "http_proxy_authorization": { + "description": "The HTTP proxy authorization.", + "type": "string", + "required": false + } + }, + { + "https_proxy": { + "description": "The HTTPS proxy.", + "required": false, + "type": "string" + } + }, + { + "https_proxy_authorization": { + "description": "The HTTPS proxy authorization.", + "type": "string", + "required": false + } + }, + { + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "type": "string", + "required": false + } + }, + { + "keepalive": { + "description": "Use keepalive with the HTTP client.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "ssl_verify": { + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "timeout": { + "description": "Network IO timeout in milliseconds.", + "type": "number", + "required": false, + "default": 10000 + } + }, + { + "display_errors": { + "description": "Display errors on failure responses.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "by_username_ignore_case": { + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "resolve_distributed_claims": { + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "expose_error_code": { + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "type": "boolean", + "default": true + } + }, + { + "token_cache_key_include_scope": { + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean", + "default": false + } + }, + { + "introspection_token_param_name": { + "description": "Designate token's parameter name for introspection.", + "type": "string", + "required": false, + "default": "token" + } + }, + { + "revocation_token_param_name": { + "description": "Designate token's parameter name for revocation.", + "type": "string", + "required": false, + "default": "token" + } + }, + { + "proof_of_possession_mtls": { + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "required": false, + "one_of": [ + "off", + "strict", + "optional" + ], + "type": "string", + "default": "off" + } + }, + { + "proof_of_possession_auth_methods_validation": { + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "tls_client_auth_cert_id": { + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "auto": false, + "type": "string", + "uuid": true, + "required": false + } + }, + { + "tls_client_auth_ssl_verify": { + "description": "Verify identity provider server certificate during mTLS client authentication.", + "type": "boolean", + "required": false, + "default": true + } + }, + { + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "proof_of_possession_dpop": { + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "required": false, + "one_of": [ + "off", + "strict", + "optional" + ], + "type": "string", + "default": "off" + } + }, + { + "dpop_use_nonce": { + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "dpop_proof_lifetime": { + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "type": "number", + "required": false, + "default": 300 + } + }, + { + "claims_forbidden": { + "description": "If given, these claims are forbidden in the token payload.", + "type": "array", + "required": false, + "elements": { + "type": "string" + } + } + }, + { + "cluster_cache_strategy": { + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "required": false, + "one_of": [ + "off", + "redis" + ], + "type": "string", + "default": "off" + } + }, + { + "cluster_cache_redis": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer", + "between": [ + 1, + 2147483646 + ], + "default": 256 + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer", + "default": 5 + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean", + "default": false + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_nodes" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_nodes" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_field": "connection_is_proxied", + "if_match": { + "eq": true + }, + "then_field": "host", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "translate_backwards": [ + "connect_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + } + ], + "required": true, + "shorthand_fields": [ + { + "authorization_cookie_lifetime": { + "deprecation": { + "message": "openid-connect: config.authorization_cookie_lifetime is deprecated, please use config.authorization_rolling_timeout instead", + "removal_in_version": "4.0" + }, + "type": "number" + } + }, + { + "authorization_cookie_samesite": { + "deprecation": { + "message": "openid-connect: config.authorization_cookie_samesite is deprecated, please use config.authorization_cookie_same_site instead", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "authorization_cookie_httponly": { + "deprecation": { + "message": "openid-connect: config.authorization_cookie_httponly is deprecated, please use config.authorization_cookie_http_only instead", + "removal_in_version": "4.0" + }, + "type": "boolean" + } + }, + { + "session_cookie_lifetime": { + "deprecation": { + "message": "openid-connect: config.session_cookie_lifetime is deprecated, please use config.session_rolling_timeout instead", + "removal_in_version": "4.0" + }, + "type": "number" + } + }, + { + "session_cookie_idletime": { + "deprecation": { + "message": "openid-connect: config.session_cookie_idletime is deprecated, please use config.session_idling_timeout instead", + "removal_in_version": "4.0" + }, + "type": "number" + } + }, + { + "session_cookie_samesite": { + "deprecation": { + "message": "openid-connect: config.session_cookie_samesite is deprecated, please use config.session_cookie_same_site instead", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_cookie_httponly": { + "deprecation": { + "message": "openid-connect: config.session_cookie_httponly is deprecated, please use config.session_cookie_http_only instead", + "removal_in_version": "4.0" + }, + "type": "boolean" + } + }, + { + "session_memcache_prefix": { + "deprecation": { + "message": "openid-connect: config.session_memcache_prefix is deprecated, please use config.session_memcached_prefix instead", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_memcache_socket": { + "deprecation": { + "message": "openid-connect: config.session_memcache_socket is deprecated, please use config.session_memcached_socket instead", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_memcache_host": { + "deprecation": { + "message": "openid-connect: config.session_memcache_host is deprecated, please use config.session_memcached_host instead", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_memcache_port": { + "deprecation": { + "message": "openid-connect: config.session_memcache_port is deprecated, please use config.session_memcached_port instead", + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "session_cookie_renew": { + "deprecation": { + "message": "openid-connect: config.session_cookie_renew option does not exist anymore", + "removal_in_version": "4.0" + }, + "type": "number" + } + }, + { + "session_cookie_maxsize": { + "deprecation": { + "message": "openid-connect: config.session_cookie_maxsize option does not exist anymore", + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "session_strategy": { + "deprecation": { + "message": "openid-connect: config.session_strategy option does not exist anymore", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_compressor": { + "deprecation": { + "message": "openid-connect: config.session_compressor option does not exist anymore", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_redis_prefix": { + "type": "string", + "translate_backwards": [ + "redis", + "prefix" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "prefix" + ] + } + ], + "message": "openid-connect: config.session_redis_prefix is deprecated, please use config.redis.prefix instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_socket": { + "type": "string", + "translate_backwards": [ + "redis", + "socket" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "socket" + ] + } + ], + "message": "openid-connect: config.session_redis_socket is deprecated, please use config.redis.socket instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_host": { + "type": "string", + "translate_backwards": [ + "redis", + "host" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ], + "message": "openid-connect: config.session_redis_host is deprecated, please use config.redis.host instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_port": { + "type": "integer", + "translate_backwards": [ + "redis", + "port" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ], + "message": "openid-connect: config.session_redis_port is deprecated, please use config.redis.port instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_username": { + "type": "string", + "translate_backwards": [ + "redis", + "username" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ], + "message": "openid-connect: config.redis_host is deprecated, please use config.redis.host instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_password": { + "type": "string", + "translate_backwards": [ + "redis", + "password" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ], + "message": "openid-connect: config.session_redis_password is deprecated, please use config.redis.password instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_connect_timeout": { + "type": "integer", + "translate_backwards": [ + "redis", + "connect_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "connect_timeout" + ] + } + ], + "message": "openid-connect: config.session_redis_connect_timeout is deprecated, please use config.redis.connect_timeout instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_read_timeout": { + "type": "integer", + "translate_backwards": [ + "redis", + "read_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "read_timeout" + ] + } + ], + "message": "openid-connect: config.session_redis_read_timeout is deprecated, please use config.redis.read_timeout instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_send_timeout": { + "type": "integer", + "translate_backwards": [ + "redis", + "send_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "send_timeout" + ] + } + ], + "message": "openid-connect: config.session_redis_send_timeout is deprecated, please use config.redis.send_timeout instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_ssl": { + "type": "boolean", + "translate_backwards": [ + "redis", + "ssl" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ], + "message": "openid-connect: config.session_redis_ssl is deprecated, please use config.redis.ssl instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_ssl_verify": { + "type": "boolean", + "translate_backwards": [ + "redis", + "ssl_verify" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ], + "message": "openid-connect: config.session_redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_server_name": { + "type": "string", + "translate_backwards": [ + "redis", + "server_name" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ], + "message": "openid-connect: config.session_redis_server_name is deprecated, please use config.redis.server_name instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_cluster_nodes": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "cluster_nodes" + ] + } + ], + "message": "openid-connect: config.session_redis_cluster_nodes is deprecated, please use config.redis.cluster_nodes instead", + "removal_in_version": "4.0" + }, + "type": "array", + "translate_backwards": [ + "redis", + "cluster_nodes" + ], + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + } + } + }, + { + "session_redis_cluster_max_redirections": { + "type": "integer", + "translate_backwards": [ + "redis", + "cluster_max_redirections" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "cluster_max_redirections" + ] + } + ], + "message": "openid-connect: config.session_redis_cluster_max_redirections is deprecated, please use config.redis.cluster_max_redirections instead", + "removal_in_version": "4.0" + } + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/openid-connect/3.9.x.json b/schemas/openid-connect/3.9.x.json new file mode 100644 index 00000000..7a0c9dd9 --- /dev/null +++ b/schemas/openid-connect/3.9.x.json @@ -0,0 +1,3558 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "shorthand_fields": [ + { + "authorization_cookie_lifetime": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.authorization_cookie_lifetime is deprecated, please use config.authorization_rolling_timeout instead" + }, + "type": "number" + } + }, + { + "authorization_cookie_samesite": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.authorization_cookie_samesite is deprecated, please use config.authorization_cookie_same_site instead" + }, + "type": "string" + } + }, + { + "authorization_cookie_httponly": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.authorization_cookie_httponly is deprecated, please use config.authorization_cookie_http_only instead" + }, + "type": "boolean" + } + }, + { + "session_cookie_lifetime": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_lifetime is deprecated, please use config.session_rolling_timeout instead" + }, + "type": "number" + } + }, + { + "session_cookie_idletime": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_idletime is deprecated, please use config.session_idling_timeout instead" + }, + "type": "number" + } + }, + { + "session_cookie_samesite": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_samesite is deprecated, please use config.session_cookie_same_site instead" + }, + "type": "string" + } + }, + { + "session_cookie_httponly": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_httponly is deprecated, please use config.session_cookie_http_only instead" + }, + "type": "boolean" + } + }, + { + "session_memcache_prefix": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_prefix is deprecated, please use config.session_memcached_prefix instead" + }, + "type": "string" + } + }, + { + "session_memcache_socket": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_socket is deprecated, please use config.session_memcached_socket instead" + }, + "type": "string" + } + }, + { + "session_memcache_host": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_host is deprecated, please use config.session_memcached_host instead" + }, + "type": "string" + } + }, + { + "session_memcache_port": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_port is deprecated, please use config.session_memcached_port instead" + }, + "type": "integer" + } + }, + { + "session_cookie_renew": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_renew option does not exist anymore" + }, + "type": "number" + } + }, + { + "session_cookie_maxsize": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_maxsize option does not exist anymore" + }, + "type": "integer" + } + }, + { + "session_strategy": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_strategy option does not exist anymore" + }, + "type": "string" + } + }, + { + "session_compressor": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_compressor option does not exist anymore" + }, + "type": "string" + } + }, + { + "session_redis_prefix": { + "deprecation": { + "message": "openid-connect: config.session_redis_prefix is deprecated, please use config.redis.prefix instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "prefix" + ] + } + ] + }, + "type": "string" + } + }, + { + "session_redis_socket": { + "deprecation": { + "message": "openid-connect: config.session_redis_socket is deprecated, please use config.redis.socket instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "socket" + ] + } + ] + }, + "type": "string" + } + }, + { + "session_redis_host": { + "deprecation": { + "message": "openid-connect: config.session_redis_host is deprecated, please use config.redis.host instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ] + }, + "type": "string" + } + }, + { + "session_redis_port": { + "deprecation": { + "message": "openid-connect: config.session_redis_port is deprecated, please use config.redis.port instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ] + }, + "type": "integer" + } + }, + { + "session_redis_username": { + "deprecation": { + "message": "openid-connect: config.redis_host is deprecated, please use config.redis.host instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ] + }, + "type": "string" + } + }, + { + "session_redis_password": { + "deprecation": { + "message": "openid-connect: config.session_redis_password is deprecated, please use config.redis.password instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ] + }, + "type": "string" + } + }, + { + "session_redis_connect_timeout": { + "deprecation": { + "message": "openid-connect: config.session_redis_connect_timeout is deprecated, please use config.redis.connect_timeout instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "connect_timeout" + ] + } + ] + }, + "type": "integer" + } + }, + { + "session_redis_read_timeout": { + "deprecation": { + "message": "openid-connect: config.session_redis_read_timeout is deprecated, please use config.redis.read_timeout instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "read_timeout" + ] + } + ] + }, + "type": "integer" + } + }, + { + "session_redis_send_timeout": { + "deprecation": { + "message": "openid-connect: config.session_redis_send_timeout is deprecated, please use config.redis.send_timeout instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "send_timeout" + ] + } + ] + }, + "type": "integer" + } + }, + { + "session_redis_ssl": { + "deprecation": { + "message": "openid-connect: config.session_redis_ssl is deprecated, please use config.redis.ssl instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ] + }, + "type": "boolean" + } + }, + { + "session_redis_ssl_verify": { + "deprecation": { + "message": "openid-connect: config.session_redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ] + }, + "type": "boolean" + } + }, + { + "session_redis_server_name": { + "deprecation": { + "message": "openid-connect: config.session_redis_server_name is deprecated, please use config.redis.server_name instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ] + }, + "type": "string" + } + }, + { + "session_redis_cluster_nodes": { + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "type": "array", + "deprecation": { + "message": "openid-connect: config.session_redis_cluster_nodes is deprecated, please use config.redis.cluster_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_nodes" + ] + } + ] + } + } + }, + { + "session_redis_cluster_max_redirections": { + "deprecation": { + "message": "openid-connect: config.session_redis_cluster_max_redirections is deprecated, please use config.redis.cluster_max_redirections instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_max_redirections" + ] + } + ] + }, + "type": "integer" + } + } + ], + "required": true, + "fields": [ + { + "issuer": { + "description": "The discovery endpoint (or the issuer identifier). When there is no discovery endpoint, please also configure `config.using_pseudo_issuer=true`.", + "required": true, + "type": "string" + } + }, + { + "using_pseudo_issuer": { + "default": false, + "description": "If the plugin uses a pseudo issuer. When set to true, the plugin will not discover the configuration from the issuer URL specified with `config.issuer`.", + "required": false, + "type": "boolean" + } + }, + { + "discovery_headers_names": { + "elements": { + "type": "string" + }, + "description": "Extra header names passed to the discovery endpoint.", + "required": false, + "type": "array" + } + }, + { + "discovery_headers_values": { + "elements": { + "type": "string" + }, + "description": "Extra header values passed to the discovery endpoint.", + "required": false, + "type": "array" + } + }, + { + "extra_jwks_uris": { + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "JWKS URIs whose public keys are trusted (in addition to the keys found with the discovery).", + "required": false, + "type": "set" + } + }, + { + "rediscovery_lifetime": { + "default": 30, + "description": "Specifies how long (in seconds) the plugin waits between discovery attempts. Discovery is still triggered on an as-needed basis.", + "required": false, + "type": "number" + } + }, + { + "auth_methods": { + "required": false, + "type": "array", + "default": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ], + "description": "Types of credentials/grants to enable.", + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + } + } + }, + { + "client_id": { + "encrypted": true, + "required": false, + "type": "array", + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider." + } + }, + { + "client_secret": { + "encrypted": true, + "required": false, + "type": "array", + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "The client secret." + } + }, + { + "client_auth": { + "elements": { + "type": "string", + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + }, + "description": "The default OpenID Connect client authentication method is 'client_secret_basic' (using 'Authorization: Basic' header), 'client_secret_post' (credentials in body), 'client_secret_jwt' (signed client assertion in body), 'private_key_jwt' (private key-signed assertion), 'tls_client_auth' (client certificate), 'self_signed_tls_client_auth' (self-signed client certificate), and 'none' (no authentication).", + "required": false, + "type": "array" + } + }, + { + "client_jwk": { + "elements": { + "type": "record", + "required": false, + "fields": [ + { + "issuer": { + "required": false, + "type": "string" + } + }, + { + "kty": { + "required": false, + "type": "string" + } + }, + { + "use": { + "required": false, + "type": "string" + } + }, + { + "key_ops": { + "elements": { + "required": false, + "type": "string" + }, + "required": false, + "type": "array" + } + }, + { + "alg": { + "required": false, + "type": "string" + } + }, + { + "kid": { + "required": false, + "type": "string" + } + }, + { + "x5u": { + "required": false, + "type": "string" + } + }, + { + "x5c": { + "elements": { + "required": false, + "type": "string" + }, + "required": false, + "type": "array" + } + }, + { + "x5t": { + "required": false, + "type": "string" + } + }, + { + "x5t#S256": { + "required": false, + "type": "string" + } + }, + { + "k": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "x": { + "required": false, + "type": "string" + } + }, + { + "y": { + "required": false, + "type": "string" + } + }, + { + "crv": { + "required": false, + "type": "string" + } + }, + { + "n": { + "required": false, + "type": "string" + } + }, + { + "e": { + "required": false, + "type": "string" + } + }, + { + "d": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "p": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "q": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "dp": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "dq": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "qi": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "oth": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "r": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "t": { + "encrypted": true, + "required": false, + "referenceable": true, + "type": "string" + } + } + ] + }, + "description": "The JWK used for the private_key_jwt authentication.", + "required": false, + "type": "array" + } + }, + { + "client_alg": { + "elements": { + "type": "string", + "one_of": [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "ES256", + "ES384", + "ES512", + "PS256", + "PS384", + "PS512", + "EdDSA" + ] + }, + "description": "The algorithm to use for client_secret_jwt (only HS***) or private_key_jwt authentication.", + "required": false, + "type": "array" + } + }, + { + "client_arg": { + "default": "client_id", + "description": "The client to use for this request (the selection is made with a request parameter with the same name).", + "required": false, + "type": "string" + } + }, + { + "redirect_uri": { + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "The redirect URI passed to the authorization and token endpoints.", + "required": false, + "type": "array" + } + }, + { + "login_redirect_uri": { + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "referenceable": true, + "type": "string" + }, + "description": "Where to redirect the client when `login_action` is set to `redirect`.", + "required": false, + "type": "array" + } + }, + { + "logout_redirect_uri": { + "elements": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "referenceable": true, + "type": "string" + }, + "description": "Where to redirect the client after the logout.", + "required": false, + "type": "array" + } + }, + { + "forbidden_redirect_uri": { + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "Where to redirect the client on forbidden requests.", + "required": false, + "type": "array" + } + }, + { + "forbidden_error_message": { + "default": "Forbidden", + "description": "The error message for the forbidden requests (when not using the redirection).", + "required": false, + "type": "string" + } + }, + { + "forbidden_destroy_session": { + "default": true, + "description": "Destroy any active session for the forbidden requests.", + "required": false, + "type": "boolean" + } + }, + { + "unauthorized_destroy_session": { + "default": true, + "description": "Destroy any active session for the unauthorized requests.", + "required": false, + "type": "boolean" + } + }, + { + "unauthorized_redirect_uri": { + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "Where to redirect the client on unauthorized requests.", + "required": false, + "type": "array" + } + }, + { + "unauthorized_error_message": { + "default": "Unauthorized", + "description": "The error message for the unauthorized requests (when not using the redirection).", + "required": false, + "type": "string" + } + }, + { + "unexpected_redirect_uri": { + "elements": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + }, + "description": "Where to redirect the client when unexpected errors happen with the requests.", + "required": false, + "type": "array" + } + }, + { + "response_mode": { + "required": false, + "type": "string", + "default": "query", + "description": "Response mode passed to the authorization endpoint: - `query`: for parameters in query string - `form_post`: for parameters in request body - `fragment`: for parameters in uri fragment (rarely useful as the plugin itself cannot read it) - `query.jwt`, `form_post.jwt`, `fragment.jwt`: similar to `query`, `form_post` and `fragment` but the parameters are encoded in a JWT - `jwt`: shortcut that indicates the default encoding for the requested response type.", + "one_of": [ + "query", + "form_post", + "fragment", + "query.jwt", + "form_post.jwt", + "fragment.jwt", + "jwt" + ] + } + }, + { + "response_type": { + "required": false, + "type": "array", + "default": [ + "code" + ], + "description": "The response type passed to the authorization endpoint.", + "elements": { + "type": "string" + } + } + }, + { + "scopes": { + "required": false, + "type": "array", + "default": [ + "openid" + ], + "description": "The scopes passed to the authorization and token endpoints.", + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "audience": { + "elements": { + "type": "string" + }, + "description": "The audience passed to the authorization endpoint.", + "required": false, + "type": "array" + } + }, + { + "issuers_allowed": { + "elements": { + "type": "string" + }, + "description": "The issuers allowed to be present in the tokens (`iss` claim).", + "required": false, + "type": "array" + } + }, + { + "scopes_required": { + "elements": { + "type": "string" + }, + "description": "The scopes (`scopes_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "required": false, + "type": "array" + } + }, + { + "scopes_claim": { + "required": false, + "type": "array", + "default": [ + "scope" + ], + "description": "The claim that contains the scopes. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "audience_required": { + "elements": { + "type": "string" + }, + "description": "The audiences (`audience_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "required": false, + "type": "array" + } + }, + { + "audience_claim": { + "required": false, + "type": "array", + "default": [ + "aud" + ], + "description": "The claim that contains the audience. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "groups_required": { + "elements": { + "type": "string" + }, + "description": "The groups (`groups_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "required": false, + "type": "array" + } + }, + { + "groups_claim": { + "required": false, + "type": "array", + "default": [ + "groups" + ], + "description": "The claim that contains the groups. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "roles_required": { + "elements": { + "type": "string" + }, + "description": "The roles (`roles_claim` claim) required to be present in the access token (or introspection results) for successful authorization. This config parameter works in both **AND** / **OR** cases.", + "required": false, + "type": "array" + } + }, + { + "roles_claim": { + "required": false, + "type": "array", + "default": [ + "roles" + ], + "description": "The claim that contains the roles. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "domains": { + "elements": { + "type": "string" + }, + "description": "The allowed values for the `hd` claim.", + "required": false, + "type": "array" + } + }, + { + "max_age": { + "description": "The maximum age (in seconds) compared to the `auth_time` claim.", + "required": false, + "type": "number" + } + }, + { + "authenticated_groups_claim": { + "elements": { + "type": "string" + }, + "description": "The claim that contains authenticated groups. This setting can be used together with ACL plugin, but it also enables IdP managed groups with other applications and integrations. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "required": false, + "type": "array" + } + }, + { + "pushed_authorization_request_endpoint": { + "description": "The pushed authorization endpoint. If set it overrides the value in `pushed_authorization_request_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "pushed_authorization_request_endpoint_auth_method": { + "type": "string", + "description": "The pushed authorization request endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "required": false, + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "require_pushed_authorization_requests": { + "description": "Forcibly enable or disable the pushed authorization requests. When not set the value is determined through the discovery using the value of `require_pushed_authorization_requests` (which defaults to `false`).", + "required": false, + "type": "boolean" + } + }, + { + "require_proof_key_for_code_exchange": { + "description": "Forcibly enable or disable the proof key for code exchange. When not set the value is determined through the discovery using the value of `code_challenge_methods_supported`, and enabled automatically (in case the `code_challenge_methods_supported` is missing, the PKCE will not be enabled).", + "required": false, + "type": "boolean" + } + }, + { + "require_signed_request_object": { + "description": "Forcibly enable or disable the usage of signed request object on authorization or pushed authorization endpoint. When not set the value is determined through the discovery using the value of `require_signed_request_object`, and enabled automatically (in case the `require_signed_request_object` is missing, the feature will not be enabled).", + "required": false, + "type": "boolean" + } + }, + { + "authorization_endpoint": { + "description": "The authorization endpoint. If set it overrides the value in `authorization_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "authorization_query_args_names": { + "elements": { + "type": "string" + }, + "description": "Extra query argument names passed to the authorization endpoint.", + "required": false, + "type": "array" + } + }, + { + "authorization_query_args_values": { + "elements": { + "type": "string" + }, + "description": "Extra query argument values passed to the authorization endpoint.", + "required": false, + "type": "array" + } + }, + { + "authorization_query_args_client": { + "elements": { + "type": "string" + }, + "description": "Extra query arguments passed from the client to the authorization endpoint.", + "required": false, + "type": "array" + } + }, + { + "authorization_rolling_timeout": { + "default": 600, + "description": "Specifies how long the session used for the authorization code flow can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "required": false, + "type": "number" + } + }, + { + "authorization_cookie_name": { + "default": "authorization", + "description": "The authorization cookie name.", + "required": false, + "type": "string" + } + }, + { + "authorization_cookie_path": { + "required": false, + "type": "string", + "default": "/", + "description": "The authorization cookie Path flag.", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "starts_with": "/" + } + }, + { + "authorization_cookie_domain": { + "description": "The authorization cookie Domain flag.", + "required": false, + "type": "string" + } + }, + { + "authorization_cookie_same_site": { + "required": false, + "type": "string", + "default": "Default", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "authorization_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "required": false, + "type": "boolean" + } + }, + { + "authorization_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "required": false, + "type": "boolean" + } + }, + { + "preserve_query_args": { + "default": false, + "description": "With this parameter, you can preserve request query arguments even when doing authorization code flow.", + "required": false, + "type": "boolean" + } + }, + { + "token_endpoint": { + "description": "The token endpoint. If set it overrides the value in `token_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "token_endpoint_auth_method": { + "type": "string", + "description": "The token endpoint authentication method: `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "required": false, + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "token_headers_names": { + "elements": { + "type": "string" + }, + "description": "Extra header names passed to the token endpoint.", + "required": false, + "type": "array" + } + }, + { + "token_headers_values": { + "elements": { + "type": "string" + }, + "description": "Extra header values passed to the token endpoint.", + "required": false, + "type": "array" + } + }, + { + "token_headers_client": { + "elements": { + "type": "string" + }, + "description": "Extra headers passed from the client to the token endpoint.", + "required": false, + "type": "array" + } + }, + { + "token_headers_replay": { + "elements": { + "type": "string" + }, + "description": "The names of token endpoint response headers to forward to the downstream client.", + "required": false, + "type": "array" + } + }, + { + "token_headers_prefix": { + "description": "Add a prefix to the token endpoint response headers before forwarding them to the downstream client.", + "required": false, + "type": "string" + } + }, + { + "token_headers_grants": { + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token" + ] + }, + "description": "Enable the sending of the token endpoint response headers only with certain grants: - `password`: with OAuth password grant - `client_credentials`: with OAuth client credentials grant - `authorization_code`: with authorization code flow - `refresh_token` with refresh token grant.", + "required": false, + "type": "array" + } + }, + { + "token_post_args_names": { + "elements": { + "type": "string" + }, + "description": "Extra post argument names passed to the token endpoint.", + "required": false, + "type": "array" + } + }, + { + "token_post_args_values": { + "elements": { + "type": "string" + }, + "description": "Extra post argument values passed to the token endpoint.", + "required": false, + "type": "array" + } + }, + { + "token_post_args_client": { + "elements": { + "type": "string" + }, + "description": "Pass extra arguments from the client to the OpenID-Connect plugin. If arguments exist, the client can pass them using: - Query parameters - Request Body - Request Header This parameter can be used with `scope` values, like this: `config.token_post_args_client=scope` In this case, the token would take the `scope` value from the query parameter or from the request body or from the header and send it to the token endpoint.", + "required": false, + "type": "array" + } + }, + { + "introspection_endpoint": { + "description": "The introspection endpoint. If set it overrides the value in `introspection_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "introspection_endpoint_auth_method": { + "type": "string", + "description": "The introspection endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "required": false, + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "introspection_hint": { + "default": "access_token", + "description": "Introspection hint parameter value passed to the introspection endpoint.", + "required": false, + "type": "string" + } + }, + { + "introspection_check_active": { + "default": true, + "description": "Check that the introspection response has an `active` claim with a value of `true`.", + "required": false, + "type": "boolean" + } + }, + { + "introspection_accept": { + "required": false, + "type": "string", + "default": "application/json", + "description": "The value of `Accept` header for introspection requests: - `application/json`: introspection response as JSON - `application/token-introspection+jwt`: introspection response as JWT (from the current IETF draft document) - `application/jwt`: introspection response as JWT (from the obsolete IETF draft document).", + "one_of": [ + "application/json", + "application/token-introspection+jwt", + "application/jwt" + ] + } + }, + { + "introspection_headers_names": { + "elements": { + "type": "string" + }, + "description": "Extra header names passed to the introspection endpoint.", + "required": false, + "type": "array" + } + }, + { + "introspection_headers_values": { + "encrypted": true, + "required": false, + "type": "array", + "elements": { + "referenceable": true, + "type": "string" + }, + "description": "Extra header values passed to the introspection endpoint." + } + }, + { + "introspection_headers_client": { + "elements": { + "type": "string" + }, + "description": "Extra headers passed from the client to the introspection endpoint.", + "required": false, + "type": "array" + } + }, + { + "introspection_post_args_names": { + "elements": { + "type": "string" + }, + "description": "Extra post argument names passed to the introspection endpoint.", + "required": false, + "type": "array" + } + }, + { + "introspection_post_args_values": { + "elements": { + "type": "string" + }, + "description": "Extra post argument values passed to the introspection endpoint.", + "required": false, + "type": "array" + } + }, + { + "introspection_post_args_client": { + "elements": { + "type": "string" + }, + "description": "Extra post arguments passed from the client to the introspection endpoint.", + "required": false, + "type": "array" + } + }, + { + "introspection_post_args_client_headers": { + "elements": { + "type": "string" + }, + "description": "Extra post arguments passed from the client headers to the introspection endpoint.", + "required": false, + "type": "array" + } + }, + { + "introspect_jwt_tokens": { + "default": false, + "description": "Specifies whether to introspect the JWT access tokens (can be used to check for revocations).", + "required": false, + "type": "boolean" + } + }, + { + "revocation_endpoint": { + "description": "The revocation endpoint. If set it overrides the value in `revocation_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "revocation_endpoint_auth_method": { + "type": "string", + "description": "The revocation endpoint authentication method: : `client_secret_basic`, `client_secret_post`, `client_secret_jwt`, `private_key_jwt`, `tls_client_auth`, `self_signed_tls_client_auth`, or `none`: do not authenticate", + "required": false, + "one_of": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "tls_client_auth", + "self_signed_tls_client_auth", + "none" + ] + } + }, + { + "end_session_endpoint": { + "description": "The end session endpoint. If set it overrides the value in `end_session_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "userinfo_endpoint": { + "description": "The user info endpoint. If set it overrides the value in `userinfo_endpoint` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "userinfo_accept": { + "required": false, + "type": "string", + "default": "application/json", + "description": "The value of `Accept` header for user info requests: - `application/json`: user info response as JSON - `application/jwt`: user info response as JWT (from the obsolete IETF draft document).", + "one_of": [ + "application/json", + "application/jwt" + ] + } + }, + { + "userinfo_headers_names": { + "elements": { + "type": "string" + }, + "description": "Extra header names passed to the user info endpoint.", + "required": false, + "type": "array" + } + }, + { + "userinfo_headers_values": { + "elements": { + "type": "string" + }, + "description": "Extra header values passed to the user info endpoint.", + "required": false, + "type": "array" + } + }, + { + "userinfo_headers_client": { + "elements": { + "type": "string" + }, + "description": "Extra headers passed from the client to the user info endpoint.", + "required": false, + "type": "array" + } + }, + { + "userinfo_query_args_names": { + "elements": { + "type": "string" + }, + "description": "Extra query argument names passed to the user info endpoint.", + "required": false, + "type": "array" + } + }, + { + "userinfo_query_args_values": { + "elements": { + "type": "string" + }, + "description": "Extra query argument values passed to the user info endpoint.", + "required": false, + "type": "array" + } + }, + { + "userinfo_query_args_client": { + "elements": { + "type": "string" + }, + "description": "Extra query arguments passed from the client to the user info endpoint.", + "required": false, + "type": "array" + } + }, + { + "token_exchange_endpoint": { + "description": "The token exchange endpoint.", + "required": false, + "type": "string" + } + }, + { + "session_secret": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "The session secret.", + "required": false + } + }, + { + "session_audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "required": false, + "type": "string" + } + }, + { + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "required": false, + "type": "string" + } + }, + { + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "required": false, + "type": "boolean" + } + }, + { + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "required": false, + "type": "string" + } + }, + { + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Specifies how long the persistent session is considered valid in seconds. 0 disables the checks and rolling.", + "required": false, + "type": "number" + } + }, + { + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Limits how long the persistent session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "required": false, + "type": "number" + } + }, + { + "session_idling_timeout": { + "default": 900, + "description": "Specifies how long the session can be inactive until it is considered invalid in seconds. 0 disables the checks and touching.", + "required": false, + "type": "number" + } + }, + { + "session_rolling_timeout": { + "default": 3600, + "description": "Specifies how long the session can be used in seconds until it needs to be renewed. 0 disables the checks and rolling.", + "required": false, + "type": "number" + } + }, + { + "session_absolute_timeout": { + "default": 86400, + "description": "Limits how long the session can be renewed in seconds, until re-authentication is required. 0 disables the checks.", + "required": false, + "type": "number" + } + }, + { + "session_cookie_path": { + "required": false, + "type": "string", + "default": "/", + "description": "The session cookie Path flag.", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "starts_with": "/" + } + }, + { + "session_cookie_domain": { + "description": "The session cookie Domain flag.", + "required": false, + "type": "string" + } + }, + { + "session_cookie_same_site": { + "required": false, + "type": "string", + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "required": false, + "type": "boolean" + } + }, + { + "session_cookie_secure": { + "description": "Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "required": false, + "type": "boolean" + } + }, + { + "session_request_headers": { + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "description": "Set of headers to send to upstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout request headers.", + "required": false, + "type": "set" + } + }, + { + "session_response_headers": { + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "description": "Set of headers to send to downstream, use id, audience, subject, timeout, idling-timeout, rolling-timeout, absolute-timeout. E.g. `[ \"id\", \"timeout\" ]` will set Session-Id and Session-Timeout response headers.", + "required": false, + "type": "set" + } + }, + { + "session_storage": { + "required": false, + "type": "string", + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie (the session cannot be invalidated or revoked without changing session secret, but is stateless, and doesn't require a database) - `memcache`: stores session data in memcached - `redis`: stores session data in Redis.", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ] + } + }, + { + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This metadata includes information about the active sessions for a specific audience belonging to a specific subject.", + "required": false, + "type": "boolean" + } + }, + { + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "required": false, + "type": "boolean" + } + }, + { + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "required": false, + "type": "boolean" + } + }, + { + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "required": false, + "type": "boolean" + } + }, + { + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "required": false, + "type": "string" + } + }, + { + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "required": false, + "type": "string" + } + }, + { + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "required": false, + "type": "string" + } + }, + { + "session_memcached_port": { + "between": [ + 0, + 65535 + ], + "required": false, + "type": "integer", + "default": 11211, + "description": "The memcached port." + } + }, + { + "redis": { + "required": true, + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ] + } + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ] + }, + "len_min": 1, + "type": "array" + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ] + }, + "len_min": 1, + "type": "array" + } + } + ], + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "one_of": [ + "master", + "slave", + "any" + ], + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "type": "array", + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ], + "type": "record" + }, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "required": false, + "type": "array", + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ], + "type": "record" + }, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean" + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean" + } + }, + { + "prefix": { + "description": "The Redis session key prefix.", + "required": false, + "type": "string" + } + }, + { + "socket": { + "description": "The Redis unix socket path.", + "required": false, + "type": "string" + } + } + ] + } + }, + { + "reverify": { + "default": false, + "description": "Specifies whether to always verify tokens stored in the session.", + "required": false, + "type": "boolean" + } + }, + { + "jwt_session_claim": { + "default": "sid", + "description": "The claim to match against the JWT session cookie.", + "required": false, + "type": "string" + } + }, + { + "jwt_session_cookie": { + "description": "The name of the JWT session cookie.", + "required": false, + "type": "string" + } + }, + { + "bearer_token_param_type": { + "required": false, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "description": "Where to look for the bearer token: - `header`: search the `Authorization`, `access-token`, and `x-access-token` HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body - `cookie`: search the HTTP request cookies specified with `config.bearer_token_cookie_name`.", + "elements": { + "type": "string", + "one_of": [ + "header", + "cookie", + "query", + "body" + ] + } + } + }, + { + "bearer_token_cookie_name": { + "description": "The name of the cookie in which the bearer token is passed.", + "required": false, + "type": "string" + } + }, + { + "client_credentials_param_type": { + "required": false, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "description": "Where to look for the client credentials: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search from the HTTP request body.", + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + } + } + }, + { + "password_param_type": { + "required": false, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "description": "Where to look for the username and password: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + } + } + }, + { + "id_token_param_type": { + "required": false, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "description": "Where to look for the id token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + } + } + }, + { + "id_token_param_name": { + "description": "The name of the parameter used to pass the id token.", + "required": false, + "type": "string" + } + }, + { + "refresh_token_param_type": { + "required": false, + "type": "array", + "default": [ + "header", + "query", + "body" + ], + "description": "Where to look for the refresh token: - `header`: search the HTTP headers - `query`: search the URL's query string - `body`: search the HTTP request body.", + "elements": { + "type": "string", + "one_of": [ + "header", + "query", + "body" + ] + } + } + }, + { + "refresh_token_param_name": { + "description": "The name of the parameter used to pass the refresh token.", + "required": false, + "type": "string" + } + }, + { + "refresh_tokens": { + "default": true, + "description": "Specifies whether the plugin should try to refresh (soon to be) expired access tokens if the plugin has a `refresh_token` available.", + "required": false, + "type": "boolean" + } + }, + { + "upstream_headers_claims": { + "elements": { + "type": "string" + }, + "description": "The upstream header claims. Only top level claims are supported.", + "required": false, + "type": "array" + } + }, + { + "upstream_headers_names": { + "elements": { + "type": "string" + }, + "description": "The upstream header names for the claim values.", + "required": false, + "type": "array" + } + }, + { + "upstream_access_token_header": { + "default": "authorization:bearer", + "description": "The upstream access token header.", + "required": false, + "type": "string" + } + }, + { + "upstream_access_token_jwk_header": { + "description": "The upstream access token JWK header.", + "required": false, + "type": "string" + } + }, + { + "upstream_id_token_header": { + "description": "The upstream id token header.", + "required": false, + "type": "string" + } + }, + { + "upstream_id_token_jwk_header": { + "description": "The upstream id token JWK header.", + "required": false, + "type": "string" + } + }, + { + "upstream_refresh_token_header": { + "description": "The upstream refresh token header.", + "required": false, + "type": "string" + } + }, + { + "upstream_user_info_header": { + "description": "The upstream user info header.", + "required": false, + "type": "string" + } + }, + { + "upstream_user_info_jwt_header": { + "description": "The upstream user info JWT header (in case the user info returns a JWT response).", + "required": false, + "type": "string" + } + }, + { + "upstream_introspection_header": { + "description": "The upstream introspection header.", + "required": false, + "type": "string" + } + }, + { + "upstream_introspection_jwt_header": { + "description": "The upstream introspection JWT header.", + "required": false, + "type": "string" + } + }, + { + "upstream_session_id_header": { + "description": "The upstream session id header.", + "required": false, + "type": "string" + } + }, + { + "downstream_headers_claims": { + "elements": { + "type": "string" + }, + "description": "The downstream header claims. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "required": false, + "type": "array" + } + }, + { + "downstream_headers_names": { + "elements": { + "type": "string" + }, + "description": "The downstream header names for the claim values.", + "required": false, + "type": "array" + } + }, + { + "downstream_access_token_header": { + "description": "The downstream access token header.", + "required": false, + "type": "string" + } + }, + { + "downstream_access_token_jwk_header": { + "description": "The downstream access token JWK header.", + "required": false, + "type": "string" + } + }, + { + "downstream_id_token_header": { + "description": "The downstream id token header.", + "required": false, + "type": "string" + } + }, + { + "downstream_id_token_jwk_header": { + "description": "The downstream id token JWK header.", + "required": false, + "type": "string" + } + }, + { + "downstream_refresh_token_header": { + "description": "The downstream refresh token header.", + "required": false, + "type": "string" + } + }, + { + "downstream_user_info_header": { + "description": "The downstream user info header.", + "required": false, + "type": "string" + } + }, + { + "downstream_user_info_jwt_header": { + "description": "The downstream user info JWT header (in case the user info returns a JWT response).", + "required": false, + "type": "string" + } + }, + { + "downstream_introspection_header": { + "description": "The downstream introspection header.", + "required": false, + "type": "string" + } + }, + { + "downstream_introspection_jwt_header": { + "description": "The downstream introspection JWT header.", + "required": false, + "type": "string" + } + }, + { + "downstream_session_id_header": { + "description": "The downstream session id header.", + "required": false, + "type": "string" + } + }, + { + "login_methods": { + "required": false, + "type": "array", + "default": [ + "authorization_code" + ], + "description": "Enable login functionality with specified grants.", + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + } + } + }, + { + "login_action": { + "required": false, + "type": "string", + "default": "upstream", + "description": "What to do after successful login: - `upstream`: proxy request to upstream service - `response`: terminate request with a response - `redirect`: redirect to a different location.", + "one_of": [ + "upstream", + "response", + "redirect" + ] + } + }, + { + "login_tokens": { + "required": false, + "type": "array", + "default": [ + "id_token" + ], + "description": "What tokens to include in `response` body or `redirect` query string or fragment: - `id_token`: include id token - `access_token`: include access token - `refresh_token`: include refresh token - `tokens`: include the full token endpoint response - `introspection`: include introspection response.", + "elements": { + "type": "string", + "one_of": [ + "id_token", + "access_token", + "refresh_token", + "tokens", + "introspection" + ] + } + } + }, + { + "login_redirect_mode": { + "required": false, + "type": "string", + "default": "fragment", + "description": "Where to place `login_tokens` when using `redirect` `login_action`: - `query`: place tokens in query string - `fragment`: place tokens in url fragment (not readable by servers).", + "one_of": [ + "query", + "fragment" + ] + } + }, + { + "logout_query_arg": { + "description": "The request query argument that activates the logout.", + "required": false, + "type": "string" + } + }, + { + "logout_post_arg": { + "description": "The request body argument that activates the logout.", + "required": false, + "type": "string" + } + }, + { + "logout_uri_suffix": { + "description": "The request URI suffix that activates the logout.", + "required": false, + "type": "string" + } + }, + { + "logout_methods": { + "required": false, + "type": "array", + "default": [ + "POST", + "DELETE" + ], + "description": "The request methods that can activate the logout: - `POST`: HTTP POST method - `GET`: HTTP GET method - `DELETE`: HTTP DELETE method.", + "elements": { + "type": "string", + "one_of": [ + "POST", + "GET", + "DELETE" + ] + } + } + }, + { + "logout_revoke": { + "default": false, + "description": "Revoke tokens as part of the logout.\n\nFor more granular token revocation, you can also adjust the `logout_revoke_access_token` and `logout_revoke_refresh_token` parameters.", + "required": false, + "type": "boolean" + } + }, + { + "logout_revoke_access_token": { + "default": true, + "description": "Revoke the access token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "required": false, + "type": "boolean" + } + }, + { + "logout_revoke_refresh_token": { + "default": true, + "description": "Revoke the refresh token as part of the logout. Requires `logout_revoke` to be set to `true`.", + "required": false, + "type": "boolean" + } + }, + { + "consumer_claim": { + "elements": { + "type": "string" + }, + "description": "The claim used for consumer mapping. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "required": false, + "type": "array" + } + }, + { + "consumer_by": { + "required": false, + "type": "array", + "default": [ + "username", + "custom_id" + ], + "description": "Consumer fields used for mapping: - `id`: try to find the matching Consumer by `id` - `username`: try to find the matching Consumer by `username` - `custom_id`: try to find the matching Consumer by `custom_id`.", + "elements": { + "type": "string", + "one_of": [ + "id", + "username", + "custom_id" + ] + } + } + }, + { + "consumer_optional": { + "default": false, + "description": "Do not terminate the request if consumer mapping fails.", + "required": false, + "type": "boolean" + } + }, + { + "credential_claim": { + "required": false, + "type": "array", + "default": [ + "sub" + ], + "description": "The claim used to derive virtual credentials (e.g. to be consumed by the rate-limiting plugin), in case the consumer mapping is not used. If multiple values are set, it means the claim is inside a nested object of the token payload.", + "elements": { + "type": "string" + } + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value that functions as an “anonymous” consumer if authentication fails. If empty (default null), requests that fail authentication will return a `4xx` HTTP status code. This value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "required": false, + "type": "string" + } + }, + { + "run_on_preflight": { + "default": true, + "description": "Specifies whether to run this plugin on pre-flight (`OPTIONS`) requests.", + "required": false, + "type": "boolean" + } + }, + { + "leeway": { + "default": 0, + "description": "Defines leeway time (in seconds) for `auth_time`, `exp`, `iat`, and `nbf` claims", + "required": false, + "type": "number" + } + }, + { + "verify_parameters": { + "default": false, + "description": "Verify plugin configuration against discovery.", + "required": false, + "type": "boolean" + } + }, + { + "verify_nonce": { + "default": true, + "description": "Verify nonce on authorization code flow.", + "required": false, + "type": "boolean" + } + }, + { + "verify_claims": { + "default": true, + "description": "Verify tokens for standard claims.", + "required": false, + "type": "boolean" + } + }, + { + "verify_signature": { + "default": true, + "description": "Verify signature of tokens.", + "required": false, + "type": "boolean" + } + }, + { + "ignore_signature": { + "required": false, + "type": "array", + "default": [ + + ], + "description": "Skip the token signature verification on certain grants: - `password`: OAuth password grant - `client_credentials`: OAuth client credentials grant - `authorization_code`: authorization code flow - `refresh_token`: OAuth refresh token grant - `session`: session cookie authentication - `introspection`: OAuth introspection - `userinfo`: OpenID Connect user info endpoint authentication.", + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "refresh_token", + "session", + "introspection", + "userinfo" + ] + } + } + }, + { + "enable_hs_signatures": { + "default": false, + "description": "Enable shared secret, for example, HS256, signatures (when disabled they will not be accepted).", + "required": false, + "type": "boolean" + } + }, + { + "disable_session": { + "elements": { + "type": "string", + "one_of": [ + "password", + "client_credentials", + "authorization_code", + "bearer", + "introspection", + "userinfo", + "kong_oauth2", + "refresh_token", + "session" + ] + }, + "description": "Disable issuing the session cookie with the specified grants.", + "required": false, + "type": "array" + } + }, + { + "cache_ttl": { + "default": 3600, + "description": "The default cache ttl in seconds that is used in case the cached object does not specify the expiry.", + "required": false, + "type": "number" + } + }, + { + "cache_ttl_max": { + "description": "The maximum cache ttl in seconds (enforced).", + "required": false, + "type": "number" + } + }, + { + "cache_ttl_min": { + "description": "The minimum cache ttl in seconds (enforced).", + "required": false, + "type": "number" + } + }, + { + "cache_ttl_neg": { + "description": "The negative cache ttl in seconds.", + "required": false, + "type": "number" + } + }, + { + "cache_ttl_resurrect": { + "description": "The resurrection ttl in seconds.", + "required": false, + "type": "number" + } + }, + { + "cache_tokens": { + "default": true, + "description": "Cache the token endpoint requests.", + "required": false, + "type": "boolean" + } + }, + { + "cache_tokens_salt": { + "auto": true, + "description": "Salt used for generating the cache key that is used for caching the token endpoint requests.", + "required": false, + "type": "string" + } + }, + { + "cache_introspection": { + "default": true, + "description": "Cache the introspection endpoint requests.", + "required": false, + "type": "boolean" + } + }, + { + "cache_token_exchange": { + "default": true, + "description": "Cache the token exchange endpoint requests.", + "required": false, + "type": "boolean" + } + }, + { + "cache_user_info": { + "default": true, + "description": "Cache the user info requests.", + "required": false, + "type": "boolean" + } + }, + { + "search_user_info": { + "default": false, + "description": "Specify whether to use the user info endpoint to get additional claims for consumer mapping, credential mapping, authenticated groups, and upstream and downstream headers.", + "required": false, + "type": "boolean" + } + }, + { + "hide_credentials": { + "default": false, + "description": "Remove the credentials used for authentication from the request. If multiple credentials are sent with the same request, the plugin will remove those that were used for successful authentication.", + "required": false, + "type": "boolean" + } + }, + { + "http_version": { + "default": 1.1, + "description": "The HTTP version used for the requests by this plugin: - `1.1`: HTTP 1.1 (the default) - `1.0`: HTTP 1.0.", + "required": false, + "type": "number" + } + }, + { + "http_proxy": { + "description": "The HTTP proxy.", + "required": false, + "type": "string" + } + }, + { + "http_proxy_authorization": { + "required": false, + "description": "The HTTP proxy authorization.", + "referenceable": true, + "type": "string" + } + }, + { + "https_proxy": { + "description": "The HTTPS proxy.", + "required": false, + "type": "string" + } + }, + { + "https_proxy_authorization": { + "required": false, + "description": "The HTTPS proxy authorization.", + "referenceable": true, + "type": "string" + } + }, + { + "no_proxy": { + "description": "Do not use proxy with these hosts.", + "required": false, + "type": "string" + } + }, + { + "keepalive": { + "default": true, + "description": "Use keepalive with the HTTP client.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "Verify identity provider server certificate. If set to `true`, the plugin uses the CA certificate set in the `kong.conf` config parameter `lua_ssl_trusted_certificate`.", + "required": false, + "type": "boolean" + } + }, + { + "timeout": { + "default": 10000, + "description": "Network IO timeout in milliseconds.", + "required": false, + "type": "number" + } + }, + { + "display_errors": { + "default": false, + "description": "Display errors on failure responses.", + "required": false, + "type": "boolean" + } + }, + { + "by_username_ignore_case": { + "default": false, + "description": "If `consumer_by` is set to `username`, specify whether `username` can match consumers case-insensitively.", + "required": false, + "type": "boolean" + } + }, + { + "resolve_distributed_claims": { + "default": false, + "description": "Distributed claims are represented by the `_claim_names` and `_claim_sources` members of the JSON object containing the claims. If this parameter is set to `true`, the plugin explicitly resolves these distributed claims.", + "required": false, + "type": "boolean" + } + }, + { + "expose_error_code": { + "default": true, + "description": "Specifies whether to expose the error code header, as defined in RFC 6750. If an authorization request fails, this header is sent in the response. Set to `false` to disable.", + "type": "boolean" + } + }, + { + "token_cache_key_include_scope": { + "default": false, + "description": "Include the scope in the token cache key, so token with different scopes are considered diffrent tokens.", + "type": "boolean" + } + }, + { + "introspection_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for introspection.", + "required": false, + "type": "string" + } + }, + { + "revocation_token_param_name": { + "default": "token", + "description": "Designate token's parameter name for revocation.", + "required": false, + "type": "string" + } + }, + { + "proof_of_possession_mtls": { + "required": false, + "type": "string", + "default": "off", + "description": "Enable mtls proof of possession. If set to strict, all tokens (from supported auth_methods: bearer, introspection, and session granted with bearer or introspection) are verified, if set to optional, only tokens that contain the certificate hash claim are verified. If the verification fails, the request will be rejected with 401.", + "one_of": [ + "off", + "strict", + "optional" + ] + } + }, + { + "proof_of_possession_auth_methods_validation": { + "default": true, + "description": "If set to true, only the auth_methods that are compatible with Proof of Possession (PoP) can be configured when PoP is enabled. If set to false, all auth_methods will be configurable and PoP checks will be silently skipped for those auth_methods that are not compatible with PoP.", + "required": false, + "type": "boolean" + } + }, + { + "tls_client_auth_cert_id": { + "auto": false, + "required": false, + "type": "string", + "description": "ID of the Certificate entity representing the client certificate to use for mTLS client authentication for connections between Kong and the Auth Server.", + "uuid": true + } + }, + { + "tls_client_auth_ssl_verify": { + "default": true, + "description": "Verify identity provider server certificate during mTLS client authentication.", + "required": false, + "type": "boolean" + } + }, + { + "mtls_token_endpoint": { + "description": "Alias for the token endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "mtls_introspection_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "mtls_revocation_endpoint": { + "description": "Alias for the introspection endpoint to be used for mTLS client authentication. If set it overrides the value in `mtls_endpoint_aliases` returned by the discovery endpoint.", + "required": false, + "type": "string" + } + }, + { + "proof_of_possession_dpop": { + "required": false, + "type": "string", + "default": "off", + "description": "Enable Demonstrating Proof-of-Possession (DPoP). If set to strict, all request are verified despite the presence of the DPoP key claim (cnf.jkt). If set to optional, only tokens bound with DPoP's key are verified with the proof.", + "one_of": [ + "off", + "strict", + "optional" + ] + } + }, + { + "dpop_use_nonce": { + "default": false, + "description": "Specifies whether to challenge the client with a nonce value for DPoP proof. When enabled it will also be used to calculate the DPoP proof lifetime.", + "required": false, + "type": "boolean" + } + }, + { + "dpop_proof_lifetime": { + "default": 300, + "description": "Specifies the lifetime in seconds of the DPoP proof. It determines how long the same proof can be used after creation. The creation time is determined by the nonce creation time if a nonce is used, and the iat claim otherwise.", + "required": false, + "type": "number" + } + }, + { + "claims_forbidden": { + "elements": { + "type": "string" + }, + "description": "If given, these claims are forbidden in the token payload.", + "required": false, + "type": "array" + } + }, + { + "cluster_cache_strategy": { + "required": false, + "type": "string", + "default": "off", + "description": "The strategy to use for the cluster cache. If set, the plugin will share cache with nodes configured with the same strategy backend. Currentlly only introspection cache is shared.", + "one_of": [ + "off", + "redis" + ] + } + }, + { + "cluster_cache_redis": { + "required": true, + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ] + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ] + }, + "type": "array" + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ] + }, + "type": "array" + } + } + ], + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "type": "string", + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean" + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean" + } + } + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/opentelemetry/3.10.x.json b/schemas/opentelemetry/3.10.x.json new file mode 100644 index 00000000..ce77a55e --- /dev/null +++ b/schemas/opentelemetry/3.10.x.json @@ -0,0 +1,371 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "traces_endpoint", + "logs_endpoint" + ] + } + ], + "type": "record", + "fields": [ + { + "traces_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string", + "referenceable": true + } + }, + { + "logs_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string", + "referenceable": true + } + }, + { + "headers": { + "description": "The custom headers to be added in the HTTP request sent to the OTLP server. This setting is useful for adding the authentication headers (token) for the APM backend.", + "type": "map", + "values": { + "referenceable": true, + "type": "string" + }, + "keys": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + } + }, + { + "resource_attributes": { + "type": "map", + "values": { + "required": true, + "type": "string" + }, + "keys": { + "required": true, + "type": "string" + } + } + }, + { + "queue": { + "required": true, + "type": "record", + "default": { + "max_batch_size": 200 + }, + "fields": [ + { + "max_batch_size": { + "between": [ + 1, + 1000000 + ], + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time." + } + }, + { + "max_coalescing_delay": { + "between": [ + 0, + 3600 + ], + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." + } + }, + { + "max_entries": { + "between": [ + 1, + 1000000 + ], + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue." + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "default": 60, + "type": "number" + } + }, + { + "initial_retry_delay": { + "between": [ + 0.001, + 1000000 + ], + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch." + } + }, + { + "max_retry_delay": { + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "default": 60, + "type": "number", + "between": [ + 0.001, + 1000000 + ] + } + }, + { + "concurrency_limit": { + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "default": 1, + "type": "integer", + "one_of": [ + -1, + 1 + ] + } + } + ] + } + }, + { + "batch_span_count": { + "description": "The number of spans to be sent in a single batch.", + "type": "integer", + "deprecation": { + "message": "opentelemetry: config.batch_span_count is deprecated, please use config.queue.max_batch_size instead", + "old_default": 200, + "removal_in_version": "4.0" + } + } + }, + { + "batch_flush_delay": { + "description": "The delay, in seconds, between two consecutive batches.", + "type": "integer", + "deprecation": { + "message": "opentelemetry: config.batch_flush_delay is deprecated, please use config.queue.max_coalescing_delay instead", + "old_default": 3, + "removal_in_version": "4.0" + } + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 1000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 5000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 5000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "http_response_header_for_traceid": { + "type": "string" + } + }, + { + "header_type": { + "type": "string", + "deprecation": { + "message": "opentelemetry: config.header_type is deprecated, please use config.propagation options instead", + "old_default": "preserve", + "removal_in_version": "4.0" + }, + "one_of": [ + "preserve", + "ignore", + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "gcp", + "datadog", + "instana" + ], + "default": "preserve", + "required": false + } + }, + { + "sampling_rate": { + "description": "Tracing sampling rate for configuring the probability-based sampler. When set, this value supersedes the global `tracing_sampling_rate` setting from kong.conf.", + "type": "number", + "between": [ + 0, + 1 + ], + "required": false + } + }, + { + "propagation": { + "fields": [ + { + "extract": { + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "jaeger", + "ot", + "datadog", + "aws", + "gcp", + "instana", + "w3c", + "b3" + ] + } + } + }, + { + "clear": { + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "inject": { + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "preserve", + "b3-single", + "jaeger", + "ot", + "datadog", + "aws", + "gcp", + "instana", + "w3c", + "b3" + ] + } + } + }, + { + "default_format": { + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "type": "string", + "one_of": [ + "b3-single", + "jaeger", + "ot", + "datadog", + "aws", + "gcp", + "instana", + "w3c", + "b3" + ], + "required": true + } + } + ], + "default": { + "default_format": "w3c" + }, + "type": "record", + "required": true + } + } + ], + "shorthand_fields": [ + { + "endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string", + "referenceable": true, + "deprecation": { + "removal_in_version": "4.0", + "message": "OpenTelemetry: config.endpoint is deprecated, please use config.traces_endpoint instead" + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/opentelemetry/3.11.x.json b/schemas/opentelemetry/3.11.x.json new file mode 100644 index 00000000..3c859621 --- /dev/null +++ b/schemas/opentelemetry/3.11.x.json @@ -0,0 +1,383 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "traces_endpoint": { + "referenceable": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "logs_endpoint": { + "referenceable": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "headers": { + "description": "The custom headers to be added in the HTTP request sent to the OTLP server. This setting is useful for adding the authentication headers (token) for the APM backend.", + "keys": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "values": { + "referenceable": true, + "type": "string" + }, + "type": "map" + } + }, + { + "resource_attributes": { + "keys": { + "type": "string", + "required": true + }, + "values": { + "type": "string", + "required": true + }, + "type": "map" + } + }, + { + "queue": { + "default": { + "max_batch_size": 200 + }, + "required": true, + "fields": [ + { + "max_batch_size": { + "default": 1, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be processed at a time.", + "type": "integer" + } + }, + { + "max_coalescing_delay": { + "default": 1, + "between": [ + 0, + 3600 + ], + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "type": "number" + } + }, + { + "max_entries": { + "default": 10000, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be waiting on the queue.", + "type": "integer" + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "between": [ + 0.001, + 1000000 + ], + "description": "Time in seconds before the initial retry is made for a failing batch.", + "type": "number" + } + }, + { + "max_retry_delay": { + "default": 60, + "between": [ + 0.001, + 1000000 + ], + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "type": "number" + } + }, + { + "concurrency_limit": { + "one_of": [ + -1, + 1 + ], + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "type": "integer" + } + } + ], + "type": "record" + } + }, + { + "batch_span_count": { + "deprecation": { + "old_default": 200, + "removal_in_version": "4.0", + "message": "opentelemetry: config.batch_span_count is deprecated, please use config.queue.max_batch_size instead" + }, + "description": "The number of spans to be sent in a single batch.", + "type": "integer" + } + }, + { + "batch_flush_delay": { + "deprecation": { + "old_default": 3, + "removal_in_version": "4.0", + "message": "opentelemetry: config.batch_flush_delay is deprecated, please use config.queue.max_coalescing_delay instead" + }, + "description": "The delay, in seconds, between two consecutive batches.", + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 1000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "default": 5000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "read_timeout": { + "default": 5000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "http_response_header_for_traceid": { + "type": "string" + } + }, + { + "header_type": { + "required": false, + "deprecation": { + "old_default": "preserve", + "removal_in_version": "4.0", + "message": "opentelemetry: config.header_type is deprecated, please use config.propagation options instead" + }, + "one_of": [ + "preserve", + "ignore", + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "gcp", + "datadog", + "instana" + ], + "default": "preserve", + "type": "string" + } + }, + { + "sampling_rate": { + "between": [ + 0, + 1 + ], + "required": false, + "description": "Tracing sampling rate for configuring the probability-based sampler. When set, this value supersedes the global `tracing_sampling_rate` setting from kong.conf.", + "type": "number" + } + }, + { + "propagation": { + "default": { + "default_format": "w3c" + }, + "required": true, + "fields": [ + { + "extract": { + "type": "array", + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "elements": { + "one_of": [ + "w3c", + "b3", + "jaeger", + "ot", + "datadog", + "aws", + "gcp", + "instana" + ], + "type": "string" + } + } + }, + { + "clear": { + "type": "array", + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "elements": { + "type": "string" + } + } + }, + { + "inject": { + "type": "array", + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "elements": { + "one_of": [ + "preserve", + "w3c", + "b3", + "b3-single", + "jaeger", + "ot", + "datadog", + "aws", + "gcp", + "instana" + ], + "type": "string" + } + } + }, + { + "default_format": { + "one_of": [ + "w3c", + "b3", + "b3-single", + "jaeger", + "ot", + "datadog", + "aws", + "gcp", + "instana" + ], + "required": true, + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "sampling_strategy": { + "required": true, + "description": "The sampling strategy to use for OTLP `traces`. Set `parent_drop_probability_fallback` if you want parent-based sampling when the parent span contains a `false` sampled flag, and fallback to probability-based sampling otherwise. Set `parent_probability_fallback` if you want parent-based sampling when the parent span contains a valid sampled flag (`true` or `false`), and fallback to probability-based sampling otherwise.", + "one_of": [ + "parent_drop_probability_fallback", + "parent_probability_fallback" + ], + "default": "parent_drop_probability_fallback", + "type": "string" + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "traces_endpoint", + "logs_endpoint" + ] + } + ], + "shorthand_fields": [ + { + "endpoint": { + "deprecation": { + "removal_in_version": "4.0", + "message": "OpenTelemetry: config.endpoint is deprecated, please use config.traces_endpoint instead" + }, + "referenceable": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/opentelemetry/3.12.x.json b/schemas/opentelemetry/3.12.x.json new file mode 100644 index 00000000..c352f14a --- /dev/null +++ b/schemas/opentelemetry/3.12.x.json @@ -0,0 +1,381 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "entity_checks": [ + { + "at_least_one_of": [ + "traces_endpoint", + "logs_endpoint" + ] + } + ], + "required": true, + "fields": [ + { + "traces_endpoint": { + "type": "string", + "referenceable": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "logs_endpoint": { + "type": "string", + "referenceable": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "headers": { + "type": "map", + "description": "The custom headers to be added in the HTTP request sent to the OTLP server. This setting is useful for adding the authentication headers (token) for the APM backend.", + "values": { + "referenceable": true, + "type": "string" + }, + "keys": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + }, + { + "resource_attributes": { + "type": "map", + "values": { + "type": "string", + "required": true + }, + "keys": { + "type": "string", + "required": true + } + } + }, + { + "queue": { + "type": "record", + "default": { + "max_batch_size": 200 + }, + "fields": [ + { + "max_batch_size": { + "type": "integer", + "default": 1, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be processed at a time." + } + }, + { + "max_coalescing_delay": { + "type": "number", + "default": 1, + "between": [ + 0, + 3600 + ], + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." + } + }, + { + "max_entries": { + "type": "integer", + "default": 10000, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be waiting on the queue." + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "type": "number", + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." + } + }, + { + "initial_retry_delay": { + "type": "number", + "default": 0.01, + "between": [ + 0.001, + 1000000 + ], + "description": "Time in seconds before the initial retry is made for a failing batch." + } + }, + { + "max_retry_delay": { + "type": "number", + "default": 60, + "between": [ + 0.001, + 1000000 + ], + "description": "Maximum time in seconds between retries, caps exponential backoff." + } + }, + { + "concurrency_limit": { + "type": "integer", + "default": 1, + "one_of": [ + -1, + 1 + ], + "description": "The number of of queue delivery timers. -1 indicates unlimited." + } + } + ], + "required": true + } + }, + { + "batch_span_count": { + "type": "integer", + "deprecation": { + "old_default": 200, + "message": "opentelemetry: config.batch_span_count is deprecated, please use config.queue.max_batch_size instead", + "removal_in_version": "4.0" + }, + "description": "The number of spans to be sent in a single batch." + } + }, + { + "batch_flush_delay": { + "type": "integer", + "deprecation": { + "old_default": 3, + "message": "opentelemetry: config.batch_flush_delay is deprecated, please use config.queue.max_coalescing_delay instead", + "removal_in_version": "4.0" + }, + "description": "The delay, in seconds, between two consecutive batches." + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 1000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "default": 5000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "default": 5000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "http_response_header_for_traceid": { + "type": "string" + } + }, + { + "header_type": { + "type": "string", + "required": false, + "default": "preserve", + "one_of": [ + "preserve", + "ignore", + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "gcp", + "datadog", + "instana" + ], + "deprecation": { + "old_default": "preserve", + "message": "opentelemetry: config.header_type is deprecated, please use config.propagation options instead", + "removal_in_version": "4.0" + } + } + }, + { + "sampling_rate": { + "type": "number", + "description": "Tracing sampling rate for configuring the probability-based sampler. When set, this value supersedes the global `tracing_sampling_rate` setting from kong.conf.", + "between": [ + 0, + 1 + ], + "required": false + } + }, + { + "propagation": { + "type": "record", + "default": { + "default_format": "w3c" + }, + "fields": [ + { + "extract": { + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "gcp", + "instana", + "w3c", + "b3", + "jaeger", + "ot", + "datadog", + "aws" + ] + } + } + }, + { + "clear": { + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "inject": { + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "preserve", + "gcp", + "instana", + "w3c", + "b3", + "b3-single", + "jaeger", + "ot", + "datadog", + "aws" + ] + } + } + }, + { + "default_format": { + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "type": "string", + "one_of": [ + "gcp", + "instana", + "w3c", + "b3", + "b3-single", + "jaeger", + "ot", + "datadog", + "aws" + ], + "required": true + } + } + ], + "required": true + } + }, + { + "sampling_strategy": { + "type": "string", + "required": true, + "description": "The sampling strategy to use for OTLP `traces`. Set `parent_drop_probability_fallback` if you want parent-based sampling when the parent span contains a `false` sampled flag, and fallback to probability-based sampling otherwise. Set `parent_probability_fallback` if you want parent-based sampling when the parent span contains a valid sampled flag (`true` or `false`), and fallback to probability-based sampling otherwise.", + "default": "parent_drop_probability_fallback", + "one_of": [ + "parent_drop_probability_fallback", + "parent_probability_fallback" + ] + } + } + ], + "shorthand_fields": [ + { + "endpoint": { + "type": "string", + "deprecation": { + "message": "OpenTelemetry: config.endpoint is deprecated, please use config.traces_endpoint instead", + "removal_in_version": "4.0" + }, + "referenceable": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/opentelemetry/3.4.x.json b/schemas/opentelemetry/3.4.x.json index 9d455e42..13611063 100644 --- a/schemas/opentelemetry/3.4.x.json +++ b/schemas/opentelemetry/3.4.x.json @@ -2,28 +2,36 @@ "fields": [ { "protocols": { - "default": [ - "grpc", - "grpcs", - "http", - "https" - ], + "description": "A set of strings representing HTTP protocols.", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" + ] }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], "required": true, "type": "set" } }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, { "config": { - "required": true, "entity_checks": [ { "custom_entity_check": { @@ -37,16 +45,20 @@ "fields": [ { "endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "referenceable": true, "type": "string", "required": true } }, { "headers": { - "type": "map", + "description": "The custom headers to be added in the HTTP request sent to the OTLP server. This setting is useful for adding the authentication headers (token) for the APM backend.", "keys": { + "description": "A string representing an HTTP header name.", "type": "string" }, + "type": "map", "values": { "type": "string", "referenceable": true @@ -55,116 +67,139 @@ }, { "resource_attributes": { - "values": { + "keys": { "type": "string", "required": true }, - "keys": { + "type": "map", + "values": { "type": "string", "required": true - }, - "type": "map" - } - }, - { - "batch_span_count": { - "type": "integer" - } - }, - { - "batch_flush_delay": { - "type": "integer" + } } }, { "queue": { - "required": true, + "default": { + "max_batch_size": 200 + }, "fields": [ { "max_batch_size": { + "default": 1, "between": [ 1, 1000000 ], - "type": "number", - "default": 1 + "type": "integer", + "description": "Maximum number of entries that can be processed at a time." } }, { "max_coalescing_delay": { + "default": 1, "between": [ 0, 3600 ], "type": "number", - "default": 1 + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." } }, { "max_entries": { + "default": 10000, "between": [ 1, 1000000 ], - "type": "number", - "default": 10000 + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue." } }, { "max_bytes": { - "type": "number" + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." } }, { "max_retry_time": { "default": 60, - "type": "number" + "type": "number", + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." } }, { "initial_retry_delay": { "default": 0.01, - "type": "number" + "between": [ + 0.001, + 1000000 + ], + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch." } }, { "max_retry_delay": { "default": 60, - "type": "number" + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "type": "number", + "between": [ + 0.001, + 1000000 + ] } } ], - "type": "record" + "type": "record", + "required": true + } + }, + { + "batch_span_count": { + "description": "The number of spans to be sent in a single batch.", + "type": "integer" + } + }, + { + "batch_flush_delay": { + "description": "The delay, in seconds, between two consecutive batches.", + "type": "integer" } }, { "connect_timeout": { + "default": 1000, "between": [ 0, 2147483646 ], "type": "integer", - "default": 1000 + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." } }, { "send_timeout": { + "default": 5000, "between": [ 0, 2147483646 ], "type": "integer", - "default": 5000 + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." } }, { "read_timeout": { + "default": 5000, "between": [ 0, 2147483646 ], "type": "integer", - "default": 5000 + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." } }, { @@ -174,6 +209,8 @@ }, { "header_type": { + "default": "preserve", + "required": false, "type": "string", "one_of": [ "preserve", @@ -182,15 +219,19 @@ "b3-single", "w3c", "jaeger", - "ot" - ], - "required": false, - "default": "preserve" + "ot", + "aws", + "datadog" + ] } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/opentelemetry/3.5.x.json b/schemas/opentelemetry/3.5.x.json new file mode 100644 index 00000000..a43d7b02 --- /dev/null +++ b/schemas/opentelemetry/3.5.x.json @@ -0,0 +1,238 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumer_groups" + } + }, + { + "config": { + "fields": [ + { + "endpoint": { + "required": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string", + "referenceable": true + } + }, + { + "headers": { + "values": { + "referenceable": true, + "type": "string" + }, + "type": "map", + "keys": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "description": "The custom headers to be added in the HTTP request sent to the OTLP server. This setting is useful for adding the authentication headers (token) for the APM backend." + } + }, + { + "resource_attributes": { + "values": { + "required": true, + "type": "string" + }, + "type": "map", + "keys": { + "required": true, + "type": "string" + } + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_coalescing_delay": { + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "between": [ + 0, + 3600 + ] + } + }, + { + "max_entries": { + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "type": "number", + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "default": 60 + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch.", + "between": [ + 0.001, + 1000000 + ] + } + }, + { + "max_retry_delay": { + "default": 60, + "type": "number", + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "between": [ + 0.001, + 1000000 + ] + } + } + ], + "required": true, + "type": "record", + "default": { + "max_batch_size": 200 + } + } + }, + { + "batch_span_count": { + "type": "integer", + "description": "The number of spans to be sent in a single batch." + } + }, + { + "batch_flush_delay": { + "type": "integer", + "description": "The delay, in seconds, between two consecutive batches." + } + }, + { + "connect_timeout": { + "default": 1000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "http_response_header_for_traceid": { + "type": "string" + } + }, + { + "header_type": { + "required": false, + "one_of": [ + "preserve", + "ignore", + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "gcp", + "datadog" + ], + "type": "string", + "default": "preserve" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "batch_span_count", + "batch_flush_delay" + ] + } + } + ], + "type": "record", + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/opentelemetry/3.6.x.json b/schemas/opentelemetry/3.6.x.json new file mode 100644 index 00000000..ea119961 --- /dev/null +++ b/schemas/opentelemetry/3.6.x.json @@ -0,0 +1,249 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" + } + }, + { + "config": { + "type": "record", + "required": true, + "fields": [ + { + "endpoint": { + "referenceable": true, + "required": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "headers": { + "type": "map", + "keys": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "description": "The custom headers to be added in the HTTP request sent to the OTLP server. This setting is useful for adding the authentication headers (token) for the APM backend.", + "values": { + "type": "string", + "referenceable": true + } + } + }, + { + "resource_attributes": { + "type": "map", + "keys": { + "type": "string", + "required": true + }, + "values": { + "type": "string", + "required": true + } + } + }, + { + "queue": { + "type": "record", + "required": true, + "default": { + "max_batch_size": 200 + }, + "fields": [ + { + "max_batch_size": { + "type": "integer", + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be processed at a time.", + "default": 1 + } + }, + { + "max_coalescing_delay": { + "type": "number", + "between": [ + 0, + 3600 + ], + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "default": 1 + } + }, + { + "max_entries": { + "type": "integer", + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be waiting on the queue.", + "default": 10000 + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "type": "number", + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." + } + }, + { + "initial_retry_delay": { + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "description": "Time in seconds before the initial retry is made for a failing batch.", + "default": 0.01 + } + }, + { + "max_retry_delay": { + "type": "number", + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "default": 60, + "between": [ + 0.001, + 1000000 + ] + } + } + ] + } + }, + { + "batch_span_count": { + "description": "The number of spans to be sent in a single batch.", + "type": "integer" + } + }, + { + "batch_flush_delay": { + "description": "The delay, in seconds, between two consecutive batches.", + "type": "integer" + } + }, + { + "connect_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "default": 1000, + "between": [ + 0, + 2147483646 + ] + } + }, + { + "send_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "default": 5000, + "between": [ + 0, + 2147483646 + ] + } + }, + { + "read_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "default": 5000, + "between": [ + 0, + 2147483646 + ] + } + }, + { + "http_response_header_for_traceid": { + "type": "string" + } + }, + { + "header_type": { + "type": "string", + "required": false, + "default": "preserve", + "one_of": [ + "preserve", + "ignore", + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "gcp", + "datadog" + ] + } + }, + { + "sampling_rate": { + "type": "number", + "required": false, + "description": "Tracing sampling rate for configuring the probability-based sampler. When set, this value supersedes the global `tracing_sampling_rate` setting from kong.conf.", + "between": [ + 0, + 1 + ] + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "batch_span_count", + "batch_flush_delay" + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/opentelemetry/3.7.x.json b/schemas/opentelemetry/3.7.x.json new file mode 100644 index 00000000..5d917906 --- /dev/null +++ b/schemas/opentelemetry/3.7.x.json @@ -0,0 +1,329 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "endpoint": { + "required": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "referenceable": true, + "type": "string" + } + }, + { + "headers": { + "keys": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "description": "The custom headers to be added in the HTTP request sent to the OTLP server. This setting is useful for adding the authentication headers (token) for the APM backend.", + "type": "map", + "values": { + "type": "string", + "referenceable": true + } + } + }, + { + "resource_attributes": { + "keys": { + "type": "string", + "required": true + }, + "type": "map", + "values": { + "type": "string", + "required": true + } + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_coalescing_delay": { + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "between": [ + 0, + 3600 + ] + } + }, + { + "max_entries": { + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "type": "number", + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "default": 60 + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch.", + "between": [ + 0.001, + 1000000 + ] + } + }, + { + "max_retry_delay": { + "default": 60, + "type": "number", + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "between": [ + 0.001, + 1000000 + ] + } + } + ], + "required": true, + "type": "record", + "default": { + "max_batch_size": 200 + } + } + }, + { + "batch_span_count": { + "deprecation": { + "old_default": 200, + "message": "opentelemetry: config.batch_span_count is deprecated, please use config.queue.max_batch_size instead", + "removal_in_version": "4.0" + }, + "description": "The number of spans to be sent in a single batch.", + "type": "integer" + } + }, + { + "batch_flush_delay": { + "deprecation": { + "old_default": 3, + "message": "opentelemetry: config.batch_flush_delay is deprecated, please use config.queue.max_coalescing_delay instead", + "removal_in_version": "4.0" + }, + "description": "The delay, in seconds, between two consecutive batches.", + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 1000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "http_response_header_for_traceid": { + "type": "string" + } + }, + { + "header_type": { + "default": "preserve", + "required": false, + "deprecation": { + "old_default": "preserve", + "message": "opentelemetry: config.header_type is deprecated, please use config.propagation options instead", + "removal_in_version": "4.0" + }, + "type": "string", + "one_of": [ + "preserve", + "ignore", + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "gcp", + "datadog" + ] + } + }, + { + "sampling_rate": { + "required": false, + "description": "Tracing sampling rate for configuring the probability-based sampler. When set, this value supersedes the global `tracing_sampling_rate` setting from kong.conf.", + "type": "number", + "between": [ + 0, + 1 + ] + } + }, + { + "propagation": { + "fields": [ + { + "extract": { + "elements": { + "type": "string", + "one_of": [ + "b3", + "gcp", + "jaeger", + "aws", + "ot", + "w3c", + "datadog" + ] + }, + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "type": "array" + } + }, + { + "clear": { + "elements": { + "type": "string" + }, + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "type": "array" + } + }, + { + "inject": { + "elements": { + "type": "string", + "one_of": [ + "preserve", + "b3", + "gcp", + "b3-single", + "jaeger", + "aws", + "ot", + "w3c", + "datadog" + ] + }, + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "type": "array" + } + }, + { + "default_format": { + "required": true, + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "type": "string", + "one_of": [ + "b3", + "gcp", + "b3-single", + "jaeger", + "aws", + "ot", + "w3c", + "datadog" + ] + } + } + ], + "required": true, + "type": "record", + "default": { + "default_format": "w3c" + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/opentelemetry/3.8.x.json b/schemas/opentelemetry/3.8.x.json new file mode 100644 index 00000000..a847aca4 --- /dev/null +++ b/schemas/opentelemetry/3.8.x.json @@ -0,0 +1,367 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "traces_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string", + "referenceable": true + } + }, + { + "logs_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string", + "referenceable": true + } + }, + { + "headers": { + "description": "The custom headers to be added in the HTTP request sent to the OTLP server. This setting is useful for adding the authentication headers (token) for the APM backend.", + "type": "map", + "values": { + "referenceable": true, + "type": "string" + }, + "keys": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + } + }, + { + "resource_attributes": { + "keys": { + "required": true, + "type": "string" + }, + "type": "map", + "values": { + "required": true, + "type": "string" + } + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "description": "Maximum number of entries that can be processed at a time.", + "type": "integer", + "between": [ + 1, + 1000000 + ], + "default": 1 + } + }, + { + "max_coalescing_delay": { + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "type": "number", + "between": [ + 0, + 3600 + ], + "default": 1 + } + }, + { + "max_entries": { + "description": "Maximum number of entries that can be waiting on the queue.", + "type": "integer", + "between": [ + 1, + 1000000 + ], + "default": 10000 + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number", + "default": 60 + } + }, + { + "initial_retry_delay": { + "description": "Time in seconds before the initial retry is made for a failing batch.", + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "default": 0.01 + } + }, + { + "max_retry_delay": { + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "default": 60 + } + }, + { + "concurrency_limit": { + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "type": "integer", + "default": 1, + "one_of": [ + -1, + 1 + ] + } + } + ], + "type": "record", + "required": true, + "default": { + "max_batch_size": 200 + } + } + }, + { + "batch_span_count": { + "description": "The number of spans to be sent in a single batch.", + "type": "integer", + "deprecation": { + "old_default": 200, + "message": "opentelemetry: config.batch_span_count is deprecated, please use config.queue.max_batch_size instead", + "removal_in_version": "4.0" + } + } + }, + { + "batch_flush_delay": { + "description": "The delay, in seconds, between two consecutive batches.", + "type": "integer", + "deprecation": { + "old_default": 3, + "message": "opentelemetry: config.batch_flush_delay is deprecated, please use config.queue.max_coalescing_delay instead", + "removal_in_version": "4.0" + } + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 1000 + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 5000 + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 5000 + } + }, + { + "http_response_header_for_traceid": { + "type": "string" + } + }, + { + "header_type": { + "required": false, + "one_of": [ + "preserve", + "ignore", + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "gcp", + "datadog" + ], + "type": "string", + "deprecation": { + "old_default": "preserve", + "message": "opentelemetry: config.header_type is deprecated, please use config.propagation options instead", + "removal_in_version": "4.0" + }, + "default": "preserve" + } + }, + { + "sampling_rate": { + "description": "Tracing sampling rate for configuring the probability-based sampler. When set, this value supersedes the global `tracing_sampling_rate` setting from kong.conf.", + "type": "number", + "between": [ + 0, + 1 + ], + "required": false + } + }, + { + "propagation": { + "fields": [ + { + "extract": { + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "gcp", + "jaeger", + "aws", + "ot", + "w3c", + "datadog", + "b3" + ] + } + } + }, + { + "clear": { + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "inject": { + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "preserve", + "gcp", + "b3-single", + "jaeger", + "aws", + "ot", + "w3c", + "datadog", + "b3" + ] + } + } + }, + { + "default_format": { + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "type": "string", + "required": true, + "one_of": [ + "gcp", + "b3-single", + "jaeger", + "aws", + "ot", + "w3c", + "datadog", + "b3" + ] + } + } + ], + "type": "record", + "required": true, + "default": { + "default_format": "w3c" + } + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "traces_endpoint", + "logs_endpoint" + ] + } + ], + "type": "record", + "shorthand_fields": [ + { + "endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string", + "referenceable": true, + "deprecation": { + "message": "OpenTelemetry: config.endpoint is deprecated, please use config.traces_endpoint instead", + "removal_in_version": "4.0" + } + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/opentelemetry/3.9.x.json b/schemas/opentelemetry/3.9.x.json new file mode 100644 index 00000000..573b5251 --- /dev/null +++ b/schemas/opentelemetry/3.9.x.json @@ -0,0 +1,367 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "entity_checks": [ + { + "at_least_one_of": [ + "traces_endpoint", + "logs_endpoint" + ] + } + ], + "shorthand_fields": [ + { + "endpoint": { + "deprecation": { + "removal_in_version": "4.0", + "message": "OpenTelemetry: config.endpoint is deprecated, please use config.traces_endpoint instead" + }, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "referenceable": true, + "type": "string" + } + } + ], + "fields": [ + { + "traces_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "referenceable": true, + "type": "string" + } + }, + { + "logs_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "referenceable": true, + "type": "string" + } + }, + { + "headers": { + "values": { + "referenceable": true, + "type": "string" + }, + "description": "The custom headers to be added in the HTTP request sent to the OTLP server. This setting is useful for adding the authentication headers (token) for the APM backend.", + "keys": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "type": "map" + } + }, + { + "resource_attributes": { + "values": { + "required": true, + "type": "string" + }, + "keys": { + "required": true, + "type": "string" + }, + "type": "map" + } + }, + { + "queue": { + "default": { + "max_batch_size": 200 + }, + "type": "record", + "required": true, + "fields": [ + { + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "between": [ + 1, + 1000000 + ], + "type": "integer" + } + }, + { + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "between": [ + 0, + 3600 + ], + "type": "number" + } + }, + { + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "between": [ + 1, + 1000000 + ], + "type": "integer" + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "between": [ + 0.001, + 1000000 + ], + "type": "number" + } + }, + { + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "between": [ + 0.001, + 1000000 + ], + "type": "number" + } + }, + { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "type": "integer", + "one_of": [ + -1, + 1 + ] + } + } + ] + } + }, + { + "batch_span_count": { + "description": "The number of spans to be sent in a single batch.", + "type": "integer", + "deprecation": { + "old_default": 200, + "message": "opentelemetry: config.batch_span_count is deprecated, please use config.queue.max_batch_size instead", + "removal_in_version": "4.0" + } + } + }, + { + "batch_flush_delay": { + "description": "The delay, in seconds, between two consecutive batches.", + "type": "integer", + "deprecation": { + "old_default": 3, + "message": "opentelemetry: config.batch_flush_delay is deprecated, please use config.queue.max_coalescing_delay instead", + "removal_in_version": "4.0" + } + } + }, + { + "connect_timeout": { + "default": 1000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "http_response_header_for_traceid": { + "type": "string" + } + }, + { + "header_type": { + "required": false, + "type": "string", + "default": "preserve", + "deprecation": { + "old_default": "preserve", + "message": "opentelemetry: config.header_type is deprecated, please use config.propagation options instead", + "removal_in_version": "4.0" + }, + "one_of": [ + "preserve", + "ignore", + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "gcp", + "datadog" + ] + } + }, + { + "sampling_rate": { + "between": [ + 0, + 1 + ], + "description": "Tracing sampling rate for configuring the probability-based sampler. When set, this value supersedes the global `tracing_sampling_rate` setting from kong.conf.", + "required": false, + "type": "number" + } + }, + { + "propagation": { + "default": { + "default_format": "w3c" + }, + "fields": [ + { + "extract": { + "elements": { + "type": "string", + "one_of": [ + "gcp", + "jaeger", + "aws", + "ot", + "w3c", + "datadog", + "b3" + ] + }, + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "type": "array" + } + }, + { + "clear": { + "elements": { + "type": "string" + }, + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "type": "array" + } + }, + { + "inject": { + "elements": { + "type": "string", + "one_of": [ + "preserve", + "gcp", + "b3-single", + "jaeger", + "aws", + "ot", + "w3c", + "datadog", + "b3" + ] + }, + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "type": "array" + } + }, + { + "default_format": { + "type": "string", + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "required": true, + "one_of": [ + "gcp", + "b3-single", + "jaeger", + "aws", + "ot", + "w3c", + "datadog", + "b3" + ] + } + } + ], + "required": true, + "type": "record" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/post-function/3.10.x.json b/schemas/post-function/3.10.x.json new file mode 100644 index 00000000..e246d457 --- /dev/null +++ b/schemas/post-function/3.10.x.json @@ -0,0 +1,203 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "certificate": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + }, + { + "rewrite": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + }, + { + "access": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + }, + { + "header_filter": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + }, + { + "body_filter": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + }, + { + "log": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + }, + { + "ws_handshake": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + }, + { + "ws_client_frame": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + }, + { + "ws_upstream_frame": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + }, + { + "ws_close": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/post-function/3.11.x.json b/schemas/post-function/3.11.x.json new file mode 100644 index 00000000..b7d1793f --- /dev/null +++ b/schemas/post-function/3.11.x.json @@ -0,0 +1,203 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "certificate": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + }, + { + "rewrite": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + }, + { + "access": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + }, + { + "header_filter": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + }, + { + "body_filter": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + }, + { + "log": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + }, + { + "ws_handshake": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + }, + { + "ws_client_frame": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + }, + { + "ws_upstream_frame": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + }, + { + "ws_close": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/post-function/3.12.x.json b/schemas/post-function/3.12.x.json new file mode 100644 index 00000000..5d94d5c0 --- /dev/null +++ b/schemas/post-function/3.12.x.json @@ -0,0 +1,183 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } + ], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "certificate": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + }, + { + "rewrite": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + }, + { + "access": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + }, + { + "header_filter": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + }, + { + "body_filter": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + }, + { + "log": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + }, + { + "ws_handshake": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + }, + { + "ws_client_frame": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + }, + { + "ws_upstream_frame": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + }, + { + "ws_close": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/post-function/3.4.x.json b/schemas/post-function/3.4.x.json index 35c001df..dcba797d 100644 --- a/schemas/post-function/3.4.x.json +++ b/schemas/post-function/3.4.x.json @@ -10,8 +10,9 @@ "ws", "wss" ], - "type": "set", + "required": false, "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", @@ -19,16 +20,24 @@ "https", "ws", "wss" - ], - "type": "string" + ] }, - "required": false + "type": "set" } }, { "consumer": { - "eq": null, "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, @@ -40,6 +49,9 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", "elements": { "one_of": [ "grpc", @@ -53,27 +65,25 @@ "ws", "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } } }, { "config": { - "required": true, "fields": [ { "certificate": { "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } }, { @@ -81,12 +91,12 @@ "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } }, { @@ -94,12 +104,12 @@ "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } }, { @@ -107,12 +117,12 @@ "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } }, { @@ -120,12 +130,12 @@ "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } }, { @@ -133,12 +143,12 @@ "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } }, { @@ -146,12 +156,12 @@ "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } }, { @@ -159,12 +169,12 @@ "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } }, { @@ -172,12 +182,12 @@ "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } }, { @@ -185,17 +195,34 @@ "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } ] } \ No newline at end of file diff --git a/schemas/post-function/3.5.x.json b/schemas/post-function/3.5.x.json new file mode 100644 index 00000000..4422e7d5 --- /dev/null +++ b/schemas/post-function/3.5.x.json @@ -0,0 +1,238 @@ +{ + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "set", + "required": false + } + }, + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "description": "A set of strings representing protocols." + } + }, + { + "config": { + "fields": [ + { + "certificate": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "rewrite": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "access": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "header_filter": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "body_filter": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "log": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "ws_handshake": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "ws_client_frame": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "ws_upstream_frame": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "ws_close": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/post-function/3.6.x.json b/schemas/post-function/3.6.x.json new file mode 100644 index 00000000..da553433 --- /dev/null +++ b/schemas/post-function/3.6.x.json @@ -0,0 +1,228 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } + ], + "fields": [ + { + "protocols": { + "required": false, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "certificate": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "rewrite": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "access": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "header_filter": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "body_filter": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "log": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "ws_handshake": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "ws_client_frame": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "ws_upstream_frame": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "ws_close": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/post-function/3.7.x.json b/schemas/post-function/3.7.x.json new file mode 100644 index 00000000..b1717b8b --- /dev/null +++ b/schemas/post-function/3.7.x.json @@ -0,0 +1,228 @@ +{ + "fields": [ + { + "protocols": { + "required": false, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + }, + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "certificate": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "rewrite": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "access": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "header_filter": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "body_filter": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "log": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "ws_handshake": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "ws_client_frame": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "ws_upstream_frame": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "ws_close": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/post-function/3.8.x.json b/schemas/post-function/3.8.x.json new file mode 100644 index 00000000..80a53552 --- /dev/null +++ b/schemas/post-function/3.8.x.json @@ -0,0 +1,228 @@ +{ + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": false, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + }, + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "certificate": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "rewrite": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "access": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "header_filter": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "body_filter": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "log": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "ws_handshake": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "ws_client_frame": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "ws_upstream_frame": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "ws_close": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/post-function/3.9.x.json b/schemas/post-function/3.9.x.json new file mode 100644 index 00000000..6835bfd9 --- /dev/null +++ b/schemas/post-function/3.9.x.json @@ -0,0 +1,228 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } + ], + "fields": [ + { + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": false, + "type": "set" + } + }, + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "config": { + "fields": [ + { + "certificate": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "rewrite": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "access": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "header_filter": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "body_filter": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "log": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "ws_handshake": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "ws_client_frame": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "ws_upstream_frame": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "ws_close": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/pre-function/3.10.x.json b/schemas/pre-function/3.10.x.json new file mode 100644 index 00000000..e246d457 --- /dev/null +++ b/schemas/pre-function/3.10.x.json @@ -0,0 +1,203 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "certificate": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + }, + { + "rewrite": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + }, + { + "access": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + }, + { + "header_filter": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + }, + { + "body_filter": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + }, + { + "log": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + }, + { + "ws_handshake": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + }, + { + "ws_client_frame": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + }, + { + "ws_upstream_frame": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + }, + { + "ws_close": { + "default": [ + + ], + "type": "array", + "elements": { + "required": false, + "type": "string" + }, + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/pre-function/3.11.x.json b/schemas/pre-function/3.11.x.json new file mode 100644 index 00000000..b7d1793f --- /dev/null +++ b/schemas/pre-function/3.11.x.json @@ -0,0 +1,203 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "certificate": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + }, + { + "rewrite": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + }, + { + "access": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + }, + { + "header_filter": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + }, + { + "body_filter": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + }, + { + "log": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + }, + { + "ws_handshake": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + }, + { + "ws_client_frame": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + }, + { + "ws_upstream_frame": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + }, + { + "ws_close": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string", + "required": false + } + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/pre-function/3.12.x.json b/schemas/pre-function/3.12.x.json new file mode 100644 index 00000000..5d94d5c0 --- /dev/null +++ b/schemas/pre-function/3.12.x.json @@ -0,0 +1,183 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } + ], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "certificate": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + }, + { + "rewrite": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + }, + { + "access": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + }, + { + "header_filter": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + }, + { + "body_filter": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + }, + { + "log": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + }, + { + "ws_handshake": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + }, + { + "ws_client_frame": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + }, + { + "ws_upstream_frame": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + }, + { + "ws_close": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "required": false + }, + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/pre-function/3.4.x.json b/schemas/pre-function/3.4.x.json index 35c001df..dcba797d 100644 --- a/schemas/pre-function/3.4.x.json +++ b/schemas/pre-function/3.4.x.json @@ -10,8 +10,9 @@ "ws", "wss" ], - "type": "set", + "required": false, "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", @@ -19,16 +20,24 @@ "https", "ws", "wss" - ], - "type": "string" + ] }, - "required": false + "type": "set" } }, { "consumer": { - "eq": null, "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, @@ -40,6 +49,9 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", "elements": { "one_of": [ "grpc", @@ -53,27 +65,25 @@ "ws", "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } } }, { "config": { - "required": true, "fields": [ { "certificate": { "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } }, { @@ -81,12 +91,12 @@ "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } }, { @@ -94,12 +104,12 @@ "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } }, { @@ -107,12 +117,12 @@ "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } }, { @@ -120,12 +130,12 @@ "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } }, { @@ -133,12 +143,12 @@ "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } }, { @@ -146,12 +156,12 @@ "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } }, { @@ -159,12 +169,12 @@ "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } }, { @@ -172,12 +182,12 @@ "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } }, { @@ -185,17 +195,34 @@ "default": [ ], - "elements": { - "type": "string", - "required": false - }, "required": true, - "type": "array" + "type": "array", + "elements": { + "required": false, + "type": "string" + } } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } ] } \ No newline at end of file diff --git a/schemas/pre-function/3.5.x.json b/schemas/pre-function/3.5.x.json new file mode 100644 index 00000000..4422e7d5 --- /dev/null +++ b/schemas/pre-function/3.5.x.json @@ -0,0 +1,238 @@ +{ + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "set", + "required": false + } + }, + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "description": "A set of strings representing protocols." + } + }, + { + "config": { + "fields": [ + { + "certificate": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "rewrite": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "access": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "header_filter": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "body_filter": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "log": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "ws_handshake": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "ws_client_frame": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "ws_upstream_frame": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + }, + { + "ws_close": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "Custom functions, which can be user-defined, are cached and executed sequentially during specific phases: `certificate`, `rewrite`, `access`, `header_filter`, `body_filter`, and `log`.", + "elements": { + "type": "string", + "required": false + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/pre-function/3.6.x.json b/schemas/pre-function/3.6.x.json new file mode 100644 index 00000000..da553433 --- /dev/null +++ b/schemas/pre-function/3.6.x.json @@ -0,0 +1,228 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } + ], + "fields": [ + { + "protocols": { + "required": false, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "certificate": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "rewrite": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "access": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "header_filter": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "body_filter": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "log": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "ws_handshake": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "ws_client_frame": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "ws_upstream_frame": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "ws_close": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + } + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/pre-function/3.7.x.json b/schemas/pre-function/3.7.x.json new file mode 100644 index 00000000..b1717b8b --- /dev/null +++ b/schemas/pre-function/3.7.x.json @@ -0,0 +1,228 @@ +{ + "fields": [ + { + "protocols": { + "required": false, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + }, + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "certificate": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "rewrite": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "access": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "header_filter": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "body_filter": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "log": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "ws_handshake": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "ws_client_frame": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "ws_upstream_frame": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "ws_close": { + "required": true, + "elements": { + "required": false, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/pre-function/3.8.x.json b/schemas/pre-function/3.8.x.json new file mode 100644 index 00000000..80a53552 --- /dev/null +++ b/schemas/pre-function/3.8.x.json @@ -0,0 +1,228 @@ +{ + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": false, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + } + }, + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "certificate": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "rewrite": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "access": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "header_filter": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "body_filter": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "log": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "ws_handshake": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "ws_client_frame": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "ws_upstream_frame": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + }, + { + "ws_close": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "required": false, + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } + ] +} \ No newline at end of file diff --git a/schemas/pre-function/3.9.x.json b/schemas/pre-function/3.9.x.json new file mode 100644 index 00000000..6835bfd9 --- /dev/null +++ b/schemas/pre-function/3.9.x.json @@ -0,0 +1,228 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.certificate", + "config.rewrite", + "config.access", + "config.header_filter", + "config.body_filter", + "config.log", + "config.ws_handshake", + "config.ws_upstream_frame", + "config.ws_client_frame", + "config.ws_close" + ] + } + ], + "fields": [ + { + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "ws", + "wss" + ] + }, + "required": false, + "type": "set" + } + }, + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "config": { + "fields": [ + { + "certificate": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "rewrite": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "access": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "header_filter": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "body_filter": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "log": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "ws_handshake": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "ws_client_frame": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "ws_upstream_frame": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "ws_close": { + "default": [ + + ], + "elements": { + "required": false, + "type": "string" + }, + "required": true, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/prometheus/3.10.x.json b/schemas/prometheus/3.10.x.json new file mode 100644 index 00000000..2f89b69a --- /dev/null +++ b/schemas/prometheus/3.10.x.json @@ -0,0 +1,101 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "per_consumer": { + "description": "A boolean value that determines if per-consumer metrics should be collected. If enabled, the `kong_http_requests_total` and `kong_bandwidth_bytes` metrics fill in the consumer label when available.", + "type": "boolean", + "default": false + } + }, + { + "status_code_metrics": { + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `http_requests_total`, `stream_sessions_total` metrics will be exported.", + "type": "boolean", + "default": false + } + }, + { + "ai_metrics": { + "description": "A boolean value that determines if ai metrics should be collected. If enabled, the `ai_llm_requests_total`, `ai_llm_cost_total` and `ai_llm_tokens_total` metrics will be exported.", + "type": "boolean", + "default": false + } + }, + { + "latency_metrics": { + "description": "A boolean value that determines if latency metrics should be collected. If enabled, `kong_latency_ms`, `upstream_latency_ms` and `request_latency_ms` metrics will be exported.", + "type": "boolean", + "default": false + } + }, + { + "bandwidth_metrics": { + "description": "A boolean value that determines if bandwidth metrics should be collected. If enabled, `bandwidth_bytes` and `stream_sessions_total` metrics will be exported.", + "type": "boolean", + "default": false + } + }, + { + "upstream_health_metrics": { + "description": "A boolean value that determines if upstream metrics should be collected. If enabled, `upstream_target_health` metric will be exported.", + "type": "boolean", + "default": false + } + }, + { + "wasm_metrics": { + "description": "A boolean value that determines if Wasm metrics should be collected.", + "type": "boolean", + "default": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/prometheus/3.11.x.json b/schemas/prometheus/3.11.x.json new file mode 100644 index 00000000..7c776f87 --- /dev/null +++ b/schemas/prometheus/3.11.x.json @@ -0,0 +1,101 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "per_consumer": { + "default": false, + "description": "A boolean value that determines if per-consumer metrics should be collected. If enabled, the `kong_http_requests_total` and `kong_bandwidth_bytes` metrics fill in the consumer label when available.", + "type": "boolean" + } + }, + { + "status_code_metrics": { + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `http_requests_total`, `stream_sessions_total` metrics will be exported.", + "type": "boolean" + } + }, + { + "ai_metrics": { + "default": false, + "description": "A boolean value that determines if ai metrics should be collected. If enabled, the `ai_llm_requests_total`, `ai_llm_cost_total` and `ai_llm_tokens_total` metrics will be exported.", + "type": "boolean" + } + }, + { + "latency_metrics": { + "default": false, + "description": "A boolean value that determines if latency metrics should be collected. If enabled, `kong_latency_ms`, `upstream_latency_ms` and `request_latency_ms` metrics will be exported.", + "type": "boolean" + } + }, + { + "bandwidth_metrics": { + "default": false, + "description": "A boolean value that determines if bandwidth metrics should be collected. If enabled, `bandwidth_bytes` and `stream_sessions_total` metrics will be exported.", + "type": "boolean" + } + }, + { + "upstream_health_metrics": { + "default": false, + "description": "A boolean value that determines if upstream metrics should be collected. If enabled, `upstream_target_health` metric will be exported.", + "type": "boolean" + } + }, + { + "wasm_metrics": { + "default": false, + "description": "A boolean value that determines if Wasm metrics should be collected.", + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/prometheus/3.12.x.json b/schemas/prometheus/3.12.x.json new file mode 100644 index 00000000..dbe886da --- /dev/null +++ b/schemas/prometheus/3.12.x.json @@ -0,0 +1,102 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "per_consumer": { + "description": "A boolean value that determines if per-consumer metrics should be collected. If enabled, the `kong_http_requests_total` and `kong_bandwidth_bytes` metrics fill in the consumer label when available.", + "default": false, + "type": "boolean" + } + }, + { + "status_code_metrics": { + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `http_requests_total`, `stream_sessions_total` metrics will be exported.", + "default": false, + "type": "boolean" + } + }, + { + "ai_metrics": { + "description": "A boolean value that determines if ai metrics should be collected. If enabled, the `ai_llm_requests_total`, `ai_llm_cost_total` and `ai_llm_tokens_total` metrics will be exported.", + "default": false, + "type": "boolean" + } + }, + { + "latency_metrics": { + "description": "A boolean value that determines if latency metrics should be collected. If enabled, `kong_latency_ms`, `upstream_latency_ms` and `request_latency_ms` metrics will be exported.", + "default": false, + "type": "boolean" + } + }, + { + "bandwidth_metrics": { + "description": "A boolean value that determines if bandwidth metrics should be collected. If enabled, `bandwidth_bytes` and `stream_sessions_total` metrics will be exported.", + "default": false, + "type": "boolean" + } + }, + { + "upstream_health_metrics": { + "description": "A boolean value that determines if upstream metrics should be collected. If enabled, `upstream_target_health` metric will be exported.", + "default": false, + "type": "boolean" + } + }, + { + "wasm_metrics": { + "type": "boolean", + "deprecation": { + "old_default": false, + "message": "prometheus: config.wasm_metrics was removed and has no effect", + "removal_in_version": "4.0" + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/prometheus/3.4.x.json b/schemas/prometheus/3.4.x.json index 91f590bb..913a1dca 100644 --- a/schemas/prometheus/3.4.x.json +++ b/schemas/prometheus/3.4.x.json @@ -8,6 +8,9 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", "elements": { "one_of": [ "grpc", @@ -21,49 +24,64 @@ "ws", "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "per_consumer": { + "default": false, "type": "boolean", - "default": false + "description": "A boolean value that determines if per-consumer metrics should be collected. If enabled, the `kong_http_requests_total` and `kong_bandwidth_bytes` metrics fill in the consumer label when available." } }, { "status_code_metrics": { + "default": false, "type": "boolean", - "default": false + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `http_requests_total`, `stream_sessions_total` metrics will be exported." } }, { "latency_metrics": { + "default": false, "type": "boolean", - "default": false + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `kong_latency_ms`, `upstream_latency_ms` and `request_latency_ms` metrics will be exported." } }, { "bandwidth_metrics": { + "default": false, "type": "boolean", - "default": false + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `bandwidth_bytes` and `stream_sessions_total` metrics will be exported." } }, { "upstream_health_metrics": { + "default": false, "type": "boolean", - "default": false + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `upstream_target_health` metric will be exported." } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/prometheus/3.5.x.json b/schemas/prometheus/3.5.x.json new file mode 100644 index 00000000..b84e430c --- /dev/null +++ b/schemas/prometheus/3.5.x.json @@ -0,0 +1,87 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "per_consumer": { + "default": false, + "type": "boolean", + "description": "A boolean value that determines if per-consumer metrics should be collected. If enabled, the `kong_http_requests_total` and `kong_bandwidth_bytes` metrics fill in the consumer label when available." + } + }, + { + "status_code_metrics": { + "default": false, + "type": "boolean", + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `http_requests_total`, `stream_sessions_total` metrics will be exported." + } + }, + { + "latency_metrics": { + "default": false, + "type": "boolean", + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `kong_latency_ms`, `upstream_latency_ms` and `request_latency_ms` metrics will be exported." + } + }, + { + "bandwidth_metrics": { + "default": false, + "type": "boolean", + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `bandwidth_bytes` and `stream_sessions_total` metrics will be exported." + } + }, + { + "upstream_health_metrics": { + "default": false, + "type": "boolean", + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `upstream_target_health` metric will be exported." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/prometheus/3.6.x.json b/schemas/prometheus/3.6.x.json new file mode 100644 index 00000000..e6f9921b --- /dev/null +++ b/schemas/prometheus/3.6.x.json @@ -0,0 +1,87 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "per_consumer": { + "type": "boolean", + "default": false, + "description": "A boolean value that determines if per-consumer metrics should be collected. If enabled, the `kong_http_requests_total` and `kong_bandwidth_bytes` metrics fill in the consumer label when available." + } + }, + { + "status_code_metrics": { + "type": "boolean", + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `http_requests_total`, `stream_sessions_total` metrics will be exported." + } + }, + { + "latency_metrics": { + "type": "boolean", + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `kong_latency_ms`, `upstream_latency_ms` and `request_latency_ms` metrics will be exported." + } + }, + { + "bandwidth_metrics": { + "type": "boolean", + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `bandwidth_bytes` and `stream_sessions_total` metrics will be exported." + } + }, + { + "upstream_health_metrics": { + "type": "boolean", + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `upstream_target_health` metric will be exported." + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/prometheus/3.7.x.json b/schemas/prometheus/3.7.x.json new file mode 100644 index 00000000..bf375f1e --- /dev/null +++ b/schemas/prometheus/3.7.x.json @@ -0,0 +1,87 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "per_consumer": { + "description": "A boolean value that determines if per-consumer metrics should be collected. If enabled, the `kong_http_requests_total` and `kong_bandwidth_bytes` metrics fill in the consumer label when available.", + "type": "boolean", + "default": false + } + }, + { + "status_code_metrics": { + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `http_requests_total`, `stream_sessions_total` metrics will be exported.", + "type": "boolean", + "default": false + } + }, + { + "latency_metrics": { + "description": "A boolean value that determines if latency metrics should be collected. If enabled, `kong_latency_ms`, `upstream_latency_ms` and `request_latency_ms` metrics will be exported.", + "type": "boolean", + "default": false + } + }, + { + "bandwidth_metrics": { + "description": "A boolean value that determines if bandwidth metrics should be collected. If enabled, `bandwidth_bytes` and `stream_sessions_total` metrics will be exported.", + "type": "boolean", + "default": false + } + }, + { + "upstream_health_metrics": { + "description": "A boolean value that determines if upstream metrics should be collected. If enabled, `upstream_target_health` metric will be exported.", + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/prometheus/3.8.x.json b/schemas/prometheus/3.8.x.json new file mode 100644 index 00000000..8a193072 --- /dev/null +++ b/schemas/prometheus/3.8.x.json @@ -0,0 +1,94 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "per_consumer": { + "description": "A boolean value that determines if per-consumer metrics should be collected. If enabled, the `kong_http_requests_total` and `kong_bandwidth_bytes` metrics fill in the consumer label when available.", + "type": "boolean", + "default": false + } + }, + { + "status_code_metrics": { + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `http_requests_total`, `stream_sessions_total` metrics will be exported.", + "type": "boolean", + "default": false + } + }, + { + "ai_metrics": { + "description": "A boolean value that determines if ai metrics should be collected. If enabled, the `ai_llm_requests_total`, `ai_llm_cost_total` and `ai_llm_tokens_total` metrics will be exported.", + "type": "boolean", + "default": false + } + }, + { + "latency_metrics": { + "description": "A boolean value that determines if latency metrics should be collected. If enabled, `kong_latency_ms`, `upstream_latency_ms` and `request_latency_ms` metrics will be exported.", + "type": "boolean", + "default": false + } + }, + { + "bandwidth_metrics": { + "description": "A boolean value that determines if bandwidth metrics should be collected. If enabled, `bandwidth_bytes` and `stream_sessions_total` metrics will be exported.", + "type": "boolean", + "default": false + } + }, + { + "upstream_health_metrics": { + "description": "A boolean value that determines if upstream metrics should be collected. If enabled, `upstream_target_health` metric will be exported.", + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/prometheus/3.9.x.json b/schemas/prometheus/3.9.x.json new file mode 100644 index 00000000..ff139dbf --- /dev/null +++ b/schemas/prometheus/3.9.x.json @@ -0,0 +1,94 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "per_consumer": { + "default": false, + "description": "A boolean value that determines if per-consumer metrics should be collected. If enabled, the `kong_http_requests_total` and `kong_bandwidth_bytes` metrics fill in the consumer label when available.", + "type": "boolean" + } + }, + { + "status_code_metrics": { + "default": false, + "description": "A boolean value that determines if status code metrics should be collected. If enabled, `http_requests_total`, `stream_sessions_total` metrics will be exported.", + "type": "boolean" + } + }, + { + "ai_metrics": { + "default": false, + "description": "A boolean value that determines if ai metrics should be collected. If enabled, the `ai_llm_requests_total`, `ai_llm_cost_total` and `ai_llm_tokens_total` metrics will be exported.", + "type": "boolean" + } + }, + { + "latency_metrics": { + "default": false, + "description": "A boolean value that determines if latency metrics should be collected. If enabled, `kong_latency_ms`, `upstream_latency_ms` and `request_latency_ms` metrics will be exported.", + "type": "boolean" + } + }, + { + "bandwidth_metrics": { + "default": false, + "description": "A boolean value that determines if bandwidth metrics should be collected. If enabled, `bandwidth_bytes` and `stream_sessions_total` metrics will be exported.", + "type": "boolean" + } + }, + { + "upstream_health_metrics": { + "default": false, + "description": "A boolean value that determines if upstream metrics should be collected. If enabled, `upstream_target_health` metric will be exported.", + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/proxy-cache-advanced/3.10.x.json b/schemas/proxy-cache-advanced/3.10.x.json new file mode 100644 index 00000000..e8092b3c --- /dev/null +++ b/schemas/proxy-cache-advanced/3.10.x.json @@ -0,0 +1,578 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + }, + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "response_code": { + "type": "array", + "len_min": 1, + "description": "Upstream response status code considered cacheable. The integers must be a value between 100 and 900.", + "default": [ + 200, + 301, + 404 + ], + "elements": { + "between": [ + 100, + 900 + ], + "type": "integer" + }, + "required": true + } + }, + { + "request_method": { + "type": "array", + "description": "Downstream request methods considered cacheable. Available options: `HEAD`, `GET`, `POST`, `PATCH`, `PUT`.", + "default": [ + "GET", + "HEAD" + ], + "elements": { + "type": "string", + "one_of": [ + "HEAD", + "GET", + "POST", + "PATCH", + "PUT" + ] + }, + "required": true + } + }, + { + "content_type": { + "type": "array", + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value; for example, if the upstream is expected to respond with a `application/json; charset=utf-8` content-type, the plugin configuration must contain said value or a `Bypass` cache status is returned.", + "default": [ + "text/plain", + "application/json" + ], + "elements": { + "type": "string" + }, + "required": true + } + }, + { + "cache_ttl": { + "gt": 0, + "default": 300, + "type": "integer", + "description": "TTL in seconds of cache entities." + } + }, + { + "strategy": { + "description": "The backing data store in which to hold cache entities. Accepted values are: `memory` and `redis`.", + "type": "string", + "one_of": [ + "memory", + "redis" + ], + "required": true + } + }, + { + "cache_control": { + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "ignore_uri_case": { + "description": "Determines whether to treat URIs as case sensitive. By default, case sensitivity is enabled. If set to true, requests are cached while ignoring case sensitivity in the URI.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + } + }, + { + "memory": { + "type": "record", + "fields": [ + { + "dictionary_name": { + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "default": "kong_db_cache", + "type": "string", + "required": true + } + } + ], + "required": true + } + }, + { + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration. By default, the max number of params accepted is 100. You can change this value via the `lua_max_post_args` in `kong.conf`.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "type": "record", + "fields": [ + { + "age": { + "type": "boolean", + "default": true + } + }, + { + "X-Cache-Status": { + "type": "boolean", + "default": true + } + }, + { + "X-Cache-Key": { + "type": "boolean", + "default": true + } + } + ], + "required": true + } + }, + { + "redis": { + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "default": 256, + "type": "integer", + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "default": false, + "type": "boolean", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + } + ], + "required": true + } + }, + { + "bypass_on_err": { + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "default": false, + "type": "boolean" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/proxy-cache-advanced/3.11.x.json b/schemas/proxy-cache-advanced/3.11.x.json new file mode 100644 index 00000000..850aefc8 --- /dev/null +++ b/schemas/proxy-cache-advanced/3.11.x.json @@ -0,0 +1,578 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "response_code": { + "required": true, + "description": "Upstream response status code considered cacheable. The integers must be a value between 100 and 900.", + "len_min": 1, + "type": "array", + "default": [ + 200, + 301, + 404 + ], + "elements": { + "type": "integer", + "between": [ + 100, + 900 + ] + } + } + }, + { + "request_method": { + "required": true, + "description": "Downstream request methods considered cacheable. Available options: `HEAD`, `GET`, `POST`, `PATCH`, `PUT`.", + "type": "array", + "default": [ + "GET", + "HEAD" + ], + "elements": { + "one_of": [ + "HEAD", + "GET", + "POST", + "PATCH", + "PUT" + ], + "type": "string" + } + } + }, + { + "content_type": { + "required": true, + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value; for example, if the upstream is expected to respond with a `application/json; charset=utf-8` content-type, the plugin configuration must contain said value or a `Bypass` cache status is returned.", + "type": "array", + "default": [ + "text/plain", + "application/json" + ], + "elements": { + "type": "string" + } + } + }, + { + "cache_ttl": { + "default": 300, + "gt": 0, + "description": "TTL in seconds of cache entities.", + "type": "integer" + } + }, + { + "strategy": { + "one_of": [ + "memory", + "redis" + ], + "required": true, + "description": "The backing data store in which to hold cache entities. Accepted values are: `memory` and `redis`.", + "type": "string" + } + }, + { + "cache_control": { + "default": false, + "required": true, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" + } + }, + { + "ignore_uri_case": { + "default": false, + "required": false, + "description": "Determines whether to treat URIs as case sensitive. By default, case sensitivity is enabled. If set to true, requests are cached while ignoring case sensitivity in the URI.", + "type": "boolean" + } + }, + { + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + } + }, + { + "memory": { + "required": true, + "fields": [ + { + "dictionary_name": { + "default": "kong_db_cache", + "required": true, + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "vary_query_params": { + "type": "array", + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration. By default, the max number of params accepted is 100. You can change this value via the `lua_max_post_args` in `kong.conf`.", + "elements": { + "type": "string" + } + } + }, + { + "vary_headers": { + "type": "array", + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "elements": { + "type": "string" + } + } + }, + { + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "required": true, + "fields": [ + { + "age": { + "default": true, + "type": "boolean" + } + }, + { + "X-Cache-Status": { + "default": true, + "type": "boolean" + } + }, + { + "X-Cache-Key": { + "default": true, + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "redis": { + "required": true, + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "cluster_nodes": { + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "default": 5, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "default": false, + "type": "boolean" + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "bypass_on_err": { + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + } +} \ No newline at end of file diff --git a/schemas/proxy-cache-advanced/3.12.x.json b/schemas/proxy-cache-advanced/3.12.x.json new file mode 100644 index 00000000..53e541ee --- /dev/null +++ b/schemas/proxy-cache-advanced/3.12.x.json @@ -0,0 +1,578 @@ +{ + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + }, + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "response_code": { + "type": "array", + "len_min": 1, + "required": true, + "description": "Upstream response status code considered cacheable. The integers must be a value between 100 and 900.", + "default": [ + 200, + 301, + 404 + ], + "elements": { + "type": "integer", + "between": [ + 100, + 900 + ] + } + } + }, + { + "request_method": { + "type": "array", + "required": true, + "description": "Downstream request methods considered cacheable. Available options: `HEAD`, `GET`, `POST`, `PATCH`, `PUT`.", + "default": [ + "GET", + "HEAD" + ], + "elements": { + "type": "string", + "one_of": [ + "HEAD", + "GET", + "POST", + "PATCH", + "PUT" + ] + } + } + }, + { + "content_type": { + "type": "array", + "required": true, + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value; for example, if the upstream is expected to respond with a `application/json; charset=utf-8` content-type, the plugin configuration must contain said value or a `Bypass` cache status is returned.", + "default": [ + "text/plain", + "application/json" + ], + "elements": { + "type": "string" + } + } + }, + { + "cache_ttl": { + "type": "integer", + "default": 300, + "gt": 0, + "description": "TTL in seconds of cache entities." + } + }, + { + "strategy": { + "type": "string", + "description": "The backing data store in which to hold cache entities. Accepted values are: `memory` and `redis`.", + "one_of": [ + "memory", + "redis" + ], + "required": true + } + }, + { + "cache_control": { + "type": "boolean", + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "required": true + } + }, + { + "ignore_uri_case": { + "type": "boolean", + "default": false, + "description": "Determines whether to treat URIs as case sensitive. By default, case sensitivity is enabled. If set to true, requests are cached while ignoring case sensitivity in the URI.", + "required": false + } + }, + { + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + } + }, + { + "memory": { + "type": "record", + "fields": [ + { + "dictionary_name": { + "type": "string", + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "required": true + } + } + ], + "required": true + } + }, + { + "vary_query_params": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration. By default, the max number of params accepted is 100. You can change this value via the `lua_max_post_args` in `kong.conf`." + } + }, + { + "vary_headers": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration." + } + }, + { + "response_headers": { + "type": "record", + "fields": [ + { + "age": { + "type": "boolean", + "default": true + } + }, + { + "X-Cache-Status": { + "type": "boolean", + "default": true + } + }, + { + "X-Cache-Key": { + "type": "boolean", + "default": true + } + } + ], + "description": "Caching related diagnostic headers that should be included in cached responses", + "required": true + } + }, + { + "redis": { + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "database", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + } + ], + "required": true, + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "type": "string", + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "type": "integer", + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy" + } + }, + { + "keepalive_pool_size": { + "type": "integer", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low." + } + }, + { + "keepalive_backlog": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "type": "boolean", + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "cluster_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + } + ] + } + }, + { + "bypass_on_err": { + "type": "boolean", + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream." + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/proxy-cache-advanced/3.4.x.json b/schemas/proxy-cache-advanced/3.4.x.json index 95a4e988..67482bfd 100644 --- a/schemas/proxy-cache-advanced/3.4.x.json +++ b/schemas/proxy-cache-advanced/3.4.x.json @@ -8,40 +8,49 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "response_code": { - "len_min": 1, "default": [ 200, 301, 404 ], + "description": "Upstream response status code considered cacheable. The integers must be a value between 100 and 900.", + "len_min": 1, + "type": "array", + "required": true, "elements": { "between": [ 100, 900 ], "type": "integer" - }, - "required": true, - "type": "array" + } } }, { @@ -50,18 +59,19 @@ "GET", "HEAD" ], + "required": true, + "description": "Downstream request methods considered cacheable. Available options: `HEAD`, `GET`, `POST`, `PATCH`, `PUT`.", + "type": "array", "elements": { + "type": "string", "one_of": [ "HEAD", "GET", "POST", "PATCH", "PUT" - ], - "type": "string" - }, - "required": true, - "type": "array" + ] + } } }, { @@ -70,145 +80,96 @@ "text/plain", "application/json" ], + "required": true, + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value; for example, if the upstream is expected to respond with a `application/json; charset=utf-8` content-type, the plugin configuration must contain said value or a `Bypass` cache status is returned.", + "type": "array", "elements": { "type": "string" - }, - "required": true, - "type": "array" + } } }, { "cache_ttl": { "default": 300, "gt": 0, + "description": "TTL in seconds of cache entities.", "type": "integer" } }, { "strategy": { "required": true, - "type": "string", "one_of": [ "memory", "redis" - ] + ], + "description": "The backing data store in which to hold cache entities. Accepted values are: `memory` and `redis`.", + "type": "string" } }, { "cache_control": { + "default": false, "required": true, - "type": "boolean", - "default": false + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "type": "boolean" } }, { "ignore_uri_case": { + "default": false, "required": false, - "type": "boolean", - "default": false + "description": "Determines whether to treat URIs as case sensitive. By default, case sensitivity is enabled. If set to true, requests are cached while ignoring case sensitivity in the URI.", + "type": "boolean" } }, { "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", "type": "integer" } }, { "memory": { - "required": true, "fields": [ { "dictionary_name": { - "required": true, "default": "kong_db_cache", + "required": true, + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", "type": "string" } } ], - "type": "record" + "type": "record", + "required": true } }, { "vary_query_params": { + "type": "array", "elements": { "type": "string" }, - "type": "array" + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration." } }, { "vary_headers": { + "type": "array", "elements": { "type": "string" }, - "type": "array" + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration." } }, { "redis": { - "required": true, - "entity_checks": [ - { - "mutually_exclusive_sets": { - "set1": [ - "sentinel_master", - "sentinel_role", - "sentinel_addresses" - ], - "set2": [ - "host", - "port" - ] - } - }, - { - "mutually_exclusive_sets": { - "set1": [ - "sentinel_master", - "sentinel_role", - "sentinel_addresses" - ], - "set2": [ - "cluster_addresses" - ] - } - }, - { - "mutually_exclusive_sets": { - "set1": [ - "cluster_addresses" - ], - "set2": [ - "host", - "port" - ] - } - }, - { - "mutually_required": [ - "sentinel_master", - "sentinel_role", - "sentinel_addresses" - ] - }, - { - "mutually_required": [ - "host", - "port" - ] - }, - { - "mutually_required": [ - "connect_timeout", - "send_timeout", - "read_timeout" - ] - } - ], "fields": [ { "host": { - "type": "string" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { @@ -217,17 +178,19 @@ 0, 65535 ], - "type": "integer" + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." } }, { "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "between": [ 0, 2147483646 ], - "type": "integer", - "default": 2000 + "type": "integer" } }, { @@ -236,7 +199,8 @@ 0, 2147483646 ], - "type": "integer" + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." } }, { @@ -245,7 +209,8 @@ 0, 2147483646 ], - "type": "integer" + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." } }, { @@ -254,49 +219,56 @@ 0, 2147483646 ], - "type": "integer" + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." } }, { "username": { - "type": "string", - "referenceable": true + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`.", + "type": "string" } }, { "password": { - "referenceable": true, "encrypted": true, - "type": "string" + "referenceable": true, + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis." } }, { "sentinel_username": { - "type": "string", - "referenceable": true + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string" } }, { "sentinel_password": { - "referenceable": true, "encrypted": true, - "type": "string" + "referenceable": true, + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels." } }, { "database": { - "type": "integer", - "default": 0 + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" } }, { "keepalive_pool_size": { + "type": "integer", + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "default": 30, "between": [ 1, 2147483646 - ], - "default": 30, - "type": "integer" + ] } }, { @@ -305,11 +277,13 @@ 0, 2147483646 ], - "type": "integer" + "type": "integer", + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." } }, { "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", "type": "string" } }, @@ -320,7 +294,8 @@ "slave", "any" ], - "type": "string" + "type": "string", + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." } }, { @@ -329,6 +304,7 @@ "elements": { "type": "string" }, + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", "type": "array" } }, @@ -338,12 +314,14 @@ "elements": { "type": "string" }, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", "type": "array" } }, { "ssl": { "default": false, + "description": "If set to true, uses SSL to connect to Redis.", "required": false, "type": "boolean" } @@ -351,29 +329,101 @@ { "ssl_verify": { "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", "required": false, "type": "boolean" } }, { "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", "type": "string", "required": false } } ], - "type": "record" + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_addresses" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_addresses" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + } + ], + "type": "record", + "required": true } }, { "bypass_on_err": { "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", "type": "boolean" } } ], - "type": "record" + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] } } ] -} \ No newline at end of file +} diff --git a/schemas/proxy-cache-advanced/3.5.x.json b/schemas/proxy-cache-advanced/3.5.x.json new file mode 100644 index 00000000..82fe8c7c --- /dev/null +++ b/schemas/proxy-cache-advanced/3.5.x.json @@ -0,0 +1,456 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "response_code": { + "type": "array", + "required": true, + "len_min": 1, + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable. The integers must be a value between 100 and 900.", + "elements": { + "type": "integer", + "between": [ + 100, + 900 + ] + } + } + }, + { + "request_method": { + "type": "array", + "required": true, + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable. Available options: `HEAD`, `GET`, `POST`, `PATCH`, `PUT`.", + "elements": { + "type": "string", + "one_of": [ + "HEAD", + "GET", + "POST", + "PATCH", + "PUT" + ] + } + } + }, + { + "content_type": { + "type": "array", + "required": true, + "default": [ + "text/plain", + "application/json" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value; for example, if the upstream is expected to respond with a `application/json; charset=utf-8` content-type, the plugin configuration must contain said value or a `Bypass` cache status is returned.", + "elements": { + "type": "string" + } + } + }, + { + "cache_ttl": { + "gt": 0, + "default": 300, + "type": "integer", + "description": "TTL in seconds of cache entities." + } + }, + { + "strategy": { + "description": "The backing data store in which to hold cache entities. Accepted values are: `memory` and `redis`.", + "one_of": [ + "memory", + "redis" + ], + "type": "string", + "required": true + } + }, + { + "cache_control": { + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "ignore_uri_case": { + "description": "Determines whether to treat URIs as case sensitive. By default, case sensitivity is enabled. If set to true, requests are cached while ignoring case sensitivity in the URI.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "storage_ttl": { + "type": "integer", + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors." + } + }, + { + "memory": { + "fields": [ + { + "dictionary_name": { + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "default": "kong_db_cache", + "type": "string", + "required": true + } + } + ], + "type": "record", + "required": true + } + }, + { + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "fields": [ + { + "age": { + "type": "boolean", + "default": true + } + }, + { + "X-Cache-Status": { + "type": "boolean", + "default": true + } + }, + { + "X-Cache-Key": { + "type": "boolean", + "default": true + } + } + ], + "type": "record", + "required": true + } + }, + { + "redis": { + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_addresses" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_addresses" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + } + ], + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "referenceable": true, + "type": "string", + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`." + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "type": "string", + "encrypted": true + } + }, + { + "sentinel_username": { + "referenceable": true, + "type": "string", + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "type": "string", + "encrypted": true + } + }, + { + "database": { + "default": 0, + "type": "integer", + "description": "Database to use for the Redis connection when using the `redis` strategy" + } + }, + { + "keepalive_pool_size": { + "between": [ + 1, + 2147483646 + ], + "default": 256, + "type": "integer", + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low." + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." + } + }, + { + "sentinel_master": { + "type": "string", + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "type": "string", + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_addresses": { + "len_min": 1, + "elements": { + "type": "string" + }, + "type": "array", + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element." + } + }, + { + "cluster_addresses": { + "len_min": 1, + "elements": { + "type": "string" + }, + "type": "array", + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element." + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "required": false, + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS." + } + } + ], + "type": "record", + "required": true + } + }, + { + "bypass_on_err": { + "default": false, + "type": "boolean", + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/proxy-cache-advanced/3.6.x.json b/schemas/proxy-cache-advanced/3.6.x.json new file mode 100644 index 00000000..25f4eaab --- /dev/null +++ b/schemas/proxy-cache-advanced/3.6.x.json @@ -0,0 +1,448 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "response_code": { + "elements": { + "type": "integer", + "between": [ + 100, + 900 + ] + }, + "type": "array", + "default": [ + 200, + 301, + 404 + ], + "len_min": 1, + "required": true, + "description": "Upstream response status code considered cacheable. The integers must be a value between 100 and 900." + } + }, + { + "request_method": { + "elements": { + "one_of": [ + "HEAD", + "GET", + "POST", + "PATCH", + "PUT" + ], + "type": "string" + }, + "type": "array", + "default": [ + "GET", + "HEAD" + ], + "required": true, + "description": "Downstream request methods considered cacheable. Available options: `HEAD`, `GET`, `POST`, `PATCH`, `PUT`." + } + }, + { + "content_type": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "text/plain", + "application/json" + ], + "required": true, + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value; for example, if the upstream is expected to respond with a `application/json; charset=utf-8` content-type, the plugin configuration must contain said value or a `Bypass` cache status is returned." + } + }, + { + "cache_ttl": { + "gt": 0, + "type": "integer", + "default": 300, + "description": "TTL in seconds of cache entities." + } + }, + { + "strategy": { + "required": true, + "type": "string", + "description": "The backing data store in which to hold cache entities. Accepted values are: `memory` and `redis`.", + "one_of": [ + "memory", + "redis" + ] + } + }, + { + "cache_control": { + "required": true, + "type": "boolean", + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234." + } + }, + { + "ignore_uri_case": { + "required": false, + "type": "boolean", + "default": false, + "description": "Determines whether to treat URIs as case sensitive. By default, case sensitivity is enabled. If set to true, requests are cached while ignoring case sensitivity in the URI." + } + }, + { + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + } + }, + { + "memory": { + "required": true, + "type": "record", + "fields": [ + { + "dictionary_name": { + "required": true, + "type": "string", + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template." + } + } + ] + } + }, + { + "vary_query_params": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration." + } + }, + { + "vary_headers": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration." + } + }, + { + "response_headers": { + "required": true, + "type": "record", + "description": "Caching related diagnostic headers that should be included in cached responses", + "fields": [ + { + "age": { + "default": true, + "type": "boolean" + } + }, + { + "X-Cache-Status": { + "default": true, + "type": "boolean" + } + }, + { + "X-Cache-Key": { + "default": true, + "type": "boolean" + } + } + ] + } + }, + { + "redis": { + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ], + "set2": [ + "host", + "port" + ] + } + }, + { + "mutually_exclusive_sets": { + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ], + "set2": [ + "cluster_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set1": [ + "cluster_addresses" + ], + "set2": [ + "host", + "port" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + } + ], + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "timeout": { + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "connect_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "send_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "read_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "username": { + "referenceable": true, + "type": "string", + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "encrypted": true, + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true + } + }, + { + "sentinel_username": { + "referenceable": true, + "type": "string", + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "encrypted": true, + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true + } + }, + { + "database": { + "type": "integer", + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer", + "default": 256, + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "type": "integer", + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "type": "string", + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "ssl": { + "required": false, + "type": "boolean", + "description": "If set to true, uses SSL to connect to Redis.", + "default": false + } + }, + { + "ssl_verify": { + "required": false, + "type": "boolean", + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false + } + }, + { + "server_name": { + "required": false, + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS." + } + } + ], + "required": true + } + }, + { + "bypass_on_err": { + "type": "boolean", + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream." + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/proxy-cache-advanced/3.7.x.json b/schemas/proxy-cache-advanced/3.7.x.json new file mode 100644 index 00000000..e0e93d10 --- /dev/null +++ b/schemas/proxy-cache-advanced/3.7.x.json @@ -0,0 +1,448 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "response_code": { + "type": "array", + "len_min": 1, + "required": true, + "elements": { + "type": "integer", + "between": [ + 100, + 900 + ] + }, + "description": "Upstream response status code considered cacheable. The integers must be a value between 100 and 900.", + "default": [ + 200, + 301, + 404 + ] + } + }, + { + "request_method": { + "description": "Downstream request methods considered cacheable. Available options: `HEAD`, `GET`, `POST`, `PATCH`, `PUT`.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "HEAD", + "GET", + "POST", + "PATCH", + "PUT" + ] + }, + "type": "array", + "default": [ + "GET", + "HEAD" + ] + } + }, + { + "content_type": { + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value; for example, if the upstream is expected to respond with a `application/json; charset=utf-8` content-type, the plugin configuration must contain said value or a `Bypass` cache status is returned.", + "required": true, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "text/plain", + "application/json" + ] + } + }, + { + "cache_ttl": { + "default": 300, + "type": "integer", + "description": "TTL in seconds of cache entities.", + "gt": 0 + } + }, + { + "strategy": { + "required": true, + "description": "The backing data store in which to hold cache entities. Accepted values are: `memory` and `redis`.", + "type": "string", + "one_of": [ + "memory", + "redis" + ] + } + }, + { + "cache_control": { + "required": true, + "type": "boolean", + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "default": false + } + }, + { + "ignore_uri_case": { + "required": false, + "description": "Determines whether to treat URIs as case sensitive. By default, case sensitivity is enabled. If set to true, requests are cached while ignoring case sensitivity in the URI.", + "type": "boolean", + "default": false + } + }, + { + "storage_ttl": { + "type": "integer", + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors." + } + }, + { + "memory": { + "fields": [ + { + "dictionary_name": { + "required": true, + "type": "string", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "default": "kong_db_cache" + } + } + ], + "type": "record", + "required": true + } + }, + { + "vary_query_params": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration." + } + }, + { + "vary_headers": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration." + } + }, + { + "response_headers": { + "fields": [ + { + "age": { + "type": "boolean", + "default": true + } + }, + { + "X-Cache-Status": { + "type": "boolean", + "default": true + } + }, + { + "X-Cache-Key": { + "type": "boolean", + "default": true + } + } + ], + "description": "Caching related diagnostic headers that should be included in cached responses", + "type": "record", + "required": true + } + }, + { + "redis": { + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "connect_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "send_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "read_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "type": "integer", + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "default": 256, + "type": "integer", + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "type": "integer", + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "type": "string", + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_addresses": { + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", + "elements": { + "type": "string" + }, + "type": "array", + "len_min": 1 + } + }, + { + "cluster_addresses": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", + "elements": { + "type": "string" + }, + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "required": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "required": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_addresses" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_addresses" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + } + ], + "type": "record", + "required": true + } + }, + { + "bypass_on_err": { + "type": "boolean", + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/proxy-cache-advanced/3.8.x.json b/schemas/proxy-cache-advanced/3.8.x.json new file mode 100644 index 00000000..30b3682b --- /dev/null +++ b/schemas/proxy-cache-advanced/3.8.x.json @@ -0,0 +1,610 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "response_code": { + "description": "Upstream response status code considered cacheable. The integers must be a value between 100 and 900.", + "required": true, + "elements": { + "between": [ + 100, + 900 + ], + "type": "integer" + }, + "type": "array", + "len_min": 1, + "default": [ + 200, + 301, + 404 + ] + } + }, + { + "request_method": { + "description": "Downstream request methods considered cacheable. Available options: `HEAD`, `GET`, `POST`, `PATCH`, `PUT`.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "HEAD", + "GET", + "POST", + "PATCH", + "PUT" + ] + }, + "type": "array", + "default": [ + "GET", + "HEAD" + ] + } + }, + { + "content_type": { + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value; for example, if the upstream is expected to respond with a `application/json; charset=utf-8` content-type, the plugin configuration must contain said value or a `Bypass` cache status is returned.", + "required": true, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "text/plain", + "application/json" + ] + } + }, + { + "cache_ttl": { + "description": "TTL in seconds of cache entities.", + "type": "integer", + "gt": 0, + "default": 300 + } + }, + { + "strategy": { + "description": "The backing data store in which to hold cache entities. Accepted values are: `memory` and `redis`.", + "required": true, + "type": "string", + "one_of": [ + "memory", + "redis" + ] + } + }, + { + "cache_control": { + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "ignore_uri_case": { + "description": "Determines whether to treat URIs as case sensitive. By default, case sensitivity is enabled. If set to true, requests are cached while ignoring case sensitivity in the URI.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + } + }, + { + "memory": { + "fields": [ + { + "dictionary_name": { + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "required": true, + "type": "string", + "default": "kong_db_cache" + } + } + ], + "type": "record", + "required": true + } + }, + { + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "type": "record", + "fields": [ + { + "age": { + "default": true, + "type": "boolean" + } + }, + { + "X-Cache-Status": { + "default": true, + "type": "boolean" + } + }, + { + "X-Cache-Key": { + "default": true, + "type": "boolean" + } + } + ], + "required": true + } + }, + { + "redis": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer", + "between": [ + 1, + 2147483646 + ], + "default": 256 + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer", + "default": 5 + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean", + "default": false + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_nodes" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_nodes" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_field": "connection_is_proxied", + "if_match": { + "eq": true + }, + "then_field": "host", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "translate_backwards": [ + "connect_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + }, + { + "bypass_on_err": { + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/proxy-cache-advanced/3.9.x.json b/schemas/proxy-cache-advanced/3.9.x.json new file mode 100644 index 00000000..63d95361 --- /dev/null +++ b/schemas/proxy-cache-advanced/3.9.x.json @@ -0,0 +1,573 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "response_code": { + "required": true, + "type": "array", + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable. The integers must be a value between 100 and 900.", + "elements": { + "between": [ + 100, + 900 + ], + "type": "integer" + }, + "len_min": 1 + } + }, + { + "request_method": { + "required": true, + "type": "array", + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable. Available options: `HEAD`, `GET`, `POST`, `PATCH`, `PUT`.", + "elements": { + "type": "string", + "one_of": [ + "HEAD", + "GET", + "POST", + "PATCH", + "PUT" + ] + } + } + }, + { + "content_type": { + "required": true, + "type": "array", + "default": [ + "text/plain", + "application/json" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value; for example, if the upstream is expected to respond with a `application/json; charset=utf-8` content-type, the plugin configuration must contain said value or a `Bypass` cache status is returned.", + "elements": { + "type": "string" + } + } + }, + { + "cache_ttl": { + "default": 300, + "description": "TTL in seconds of cache entities.", + "gt": 0, + "type": "integer" + } + }, + { + "strategy": { + "type": "string", + "description": "The backing data store in which to hold cache entities. Accepted values are: `memory` and `redis`.", + "required": true, + "one_of": [ + "memory", + "redis" + ] + } + }, + { + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "required": true, + "type": "boolean" + } + }, + { + "ignore_uri_case": { + "default": false, + "description": "Determines whether to treat URIs as case sensitive. By default, case sensitivity is enabled. If set to true, requests are cached while ignoring case sensitivity in the URI.", + "required": false, + "type": "boolean" + } + }, + { + "storage_ttl": { + "type": "integer", + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors." + } + }, + { + "memory": { + "fields": [ + { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "required": true, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "vary_query_params": { + "elements": { + "type": "string" + }, + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "type": "array" + } + }, + { + "vary_headers": { + "elements": { + "type": "string" + }, + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "type": "array" + } + }, + { + "response_headers": { + "type": "record", + "description": "Caching related diagnostic headers that should be included in cached responses", + "required": true, + "fields": [ + { + "age": { + "default": true, + "type": "boolean" + } + }, + { + "X-Cache-Status": { + "default": true, + "type": "boolean" + } + }, + { + "X-Cache-Key": { + "default": true, + "type": "boolean" + } + } + ] + } + }, + { + "redis": { + "required": true, + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ] + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ] + }, + "type": "array" + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ] + }, + "type": "array" + } + } + ], + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "type": "string", + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean" + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean" + } + } + ] + } + }, + { + "bypass_on_err": { + "default": false, + "description": "Unhandled errors while trying to retrieve a cache entry (such as redis down) are resolved with `Bypass`, with the request going upstream.", + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/proxy-cache/3.10.x.json b/schemas/proxy-cache/3.10.x.json new file mode 100644 index 00000000..85f8c01b --- /dev/null +++ b/schemas/proxy-cache/3.10.x.json @@ -0,0 +1,205 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "response_code": { + "type": "array", + "len_min": 1, + "description": "Upstream response status code considered cacheable.", + "default": [ + 200, + 301, + 404 + ], + "elements": { + "between": [ + 100, + 900 + ], + "type": "integer" + }, + "required": true + } + }, + { + "request_method": { + "type": "array", + "description": "Downstream request methods considered cacheable.", + "default": [ + "GET", + "HEAD" + ], + "elements": { + "type": "string", + "one_of": [ + "HEAD", + "GET", + "POST", + "PATCH", + "PUT" + ] + }, + "required": true + } + }, + { + "content_type": { + "type": "array", + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value.", + "default": [ + "text/plain", + "application/json" + ], + "elements": { + "type": "string" + }, + "required": true + } + }, + { + "cache_ttl": { + "gt": 0, + "default": 300, + "description": "TTL, in seconds, of cache entities.", + "type": "integer" + } + }, + { + "strategy": { + "description": "The backing data store in which to hold cache entities.", + "type": "string", + "one_of": [ + "memory" + ], + "required": true + } + }, + { + "cache_control": { + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "ignore_uri_case": { + "type": "boolean", + "default": false, + "required": false + } + }, + { + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + } + }, + { + "memory": { + "type": "record", + "fields": [ + { + "dictionary_name": { + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "default": "kong_db_cache", + "type": "string", + "required": true + } + } + ], + "required": true + } + }, + { + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "type": "record", + "fields": [ + { + "age": { + "default": true, + "type": "boolean" + } + }, + { + "X-Cache-Status": { + "default": true, + "type": "boolean" + } + }, + { + "X-Cache-Key": { + "default": true, + "type": "boolean" + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/proxy-cache/3.11.x.json b/schemas/proxy-cache/3.11.x.json new file mode 100644 index 00000000..5ab9c390 --- /dev/null +++ b/schemas/proxy-cache/3.11.x.json @@ -0,0 +1,205 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "response_code": { + "required": true, + "description": "Upstream response status code considered cacheable.", + "len_min": 1, + "type": "array", + "default": [ + 200, + 301, + 404 + ], + "elements": { + "type": "integer", + "between": [ + 100, + 900 + ] + } + } + }, + { + "request_method": { + "required": true, + "description": "Downstream request methods considered cacheable.", + "type": "array", + "default": [ + "GET", + "HEAD" + ], + "elements": { + "one_of": [ + "HEAD", + "GET", + "POST", + "PATCH", + "PUT" + ], + "type": "string" + } + } + }, + { + "content_type": { + "required": true, + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value.", + "type": "array", + "default": [ + "text/plain", + "application/json" + ], + "elements": { + "type": "string" + } + } + }, + { + "cache_ttl": { + "description": "TTL, in seconds, of cache entities.", + "gt": 0, + "default": 300, + "type": "integer" + } + }, + { + "strategy": { + "one_of": [ + "memory" + ], + "required": true, + "description": "The backing data store in which to hold cache entities.", + "type": "string" + } + }, + { + "cache_control": { + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "ignore_uri_case": { + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + } + }, + { + "memory": { + "required": true, + "fields": [ + { + "dictionary_name": { + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "required": true, + "default": "kong_db_cache", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "vary_query_params": { + "type": "array", + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "elements": { + "type": "string" + } + } + }, + { + "vary_headers": { + "type": "array", + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "elements": { + "type": "string" + } + } + }, + { + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "required": true, + "fields": [ + { + "age": { + "default": true, + "type": "boolean" + } + }, + { + "X-Cache-Status": { + "default": true, + "type": "boolean" + } + }, + { + "X-Cache-Key": { + "default": true, + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/proxy-cache/3.12.x.json b/schemas/proxy-cache/3.12.x.json new file mode 100644 index 00000000..1eee265e --- /dev/null +++ b/schemas/proxy-cache/3.12.x.json @@ -0,0 +1,205 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "response_code": { + "type": "array", + "len_min": 1, + "required": true, + "description": "Upstream response status code considered cacheable.", + "default": [ + 200, + 301, + 404 + ], + "elements": { + "type": "integer", + "between": [ + 100, + 900 + ] + } + } + }, + { + "request_method": { + "type": "array", + "required": true, + "description": "Downstream request methods considered cacheable.", + "default": [ + "GET", + "HEAD" + ], + "elements": { + "type": "string", + "one_of": [ + "HEAD", + "GET", + "POST", + "PATCH", + "PUT" + ] + } + } + }, + { + "content_type": { + "type": "array", + "required": true, + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value.", + "default": [ + "text/plain", + "application/json" + ], + "elements": { + "type": "string" + } + } + }, + { + "cache_ttl": { + "description": "TTL, in seconds, of cache entities.", + "default": 300, + "gt": 0, + "type": "integer" + } + }, + { + "strategy": { + "description": "The backing data store in which to hold cache entities.", + "type": "string", + "one_of": [ + "memory" + ], + "required": true + } + }, + { + "cache_control": { + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "ignore_uri_case": { + "type": "boolean", + "default": false, + "required": false + } + }, + { + "storage_ttl": { + "type": "integer", + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors." + } + }, + { + "memory": { + "type": "record", + "fields": [ + { + "dictionary_name": { + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "default": "kong_db_cache", + "type": "string", + "required": true + } + } + ], + "required": true + } + }, + { + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "fields": [ + { + "age": { + "type": "boolean", + "default": true + } + }, + { + "X-Cache-Status": { + "type": "boolean", + "default": true + } + }, + { + "X-Cache-Key": { + "type": "boolean", + "default": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/proxy-cache/3.4.x.json b/schemas/proxy-cache/3.4.x.json index 47930b69..2ddb03dc 100644 --- a/schemas/proxy-cache/3.4.x.json +++ b/schemas/proxy-cache/3.4.x.json @@ -8,6 +8,9 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", "elements": { "one_of": [ "grpc", @@ -21,33 +24,40 @@ "ws", "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "response_code": { - "len_min": 1, "default": [ 200, 301, 404 ], + "required": true, + "len_min": 1, + "description": "Upstream response status code considered cacheable.", + "type": "array", "elements": { "between": [ 100, 900 ], "type": "integer" - }, - "required": true, - "type": "array" + } } }, { @@ -56,18 +66,19 @@ "GET", "HEAD" ], + "type": "array", + "required": true, + "description": "Downstream request methods considered cacheable.", "elements": { + "type": "string", "one_of": [ "HEAD", "GET", "POST", "PATCH", "PUT" - ], - "type": "string" - }, - "type": "array", - "required": true + ] + } } }, { @@ -76,65 +87,72 @@ "text/plain", "application/json" ], + "type": "array", + "required": true, + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value.", "elements": { "type": "string" - }, - "type": "array", - "required": true + } } }, { "cache_ttl": { "default": 300, "gt": 0, - "type": "integer" + "type": "integer", + "description": "TTL, in seconds, of cache entities." } }, { "strategy": { "type": "string", - "required": true, "one_of": [ "memory" - ] + ], + "required": true, + "description": "The backing data store in which to hold cache entities." } }, { "cache_control": { + "default": false, "type": "boolean", "required": true, - "default": false + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234." } }, { "ignore_uri_case": { - "type": "boolean", + "default": false, "required": false, - "default": false + "type": "boolean" } }, { "storage_ttl": { - "type": "integer" + "type": "integer", + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors." } }, { "memory": { - "required": true, "fields": [ { "dictionary_name": { + "default": "kong_db_cache", "required": true, "type": "string", - "default": "kong_db_cache" + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template." } } ], - "type": "record" + "type": "record", + "required": true } }, { "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", "elements": { "type": "string" }, @@ -143,6 +161,7 @@ }, { "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", "elements": { "type": "string" }, @@ -150,7 +169,17 @@ } } ], - "type": "record" + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] } } ] diff --git a/schemas/proxy-cache/3.5.x.json b/schemas/proxy-cache/3.5.x.json new file mode 100644 index 00000000..f7096937 --- /dev/null +++ b/schemas/proxy-cache/3.5.x.json @@ -0,0 +1,213 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "response_code": { + "type": "array", + "required": true, + "len_min": 1, + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable.", + "elements": { + "type": "integer", + "between": [ + 100, + 900 + ] + } + } + }, + { + "request_method": { + "type": "array", + "required": true, + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable.", + "elements": { + "type": "string", + "one_of": [ + "HEAD", + "GET", + "POST", + "PATCH", + "PUT" + ] + } + } + }, + { + "content_type": { + "type": "array", + "required": true, + "default": [ + "text/plain", + "application/json" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value.", + "elements": { + "type": "string" + } + } + }, + { + "cache_ttl": { + "gt": 0, + "default": 300, + "type": "integer", + "description": "TTL, in seconds, of cache entities." + } + }, + { + "strategy": { + "description": "The backing data store in which to hold cache entities.", + "one_of": [ + "memory" + ], + "type": "string", + "required": true + } + }, + { + "cache_control": { + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "ignore_uri_case": { + "default": false, + "type": "boolean", + "required": false + } + }, + { + "storage_ttl": { + "type": "integer", + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors." + } + }, + { + "memory": { + "fields": [ + { + "dictionary_name": { + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "default": "kong_db_cache", + "type": "string", + "required": true + } + } + ], + "type": "record", + "required": true + } + }, + { + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "fields": [ + { + "age": { + "type": "boolean", + "default": true + } + }, + { + "X-Cache-Status": { + "type": "boolean", + "default": true + } + }, + { + "X-Cache-Key": { + "type": "boolean", + "default": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/proxy-cache/3.6.x.json b/schemas/proxy-cache/3.6.x.json new file mode 100644 index 00000000..fdff8582 --- /dev/null +++ b/schemas/proxy-cache/3.6.x.json @@ -0,0 +1,205 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "response_code": { + "elements": { + "type": "integer", + "between": [ + 100, + 900 + ] + }, + "type": "array", + "default": [ + 200, + 301, + 404 + ], + "len_min": 1, + "required": true, + "description": "Upstream response status code considered cacheable." + } + }, + { + "request_method": { + "elements": { + "one_of": [ + "HEAD", + "GET", + "POST", + "PATCH", + "PUT" + ], + "type": "string" + }, + "type": "array", + "default": [ + "GET", + "HEAD" + ], + "required": true, + "description": "Downstream request methods considered cacheable." + } + }, + { + "content_type": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "text/plain", + "application/json" + ], + "required": true, + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value." + } + }, + { + "cache_ttl": { + "gt": 0, + "type": "integer", + "description": "TTL, in seconds, of cache entities.", + "default": 300 + } + }, + { + "strategy": { + "required": true, + "type": "string", + "description": "The backing data store in which to hold cache entities.", + "one_of": [ + "memory" + ] + } + }, + { + "cache_control": { + "required": true, + "type": "boolean", + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "default": false + } + }, + { + "ignore_uri_case": { + "required": false, + "type": "boolean", + "default": false + } + }, + { + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + } + }, + { + "memory": { + "required": true, + "type": "record", + "fields": [ + { + "dictionary_name": { + "required": true, + "type": "string", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "default": "kong_db_cache" + } + } + ] + } + }, + { + "vary_query_params": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration." + } + }, + { + "vary_headers": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration." + } + }, + { + "response_headers": { + "required": true, + "type": "record", + "description": "Caching related diagnostic headers that should be included in cached responses", + "fields": [ + { + "age": { + "default": true, + "type": "boolean" + } + }, + { + "X-Cache-Status": { + "default": true, + "type": "boolean" + } + }, + { + "X-Cache-Key": { + "default": true, + "type": "boolean" + } + } + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/proxy-cache/3.7.x.json b/schemas/proxy-cache/3.7.x.json new file mode 100644 index 00000000..6137f9bc --- /dev/null +++ b/schemas/proxy-cache/3.7.x.json @@ -0,0 +1,205 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "response_code": { + "len_min": 1, + "description": "Upstream response status code considered cacheable.", + "required": true, + "elements": { + "type": "integer", + "between": [ + 100, + 900 + ] + }, + "type": "array", + "default": [ + 200, + 301, + 404 + ] + } + }, + { + "request_method": { + "description": "Downstream request methods considered cacheable.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "HEAD", + "GET", + "POST", + "PATCH", + "PUT" + ] + }, + "type": "array", + "default": [ + "GET", + "HEAD" + ] + } + }, + { + "content_type": { + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value.", + "required": true, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "text/plain", + "application/json" + ] + } + }, + { + "cache_ttl": { + "default": 300, + "type": "integer", + "description": "TTL, in seconds, of cache entities.", + "gt": 0 + } + }, + { + "strategy": { + "required": true, + "type": "string", + "description": "The backing data store in which to hold cache entities.", + "one_of": [ + "memory" + ] + } + }, + { + "cache_control": { + "required": true, + "type": "boolean", + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "default": false + } + }, + { + "ignore_uri_case": { + "required": false, + "type": "boolean", + "default": false + } + }, + { + "storage_ttl": { + "type": "integer", + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors." + } + }, + { + "memory": { + "fields": [ + { + "dictionary_name": { + "required": true, + "type": "string", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "default": "kong_db_cache" + } + } + ], + "type": "record", + "required": true + } + }, + { + "vary_query_params": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration." + } + }, + { + "vary_headers": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration." + } + }, + { + "response_headers": { + "fields": [ + { + "age": { + "type": "boolean", + "default": true + } + }, + { + "X-Cache-Status": { + "type": "boolean", + "default": true + } + }, + { + "X-Cache-Key": { + "type": "boolean", + "default": true + } + } + ], + "description": "Caching related diagnostic headers that should be included in cached responses", + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/proxy-cache/3.8.x.json b/schemas/proxy-cache/3.8.x.json new file mode 100644 index 00000000..6bc799e6 --- /dev/null +++ b/schemas/proxy-cache/3.8.x.json @@ -0,0 +1,205 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "response_code": { + "description": "Upstream response status code considered cacheable.", + "required": true, + "elements": { + "between": [ + 100, + 900 + ], + "type": "integer" + }, + "type": "array", + "len_min": 1, + "default": [ + 200, + 301, + 404 + ] + } + }, + { + "request_method": { + "description": "Downstream request methods considered cacheable.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "HEAD", + "GET", + "POST", + "PATCH", + "PUT" + ] + }, + "type": "array", + "default": [ + "GET", + "HEAD" + ] + } + }, + { + "content_type": { + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value.", + "required": true, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "text/plain", + "application/json" + ] + } + }, + { + "cache_ttl": { + "description": "TTL, in seconds, of cache entities.", + "type": "integer", + "gt": 0, + "default": 300 + } + }, + { + "strategy": { + "description": "The backing data store in which to hold cache entities.", + "required": true, + "type": "string", + "one_of": [ + "memory" + ] + } + }, + { + "cache_control": { + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "ignore_uri_case": { + "type": "boolean", + "required": false, + "default": false + } + }, + { + "storage_ttl": { + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors.", + "type": "integer" + } + }, + { + "memory": { + "fields": [ + { + "dictionary_name": { + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "required": true, + "type": "string", + "default": "kong_db_cache" + } + } + ], + "type": "record", + "required": true + } + }, + { + "vary_query_params": { + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "vary_headers": { + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "response_headers": { + "description": "Caching related diagnostic headers that should be included in cached responses", + "type": "record", + "fields": [ + { + "age": { + "default": true, + "type": "boolean" + } + }, + { + "X-Cache-Status": { + "default": true, + "type": "boolean" + } + }, + { + "X-Cache-Key": { + "default": true, + "type": "boolean" + } + } + ], + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/proxy-cache/3.9.x.json b/schemas/proxy-cache/3.9.x.json new file mode 100644 index 00000000..c639f5af --- /dev/null +++ b/schemas/proxy-cache/3.9.x.json @@ -0,0 +1,205 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "config": { + "fields": [ + { + "response_code": { + "required": true, + "type": "array", + "default": [ + 200, + 301, + 404 + ], + "description": "Upstream response status code considered cacheable.", + "elements": { + "between": [ + 100, + 900 + ], + "type": "integer" + }, + "len_min": 1 + } + }, + { + "request_method": { + "required": true, + "type": "array", + "default": [ + "GET", + "HEAD" + ], + "description": "Downstream request methods considered cacheable.", + "elements": { + "type": "string", + "one_of": [ + "HEAD", + "GET", + "POST", + "PATCH", + "PUT" + ] + } + } + }, + { + "content_type": { + "required": true, + "type": "array", + "default": [ + "text/plain", + "application/json" + ], + "description": "Upstream response content types considered cacheable. The plugin performs an **exact match** against each specified value.", + "elements": { + "type": "string" + } + } + }, + { + "cache_ttl": { + "default": 300, + "description": "TTL, in seconds, of cache entities.", + "gt": 0, + "type": "integer" + } + }, + { + "strategy": { + "type": "string", + "description": "The backing data store in which to hold cache entities.", + "required": true, + "one_of": [ + "memory" + ] + } + }, + { + "cache_control": { + "default": false, + "description": "When enabled, respect the Cache-Control behaviors defined in RFC7234.", + "required": true, + "type": "boolean" + } + }, + { + "ignore_uri_case": { + "default": false, + "required": false, + "type": "boolean" + } + }, + { + "storage_ttl": { + "type": "integer", + "description": "Number of seconds to keep resources in the storage backend. This value is independent of `cache_ttl` or resource TTLs defined by Cache-Control behaviors." + } + }, + { + "memory": { + "fields": [ + { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "required": true, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "vary_query_params": { + "elements": { + "type": "string" + }, + "description": "Relevant query parameters considered for the cache key. If undefined, all params are taken into consideration.", + "type": "array" + } + }, + { + "vary_headers": { + "elements": { + "type": "string" + }, + "description": "Relevant headers considered for the cache key. If undefined, none of the headers are taken into consideration.", + "type": "array" + } + }, + { + "response_headers": { + "type": "record", + "description": "Caching related diagnostic headers that should be included in cached responses", + "required": true, + "fields": [ + { + "age": { + "default": true, + "type": "boolean" + } + }, + { + "X-Cache-Status": { + "default": true, + "type": "boolean" + } + }, + { + "X-Cache-Key": { + "default": true, + "type": "boolean" + } + } + ] + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/rate-limiting-advanced/3.10.x.json b/schemas/rate-limiting-advanced/3.10.x.json new file mode 100644 index 00000000..d138341c --- /dev/null +++ b/schemas/rate-limiting-advanced/3.10.x.json @@ -0,0 +1,604 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + }, + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "identifier": { + "type": "string", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`. Note if `identifier` is `consumer-group`, the plugin must be applied on a consumer group entity. Because a consumer may belong to multiple consumer groups, the plugin needs to know explicitly which consumer group to limit the rate.", + "one_of": [ + "ip", + "credential", + "consumer", + "service", + "header", + "path", + "consumer-group" + ], + "default": "consumer", + "required": true + } + }, + { + "compound_identifier": { + "description": "Similar to `identifer`, but supports combining multiple items. The priority of `compound_identifier` is higher than `identifier`, which means if `compound_identifer` is set, it will be used, otherwise `identifier` will be used.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "ip", + "credential", + "consumer", + "service", + "header", + "path", + "consumer-group" + ] + } + } + }, + { + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "type": "array", + "elements": { + "type": "number" + }, + "required": true + } + }, + { + "window_type": { + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "type": "string", + "default": "sliding", + "one_of": [ + "fixed", + "sliding" + ] + } + }, + { + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "type": "array", + "elements": { + "type": "number" + }, + "required": true + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + } + }, + { + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same.", + "type": "string", + "required": true, + "auto": true + } + }, + { + "strategy": { + "type": "string", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "one_of": [ + "cluster", + "redis", + "local" + ], + "default": "local", + "required": true + } + }, + { + "dictionary_name": { + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string", + "default": "kong_rate_limiting_counters", + "required": true + } + }, + { + "lock_dictionary_name": { + "description": "The shared dictionary where concurrency control locks are stored. The default shared dictionary is `kong_locks`. The shared dictionary should be declare in nginx-kong.conf.", + "type": "string", + "default": "kong_locks", + "required": true + } + }, + { + "hide_client_headers": { + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean", + "default": false + } + }, + { + "retry_after_jitter_max": { + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number", + "default": 0 + } + }, + { + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + { + "path": { + "starts_with": "/", + "type": "string", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)." + } + }, + { + "redis": { + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + }, + "required": false + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + }, + "required": false + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "redis_proxy_type": { + "description": "If the `connection_is_proxied` is enabled, this field indicates the proxy type and version you are using. For example, you can enable this optioin when you want authentication between Kong and Envoy proxy.", + "type": "string", + "one_of": [ + "envoy_v1.31" + ], + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "type": "array", + "elements": { + "type": "string" + }, + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "len_min": 1 + } + }, + { + "cluster_addresses": { + "type": "array", + "elements": { + "type": "string" + }, + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "len_min": 1 + } + } + ], + "required": true + } + }, + { + "enforce_consumer_groups": { + "description": "Determines if consumer groups are allowed to override the rate limiting settings for the given Route or Service. Flipping `enforce_consumer_groups` from `true` to `false` disables the group override, but does not clear the list of consumer groups. You can then flip `enforce_consumer_groups` to `true` to re-enforce the groups.", + "type": "boolean", + "default": false + } + }, + { + "consumer_groups": { + "description": "List of consumer groups allowed to override the rate limiting settings for the given Route or Service. Required if `enforce_consumer_groups` is set to `true`.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "disable_penalty": { + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "type": "boolean", + "default": false + } + }, + { + "error_code": { + "description": "Set a custom error code to return when the rate limit is exceeded.", + "type": "number", + "default": 429, + "gt": 0 + } + }, + { + "error_message": { + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string", + "default": "API rate limit exceeded" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/rate-limiting-advanced/3.11.x.json b/schemas/rate-limiting-advanced/3.11.x.json new file mode 100644 index 00000000..c00928e4 --- /dev/null +++ b/schemas/rate-limiting-advanced/3.11.x.json @@ -0,0 +1,604 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "identifier": { + "required": true, + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`. Note if `identifier` is `consumer-group`, the plugin must be applied on a consumer group entity. Because a consumer may belong to multiple consumer groups, the plugin needs to know explicitly which consumer group to limit the rate.", + "one_of": [ + "ip", + "credential", + "consumer", + "service", + "header", + "path", + "consumer-group" + ], + "default": "consumer", + "type": "string" + } + }, + { + "compound_identifier": { + "type": "array", + "description": "Similar to `identifer`, but supports combining multiple items. The priority of `compound_identifier` is higher than `identifier`, which means if `compound_identifer` is set, it will be used, otherwise `identifier` will be used.", + "elements": { + "one_of": [ + "ip", + "credential", + "consumer", + "service", + "header", + "path", + "consumer-group" + ], + "type": "string" + } + } + }, + { + "window_size": { + "type": "array", + "required": true, + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "elements": { + "type": "number" + } + } + }, + { + "window_type": { + "one_of": [ + "fixed", + "sliding" + ], + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "default": "sliding", + "type": "string" + } + }, + { + "limit": { + "type": "array", + "required": true, + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "elements": { + "type": "number" + } + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + } + }, + { + "namespace": { + "type": "string", + "required": true, + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same.", + "auto": true + } + }, + { + "strategy": { + "required": true, + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "one_of": [ + "cluster", + "redis", + "local" + ], + "default": "local", + "type": "string" + } + }, + { + "dictionary_name": { + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "required": true, + "default": "kong_rate_limiting_counters", + "type": "string" + } + }, + { + "lock_dictionary_name": { + "description": "The shared dictionary where concurrency control locks are stored. The default shared dictionary is `kong_locks`. The shared dictionary should be declare in nginx-kong.conf.", + "required": true, + "default": "kong_locks", + "type": "string" + } + }, + { + "hide_client_headers": { + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "default": false, + "type": "boolean" + } + }, + { + "retry_after_jitter_max": { + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "default": 0, + "type": "number" + } + }, + { + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + { + "path": { + "type": "string", + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + }, + { + "redis": { + "required": true, + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer" + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer" + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer" + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer" + } + }, + { + "username": { + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string" + } + }, + { + "sentinel_username": { + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "referenceable": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "default": 256, + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1, + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer" + } + } + ], + "type": "record" + }, + "type": "array" + } + }, + { + "cluster_nodes": { + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1, + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer" + } + } + ], + "type": "record" + }, + "type": "array" + } + }, + { + "ssl": { + "default": false, + "required": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "required": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "required": false, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "required": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + } + }, + { + "redis_proxy_type": { + "one_of": [ + "envoy_v1.31" + ], + "required": false, + "description": "If the `connection_is_proxied` is enabled, this field indicates the proxy type and version you are using. For example, you can enable this optioin when you want authentication between Kong and Envoy proxy.", + "type": "string" + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "array" + } + }, + { + "cluster_addresses": { + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "array" + } + } + ], + "type": "record" + } + }, + { + "enforce_consumer_groups": { + "description": "Determines if consumer groups are allowed to override the rate limiting settings for the given Route or Service. Flipping `enforce_consumer_groups` from `true` to `false` disables the group override, but does not clear the list of consumer groups. You can then flip `enforce_consumer_groups` to `true` to re-enforce the groups.", + "default": false, + "type": "boolean" + } + }, + { + "consumer_groups": { + "type": "array", + "description": "List of consumer groups allowed to override the rate limiting settings for the given Route or Service. Required if `enforce_consumer_groups` is set to `true`.", + "elements": { + "type": "string" + } + } + }, + { + "disable_penalty": { + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "default": false, + "type": "boolean" + } + }, + { + "error_code": { + "description": "Set a custom error code to return when the rate limit is exceeded.", + "gt": 0, + "default": 429, + "type": "number" + } + }, + { + "error_message": { + "description": "Set a custom error message to return when the rate limit is exceeded.", + "default": "API rate limit exceeded", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + } +} \ No newline at end of file diff --git a/schemas/rate-limiting-advanced/3.12.x.json b/schemas/rate-limiting-advanced/3.12.x.json new file mode 100644 index 00000000..c3f4e90c --- /dev/null +++ b/schemas/rate-limiting-advanced/3.12.x.json @@ -0,0 +1,656 @@ +{ + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + }, + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "identifier": { + "type": "string", + "required": true, + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`. Note if `identifier` is `consumer-group`, the plugin must be applied on a consumer group entity. Because a consumer may belong to multiple consumer groups, the plugin needs to know explicitly which consumer group to limit the rate.", + "default": "consumer", + "one_of": [ + "ip", + "credential", + "consumer", + "service", + "header", + "path", + "consumer-group" + ] + } + }, + { + "compound_identifier": { + "description": "Similar to `identifer`, but supports combining multiple items. The priority of `compound_identifier` is higher than `identifier`, which means if `compound_identifer` is set, it will be used, otherwise `identifier` will be used.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "ip", + "credential", + "consumer", + "service", + "header", + "path", + "consumer-group" + ] + } + } + }, + { + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "elements": { + "type": "number" + }, + "type": "array", + "required": true + } + }, + { + "window_type": { + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "default": "sliding", + "one_of": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + { + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "elements": { + "type": "number" + }, + "type": "array", + "required": true + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + } + }, + { + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same.", + "type": "string", + "auto": true, + "required": true + } + }, + { + "strategy": { + "type": "string", + "required": true, + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "default": "local", + "one_of": [ + "cluster", + "redis", + "local" + ] + } + }, + { + "dictionary_name": { + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "default": "kong_rate_limiting_counters", + "type": "string", + "required": true + } + }, + { + "lock_dictionary_name": { + "description": "The shared dictionary where concurrency control locks are stored. The default shared dictionary is `kong_locks`. The shared dictionary should be declare in nginx-kong.conf.", + "default": "kong_locks", + "type": "string", + "required": true + } + }, + { + "hide_client_headers": { + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "default": false, + "type": "boolean" + } + }, + { + "retry_after_jitter_max": { + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "default": 0, + "type": "number" + } + }, + { + "header_name": { + "type": "string", + "description": "A string representing an HTTP header name." + } + }, + { + "path": { + "type": "string", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)." + } + }, + { + "redis": { + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "database", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + } + ], + "required": true, + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis." + } + }, + { + "sentinel_username": { + "type": "string", + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels." + } + }, + { + "database": { + "type": "integer", + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy" + } + }, + { + "keepalive_pool_size": { + "type": "integer", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low." + } + }, + { + "keepalive_backlog": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "type": "boolean", + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false + } + }, + { + "redis_proxy_type": { + "type": "string", + "description": "If the `connection_is_proxied` is enabled, this field indicates the proxy type and version you are using. For example, you can enable this optioin when you want authentication between Kong and Envoy proxy.", + "one_of": [ + "envoy_v1.31" + ], + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + } + } + }, + { + "cluster_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + } + } + } + ] + } + }, + { + "throttling": { + "type": "record", + "fields": [ + { + "enabled": { + "description": "Determines if the throttling feature is enabled or not", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "interval": { + "type": "number", + "between": [ + 1, + 1000000 + ], + "required": true, + "description": "The period between two successive retries for an individual request (in seconds)", + "default": 5 + } + }, + { + "retry_times": { + "type": "number", + "between": [ + 1, + 1000000 + ], + "required": true, + "description": "The maximum number of retries for an individual request", + "default": 3 + } + }, + { + "queue_limit": { + "type": "number", + "between": [ + 1, + 1000000 + ], + "required": true, + "description": "The maximum number of requests allowed for throttling", + "default": 5 + } + } + ], + "required": false + } + }, + { + "enforce_consumer_groups": { + "description": "Determines if consumer groups are allowed to override the rate limiting settings for the given Route or Service. Flipping `enforce_consumer_groups` from `true` to `false` disables the group override, but does not clear the list of consumer groups. You can then flip `enforce_consumer_groups` to `true` to re-enforce the groups.", + "default": false, + "type": "boolean" + } + }, + { + "consumer_groups": { + "description": "List of consumer groups allowed to override the rate limiting settings for the given Route or Service. Required if `enforce_consumer_groups` is set to `true`.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "disable_penalty": { + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "default": false, + "type": "boolean" + } + }, + { + "error_code": { + "description": "Set a custom error code to return when the rate limit is exceeded.", + "default": 429, + "gt": 0, + "type": "number" + } + }, + { + "error_message": { + "description": "Set a custom error message to return when the rate limit is exceeded.", + "default": "API rate limit exceeded", + "type": "string" + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/rate-limiting-advanced/3.4.x.json b/schemas/rate-limiting-advanced/3.4.x.json index c203bdb4..91b91d54 100644 --- a/schemas/rate-limiting-advanced/3.4.x.json +++ b/schemas/rate-limiting-advanced/3.4.x.json @@ -2,6 +2,8 @@ "fields": [ { "protocols": { + "type": "set", + "required": true, "default": [ "grpc", "grpcs", @@ -17,17 +19,15 @@ ], "type": "string" }, - "required": true, - "type": "set" + "description": "A set of strings representing HTTP protocols." } }, { "config": { - "required": true, + "type": "record", "fields": [ { "identifier": { - "type": "string", "one_of": [ "ip", "credential", @@ -36,8 +36,10 @@ "header", "path" ], + "type": "string", + "required": true, "default": "consumer", - "required": true + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, or `path`." } }, { @@ -46,17 +48,19 @@ "type": "array", "elements": { "type": "number" - } + }, + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified." } }, { "window_type": { - "default": "sliding", - "type": "string", "one_of": [ "fixed", "sliding" - ] + ], + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "type": "string" } }, { @@ -65,235 +69,199 @@ "type": "array", "elements": { "type": "number" - } + }, + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified." } }, { "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", "type": "number" } }, { "namespace": { - "required": true, "auto": true, - "type": "string" + "type": "string", + "required": true, + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace." } }, { "strategy": { - "type": "string", "one_of": [ "cluster", "redis", "local" ], + "type": "string", + "required": true, "default": "local", - "required": true + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`." } }, { "dictionary_name": { - "required": true, + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", "default": "kong_rate_limiting_counters", + "required": true, "type": "string" } }, { "hide_client_headers": { - "type": "boolean", - "default": false + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" } }, { "retry_after_jitter_max": { - "type": "number", - "default": 0 + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" } }, { "header_name": { + "description": "A string representing an HTTP header name.", "type": "string" } }, { "path": { + "type": "string", "match_none": [ { - "err": "must not have empty segments", - "pattern": "//" + "pattern": "//", + "err": "must not have empty segments" } ], - "starts_with": "/", - "type": "string" + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "starts_with": "/" } }, { "redis": { - "required": true, - "entity_checks": [ - { - "mutually_exclusive_sets": { - "set1": [ - "sentinel_master", - "sentinel_role", - "sentinel_addresses" - ], - "set2": [ - "host", - "port" - ] - } - }, - { - "mutually_exclusive_sets": { - "set1": [ - "sentinel_master", - "sentinel_role", - "sentinel_addresses" - ], - "set2": [ - "cluster_addresses" - ] - } - }, - { - "mutually_exclusive_sets": { - "set1": [ - "cluster_addresses" - ], - "set2": [ - "host", - "port" - ] - } - }, - { - "mutually_required": [ - "sentinel_master", - "sentinel_role", - "sentinel_addresses" - ] - }, - { - "mutually_required": [ - "host", - "port" - ] - }, - { - "mutually_required": [ - "connect_timeout", - "send_timeout", - "read_timeout" - ] - } - ], "fields": [ { "host": { + "description": "A string representing a host name, such as example.com.", "type": "string" } }, { "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", "between": [ 0, 65535 - ], - "type": "integer" + ] } }, { "timeout": { + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "between": [ 0, 2147483646 - ], - "type": "integer", - "default": 2000 + ] } }, { "connect_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "between": [ 0, 2147483646 - ], - "type": "integer" + ] } }, { "send_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "between": [ 0, 2147483646 - ], - "type": "integer" + ] } }, { "read_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "between": [ 0, 2147483646 - ], - "type": "integer" + ] } }, { "username": { + "referenceable": true, "type": "string", - "referenceable": true + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`." } }, { "password": { "referenceable": true, + "type": "string", "encrypted": true, - "type": "string" + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis." } }, { "sentinel_username": { + "referenceable": true, "type": "string", - "referenceable": true + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." } }, { "sentinel_password": { "referenceable": true, + "type": "string", "encrypted": true, - "type": "string" + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels." } }, { "database": { "type": "integer", + "description": "Database to use for the Redis connection when using the `redis` strategy", "default": 0 } }, { "keepalive_pool_size": { + "default": 30, + "type": "integer", + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value.", "between": [ 1, 2147483646 - ], - "default": 30, - "type": "integer" + ] } }, { "keepalive_backlog": { + "type": "integer", + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, all connection queues beyond the maximum limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued connect operations resume once the number of connections in the pool is less than `keepalive_pool_size`. Note that queued connect operations are subject to set timeouts.", "between": [ 0, 2147483646 - ], - "type": "integer" + ] } }, { "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", "type": "string" } }, @@ -304,86 +272,165 @@ "slave", "any" ], - "type": "string" + "type": "string", + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." } }, { "sentinel_addresses": { - "len_min": 1, "elements": { "type": "string" }, - "type": "array" + "type": "array", + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", + "len_min": 1 } }, { "cluster_addresses": { - "len_min": 1, "elements": { "type": "string" }, - "type": "array" + "type": "array", + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", + "len_min": 1 } }, { "ssl": { "default": false, + "type": "boolean", "required": false, - "type": "boolean" + "description": "If set to true, uses SSL to connect to Redis." } }, { "ssl_verify": { "default": false, + "type": "boolean", "required": false, - "type": "boolean" + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly." } }, { "server_name": { "type": "string", - "required": false + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS." } } ], - "type": "record" + "type": "record", + "required": true, + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ], + "set2": [ + "host", + "port" + ] + } + }, + { + "mutually_exclusive_sets": { + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ], + "set2": [ + "cluster_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set1": [ + "cluster_addresses" + ], + "set2": [ + "host", + "port" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + } + ] } }, { "enforce_consumer_groups": { - "type": "boolean", - "default": false + "default": false, + "description": "Determines if consumer groups are allowed to override the rate limiting settings for the given Route or Service. Flipping `enforce_consumer_groups` from `true` to `false` disables the group override, but does not clear the list of consumer groups. You can then flip `enforce_consumer_groups` to `true` to re-enforce the groups.", + "type": "boolean" } }, { "consumer_groups": { + "type": "array", + "description": "List of consumer groups allowed to override the rate limiting settings for the given Route or Service. Required if `enforce_consumer_groups` is set to `true`.", "elements": { "type": "string" - }, - "type": "array" + } } }, { "disable_penalty": { - "type": "boolean", - "default": false + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "type": "boolean" } }, { "error_code": { - "type": "number", "gt": 0, - "default": 429 + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "type": "number" } }, { "error_message": { - "type": "string", - "default": "API rate limit exceeded" + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" } } ], - "type": "record" + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] } } ] diff --git a/schemas/rate-limiting-advanced/3.5.x.json b/schemas/rate-limiting-advanced/3.5.x.json new file mode 100644 index 00000000..14ed04f8 --- /dev/null +++ b/schemas/rate-limiting-advanced/3.5.x.json @@ -0,0 +1,437 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "fields": [ + { + "identifier": { + "required": true, + "type": "string", + "default": "consumer", + "one_of": [ + "ip", + "credential", + "consumer", + "service", + "header", + "path" + ], + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, or `path`." + } + }, + { + "window_size": { + "required": true, + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "type": "array", + "elements": { + "type": "number" + } + } + }, + { + "window_type": { + "one_of": [ + "fixed", + "sliding" + ], + "type": "string", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "default": "sliding" + } + }, + { + "limit": { + "required": true, + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "type": "array", + "elements": { + "type": "number" + } + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + } + }, + { + "namespace": { + "auto": true, + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same.", + "type": "string", + "required": true + } + }, + { + "strategy": { + "required": true, + "type": "string", + "default": "local", + "one_of": [ + "cluster", + "redis", + "local" + ], + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`." + } + }, + { + "dictionary_name": { + "required": true, + "type": "string", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "default": "kong_rate_limiting_counters" + } + }, + { + "hide_client_headers": { + "type": "boolean", + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "default": false + } + }, + { + "retry_after_jitter_max": { + "type": "number", + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "default": 0 + } + }, + { + "header_name": { + "type": "string", + "description": "A string representing an HTTP header name." + } + }, + { + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "type": "string", + "starts_with": "/" + } + }, + { + "redis": { + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "connect_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "send_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "read_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "username": { + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`.", + "type": "string" + } + }, + { + "password": { + "referenceable": true, + "encrypted": true, + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis." + } + }, + { + "sentinel_username": { + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string" + } + }, + { + "sentinel_password": { + "referenceable": true, + "encrypted": true, + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels." + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer", + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", + "type": "array", + "len_min": 1 + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "required": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "required": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "required": false, + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS." + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ], + "set2": [ + "host", + "port" + ] + } + }, + { + "mutually_exclusive_sets": { + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ], + "set2": [ + "cluster_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set1": [ + "cluster_addresses" + ], + "set2": [ + "host", + "port" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + } + ], + "type": "record", + "required": true + } + }, + { + "enforce_consumer_groups": { + "type": "boolean", + "description": "Determines if consumer groups are allowed to override the rate limiting settings for the given Route or Service. Flipping `enforce_consumer_groups` from `true` to `false` disables the group override, but does not clear the list of consumer groups. You can then flip `enforce_consumer_groups` to `true` to re-enforce the groups.", + "default": false + } + }, + { + "consumer_groups": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "List of consumer groups allowed to override the rate limiting settings for the given Route or Service. Required if `enforce_consumer_groups` is set to `true`." + } + }, + { + "disable_penalty": { + "type": "boolean", + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "default": false + } + }, + { + "error_code": { + "gt": 0, + "type": "number", + "description": "Set a custom error code to return when the rate limit is exceeded.", + "default": 429 + } + }, + { + "error_message": { + "type": "string", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "default": "API rate limit exceeded" + } + } + ], + "type": "record", + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/rate-limiting-advanced/3.6.x.json b/schemas/rate-limiting-advanced/3.6.x.json new file mode 100644 index 00000000..6343a43d --- /dev/null +++ b/schemas/rate-limiting-advanced/3.6.x.json @@ -0,0 +1,438 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "fields": [ + { + "identifier": { + "required": true, + "default": "consumer", + "type": "string", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`.", + "one_of": [ + "ip", + "credential", + "consumer", + "service", + "header", + "path", + "consumer-group" + ] + } + }, + { + "window_size": { + "required": true, + "type": "array", + "elements": { + "type": "number" + }, + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified." + } + }, + { + "window_type": { + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "default": "sliding", + "type": "string", + "one_of": [ + "fixed", + "sliding" + ] + } + }, + { + "limit": { + "required": true, + "type": "array", + "elements": { + "type": "number" + }, + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified." + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + } + }, + { + "namespace": { + "required": true, + "type": "string", + "auto": true, + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same." + } + }, + { + "strategy": { + "required": true, + "default": "local", + "type": "string", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "one_of": [ + "cluster", + "redis", + "local" + ] + } + }, + { + "dictionary_name": { + "required": true, + "default": "kong_rate_limiting_counters", + "type": "string", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle." + } + }, + { + "hide_client_headers": { + "type": "boolean", + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters." + } + }, + { + "retry_after_jitter_max": { + "type": "number", + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header." + } + }, + { + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + { + "path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "type": "string", + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)." + } + }, + { + "redis": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "timeout": { + "default": 2000, + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "connect_timeout": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis." + } + }, + { + "sentinel_username": { + "type": "string", + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels." + } + }, + { + "database": { + "default": 0, + "type": "integer", + "description": "Database to use for the Redis connection when using the `redis` strategy" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "type": "integer", + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low." + } + }, + { + "keepalive_backlog": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "type": "string", + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "type": "array", + "len_min": 1, + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element." + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "type": "array", + "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element." + } + }, + { + "ssl": { + "required": false, + "type": "boolean", + "default": false, + "description": "If set to true, uses SSL to connect to Redis." + } + }, + { + "ssl_verify": { + "required": false, + "type": "boolean", + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly." + } + }, + { + "server_name": { + "required": false, + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS." + } + } + ], + "type": "record", + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_addresses" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_addresses" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + } + ], + "required": true + } + }, + { + "enforce_consumer_groups": { + "type": "boolean", + "default": false, + "description": "Determines if consumer groups are allowed to override the rate limiting settings for the given Route or Service. Flipping `enforce_consumer_groups` from `true` to `false` disables the group override, but does not clear the list of consumer groups. You can then flip `enforce_consumer_groups` to `true` to re-enforce the groups." + } + }, + { + "consumer_groups": { + "elements": { + "type": "string" + }, + "type": "array", + "description": "List of consumer groups allowed to override the rate limiting settings for the given Route or Service. Required if `enforce_consumer_groups` is set to `true`." + } + }, + { + "disable_penalty": { + "type": "boolean", + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type." + } + }, + { + "error_code": { + "gt": 0, + "default": 429, + "type": "number", + "description": "Set a custom error code to return when the rate limit is exceeded." + } + }, + { + "error_message": { + "type": "string", + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/rate-limiting-advanced/3.7.x.json b/schemas/rate-limiting-advanced/3.7.x.json new file mode 100644 index 00000000..ed32d32a --- /dev/null +++ b/schemas/rate-limiting-advanced/3.7.x.json @@ -0,0 +1,438 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "identifier": { + "default": "consumer", + "required": true, + "type": "string", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`.", + "one_of": [ + "ip", + "credential", + "consumer", + "service", + "header", + "path", + "consumer-group" + ] + } + }, + { + "window_size": { + "required": true, + "elements": { + "type": "number" + }, + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "type": "array" + } + }, + { + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "type": "string", + "one_of": [ + "fixed", + "sliding" + ] + } + }, + { + "limit": { + "required": true, + "elements": { + "type": "number" + }, + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "type": "array" + } + }, + { + "sync_rate": { + "type": "number", + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms)." + } + }, + { + "namespace": { + "auto": true, + "required": true, + "type": "string", + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same." + } + }, + { + "strategy": { + "default": "local", + "required": true, + "type": "string", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "one_of": [ + "cluster", + "redis", + "local" + ] + } + }, + { + "dictionary_name": { + "required": true, + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string", + "default": "kong_rate_limiting_counters" + } + }, + { + "hide_client_headers": { + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean", + "default": false + } + }, + { + "retry_after_jitter_max": { + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number", + "default": 0 + } + }, + { + "header_name": { + "type": "string", + "description": "A string representing an HTTP header name." + } + }, + { + "path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + } + }, + { + "redis": { + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "connect_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "send_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "read_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "type": "integer", + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "default": 256, + "type": "integer", + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "type": "integer", + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "type": "string", + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_addresses": { + "description": "Sentinel addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel. Each string element must be a hostname. The minimum length of the array is 1 element.", + "elements": { + "type": "string" + }, + "type": "array", + "len_min": 1 + } + }, + { + "cluster_addresses": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Cluster. Each string element must be a hostname. The minimum length of the array is 1 element.", + "elements": { + "type": "string" + }, + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "required": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "required": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_addresses" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_addresses" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_addresses" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + } + ], + "type": "record", + "required": true + } + }, + { + "enforce_consumer_groups": { + "description": "Determines if consumer groups are allowed to override the rate limiting settings for the given Route or Service. Flipping `enforce_consumer_groups` from `true` to `false` disables the group override, but does not clear the list of consumer groups. You can then flip `enforce_consumer_groups` to `true` to re-enforce the groups.", + "type": "boolean", + "default": false + } + }, + { + "consumer_groups": { + "elements": { + "type": "string" + }, + "description": "List of consumer groups allowed to override the rate limiting settings for the given Route or Service. Required if `enforce_consumer_groups` is set to `true`.", + "type": "array" + } + }, + { + "disable_penalty": { + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "type": "boolean", + "default": false + } + }, + { + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "type": "number", + "gt": 0 + } + }, + { + "error_message": { + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string", + "default": "API rate limit exceeded" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/rate-limiting-advanced/3.8.x.json b/schemas/rate-limiting-advanced/3.8.x.json new file mode 100644 index 00000000..7df38f70 --- /dev/null +++ b/schemas/rate-limiting-advanced/3.8.x.json @@ -0,0 +1,600 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "identifier": { + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`.", + "required": true, + "one_of": [ + "ip", + "credential", + "consumer", + "service", + "header", + "path", + "consumer-group" + ], + "type": "string", + "default": "consumer" + } + }, + { + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "required": true, + "type": "array", + "elements": { + "type": "number" + } + } + }, + { + "window_type": { + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "type": "string", + "default": "sliding", + "one_of": [ + "fixed", + "sliding" + ] + } + }, + { + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "required": true, + "type": "array", + "elements": { + "type": "number" + } + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + } + }, + { + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `window_size`, `dictionary_name`, need to be the same.", + "auto": true, + "type": "string", + "required": true + } + }, + { + "strategy": { + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "required": true, + "one_of": [ + "cluster", + "redis", + "local" + ], + "type": "string", + "default": "local" + } + }, + { + "dictionary_name": { + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string", + "required": true, + "default": "kong_rate_limiting_counters" + } + }, + { + "hide_client_headers": { + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean", + "default": false + } + }, + { + "retry_after_jitter_max": { + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number", + "default": 0 + } + }, + { + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + { + "path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "type": "string", + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)." + } + }, + { + "redis": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer", + "between": [ + 1, + 2147483646 + ], + "default": 256 + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer", + "default": 5 + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean", + "default": false + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_nodes" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_nodes" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_field": "connection_is_proxied", + "if_match": { + "eq": true + }, + "then_field": "host", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "translate_backwards": [ + "connect_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + }, + { + "enforce_consumer_groups": { + "description": "Determines if consumer groups are allowed to override the rate limiting settings for the given Route or Service. Flipping `enforce_consumer_groups` from `true` to `false` disables the group override, but does not clear the list of consumer groups. You can then flip `enforce_consumer_groups` to `true` to re-enforce the groups.", + "type": "boolean", + "default": false + } + }, + { + "consumer_groups": { + "description": "List of consumer groups allowed to override the rate limiting settings for the given Route or Service. Required if `enforce_consumer_groups` is set to `true`.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "disable_penalty": { + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "type": "boolean", + "default": false + } + }, + { + "error_code": { + "description": "Set a custom error code to return when the rate limit is exceeded.", + "type": "number", + "gt": 0, + "default": 429 + } + }, + { + "error_message": { + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string", + "default": "API rate limit exceeded" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/rate-limiting-advanced/3.9.x.json b/schemas/rate-limiting-advanced/3.9.x.json new file mode 100644 index 00000000..a2ecf410 --- /dev/null +++ b/schemas/rate-limiting-advanced/3.9.x.json @@ -0,0 +1,599 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "identifier": { + "required": true, + "type": "string", + "default": "consumer", + "description": "The type of identifier used to generate the rate limit key. Defines the scope used to increment the rate limiting counters. Can be `ip`, `credential`, `consumer`, `service`, `header`, `path` or `consumer-group`.", + "one_of": [ + "ip", + "credential", + "consumer", + "service", + "header", + "path", + "consumer-group" + ] + } + }, + { + "compound_identifier": { + "elements": { + "type": "string", + "one_of": [ + "ip", + "credential", + "consumer", + "service", + "header", + "path", + "consumer-group" + ] + }, + "description": "Similar to `identifer`, but supports combining multiple items. The priority of `compound_identifier` is higher than `identifier`, which means if `compound_identifer` is set, it will be used, otherwise `identifier` will be used.", + "type": "array" + } + }, + { + "window_size": { + "elements": { + "type": "number" + }, + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "required": true, + "type": "array" + } + }, + { + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "type": "string", + "one_of": [ + "fixed", + "sliding" + ] + } + }, + { + "limit": { + "elements": { + "type": "number" + }, + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "required": true, + "type": "array" + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + } + }, + { + "namespace": { + "auto": true, + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same.", + "required": true, + "type": "string" + } + }, + { + "strategy": { + "required": true, + "type": "string", + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "one_of": [ + "cluster", + "redis", + "local" + ] + } + }, + { + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "required": true, + "type": "string" + } + }, + { + "lock_dictionary_name": { + "default": "kong_locks", + "description": "The shared dictionary where concurrency control locks are stored. The default shared dictionary is `kong_locks`. The shared dictionary should be declare in nginx-kong.conf.", + "required": true, + "type": "string" + } + }, + { + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + } + }, + { + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + } + }, + { + "header_name": { + "type": "string", + "description": "A string representing an HTTP header name." + } + }, + { + "path": { + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "type": "string" + } + }, + { + "redis": { + "required": true, + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ] + } + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ] + }, + "len_min": 1, + "type": "array" + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ] + }, + "len_min": 1, + "type": "array" + } + } + ], + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "one_of": [ + "master", + "slave", + "any" + ], + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "type": "array", + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ], + "type": "record" + }, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "required": false, + "type": "array", + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ], + "type": "record" + }, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean" + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean" + } + }, + { + "redis_proxy_type": { + "type": "string", + "description": "If the `connection_is_proxied` is enabled, this field indicates the proxy type and version you are using. For example, you can enable this optioin when you want authentication between Kong and Envoy proxy.", + "required": false, + "one_of": [ + "envoy_v1.31" + ] + } + } + ] + } + }, + { + "enforce_consumer_groups": { + "default": false, + "description": "Determines if consumer groups are allowed to override the rate limiting settings for the given Route or Service. Flipping `enforce_consumer_groups` from `true` to `false` disables the group override, but does not clear the list of consumer groups. You can then flip `enforce_consumer_groups` to `true` to re-enforce the groups.", + "type": "boolean" + } + }, + { + "consumer_groups": { + "elements": { + "type": "string" + }, + "description": "List of consumer groups allowed to override the rate limiting settings for the given Route or Service. Required if `enforce_consumer_groups` is set to `true`.", + "type": "array" + } + }, + { + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "type": "boolean" + } + }, + { + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "gt": 0, + "type": "number" + } + }, + { + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/rate-limiting/3.10.x.json b/schemas/rate-limiting/3.10.x.json new file mode 100644 index 00000000..da255ec3 --- /dev/null +++ b/schemas/rate-limiting/3.10.x.json @@ -0,0 +1,479 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.second", + "config.minute", + "config.hour", + "config.day", + "config.month", + "config.year" + ] + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.host", + "if_field": "config.policy", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.port", + "if_field": "config.policy", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.timeout", + "if_field": "config.policy", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "header" + }, + "then_field": "config.header_name", + "if_field": "config.limit_by", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "path" + }, + "then_field": "config.path", + "if_field": "config.limit_by", + "then_match": { + "required": true + } + } + } + ], + "supported_partials": { + "redis-ce": [ + "config.redis" + ] + }, + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "required": true, + "type": "record", + "shorthand_fields": [ + { + "redis_host": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ], + "message": "rate-limiting: config.redis_host is deprecated, please use config.redis.host instead" + }, + "type": "string" + } + }, + { + "redis_port": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ], + "message": "rate-limiting: config.redis_port is deprecated, please use config.redis.port instead" + }, + "type": "integer" + } + }, + { + "redis_password": { + "type": "string", + "len_min": 0, + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ], + "message": "rate-limiting: config.redis_password is deprecated, please use config.redis.password instead" + } + } + }, + { + "redis_username": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ], + "message": "rate-limiting: config.redis_username is deprecated, please use config.redis.username instead" + }, + "type": "string" + } + }, + { + "redis_ssl": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ], + "message": "rate-limiting: config.redis_ssl is deprecated, please use config.redis.ssl instead" + }, + "type": "boolean" + } + }, + { + "redis_ssl_verify": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ], + "message": "rate-limiting: config.redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead" + }, + "type": "boolean" + } + }, + { + "redis_server_name": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ], + "message": "rate-limiting: config.redis_server_name is deprecated, please use config.redis.server_name instead" + }, + "type": "string" + } + }, + { + "redis_timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "timeout" + ] + } + ], + "message": "rate-limiting: config.redis_timeout is deprecated, please use config.redis.timeout instead" + }, + "type": "integer" + } + }, + { + "redis_database": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "database" + ] + } + ], + "message": "rate-limiting: config.redis_database is deprecated, please use config.redis.database instead" + }, + "type": "integer" + } + } + ], + "fields": [ + { + "second": { + "gt": 0, + "type": "number", + "description": "The number of HTTP requests that can be made per second." + } + }, + { + "minute": { + "gt": 0, + "type": "number", + "description": "The number of HTTP requests that can be made per minute." + } + }, + { + "hour": { + "gt": 0, + "type": "number", + "description": "The number of HTTP requests that can be made per hour." + } + }, + { + "day": { + "gt": 0, + "type": "number", + "description": "The number of HTTP requests that can be made per day." + } + }, + { + "month": { + "gt": 0, + "type": "number", + "description": "The number of HTTP requests that can be made per month." + } + }, + { + "year": { + "gt": 0, + "type": "number", + "description": "The number of HTTP requests that can be made per year." + } + }, + { + "limit_by": { + "description": "The entity that is used when aggregating the limits.", + "default": "consumer", + "one_of": [ + "consumer", + "credential", + "ip", + "service", + "header", + "path", + "consumer-group" + ], + "type": "string" + } + }, + { + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + { + "path": { + "starts_with": "/", + "type": "string", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)." + } + }, + { + "policy": { + "type": "string", + "len_min": 0, + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "default": "local", + "one_of": [ + "local", + "cluster", + "redis" + ] + } + }, + { + "fault_tolerant": { + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party data store. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the data store is working again. If `false`, then the clients will see `500` errors.", + "default": true, + "type": "boolean", + "required": true + } + }, + { + "redis": { + "description": "Redis configuration", + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "type": "string", + "referenceable": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "len_min": 0 + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + } + ], + "required": true + } + }, + { + "hide_client_headers": { + "description": "Optionally hide informative response headers.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "error_code": { + "description": "Set a custom error code to return when the rate limit is exceeded.", + "default": 429, + "gt": 0, + "type": "number" + } + }, + { + "error_message": { + "description": "Set a custom error message to return when the rate limit is exceeded.", + "default": "API rate limit exceeded", + "type": "string" + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of -1 results in synchronous behavior.", + "default": -1, + "type": "number", + "required": true + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/rate-limiting/3.11.x.json b/schemas/rate-limiting/3.11.x.json new file mode 100644 index 00000000..67dd6d5d --- /dev/null +++ b/schemas/rate-limiting/3.11.x.json @@ -0,0 +1,479 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.second", + "config.minute", + "config.hour", + "config.day", + "config.month", + "config.year" + ] + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.host", + "if_field": "config.policy", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.port", + "if_field": "config.policy", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.timeout", + "if_field": "config.policy", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "header" + }, + "then_field": "config.header_name", + "if_field": "config.limit_by", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "path" + }, + "then_field": "config.path", + "if_field": "config.limit_by", + "then_match": { + "required": true + } + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "shorthand_fields": [ + { + "redis_host": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ], + "message": "rate-limiting: config.redis_host is deprecated, please use config.redis.host instead" + }, + "type": "string" + } + }, + { + "redis_port": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ], + "message": "rate-limiting: config.redis_port is deprecated, please use config.redis.port instead" + }, + "type": "integer" + } + }, + { + "redis_password": { + "len_min": 0, + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ], + "message": "rate-limiting: config.redis_password is deprecated, please use config.redis.password instead" + }, + "type": "string" + } + }, + { + "redis_username": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ], + "message": "rate-limiting: config.redis_username is deprecated, please use config.redis.username instead" + }, + "type": "string" + } + }, + { + "redis_ssl": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ], + "message": "rate-limiting: config.redis_ssl is deprecated, please use config.redis.ssl instead" + }, + "type": "boolean" + } + }, + { + "redis_ssl_verify": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ], + "message": "rate-limiting: config.redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead" + }, + "type": "boolean" + } + }, + { + "redis_server_name": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ], + "message": "rate-limiting: config.redis_server_name is deprecated, please use config.redis.server_name instead" + }, + "type": "string" + } + }, + { + "redis_timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "timeout" + ] + } + ], + "message": "rate-limiting: config.redis_timeout is deprecated, please use config.redis.timeout instead" + }, + "type": "integer" + } + }, + { + "redis_database": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "database" + ] + } + ], + "message": "rate-limiting: config.redis_database is deprecated, please use config.redis.database instead" + }, + "type": "integer" + } + } + ], + "required": true, + "fields": [ + { + "second": { + "gt": 0, + "description": "The number of HTTP requests that can be made per second.", + "type": "number" + } + }, + { + "minute": { + "gt": 0, + "description": "The number of HTTP requests that can be made per minute.", + "type": "number" + } + }, + { + "hour": { + "gt": 0, + "description": "The number of HTTP requests that can be made per hour.", + "type": "number" + } + }, + { + "day": { + "gt": 0, + "description": "The number of HTTP requests that can be made per day.", + "type": "number" + } + }, + { + "month": { + "gt": 0, + "description": "The number of HTTP requests that can be made per month.", + "type": "number" + } + }, + { + "year": { + "gt": 0, + "description": "The number of HTTP requests that can be made per year.", + "type": "number" + } + }, + { + "limit_by": { + "one_of": [ + "consumer", + "credential", + "ip", + "service", + "header", + "path", + "consumer-group" + ], + "default": "consumer", + "description": "The entity that is used when aggregating the limits.", + "type": "string" + } + }, + { + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + { + "path": { + "type": "string", + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + }, + { + "policy": { + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "len_min": 0, + "one_of": [ + "local", + "cluster", + "redis" + ], + "default": "local", + "type": "string" + } + }, + { + "fault_tolerant": { + "default": true, + "required": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party data store. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the data store is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean" + } + }, + { + "redis": { + "description": "Redis configuration", + "required": true, + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "len_min": 0, + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "hide_client_headers": { + "default": false, + "required": true, + "description": "Optionally hide informative response headers.", + "type": "boolean" + } + }, + { + "error_code": { + "default": 429, + "gt": 0, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "type": "number" + } + }, + { + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + } + }, + { + "sync_rate": { + "default": -1, + "required": true, + "description": "How often to sync counter data to the central data store. A value of -1 results in synchronous behavior.", + "type": "number" + } + } + ], + "type": "record" + } + } + ], + "supported_partials": { + "redis-ce": [ + "config.redis" + ] + } +} \ No newline at end of file diff --git a/schemas/rate-limiting/3.12.x.json b/schemas/rate-limiting/3.12.x.json new file mode 100644 index 00000000..00037b01 --- /dev/null +++ b/schemas/rate-limiting/3.12.x.json @@ -0,0 +1,479 @@ +{ + "supported_partials": { + "redis-ce": [ + "config.redis" + ] + }, + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "second": { + "type": "number", + "gt": 0, + "description": "The number of HTTP requests that can be made per second." + } + }, + { + "minute": { + "type": "number", + "gt": 0, + "description": "The number of HTTP requests that can be made per minute." + } + }, + { + "hour": { + "type": "number", + "gt": 0, + "description": "The number of HTTP requests that can be made per hour." + } + }, + { + "day": { + "type": "number", + "gt": 0, + "description": "The number of HTTP requests that can be made per day." + } + }, + { + "month": { + "type": "number", + "gt": 0, + "description": "The number of HTTP requests that can be made per month." + } + }, + { + "year": { + "type": "number", + "gt": 0, + "description": "The number of HTTP requests that can be made per year." + } + }, + { + "limit_by": { + "type": "string", + "default": "consumer", + "one_of": [ + "consumer", + "credential", + "ip", + "service", + "header", + "path", + "consumer-group" + ], + "description": "The entity that is used when aggregating the limits." + } + }, + { + "header_name": { + "type": "string", + "description": "A string representing an HTTP header name." + } + }, + { + "path": { + "type": "string", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)." + } + }, + { + "policy": { + "type": "string", + "len_min": 0, + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "default": "local", + "one_of": [ + "local", + "cluster", + "redis" + ] + } + }, + { + "fault_tolerant": { + "type": "boolean", + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party data store. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the data store is working again. If `false`, then the clients will see `500` errors.", + "required": true + } + }, + { + "redis": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "type": "string", + "len_min": 0, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + } + ], + "description": "Redis configuration", + "required": true + } + }, + { + "hide_client_headers": { + "type": "boolean", + "default": false, + "description": "Optionally hide informative response headers.", + "required": true + } + }, + { + "error_code": { + "type": "number", + "default": 429, + "gt": 0, + "description": "Set a custom error code to return when the rate limit is exceeded." + } + }, + { + "error_message": { + "type": "string", + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded." + } + }, + { + "sync_rate": { + "type": "number", + "default": -1, + "description": "How often to sync counter data to the central data store. A value of -1 results in synchronous behavior.", + "required": true + } + } + ], + "shorthand_fields": [ + { + "redis_host": { + "type": "string", + "deprecation": { + "message": "rate-limiting: config.redis_host is deprecated, please use config.redis.host instead", + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "redis_port": { + "type": "integer", + "deprecation": { + "message": "rate-limiting: config.redis_port is deprecated, please use config.redis.port instead", + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "redis_password": { + "type": "string", + "len_min": 0, + "deprecation": { + "message": "rate-limiting: config.redis_password is deprecated, please use config.redis.password instead", + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "redis_username": { + "type": "string", + "deprecation": { + "message": "rate-limiting: config.redis_username is deprecated, please use config.redis.username instead", + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "redis_ssl": { + "type": "boolean", + "deprecation": { + "message": "rate-limiting: config.redis_ssl is deprecated, please use config.redis.ssl instead", + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "redis_ssl_verify": { + "type": "boolean", + "deprecation": { + "message": "rate-limiting: config.redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead", + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "redis_server_name": { + "type": "string", + "deprecation": { + "message": "rate-limiting: config.redis_server_name is deprecated, please use config.redis.server_name instead", + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "redis_timeout": { + "type": "integer", + "deprecation": { + "message": "rate-limiting: config.redis_timeout is deprecated, please use config.redis.timeout instead", + "replaced_with": [ + { + "path": [ + "redis", + "timeout" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "redis_database": { + "type": "integer", + "deprecation": { + "message": "rate-limiting: config.redis_database is deprecated, please use config.redis.database instead", + "replaced_with": [ + { + "path": [ + "redis", + "database" + ] + } + ], + "removal_in_version": "4.0" + } + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.second", + "config.minute", + "config.hour", + "config.day", + "config.month", + "config.year" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.host", + "if_field": "config.policy" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.port", + "if_field": "config.policy" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.timeout", + "if_field": "config.policy" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "header" + }, + "then_field": "config.header_name", + "if_field": "config.limit_by" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "path" + }, + "then_field": "config.path", + "if_field": "config.limit_by" + } + } + ] +} \ No newline at end of file diff --git a/schemas/rate-limiting/3.4.x.json b/schemas/rate-limiting/3.4.x.json index 001e7790..bbbe2adf 100644 --- a/schemas/rate-limiting/3.4.x.json +++ b/schemas/rate-limiting/3.4.x.json @@ -8,63 +8,76 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "second": { "gt": 0, - "type": "number" + "type": "number", + "description": "The number of HTTP requests that can be made per second." } }, { "minute": { "gt": 0, - "type": "number" + "type": "number", + "description": "The number of HTTP requests that can be made per minute." } }, { "hour": { "gt": 0, - "type": "number" + "type": "number", + "description": "The number of HTTP requests that can be made per hour." } }, { "day": { "gt": 0, - "type": "number" + "type": "number", + "description": "The number of HTTP requests that can be made per day." } }, { "month": { "gt": 0, - "type": "number" + "type": "number", + "description": "The number of HTTP requests that can be made per month." } }, { "year": { "gt": 0, - "type": "number" + "type": "number", + "description": "The number of HTTP requests that can be made per year." } }, { "limit_by": { "default": "consumer", - "type": "string", "one_of": [ "consumer", "credential", @@ -72,126 +85,225 @@ "service", "header", "path" - ] + ], + "type": "string", + "description": "The entity that is used when aggregating the limits." } }, { "header_name": { - "type": "string" + "type": "string", + "description": "A string representing an HTTP header name." } }, { "path": { + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", "match_none": [ { - "err": "must not have empty segments", - "pattern": "//" + "pattern": "//", + "err": "must not have empty segments" } ], - "starts_with": "/", "type": "string" } }, { "policy": { + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "len_min": 0, "one_of": [ "local", "cluster", "redis" ], - "len_min": 0, - "type": "string", - "default": "local" + "type": "string" } }, { "fault_tolerant": { "default": true, - "required": true, - "type": "boolean" + "type": "boolean", + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party data store. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the data store is working again. If `false`, then the clients will see `500` errors.", + "required": true } }, { "redis_host": { - "type": "string" + "type": "string", + "description": "A string representing a host name, such as example.com." } }, { "redis_port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", "between": [ 0, 65535 ], - "type": "integer", - "default": 6379 + "type": "integer" } }, { "redis_password": { "len_min": 0, + "referenceable": true, "type": "string", - "referenceable": true + "description": "When using the `redis` policy, this property specifies the password to connect to the Redis server." } }, { "redis_username": { + "referenceable": true, "type": "string", - "referenceable": true + "description": "When using the `redis` policy, this property specifies the username to connect to the Redis server when ACL authentication is desired." } }, { "redis_ssl": { "default": false, - "required": true, - "type": "boolean" + "type": "boolean", + "description": "When using the `redis` policy, this property specifies if SSL is used to connect to the Redis server.", + "required": true } }, { "redis_ssl_verify": { "default": false, - "required": true, - "type": "boolean" + "type": "boolean", + "description": "When using the `redis` policy with `redis_ssl` set to `true`, this property specifies it server SSL certificate is validated. Note that you need to configure the lua_ssl_trusted_certificate to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ssl_verify_depth accordingly.", + "required": true } }, { "redis_server_name": { - "type": "string" + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS." } }, { "redis_timeout": { + "default": 2000, "type": "number", - "default": 2000 + "description": "When using the `redis` policy, this property specifies the timeout in milliseconds of any command submitted to the Redis server." } }, { "redis_database": { + "default": 0, "type": "integer", - "default": 0 + "description": "When using the `redis` policy, this property specifies the Redis database to use." } }, { "hide_client_headers": { "default": false, - "required": true, - "type": "boolean" + "type": "boolean", + "description": "Optionally hide informative response headers.", + "required": true } }, { "error_code": { - "type": "number", + "default": 429, "gt": 0, - "default": 429 + "type": "number", + "description": "Set a custom error code to return when the rate limit is exceeded." } }, { "error_message": { + "default": "API rate limit exceeded", "type": "string", - "default": "API rate limit exceeded" + "description": "Set a custom error message to return when the rate limit is exceeded." + } + }, + { + "sync_rate": { + "default": -1, + "type": "number", + "description": "How often to sync counter data to the central data store. A value of -1 results in synchronous behavior.", + "required": true } } ], - "type": "record" + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.second", + "config.minute", + "config.hour", + "config.day", + "config.month", + "config.year" + ] + }, + { + "conditional": { + "then_field": "config.redis_host", + "if_match": { + "eq": "redis" + }, + "then_match": { + "required": true + }, + "if_field": "config.policy" + } + }, + { + "conditional": { + "then_field": "config.redis_port", + "if_match": { + "eq": "redis" + }, + "then_match": { + "required": true + }, + "if_field": "config.policy" + } + }, + { + "conditional": { + "then_field": "config.header_name", + "if_match": { + "eq": "header" + }, + "then_match": { + "required": true + }, + "if_field": "config.limit_by" + } + }, + { + "conditional": { + "then_field": "config.path", + "if_match": { + "eq": "path" + }, + "then_match": { + "required": true + }, + "if_field": "config.limit_by" + } + }, + { + "conditional": { + "then_field": "config.redis_timeout", + "if_match": { + "eq": "redis" + }, + "then_match": { + "required": true + }, + "if_field": "config.policy" } } ] diff --git a/schemas/rate-limiting/3.5.x.json b/schemas/rate-limiting/3.5.x.json new file mode 100644 index 00000000..295b8035 --- /dev/null +++ b/schemas/rate-limiting/3.5.x.json @@ -0,0 +1,310 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.second", + "config.minute", + "config.hour", + "config.day", + "config.month", + "config.year" + ] + }, + { + "conditional": { + "then_field": "config.redis_host", + "if_field": "config.policy", + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + } + } + }, + { + "conditional": { + "then_field": "config.redis_port", + "if_field": "config.policy", + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + } + } + }, + { + "conditional": { + "then_field": "config.header_name", + "if_field": "config.limit_by", + "then_match": { + "required": true + }, + "if_match": { + "eq": "header" + } + } + }, + { + "conditional": { + "then_field": "config.path", + "if_field": "config.limit_by", + "then_match": { + "required": true + }, + "if_match": { + "eq": "path" + } + } + }, + { + "conditional": { + "then_field": "config.redis_timeout", + "if_field": "config.policy", + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + } + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumer_groups" + } + }, + { + "config": { + "fields": [ + { + "second": { + "gt": 0, + "description": "The number of HTTP requests that can be made per second.", + "type": "number" + } + }, + { + "minute": { + "gt": 0, + "description": "The number of HTTP requests that can be made per minute.", + "type": "number" + } + }, + { + "hour": { + "gt": 0, + "description": "The number of HTTP requests that can be made per hour.", + "type": "number" + } + }, + { + "day": { + "gt": 0, + "description": "The number of HTTP requests that can be made per day.", + "type": "number" + } + }, + { + "month": { + "gt": 0, + "description": "The number of HTTP requests that can be made per month.", + "type": "number" + } + }, + { + "year": { + "gt": 0, + "description": "The number of HTTP requests that can be made per year.", + "type": "number" + } + }, + { + "limit_by": { + "one_of": [ + "consumer", + "credential", + "ip", + "service", + "header", + "path" + ], + "description": "The entity that is used when aggregating the limits.", + "type": "string", + "default": "consumer" + } + }, + { + "header_name": { + "type": "string", + "description": "A string representing an HTTP header name." + } + }, + { + "path": { + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "type": "string", + "starts_with": "/" + } + }, + { + "policy": { + "type": "string", + "default": "local", + "one_of": [ + "local", + "cluster", + "redis" + ], + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "len_min": 0 + } + }, + { + "fault_tolerant": { + "required": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party data store. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the data store is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean", + "default": true + } + }, + { + "redis_host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "redis_port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "redis_password": { + "referenceable": true, + "description": "When using the `redis` policy, this property specifies the password to connect to the Redis server.", + "type": "string", + "len_min": 0 + } + }, + { + "redis_username": { + "referenceable": true, + "description": "When using the `redis` policy, this property specifies the username to connect to the Redis server when ACL authentication is desired.", + "type": "string" + } + }, + { + "redis_ssl": { + "required": true, + "description": "When using the `redis` policy, this property specifies if SSL is used to connect to the Redis server.", + "type": "boolean", + "default": false + } + }, + { + "redis_ssl_verify": { + "required": true, + "description": "When using the `redis` policy with `redis_ssl` set to `true`, this property specifies it server SSL certificate is validated. Note that you need to configure the lua_ssl_trusted_certificate to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ssl_verify_depth accordingly.", + "type": "boolean", + "default": false + } + }, + { + "redis_server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS." + } + }, + { + "redis_timeout": { + "description": "When using the `redis` policy, this property specifies the timeout in milliseconds of any command submitted to the Redis server.", + "type": "number", + "default": 2000 + } + }, + { + "redis_database": { + "description": "When using the `redis` policy, this property specifies the Redis database to use.", + "type": "integer", + "default": 0 + } + }, + { + "hide_client_headers": { + "required": true, + "description": "Optionally hide informative response headers.", + "type": "boolean", + "default": false + } + }, + { + "error_code": { + "gt": 0, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "type": "number", + "default": 429 + } + }, + { + "error_message": { + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string", + "default": "API rate limit exceeded" + } + }, + { + "sync_rate": { + "required": true, + "description": "How often to sync counter data to the central data store. A value of -1 results in synchronous behavior.", + "type": "number", + "default": -1 + } + } + ], + "type": "record", + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/rate-limiting/3.6.x.json b/schemas/rate-limiting/3.6.x.json new file mode 100644 index 00000000..6c963b5f --- /dev/null +++ b/schemas/rate-limiting/3.6.x.json @@ -0,0 +1,402 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.second", + "config.minute", + "config.hour", + "config.day", + "config.month", + "config.year" + ] + }, + { + "conditional": { + "then_field": "config.redis.host", + "if_field": "config.policy", + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + } + } + }, + { + "conditional": { + "then_field": "config.redis.port", + "if_field": "config.policy", + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + } + } + }, + { + "conditional": { + "then_field": "config.redis.timeout", + "if_field": "config.policy", + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + } + } + }, + { + "conditional": { + "then_field": "config.header_name", + "if_field": "config.limit_by", + "then_match": { + "required": true + }, + "if_match": { + "eq": "header" + } + } + }, + { + "conditional": { + "then_field": "config.path", + "if_field": "config.limit_by", + "then_match": { + "required": true + }, + "if_match": { + "eq": "path" + } + } + } + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "second": { + "gt": 0, + "type": "number", + "description": "The number of HTTP requests that can be made per second." + } + }, + { + "minute": { + "gt": 0, + "type": "number", + "description": "The number of HTTP requests that can be made per minute." + } + }, + { + "hour": { + "gt": 0, + "type": "number", + "description": "The number of HTTP requests that can be made per hour." + } + }, + { + "day": { + "gt": 0, + "type": "number", + "description": "The number of HTTP requests that can be made per day." + } + }, + { + "month": { + "gt": 0, + "type": "number", + "description": "The number of HTTP requests that can be made per month." + } + }, + { + "year": { + "gt": 0, + "type": "number", + "description": "The number of HTTP requests that can be made per year." + } + }, + { + "limit_by": { + "one_of": [ + "consumer", + "credential", + "ip", + "service", + "header", + "path", + "consumer-group" + ], + "type": "string", + "default": "consumer", + "description": "The entity that is used when aggregating the limits." + } + }, + { + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + { + "path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "type": "string", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "starts_with": "/" + } + }, + { + "policy": { + "type": "string", + "default": "local", + "len_min": 0, + "one_of": [ + "local", + "cluster", + "redis" + ], + "description": "The rate-limiting policies to use for retrieving and incrementing the limits." + } + }, + { + "fault_tolerant": { + "required": true, + "type": "boolean", + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party data store. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the data store is working again. If `false`, then the clients will see `500` errors." + } + }, + { + "redis": { + "required": true, + "type": "record", + "description": "Redis configuration", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "timeout": { + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "username": { + "referenceable": true, + "type": "string", + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "referenceable": true, + "type": "string", + "len_min": 0, + "encrypted": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis." + } + }, + { + "database": { + "type": "integer", + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0 + } + }, + { + "ssl": { + "required": false, + "type": "boolean", + "description": "If set to true, uses SSL to connect to Redis.", + "default": false + } + }, + { + "ssl_verify": { + "required": false, + "type": "boolean", + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false + } + }, + { + "server_name": { + "required": false, + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS." + } + } + ] + } + }, + { + "hide_client_headers": { + "required": true, + "type": "boolean", + "default": false, + "description": "Optionally hide informative response headers." + } + }, + { + "error_code": { + "gt": 0, + "type": "number", + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded." + } + }, + { + "error_message": { + "type": "string", + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded." + } + }, + { + "sync_rate": { + "required": true, + "type": "number", + "default": -1, + "description": "How often to sync counter data to the central data store. A value of -1 results in synchronous behavior." + } + } + ], + "shorthand_fields": [ + { + "redis_host": { + "translate_backwards": [ + "redis", + "host" + ], + "type": "string" + } + }, + { + "redis_port": { + "translate_backwards": [ + "redis", + "port" + ], + "type": "integer" + } + }, + { + "redis_password": { + "translate_backwards": [ + "redis", + "password" + ], + "type": "string", + "len_min": 0 + } + }, + { + "redis_username": { + "translate_backwards": [ + "redis", + "username" + ], + "type": "string" + } + }, + { + "redis_ssl": { + "translate_backwards": [ + "redis", + "ssl" + ], + "type": "boolean" + } + }, + { + "redis_ssl_verify": { + "translate_backwards": [ + "redis", + "ssl_verify" + ], + "type": "boolean" + } + }, + { + "redis_server_name": { + "translate_backwards": [ + "redis", + "server_name" + ], + "type": "string" + } + }, + { + "redis_timeout": { + "translate_backwards": [ + "redis", + "timeout" + ], + "type": "integer" + } + }, + { + "redis_database": { + "translate_backwards": [ + "redis", + "database" + ], + "type": "integer" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/rate-limiting/3.7.x.json b/schemas/rate-limiting/3.7.x.json new file mode 100644 index 00000000..79c762c6 --- /dev/null +++ b/schemas/rate-limiting/3.7.x.json @@ -0,0 +1,438 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "second": { + "description": "The number of HTTP requests that can be made per second.", + "type": "number", + "gt": 0 + } + }, + { + "minute": { + "description": "The number of HTTP requests that can be made per minute.", + "type": "number", + "gt": 0 + } + }, + { + "hour": { + "description": "The number of HTTP requests that can be made per hour.", + "type": "number", + "gt": 0 + } + }, + { + "day": { + "description": "The number of HTTP requests that can be made per day.", + "type": "number", + "gt": 0 + } + }, + { + "month": { + "description": "The number of HTTP requests that can be made per month.", + "type": "number", + "gt": 0 + } + }, + { + "year": { + "description": "The number of HTTP requests that can be made per year.", + "type": "number", + "gt": 0 + } + }, + { + "limit_by": { + "default": "consumer", + "description": "The entity that is used when aggregating the limits.", + "type": "string", + "one_of": [ + "consumer", + "credential", + "ip", + "service", + "header", + "path", + "consumer-group" + ] + } + }, + { + "header_name": { + "type": "string", + "description": "A string representing an HTTP header name." + } + }, + { + "path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "type": "string" + } + }, + { + "policy": { + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "len_min": 0, + "type": "string", + "one_of": [ + "local", + "cluster", + "redis" + ] + } + }, + { + "fault_tolerant": { + "required": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party data store. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the data store is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean", + "default": true + } + }, + { + "redis": { + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "len_min": 0 + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "ssl": { + "required": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "required": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + } + ], + "description": "Redis configuration", + "type": "record", + "required": true + } + }, + { + "hide_client_headers": { + "required": true, + "description": "Optionally hide informative response headers.", + "type": "boolean", + "default": false + } + }, + { + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "type": "number", + "gt": 0 + } + }, + { + "error_message": { + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string", + "default": "API rate limit exceeded" + } + }, + { + "sync_rate": { + "required": true, + "description": "How often to sync counter data to the central data store. A value of -1 results in synchronous behavior.", + "type": "number", + "default": -1 + } + } + ], + "required": true, + "shorthand_fields": [ + { + "redis_host": { + "deprecation": { + "removal_in_version": "4.0", + "message": "rate-limiting: config.redis_host is deprecated, please use config.redis.host instead" + }, + "type": "string", + "translate_backwards": [ + "redis", + "host" + ] + } + }, + { + "redis_port": { + "deprecation": { + "removal_in_version": "4.0", + "message": "rate-limiting: config.redis_port is deprecated, please use config.redis.port instead" + }, + "type": "integer", + "translate_backwards": [ + "redis", + "port" + ] + } + }, + { + "redis_password": { + "len_min": 0, + "deprecation": { + "removal_in_version": "4.0", + "message": "rate-limiting: config.redis_password is deprecated, please use config.redis.password instead" + }, + "type": "string", + "translate_backwards": [ + "redis", + "password" + ] + } + }, + { + "redis_username": { + "deprecation": { + "removal_in_version": "4.0", + "message": "rate-limiting: config.redis_username is deprecated, please use config.redis.username instead" + }, + "type": "string", + "translate_backwards": [ + "redis", + "username" + ] + } + }, + { + "redis_ssl": { + "deprecation": { + "removal_in_version": "4.0", + "message": "rate-limiting: config.redis_ssl is deprecated, please use config.redis.ssl instead" + }, + "type": "boolean", + "translate_backwards": [ + "redis", + "ssl" + ] + } + }, + { + "redis_ssl_verify": { + "deprecation": { + "removal_in_version": "4.0", + "message": "rate-limiting: config.redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead" + }, + "type": "boolean", + "translate_backwards": [ + "redis", + "ssl_verify" + ] + } + }, + { + "redis_server_name": { + "deprecation": { + "removal_in_version": "4.0", + "message": "rate-limiting: config.redis_server_name is deprecated, please use config.redis.server_name instead" + }, + "type": "string", + "translate_backwards": [ + "redis", + "server_name" + ] + } + }, + { + "redis_timeout": { + "deprecation": { + "removal_in_version": "4.0", + "message": "rate-limiting: config.redis_timeout is deprecated, please use config.redis.timeout instead" + }, + "type": "integer", + "translate_backwards": [ + "redis", + "timeout" + ] + } + }, + { + "redis_database": { + "deprecation": { + "removal_in_version": "4.0", + "message": "rate-limiting: config.redis_database is deprecated, please use config.redis.database instead" + }, + "type": "integer", + "translate_backwards": [ + "redis", + "database" + ] + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.second", + "config.minute", + "config.hour", + "config.day", + "config.month", + "config.year" + ] + }, + { + "conditional": { + "if_field": "config.policy", + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.host", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "config.policy", + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.port", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "config.policy", + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.timeout", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "config.limit_by", + "if_match": { + "eq": "header" + }, + "then_field": "config.header_name", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "config.limit_by", + "if_match": { + "eq": "path" + }, + "then_field": "config.path", + "then_match": { + "required": true + } + } + } + ] +} \ No newline at end of file diff --git a/schemas/rate-limiting/3.8.x.json b/schemas/rate-limiting/3.8.x.json new file mode 100644 index 00000000..b98f28df --- /dev/null +++ b/schemas/rate-limiting/3.8.x.json @@ -0,0 +1,510 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "second": { + "description": "The number of HTTP requests that can be made per second.", + "type": "number", + "gt": 0 + } + }, + { + "minute": { + "description": "The number of HTTP requests that can be made per minute.", + "type": "number", + "gt": 0 + } + }, + { + "hour": { + "description": "The number of HTTP requests that can be made per hour.", + "type": "number", + "gt": 0 + } + }, + { + "day": { + "description": "The number of HTTP requests that can be made per day.", + "type": "number", + "gt": 0 + } + }, + { + "month": { + "description": "The number of HTTP requests that can be made per month.", + "type": "number", + "gt": 0 + } + }, + { + "year": { + "description": "The number of HTTP requests that can be made per year.", + "type": "number", + "gt": 0 + } + }, + { + "limit_by": { + "description": "The entity that is used when aggregating the limits.", + "type": "string", + "default": "consumer", + "one_of": [ + "consumer", + "credential", + "ip", + "service", + "header", + "path", + "consumer-group" + ] + } + }, + { + "header_name": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + }, + { + "path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "type": "string", + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)." + } + }, + { + "policy": { + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "len_min": 0, + "one_of": [ + "local", + "cluster", + "redis" + ], + "type": "string", + "default": "local" + } + }, + { + "fault_tolerant": { + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party data store. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the data store is working again. If `false`, then the clients will see `500` errors.", + "required": true, + "type": "boolean", + "default": true + } + }, + { + "redis": { + "description": "Redis configuration", + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + }, + { + "timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "len_min": 0, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + } + ], + "required": true + } + }, + { + "hide_client_headers": { + "description": "Optionally hide informative response headers.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "error_code": { + "description": "Set a custom error code to return when the rate limit is exceeded.", + "type": "number", + "gt": 0, + "default": 429 + } + }, + { + "error_message": { + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string", + "default": "API rate limit exceeded" + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of -1 results in synchronous behavior.", + "required": true, + "type": "number", + "default": -1 + } + } + ], + "required": true, + "shorthand_fields": [ + { + "redis_host": { + "type": "string", + "translate_backwards": [ + "redis", + "host" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ], + "message": "rate-limiting: config.redis_host is deprecated, please use config.redis.host instead", + "removal_in_version": "4.0" + } + } + }, + { + "redis_port": { + "type": "integer", + "translate_backwards": [ + "redis", + "port" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ], + "message": "rate-limiting: config.redis_port is deprecated, please use config.redis.port instead", + "removal_in_version": "4.0" + } + } + }, + { + "redis_password": { + "len_min": 0, + "type": "string", + "translate_backwards": [ + "redis", + "password" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ], + "message": "rate-limiting: config.redis_password is deprecated, please use config.redis.password instead", + "removal_in_version": "4.0" + } + } + }, + { + "redis_username": { + "type": "string", + "translate_backwards": [ + "redis", + "username" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ], + "message": "rate-limiting: config.redis_username is deprecated, please use config.redis.username instead", + "removal_in_version": "4.0" + } + } + }, + { + "redis_ssl": { + "type": "boolean", + "translate_backwards": [ + "redis", + "ssl" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ], + "message": "rate-limiting: config.redis_ssl is deprecated, please use config.redis.ssl instead", + "removal_in_version": "4.0" + } + } + }, + { + "redis_ssl_verify": { + "type": "boolean", + "translate_backwards": [ + "redis", + "ssl_verify" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ], + "message": "rate-limiting: config.redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead", + "removal_in_version": "4.0" + } + } + }, + { + "redis_server_name": { + "type": "string", + "translate_backwards": [ + "redis", + "server_name" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ], + "message": "rate-limiting: config.redis_server_name is deprecated, please use config.redis.server_name instead", + "removal_in_version": "4.0" + } + } + }, + { + "redis_timeout": { + "type": "integer", + "translate_backwards": [ + "redis", + "timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "timeout" + ] + } + ], + "message": "rate-limiting: config.redis_timeout is deprecated, please use config.redis.timeout instead", + "removal_in_version": "4.0" + } + } + }, + { + "redis_database": { + "type": "integer", + "translate_backwards": [ + "redis", + "database" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "database" + ] + } + ], + "message": "rate-limiting: config.redis_database is deprecated, please use config.redis.database instead", + "removal_in_version": "4.0" + } + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "config.second", + "config.minute", + "config.hour", + "config.day", + "config.month", + "config.year" + ] + }, + { + "conditional": { + "if_field": "config.policy", + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.host", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "config.policy", + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.port", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "config.policy", + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.timeout", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "config.limit_by", + "if_match": { + "eq": "header" + }, + "then_field": "config.header_name", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "config.limit_by", + "if_match": { + "eq": "path" + }, + "then_field": "config.path", + "then_match": { + "required": true + } + } + } + ] +} \ No newline at end of file diff --git a/schemas/rate-limiting/3.9.x.json b/schemas/rate-limiting/3.9.x.json new file mode 100644 index 00000000..fc7061fb --- /dev/null +++ b/schemas/rate-limiting/3.9.x.json @@ -0,0 +1,474 @@ +{ + "entity_checks": [ + { + "at_least_one_of": [ + "config.second", + "config.minute", + "config.hour", + "config.day", + "config.month", + "config.year" + ] + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.host", + "if_field": "config.policy", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.port", + "if_field": "config.policy", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.timeout", + "if_field": "config.policy", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "header" + }, + "then_field": "config.header_name", + "if_field": "config.limit_by", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "path" + }, + "then_field": "config.path", + "if_field": "config.limit_by", + "then_match": { + "required": true + } + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "second": { + "gt": 0, + "description": "The number of HTTP requests that can be made per second.", + "type": "number" + } + }, + { + "minute": { + "gt": 0, + "description": "The number of HTTP requests that can be made per minute.", + "type": "number" + } + }, + { + "hour": { + "gt": 0, + "description": "The number of HTTP requests that can be made per hour.", + "type": "number" + } + }, + { + "day": { + "gt": 0, + "description": "The number of HTTP requests that can be made per day.", + "type": "number" + } + }, + { + "month": { + "gt": 0, + "description": "The number of HTTP requests that can be made per month.", + "type": "number" + } + }, + { + "year": { + "gt": 0, + "description": "The number of HTTP requests that can be made per year.", + "type": "number" + } + }, + { + "limit_by": { + "default": "consumer", + "description": "The entity that is used when aggregating the limits.", + "type": "string", + "one_of": [ + "consumer", + "credential", + "ip", + "service", + "header", + "path", + "consumer-group" + ] + } + }, + { + "header_name": { + "type": "string", + "description": "A string representing an HTTP header name." + } + }, + { + "path": { + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "type": "string" + } + }, + { + "policy": { + "type": "string", + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "len_min": 0, + "one_of": [ + "local", + "cluster", + "redis" + ] + } + }, + { + "fault_tolerant": { + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party data store. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the data store is working again. If `false`, then the clients will see `500` errors.", + "required": true, + "type": "boolean" + } + }, + { + "redis": { + "type": "record", + "description": "Redis configuration", + "required": true, + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "len_min": 0 + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean" + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + } + ] + } + }, + { + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers.", + "required": true, + "type": "boolean" + } + }, + { + "error_code": { + "gt": 0, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "default": 429, + "type": "number" + } + }, + { + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + } + }, + { + "sync_rate": { + "default": -1, + "description": "How often to sync counter data to the central data store. A value of -1 results in synchronous behavior.", + "required": true, + "type": "number" + } + } + ], + "shorthand_fields": [ + { + "redis_host": { + "deprecation": { + "message": "rate-limiting: config.redis_host is deprecated, please use config.redis.host instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ] + }, + "type": "string" + } + }, + { + "redis_port": { + "deprecation": { + "message": "rate-limiting: config.redis_port is deprecated, please use config.redis.port instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ] + }, + "type": "integer" + } + }, + { + "redis_password": { + "type": "string", + "deprecation": { + "message": "rate-limiting: config.redis_password is deprecated, please use config.redis.password instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ] + }, + "len_min": 0 + } + }, + { + "redis_username": { + "deprecation": { + "message": "rate-limiting: config.redis_username is deprecated, please use config.redis.username instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ] + }, + "type": "string" + } + }, + { + "redis_ssl": { + "deprecation": { + "message": "rate-limiting: config.redis_ssl is deprecated, please use config.redis.ssl instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ] + }, + "type": "boolean" + } + }, + { + "redis_ssl_verify": { + "deprecation": { + "message": "rate-limiting: config.redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ] + }, + "type": "boolean" + } + }, + { + "redis_server_name": { + "deprecation": { + "message": "rate-limiting: config.redis_server_name is deprecated, please use config.redis.server_name instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ] + }, + "type": "string" + } + }, + { + "redis_timeout": { + "deprecation": { + "message": "rate-limiting: config.redis_timeout is deprecated, please use config.redis.timeout instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "timeout" + ] + } + ] + }, + "type": "integer" + } + }, + { + "redis_database": { + "deprecation": { + "message": "rate-limiting: config.redis_database is deprecated, please use config.redis.database instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "database" + ] + } + ] + }, + "type": "integer" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/redirect/3.10.x.json b/schemas/redirect/3.10.x.json new file mode 100644 index 00000000..51d47bdc --- /dev/null +++ b/schemas/redirect/3.10.x.json @@ -0,0 +1,63 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "status_code": { + "type": "integer", + "description": "The response code to send. Must be an integer between 100 and 599.", + "default": 301, + "between": [ + 100, + 599 + ], + "required": true + } + }, + { + "location": { + "description": "The URL to redirect to", + "type": "string", + "required": true + } + }, + { + "keep_incoming_path": { + "description": "Use the incoming request's path and query string in the redirect URL", + "type": "boolean", + "default": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/redirect/3.11.x.json b/schemas/redirect/3.11.x.json new file mode 100644 index 00000000..6fb424ba --- /dev/null +++ b/schemas/redirect/3.11.x.json @@ -0,0 +1,63 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "status_code": { + "required": true, + "description": "The response code to send. Must be an integer between 100 and 599.", + "between": [ + 100, + 599 + ], + "default": 301, + "type": "integer" + } + }, + { + "location": { + "required": true, + "description": "The URL to redirect to", + "type": "string" + } + }, + { + "keep_incoming_path": { + "default": false, + "description": "Use the incoming request's path and query string in the redirect URL", + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/redirect/3.12.x.json b/schemas/redirect/3.12.x.json new file mode 100644 index 00000000..ed4fbc19 --- /dev/null +++ b/schemas/redirect/3.12.x.json @@ -0,0 +1,61 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "status_code": { + "type": "integer", + "between": [ + 100, + 599 + ], + "required": true, + "description": "The response code to send. Must be an integer between 100 and 599.", + "default": 301 + } + }, + { + "location": { + "description": "The URL to redirect to", + "type": "string", + "required": true + } + }, + { + "keep_incoming_path": { + "type": "boolean", + "default": false, + "description": "Use the incoming request's path and query string in the redirect URL" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/redirect/3.9.x.json b/schemas/redirect/3.9.x.json new file mode 100644 index 00000000..32153288 --- /dev/null +++ b/schemas/redirect/3.9.x.json @@ -0,0 +1,61 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "type": "record", + "required": true, + "fields": [ + { + "status_code": { + "between": [ + 100, + 599 + ], + "default": 301, + "type": "integer", + "required": true, + "description": "The response code to send. Must be an integer between 100 and 599." + } + }, + { + "location": { + "type": "string", + "required": true, + "description": "The URL to redirect to" + } + }, + { + "keep_incoming_path": { + "type": "boolean", + "default": false, + "description": "Use the incoming request's path and query string in the redirect URL" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-callout/3.10.x.json b/schemas/request-callout/3.10.x.json new file mode 100644 index 00000000..4c92e8f2 --- /dev/null +++ b/schemas/request-callout/3.10.x.json @@ -0,0 +1,960 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "callouts": { + "description": "A collection of callout objects, where each object represents an HTTPrequest made in the context of a proxy request.", + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "name": { + "description": "A string identifier for a callout. A callout object is referenceablevia its name in the kong.ctx.shared.callouts.", + "type": "string", + "required": true + } + }, + { + "depends_on": { + "type": "array", + "description": "An array of callout names the current callout depends on.This dependency determines the callout execution order.", + "default": [ + + ], + "elements": { + "type": "string", + "required": true + }, + "required": true + } + }, + { + "request": { + "description": "The customizations for the callout request.", + "type": "record", + "required": true, + "fields": [ + { + "url": { + "description": "The URL that will be requested.", + "type": "string", + "required": true, + "referenceable": true + } + }, + { + "method": { + "type": "string", + "match": "^%u+$", + "description": "The HTTP method that will be requested.", + "default": "GET", + "required": true + } + }, + { + "http_opts": { + "description": "HTTP connection parameters.", + "type": "record", + "required": true, + "fields": [ + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean", + "default": false + } + }, + { + "ssl_server_name": { + "description": "The SNI used in the callout request. Defaults to host if omitted.", + "type": "string" + } + }, + { + "timeouts": { + "description": "Socket timeouts in milliseconds. All or none must be set.", + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "connect", + "write", + "read" + ] + } + ], + "fields": [ + { + "connect": { + "description": "The socket connect timeout.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "write": { + "description": "The socket write timeout.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "read": { + "description": "The socket read timeout. ", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + } + ] + } + }, + { + "proxy": { + "description": "Proxy settings.", + "type": "record", + "fields": [ + { + "auth_username": { + "description": "The username to authenticate with, if the forward proxy is protected by basic authentication.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "auth_password": { + "description": "The password to authenticate with, if the forward proxy is protected by basic authentication.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "https_proxy": { + "description": "The HTTPS proxy URL. This proxy server will be used for HTTPS requests.", + "type": "string" + } + }, + { + "http_proxy": { + "description": "The HTTP proxy URL. This proxy server will be used for HTTP requests.", + "type": "string" + } + } + ] + } + } + ] + } + }, + { + "query": { + "description": "Callout request query param customizations.", + "type": "record", + "required": true, + "fields": [ + { + "forward": { + "description": "If true, forwards the incoming request's query params to the callout request. ", + "type": "boolean", + "default": false + } + }, + { + "custom": { + "type": "map", + "keys": { + "type": "string" + }, + "description": "The custom query params to be added in the callout HTTP request.Values can contain Lua expressions in the form $(some_lua_code).", + "values": { + "type": "string", + "referenceable": true, + "required": false + }, + "required": false + } + } + ] + } + }, + { + "headers": { + "description": "Callout request header customizations.", + "type": "record", + "required": true, + "fields": [ + { + "forward": { + "description": "If true, forwards the incoming request's headers to the callout request. ", + "type": "boolean", + "default": false + } + }, + { + "custom": { + "type": "map", + "keys": { + "type": "string" + }, + "description": "The custom headers to be added in the callout HTTP request.Values can contain Lua expressions in the form $(some_lua_code).", + "values": { + "type": "string", + "referenceable": true, + "required": false + }, + "required": false + } + } + ] + } + }, + { + "body": { + "description": "Callout request body customizations.", + "type": "record", + "required": true, + "fields": [ + { + "forward": { + "description": "If true, forwards the incoming request's body to the callout request.", + "type": "boolean", + "default": false + } + }, + { + "decode": { + "description": "If true, decodes the request's body to make it available for customizations.", + "type": "boolean", + "default": false + } + }, + { + "custom": { + "type": "map", + "keys": { + "type": "string" + }, + "description": "The custom body fields to be added in the callout HTTP request.Values can contain Lua expressions in the form $(some_lua_code).", + "values": { + "type": "string", + "referenceable": true, + "required": false + }, + "required": false + } + } + ] + } + }, + { + "error": { + "description": "The error handling policy the plugin will apply to TCP and HTTP errors.", + "type": "record", + "required": true, + "fields": [ + { + "on_error": { + "one_of": [ + "retry", + "fail", + "continue" + ], + "default": "fail", + "type": "string" + } + }, + { + "retries": { + "description": "The number of retries the plugin will attempt on TCP and HTTP errors if `on_error` is set to `retry`.", + "type": "integer", + "default": 2 + } + }, + { + "http_statuses": { + "description": "The list of HTTP status codes considered errors under the error handling policy.", + "type": "array", + "elements": { + "between": [ + 100, + 999 + ], + "type": "integer" + } + } + }, + { + "error_response_code": { + "description": "The error code to respond with if `on_error` is `fail` or if `retries` is achieved.", + "type": "integer", + "default": 400 + } + }, + { + "error_response_msg": { + "description": "The error mesasge to respond with if `on_error` is `fail` or if `retries` is achieved.Templating with Lua expressions is supported.", + "type": "string", + "default": "service callout error" + } + } + ] + } + }, + { + "by_lua": { + "description": "Lua code that executes before the callout request is made.Standard Lua sandboxing restrictions apply.", + "type": "string", + "required": false + } + } + ] + } + }, + { + "response": { + "description": "Configurations of callout response handling.", + "type": "record", + "required": true, + "fields": [ + { + "headers": { + "description": "Callout response header customizations.", + "type": "record", + "required": true, + "fields": [ + { + "store": { + "description": "If false, skips storing the callout response headers intokong.ctx.shared.callouts..response.headers.", + "type": "boolean", + "default": true + } + } + ] + } + }, + { + "body": { + "type": "record", + "required": true, + "fields": [ + { + "store": { + "description": "If false, skips storing the callout response body into kong.ctx.shared.callouts..response.body.", + "type": "boolean", + "default": true + } + }, + { + "decode": { + "description": "If true, decodes the response body before storing into the context. Only JSON is supported.", + "type": "boolean", + "default": false + } + } + ] + } + }, + { + "by_lua": { + "description": "Lua code that executes after the callout request is made, before caching takes place. Standard Lua sandboxing restrictions apply.", + "type": "string", + "required": false + } + } + ] + } + }, + { + "cache": { + "description": "Callout caching configuration.", + "type": "record", + "required": true, + "fields": [ + { + "bypass": { + "description": "If true, skips caching the callout response.", + "type": "boolean", + "default": false + } + } + ] + } + } + ] + }, + "required": true + } + }, + { + "cache": { + "description": "Plugin global caching configuration.", + "type": "record", + "required": true, + "fields": [ + { + "strategy": { + "type": "string", + "description": "The backing data store in which to hold cache entities. Accepted values are: `off`, `memory`, and `redis`.", + "one_of": [ + "memory", + "redis", + "off" + ], + "default": "off", + "required": true + } + }, + { + "memory": { + "type": "record", + "fields": [ + { + "dictionary_name": { + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "type": "string", + "default": "kong_db_cache", + "required": true + } + } + ], + "required": true + } + }, + { + "redis": { + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "default": 256, + "type": "integer", + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "default": false, + "type": "boolean", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + } + ], + "required": true + } + }, + { + "cache_ttl": { + "description": "TTL in seconds of cache entities.", + "type": "integer", + "default": 300, + "gt": 0 + } + } + ] + } + }, + { + "upstream": { + "description": "Customizations to the upstream request.", + "type": "record", + "fields": [ + { + "by_lua": { + "description": "Lua code that executes before the upstream request is made. Standard Lua sandboxing restrictions apply.", + "type": "string", + "required": false + } + }, + { + "query": { + "description": "Upstream request query param customizations.", + "type": "record", + "required": true, + "fields": [ + { + "forward": { + "description": "If false, does not forward request query params to upstream request.", + "type": "boolean", + "default": true + } + }, + { + "custom": { + "type": "map", + "keys": { + "type": "string" + }, + "description": "The custom query params to be added in the upstream HTTP request. Values can contain Lua expressions in the form $(some_lua_code).", + "values": { + "type": "string", + "referenceable": true, + "required": false + }, + "required": false + } + } + ] + } + }, + { + "headers": { + "description": "Callout request header customizations.", + "type": "record", + "required": true, + "fields": [ + { + "forward": { + "description": "If false, does not forward request headers to upstream request.", + "type": "boolean", + "default": true + } + }, + { + "custom": { + "type": "map", + "keys": { + "type": "string" + }, + "description": "The custom headers to be added in the upstream HTTP request. Values can contain Lua expressions in the form $(some_lua_code).", + "values": { + "type": "string", + "referenceable": true, + "required": false + }, + "required": false + } + } + ] + } + }, + { + "body": { + "description": "Callout request body customizations.", + "type": "record", + "required": true, + "fields": [ + { + "forward": { + "description": "If false, skips forwarding the incoming request's body to the upstream request.", + "type": "boolean", + "default": true + } + }, + { + "decode": { + "description": "If true, decodes the request's body to make it available for upstream by_lua customizations.", + "type": "boolean", + "default": true + } + }, + { + "custom": { + "type": "map", + "keys": { + "type": "string" + }, + "description": "The custom body fields to be added in the upstream request body. Values can contain Lua expressions in the form $(some_lua_code).", + "values": { + "type": "string", + "referenceable": true, + "required": false + }, + "required": false + } + } + ] + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-callout/3.11.x.json b/schemas/request-callout/3.11.x.json new file mode 100644 index 00000000..891a5416 --- /dev/null +++ b/schemas/request-callout/3.11.x.json @@ -0,0 +1,961 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "callouts": { + "type": "array", + "required": true, + "description": "A collection of callout objects, where each object represents an HTTP request made in the context of a proxy request.", + "elements": { + "fields": [ + { + "name": { + "required": true, + "description": "A string identifier for a callout. A callout object is referenceable via its name in the `kong.ctx.shared.callouts.`", + "type": "string" + } + }, + { + "depends_on": { + "required": true, + "description": "An array of callout names the current callout depends on. This dependency list determines the callout execution order via a topological sorting algorithm.", + "type": "array", + "default": [ + + ], + "elements": { + "required": true, + "type": "string" + } + } + }, + { + "request": { + "description": "The customizations for the callout request.", + "required": true, + "fields": [ + { + "url": { + "referenceable": true, + "required": true, + "description": "The URL that will be requested.", + "type": "string" + } + }, + { + "method": { + "match": "^%u+$", + "required": true, + "description": "The HTTP method that will be requested.", + "default": "GET", + "type": "string" + } + }, + { + "http_opts": { + "description": "HTTP connection parameters.", + "required": true, + "fields": [ + { + "ssl_verify": { + "default": false, + "description": "If set to `true`, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + } + }, + { + "ssl_server_name": { + "description": "The SNI used in the callout request. Defaults to host if omitted.", + "type": "string" + } + }, + { + "timeouts": { + "description": "Socket timeouts in milliseconds. All or none must be set.", + "entity_checks": [ + { + "mutually_required": [ + "connect", + "write", + "read" + ] + } + ], + "fields": [ + { + "connect": { + "between": [ + 0, + 2147483646 + ], + "description": "The socket connect timeout.", + "type": "integer" + } + }, + { + "write": { + "between": [ + 0, + 2147483646 + ], + "description": "The socket write timeout.", + "type": "integer" + } + }, + { + "read": { + "between": [ + 0, + 2147483646 + ], + "description": "The socket read timeout. ", + "type": "integer" + } + } + ], + "type": "record" + } + }, + { + "proxy": { + "description": "Proxy settings.", + "fields": [ + { + "auth_username": { + "description": "The username to authenticate with, if the forward proxy is protected by basic authentication.", + "required": false, + "referenceable": true, + "type": "string" + } + }, + { + "auth_password": { + "required": false, + "description": "The password to authenticate with, if the forward proxy is protected by basic authentication.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "https_proxy": { + "description": "The HTTPS proxy URL. This proxy server will be used for HTTPS requests.", + "type": "string" + } + }, + { + "http_proxy": { + "description": "The HTTP proxy URL. This proxy server will be used for HTTP requests.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "query": { + "description": "Callout request query param customizations.", + "required": true, + "fields": [ + { + "forward": { + "description": "If `true`, forwards the incoming request's query params to the callout request. ", + "default": false, + "type": "boolean" + } + }, + { + "custom": { + "required": false, + "description": "The custom query params to be added in the callout HTTP request. Values can contain Lua expressions in the form `$(some_lua_expression)`. The syntax is based on `request-transformer-advanced` templates.", + "keys": { + "type": "string" + }, + "values": { + "required": false, + "referenceable": true, + "type": "string" + }, + "type": "map" + } + } + ], + "type": "record" + } + }, + { + "headers": { + "description": "Callout request header customizations.", + "required": true, + "fields": [ + { + "forward": { + "description": "If `true`, forwards the incoming request's headers to the callout request. ", + "default": false, + "type": "boolean" + } + }, + { + "custom": { + "required": false, + "description": "The custom headers to be added in the callout HTTP request. Values can contain Lua expressions in the form `$(some_lua_expression)`. The syntax is based on `request-transformer-advanced` templates.", + "keys": { + "type": "string" + }, + "values": { + "required": false, + "referenceable": true, + "type": "string" + }, + "type": "map" + } + } + ], + "type": "record" + } + }, + { + "body": { + "description": "Callout request body customizations.", + "required": true, + "fields": [ + { + "forward": { + "description": "If `true`, forwards the incoming request's body to the callout request.", + "default": false, + "type": "boolean" + } + }, + { + "decode": { + "default": false, + "description": "If `true`, decodes the request's body and make it available for customizations. Only JSON content type is supported.", + "type": "boolean" + } + }, + { + "custom": { + "required": false, + "description": "The custom body fields to be added to the callout HTTP request. Values can contain Lua expressions in the form $(some_lua_expression). The syntax is based on `request-transformer-advanced` templates.", + "keys": { + "type": "string" + }, + "values": { + "required": false, + "referenceable": true, + "type": "string" + }, + "type": "map" + } + } + ], + "type": "record" + } + }, + { + "error": { + "description": "The error handling policy the plugin will apply to TCP and HTTP errors.", + "required": true, + "fields": [ + { + "on_error": { + "one_of": [ + "retry", + "fail", + "continue" + ], + "default": "fail", + "type": "string" + } + }, + { + "retries": { + "description": "The number of retries the plugin will attempt on TCP and HTTP errors if `on_error` is set to `retry`.", + "default": 2, + "type": "integer" + } + }, + { + "http_statuses": { + "type": "array", + "description": "The list of HTTP status codes considered errors under the error handling policy.", + "elements": { + "type": "integer", + "between": [ + 100, + 999 + ] + } + } + }, + { + "error_response_code": { + "description": "The error code to respond with if `on_error` is `fail` or if `retries` is achieved.", + "default": 400, + "type": "integer" + } + }, + { + "error_response_msg": { + "default": "service callout error", + "description": "The error mesasge to respond with if `on_error` is set to `fail` or if `retries` is achieved. Templating with Lua expressions is supported.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "by_lua": { + "required": false, + "description": "Lua code that executes before the callout request is made. **Warning** can impact system behavior. Standard Lua sandboxing restrictions apply.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "response": { + "description": "Configurations of callout response handling.", + "required": true, + "fields": [ + { + "headers": { + "description": "Callout response header customizations.", + "required": true, + "fields": [ + { + "store": { + "default": true, + "description": "If `false`, skips storing the callout response headers into kong.ctx.shared.callouts..response.headers.", + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "body": { + "required": true, + "fields": [ + { + "store": { + "default": true, + "description": "If `false`, skips storing the callout response body into kong.ctx.shared.callouts..response.body.", + "type": "boolean" + } + }, + { + "decode": { + "default": false, + "description": "If `true`, decodes the response body before storing into the context. Only JSON is supported.", + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "by_lua": { + "required": false, + "description": "Lua code that executes after the callout response is received, before caching takes place. Can produce side effects. Standard Lua sandboxing restrictions apply.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "cache": { + "description": "Callout caching configuration.", + "required": true, + "fields": [ + { + "bypass": { + "description": "If `true`, skips caching the callout response.", + "default": false, + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + }, + { + "cache": { + "description": "Plugin global caching configuration.", + "required": true, + "fields": [ + { + "strategy": { + "required": true, + "description": "The backing data store in which to hold cache entities. Accepted values are: `off`, `memory`, and `redis`.", + "one_of": [ + "memory", + "redis", + "off" + ], + "default": "off", + "type": "string" + } + }, + { + "memory": { + "required": true, + "fields": [ + { + "dictionary_name": { + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "required": true, + "default": "kong_db_cache", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "redis": { + "required": true, + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "cluster_nodes": { + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "default": 5, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "default": false, + "type": "boolean" + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "cache_ttl": { + "description": "TTL in seconds of cache entities.", + "gt": 0, + "default": 300, + "type": "integer" + } + } + ], + "type": "record" + } + }, + { + "upstream": { + "description": "Customizations to the upstream request.", + "required": true, + "fields": [ + { + "by_lua": { + "required": false, + "description": "Lua code that executes before the upstream request is made. Can produce side effects. Standard Lua sandboxing restrictions apply.", + "type": "string" + } + }, + { + "query": { + "description": "Upstream request query param customizations.", + "required": true, + "fields": [ + { + "forward": { + "default": true, + "description": "If `false`, does not forward request query params to upstream request.", + "type": "boolean" + } + }, + { + "custom": { + "required": false, + "description": "The custom query params to be added in the upstream HTTP request. Values can contain Lua expressions in the form `$(some_lua_expression)`. The syntax is based on `request-transformer-advanced` templates.", + "keys": { + "type": "string" + }, + "values": { + "required": false, + "referenceable": true, + "type": "string" + }, + "type": "map" + } + } + ], + "type": "record" + } + }, + { + "headers": { + "description": "Callout request header customizations.", + "required": true, + "fields": [ + { + "forward": { + "description": "If `false`, does not forward request headers to upstream request.", + "default": true, + "type": "boolean" + } + }, + { + "custom": { + "required": false, + "description": "The custom headers to be added in the upstream HTTP request. Values can contain Lua expressions in the form $(some_lua_expression). The syntax is based on `request-transformer-advanced` templates.", + "keys": { + "type": "string" + }, + "values": { + "required": false, + "referenceable": true, + "type": "string" + }, + "type": "map" + } + } + ], + "type": "record" + } + }, + { + "body": { + "description": "Callout request body customizations.", + "required": true, + "fields": [ + { + "forward": { + "description": "If `false`, skips forwarding the incoming request's body to the upstream request.", + "default": true, + "type": "boolean" + } + }, + { + "decode": { + "default": true, + "description": "If `true`, decodes the request's body to make it available for upstream by_lua customizations. Only JSON content type is supported.", + "type": "boolean" + } + }, + { + "custom": { + "required": false, + "description": "The custom body fields to be added in the upstream request body. Values can contain Lua expressions in the form $(some_lua_expression). The syntax is based on `request-transformer-advanced` templates.", + "keys": { + "type": "string" + }, + "values": { + "required": false, + "referenceable": true, + "type": "string" + }, + "type": "map" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/request-callout/3.12.x.json b/schemas/request-callout/3.12.x.json new file mode 100644 index 00000000..97f912a2 --- /dev/null +++ b/schemas/request-callout/3.12.x.json @@ -0,0 +1,957 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "callouts": { + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "name": { + "type": "string", + "description": "A string identifier for a callout. A callout object is referenceable via its name in the `kong.ctx.shared.callouts.`", + "required": true + } + }, + { + "depends_on": { + "type": "array", + "required": true, + "description": "An array of callout names the current callout depends on. This dependency list determines the callout execution order via a topological sorting algorithm.", + "default": [], + "elements": { + "type": "string", + "required": true + } + } + }, + { + "request": { + "type": "record", + "fields": [ + { + "url": { + "type": "string", + "description": "The URL that will be requested. Values can contain Lua expressions in the form `$(some_lua_expression)`. The syntax is based on `request-transformer-advanced` templates.", + "referenceable": true, + "required": true + } + }, + { + "method": { + "type": "string", + "match": "^%u+$", + "required": true, + "description": "The HTTP method that will be requested.", + "default": "GET" + } + }, + { + "http_opts": { + "type": "record", + "fields": [ + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "If set to `true`, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly." + } + }, + { + "ssl_server_name": { + "type": "string", + "description": "The SNI used in the callout request. Defaults to host if omitted." + } + }, + { + "timeouts": { + "type": "record", + "fields": [ + { + "connect": { + "description": "The socket connect timeout.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "write": { + "description": "The socket write timeout.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "read": { + "description": "The socket read timeout. ", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "connect", + "write", + "read" + ] + } + ], + "description": "Socket timeouts in milliseconds. All or none must be set." + } + }, + { + "proxy": { + "type": "record", + "fields": [ + { + "auth_username": { + "description": "The username to authenticate with, if the forward proxy is protected by basic authentication.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "auth_password": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "The password to authenticate with, if the forward proxy is protected by basic authentication." + } + }, + { + "https_proxy": { + "description": "The HTTPS proxy URL. This proxy server will be used for HTTPS requests.", + "type": "string" + } + }, + { + "http_proxy": { + "description": "The HTTP proxy URL. This proxy server will be used for HTTP requests.", + "type": "string" + } + } + ], + "description": "Proxy settings." + } + } + ], + "description": "HTTP connection parameters.", + "required": true + } + }, + { + "query": { + "type": "record", + "fields": [ + { + "forward": { + "type": "boolean", + "default": false, + "description": "If `true`, forwards the incoming request's query params to the callout request. " + } + }, + { + "custom": { + "type": "map", + "required": false, + "description": "The custom query params to be added in the callout HTTP request. Values can contain Lua expressions in the form `$(some_lua_expression)`. The syntax is based on `request-transformer-advanced` templates.", + "values": { + "type": "string", + "referenceable": true, + "required": false + }, + "keys": { + "type": "string" + } + } + } + ], + "description": "Callout request query param customizations.", + "required": true + } + }, + { + "headers": { + "type": "record", + "fields": [ + { + "forward": { + "type": "boolean", + "default": false, + "description": "If `true`, forwards the incoming request's headers to the callout request. " + } + }, + { + "custom": { + "type": "map", + "required": false, + "description": "The custom headers to be added in the callout HTTP request. Values can contain Lua expressions in the form `$(some_lua_expression)`. The syntax is based on `request-transformer-advanced` templates.", + "values": { + "type": "string", + "referenceable": true, + "required": false + }, + "keys": { + "type": "string" + } + } + } + ], + "description": "Callout request header customizations.", + "required": true + } + }, + { + "body": { + "type": "record", + "fields": [ + { + "forward": { + "type": "boolean", + "default": false, + "description": "If `true`, forwards the incoming request's body to the callout request." + } + }, + { + "decode": { + "type": "boolean", + "default": false, + "description": "If `true`, decodes the request's body and make it available for customizations. Only JSON content type is supported." + } + }, + { + "custom": { + "type": "map", + "required": false, + "description": "The custom body fields to be added to the callout HTTP request. Values can contain Lua expressions in the form $(some_lua_expression). The syntax is based on `request-transformer-advanced` templates.", + "values": { + "type": "string", + "referenceable": true, + "required": false + }, + "keys": { + "type": "string" + } + } + } + ], + "description": "Callout request body customizations.", + "required": true + } + }, + { + "error": { + "type": "record", + "fields": [ + { + "on_error": { + "type": "string", + "default": "fail", + "one_of": [ + "retry", + "fail", + "continue" + ] + } + }, + { + "retries": { + "type": "integer", + "default": 2, + "description": "The number of retries the plugin will attempt on TCP and HTTP errors if `on_error` is set to `retry`." + } + }, + { + "http_statuses": { + "type": "array", + "description": "The list of HTTP status codes considered errors under the error handling policy.", + "elements": { + "type": "integer", + "between": [ + 100, + 999 + ] + } + } + }, + { + "error_response_code": { + "type": "integer", + "default": 400, + "description": "The error code to respond with if `on_error` is `fail` or if `retries` is achieved." + } + }, + { + "error_response_msg": { + "type": "string", + "default": "service callout error", + "description": "The error mesasge to respond with if `on_error` is set to `fail` or if `retries` is achieved. Templating with Lua expressions is supported." + } + } + ], + "description": "The error handling policy the plugin will apply to TCP and HTTP errors.", + "required": true + } + }, + { + "by_lua": { + "type": "string", + "description": "Lua code that executes before the callout request is made. **Warning** can impact system behavior. Standard Lua sandboxing restrictions apply.", + "required": false + } + } + ], + "description": "The customizations for the callout request.", + "required": true + } + }, + { + "response": { + "type": "record", + "fields": [ + { + "headers": { + "type": "record", + "fields": [ + { + "store": { + "type": "boolean", + "default": true, + "description": "If `false`, skips storing the callout response headers into kong.ctx.shared.callouts..response.headers." + } + } + ], + "description": "Callout response header customizations.", + "required": true + } + }, + { + "body": { + "type": "record", + "fields": [ + { + "store": { + "type": "boolean", + "default": true, + "description": "If `false`, skips storing the callout response body into kong.ctx.shared.callouts..response.body." + } + }, + { + "decode": { + "type": "boolean", + "default": false, + "description": "If `true`, decodes the response body before storing into the context. Only JSON is supported." + } + } + ], + "required": true + } + }, + { + "by_lua": { + "type": "string", + "description": "Lua code that executes after the callout response is received, before caching takes place. Can produce side effects. Standard Lua sandboxing restrictions apply.", + "required": false + } + } + ], + "description": "Configurations of callout response handling.", + "required": true + } + }, + { + "cache": { + "type": "record", + "fields": [ + { + "bypass": { + "type": "boolean", + "default": false, + "description": "If `true`, skips caching the callout response." + } + } + ], + "description": "Callout caching configuration.", + "required": true + } + } + ] + }, + "description": "A collection of callout objects, where each object represents an HTTP request made in the context of a proxy request.", + "required": true + } + }, + { + "cache": { + "type": "record", + "fields": [ + { + "strategy": { + "type": "string", + "required": true, + "description": "The backing data store in which to hold cache entities. Accepted values are: `off`, `memory`, and `redis`.", + "default": "off", + "one_of": [ + "memory", + "redis", + "off" + ] + } + }, + { + "memory": { + "type": "record", + "fields": [ + { + "dictionary_name": { + "type": "string", + "default": "kong_db_cache", + "description": "The name of the shared dictionary in which to hold cache entities when the memory strategy is selected. Note that this dictionary currently must be defined manually in the Kong Nginx template.", + "required": true + } + } + ], + "required": true + } + }, + { + "redis": { + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "database", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + } + ], + "required": true, + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "type": "string", + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "type": "integer", + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy" + } + }, + { + "keepalive_pool_size": { + "type": "integer", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low." + } + }, + { + "keepalive_backlog": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "type": "boolean", + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "cluster_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + } + ] + } + }, + { + "cache_ttl": { + "type": "integer", + "default": 300, + "gt": 0, + "description": "TTL in seconds of cache entities." + } + } + ], + "description": "Plugin global caching configuration.", + "required": true + } + }, + { + "upstream": { + "type": "record", + "fields": [ + { + "by_lua": { + "type": "string", + "description": "Lua code that executes before the upstream request is made. Can produce side effects. Standard Lua sandboxing restrictions apply.", + "required": false + } + }, + { + "query": { + "type": "record", + "fields": [ + { + "forward": { + "type": "boolean", + "default": true, + "description": "If `false`, does not forward request query params to upstream request." + } + }, + { + "custom": { + "type": "map", + "required": false, + "description": "The custom query params to be added in the upstream HTTP request. Values can contain Lua expressions in the form `$(some_lua_expression)`. The syntax is based on `request-transformer-advanced` templates.", + "values": { + "type": "string", + "referenceable": true, + "required": false + }, + "keys": { + "type": "string" + } + } + } + ], + "description": "Upstream request query param customizations.", + "required": true + } + }, + { + "headers": { + "type": "record", + "fields": [ + { + "forward": { + "type": "boolean", + "default": true, + "description": "If `false`, does not forward request headers to upstream request." + } + }, + { + "custom": { + "type": "map", + "required": false, + "description": "The custom headers to be added in the upstream HTTP request. Values can contain Lua expressions in the form $(some_lua_expression). The syntax is based on `request-transformer-advanced` templates.", + "values": { + "type": "string", + "referenceable": true, + "required": false + }, + "keys": { + "type": "string" + } + } + } + ], + "description": "Callout request header customizations.", + "required": true + } + }, + { + "body": { + "type": "record", + "fields": [ + { + "forward": { + "type": "boolean", + "default": true, + "description": "If `false`, skips forwarding the incoming request's body to the upstream request." + } + }, + { + "decode": { + "type": "boolean", + "default": true, + "description": "If `true`, decodes the request's body to make it available for upstream by_lua customizations. Only JSON content type is supported." + } + }, + { + "custom": { + "type": "map", + "required": false, + "description": "The custom body fields to be added in the upstream request body. Values can contain Lua expressions in the form $(some_lua_expression). The syntax is based on `request-transformer-advanced` templates.", + "values": { + "type": "string", + "referenceable": true, + "required": false + }, + "keys": { + "type": "string" + } + } + } + ], + "description": "Callout request body customizations.", + "required": true + } + } + ], + "description": "Customizations to the upstream request.", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-size-limiting/3.10.x.json b/schemas/request-size-limiting/3.10.x.json new file mode 100644 index 00000000..d9d0bc10 --- /dev/null +++ b/schemas/request-size-limiting/3.10.x.json @@ -0,0 +1,73 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "allowed_payload_size": { + "description": "Allowed request payload size in megabytes. Default is `128` megabytes (128000000 bytes).", + "default": 128, + "type": "integer" + } + }, + { + "size_unit": { + "type": "string", + "description": "Size unit can be set either in `bytes`, `kilobytes`, or `megabytes` (default). This configuration is not available in versions prior to Kong Gateway 1.3 and Kong Gateway (OSS) 2.0.", + "one_of": [ + "megabytes", + "kilobytes", + "bytes" + ], + "default": "megabytes", + "required": true + } + }, + { + "require_content_length": { + "description": "Set to `true` to ensure a valid `Content-Length` header exists before reading the request body.", + "default": false, + "type": "boolean", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-size-limiting/3.11.x.json b/schemas/request-size-limiting/3.11.x.json new file mode 100644 index 00000000..98670b96 --- /dev/null +++ b/schemas/request-size-limiting/3.11.x.json @@ -0,0 +1,73 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "allowed_payload_size": { + "description": "Allowed request payload size in megabytes. Default is `128` megabytes (128000000 bytes).", + "default": 128, + "type": "integer" + } + }, + { + "size_unit": { + "required": true, + "description": "Size unit can be set either in `bytes`, `kilobytes`, or `megabytes` (default). This configuration is not available in versions prior to Kong Gateway 1.3 and Kong Gateway (OSS) 2.0.", + "one_of": [ + "megabytes", + "kilobytes", + "bytes" + ], + "default": "megabytes", + "type": "string" + } + }, + { + "require_content_length": { + "description": "Set to `true` to ensure a valid `Content-Length` header exists before reading the request body.", + "required": true, + "default": false, + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/request-size-limiting/3.12.x.json b/schemas/request-size-limiting/3.12.x.json new file mode 100644 index 00000000..b683b942 --- /dev/null +++ b/schemas/request-size-limiting/3.12.x.json @@ -0,0 +1,71 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "allowed_payload_size": { + "description": "Allowed request payload size in megabytes. Default is `128` megabytes (128000000 bytes).", + "default": 128, + "type": "integer" + } + }, + { + "size_unit": { + "type": "string", + "required": true, + "description": "Size unit can be set either in `bytes`, `kilobytes`, or `megabytes` (default). This configuration is not available in versions prior to Kong Gateway 1.3 and Kong Gateway (OSS) 2.0.", + "default": "megabytes", + "one_of": [ + "megabytes", + "kilobytes", + "bytes" + ] + } + }, + { + "require_content_length": { + "description": "Set to `true` to ensure a valid `Content-Length` header exists before reading the request body.", + "default": false, + "type": "boolean", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-size-limiting/3.4.x.json b/schemas/request-size-limiting/3.4.x.json index 92de1580..03f352b8 100644 --- a/schemas/request-size-limiting/3.4.x.json +++ b/schemas/request-size-limiting/3.4.x.json @@ -8,51 +8,66 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "allowed_payload_size": { "default": 128, + "description": "Allowed request payload size in megabytes. Default is `128` megabytes (128000000 bytes).", "type": "integer" } }, { "size_unit": { "default": "megabytes", + "required": true, "one_of": [ "megabytes", "kilobytes", "bytes" ], - "required": true, + "description": "Size unit can be set either in `bytes`, `kilobytes`, or `megabytes` (default). This configuration is not available in versions prior to Kong Gateway 1.3 and Kong Gateway (OSS) 2.0.", "type": "string" } }, { "require_content_length": { "default": false, - "type": "boolean", - "required": true + "required": true, + "description": "Set to `true` to ensure a valid `Content-Length` header exists before reading the request body.", + "type": "boolean" } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/request-size-limiting/3.5.x.json b/schemas/request-size-limiting/3.5.x.json new file mode 100644 index 00000000..abb4d81d --- /dev/null +++ b/schemas/request-size-limiting/3.5.x.json @@ -0,0 +1,73 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "allowed_payload_size": { + "default": 128, + "type": "integer", + "description": "Allowed request payload size in megabytes. Default is `128` megabytes (128000000 bytes)." + } + }, + { + "size_unit": { + "type": "string", + "required": true, + "one_of": [ + "megabytes", + "kilobytes", + "bytes" + ], + "default": "megabytes", + "description": "Size unit can be set either in `bytes`, `kilobytes`, or `megabytes` (default). This configuration is not available in versions prior to Kong Gateway 1.3 and Kong Gateway (OSS) 2.0." + } + }, + { + "require_content_length": { + "required": true, + "default": false, + "type": "boolean", + "description": "Set to `true` to ensure a valid `Content-Length` header exists before reading the request body." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/request-size-limiting/3.6.x.json b/schemas/request-size-limiting/3.6.x.json new file mode 100644 index 00000000..2ba3aec0 --- /dev/null +++ b/schemas/request-size-limiting/3.6.x.json @@ -0,0 +1,73 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "allowed_payload_size": { + "type": "integer", + "default": 128, + "description": "Allowed request payload size in megabytes. Default is `128` megabytes (128000000 bytes)." + } + }, + { + "size_unit": { + "type": "string", + "default": "megabytes", + "required": true, + "description": "Size unit can be set either in `bytes`, `kilobytes`, or `megabytes` (default). This configuration is not available in versions prior to Kong Gateway 1.3 and Kong Gateway (OSS) 2.0.", + "one_of": [ + "megabytes", + "kilobytes", + "bytes" + ] + } + }, + { + "require_content_length": { + "required": true, + "type": "boolean", + "default": false, + "description": "Set to `true` to ensure a valid `Content-Length` header exists before reading the request body." + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-size-limiting/3.7.x.json b/schemas/request-size-limiting/3.7.x.json new file mode 100644 index 00000000..cb8c641c --- /dev/null +++ b/schemas/request-size-limiting/3.7.x.json @@ -0,0 +1,73 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "allowed_payload_size": { + "type": "integer", + "description": "Allowed request payload size in megabytes. Default is `128` megabytes (128000000 bytes).", + "default": 128 + } + }, + { + "size_unit": { + "default": "megabytes", + "required": true, + "type": "string", + "description": "Size unit can be set either in `bytes`, `kilobytes`, or `megabytes` (default). This configuration is not available in versions prior to Kong Gateway 1.3 and Kong Gateway (OSS) 2.0.", + "one_of": [ + "megabytes", + "kilobytes", + "bytes" + ] + } + }, + { + "require_content_length": { + "required": true, + "type": "boolean", + "description": "Set to `true` to ensure a valid `Content-Length` header exists before reading the request body.", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/request-size-limiting/3.8.x.json b/schemas/request-size-limiting/3.8.x.json new file mode 100644 index 00000000..669041e4 --- /dev/null +++ b/schemas/request-size-limiting/3.8.x.json @@ -0,0 +1,73 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "allowed_payload_size": { + "description": "Allowed request payload size in megabytes. Default is `128` megabytes (128000000 bytes).", + "type": "integer", + "default": 128 + } + }, + { + "size_unit": { + "description": "Size unit can be set either in `bytes`, `kilobytes`, or `megabytes` (default). This configuration is not available in versions prior to Kong Gateway 1.3 and Kong Gateway (OSS) 2.0.", + "required": true, + "one_of": [ + "megabytes", + "kilobytes", + "bytes" + ], + "type": "string", + "default": "megabytes" + } + }, + { + "require_content_length": { + "description": "Set to `true` to ensure a valid `Content-Length` header exists before reading the request body.", + "type": "boolean", + "required": true, + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/request-size-limiting/3.9.x.json b/schemas/request-size-limiting/3.9.x.json new file mode 100644 index 00000000..bcef5a46 --- /dev/null +++ b/schemas/request-size-limiting/3.9.x.json @@ -0,0 +1,73 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "allowed_payload_size": { + "default": 128, + "description": "Allowed request payload size in megabytes. Default is `128` megabytes (128000000 bytes).", + "type": "integer" + } + }, + { + "size_unit": { + "required": true, + "type": "string", + "default": "megabytes", + "description": "Size unit can be set either in `bytes`, `kilobytes`, or `megabytes` (default). This configuration is not available in versions prior to Kong Gateway 1.3 and Kong Gateway (OSS) 2.0.", + "one_of": [ + "megabytes", + "kilobytes", + "bytes" + ] + } + }, + { + "require_content_length": { + "default": false, + "description": "Set to `true` to ensure a valid `Content-Length` header exists before reading the request body.", + "required": true, + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-termination/3.10.x.json b/schemas/request-termination/3.10.x.json new file mode 100644 index 00000000..b27ff5f6 --- /dev/null +++ b/schemas/request-termination/3.10.x.json @@ -0,0 +1,81 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "status_code": { + "type": "integer", + "description": "The response code to send. Must be an integer between 100 and 599.", + "default": 503, + "between": [ + 100, + 599 + ], + "required": true + } + }, + { + "message": { + "description": "The message to send, if using the default response generator.", + "type": "string" + } + }, + { + "content_type": { + "description": "Content type of the raw response configured with `config.body`.", + "type": "string" + } + }, + { + "body": { + "description": "The raw response body to send. This is mutually exclusive with the `config.message` field.", + "type": "string" + } + }, + { + "echo": { + "description": "When set, the plugin will echo a copy of the request back to the client. The main usecase for this is debugging. It can be combined with `trigger` in order to debug requests on live systems without disturbing real traffic.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "trigger": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-termination/3.11.x.json b/schemas/request-termination/3.11.x.json new file mode 100644 index 00000000..f10387fc --- /dev/null +++ b/schemas/request-termination/3.11.x.json @@ -0,0 +1,81 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "status_code": { + "required": true, + "description": "The response code to send. Must be an integer between 100 and 599.", + "between": [ + 100, + 599 + ], + "default": 503, + "type": "integer" + } + }, + { + "message": { + "description": "The message to send, if using the default response generator.", + "type": "string" + } + }, + { + "content_type": { + "description": "Content type of the raw response configured with `config.body`.", + "type": "string" + } + }, + { + "body": { + "description": "The raw response body to send. This is mutually exclusive with the `config.message` field.", + "type": "string" + } + }, + { + "echo": { + "default": false, + "required": true, + "description": "When set, the plugin will echo a copy of the request back to the client. The main usecase for this is debugging. It can be combined with `trigger` in order to debug requests on live systems without disturbing real traffic.", + "type": "boolean" + } + }, + { + "trigger": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/request-termination/3.12.x.json b/schemas/request-termination/3.12.x.json new file mode 100644 index 00000000..4e35b55c --- /dev/null +++ b/schemas/request-termination/3.12.x.json @@ -0,0 +1,79 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "status_code": { + "type": "integer", + "between": [ + 100, + 599 + ], + "required": true, + "description": "The response code to send. Must be an integer between 100 and 599.", + "default": 503 + } + }, + { + "message": { + "type": "string", + "description": "The message to send, if using the default response generator." + } + }, + { + "content_type": { + "type": "string", + "description": "Content type of the raw response configured with `config.body`." + } + }, + { + "body": { + "type": "string", + "description": "The raw response body to send. This is mutually exclusive with the `config.message` field." + } + }, + { + "echo": { + "type": "boolean", + "default": false, + "description": "When set, the plugin will echo a copy of the request back to the client. The main usecase for this is debugging. It can be combined with `trigger` in order to debug requests on live systems without disturbing real traffic.", + "required": true + } + }, + { + "trigger": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-termination/3.4.x.json b/schemas/request-termination/3.4.x.json index 0f7ce4c5..5c6b340c 100644 --- a/schemas/request-termination/3.4.x.json +++ b/schemas/request-termination/3.4.x.json @@ -8,64 +8,82 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "status_code": { - "type": "integer", + "default": 503, + "description": "The response code to send. Must be an integer between 100 and 599.", "between": [ 100, 599 ], - "default": 503, + "type": "integer", "required": true } }, { "message": { + "description": "The message to send, if using the default response generator.", "type": "string" } }, { "content_type": { + "description": "Content type of the raw response configured with `config.body`.", "type": "string" } }, { "body": { + "description": "The raw response body to send. This is mutually exclusive with the `config.message` field.", "type": "string" } }, { "echo": { "default": false, + "description": "When set, the plugin will echo a copy of the request back to the client. The main usecase for this is debugging. It can be combined with `trigger` in order to debug requests on live systems without disturbing real traffic.", "required": true, "type": "boolean" } }, { "trigger": { - "type": "string" + "type": "string", + "description": "A string representing an HTTP header name." } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/request-termination/3.5.x.json b/schemas/request-termination/3.5.x.json new file mode 100644 index 00000000..c6dc97b0 --- /dev/null +++ b/schemas/request-termination/3.5.x.json @@ -0,0 +1,89 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "status_code": { + "type": "integer", + "required": true, + "between": [ + 100, + 599 + ], + "default": 503, + "description": "The response code to send. Must be an integer between 100 and 599." + } + }, + { + "message": { + "type": "string", + "description": "The message to send, if using the default response generator." + } + }, + { + "content_type": { + "type": "string", + "description": "Content type of the raw response configured with `config.body`." + } + }, + { + "body": { + "type": "string", + "description": "The raw response body to send. This is mutually exclusive with the `config.message` field." + } + }, + { + "echo": { + "description": "When set, the plugin will echo a copy of the request back to the client. The main usecase for this is debugging. It can be combined with `trigger` in order to debug requests on live systems without disturbing real traffic.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "trigger": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/request-termination/3.6.x.json b/schemas/request-termination/3.6.x.json new file mode 100644 index 00000000..bb6a0089 --- /dev/null +++ b/schemas/request-termination/3.6.x.json @@ -0,0 +1,81 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "status_code": { + "type": "integer", + "default": 503, + "between": [ + 100, + 599 + ], + "required": true, + "description": "The response code to send. Must be an integer between 100 and 599." + } + }, + { + "message": { + "description": "The message to send, if using the default response generator.", + "type": "string" + } + }, + { + "content_type": { + "description": "Content type of the raw response configured with `config.body`.", + "type": "string" + } + }, + { + "body": { + "description": "The raw response body to send. This is mutually exclusive with the `config.message` field.", + "type": "string" + } + }, + { + "echo": { + "required": true, + "type": "boolean", + "description": "When set, the plugin will echo a copy of the request back to the client. The main usecase for this is debugging. It can be combined with `trigger` in order to debug requests on live systems without disturbing real traffic.", + "default": false + } + }, + { + "trigger": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-termination/3.7.x.json b/schemas/request-termination/3.7.x.json new file mode 100644 index 00000000..e716bea1 --- /dev/null +++ b/schemas/request-termination/3.7.x.json @@ -0,0 +1,81 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "status_code": { + "default": 503, + "required": true, + "description": "The response code to send. Must be an integer between 100 and 599.", + "type": "integer", + "between": [ + 100, + 599 + ] + } + }, + { + "message": { + "type": "string", + "description": "The message to send, if using the default response generator." + } + }, + { + "content_type": { + "type": "string", + "description": "Content type of the raw response configured with `config.body`." + } + }, + { + "body": { + "type": "string", + "description": "The raw response body to send. This is mutually exclusive with the `config.message` field." + } + }, + { + "echo": { + "required": true, + "type": "boolean", + "description": "When set, the plugin will echo a copy of the request back to the client. The main usecase for this is debugging. It can be combined with `trigger` in order to debug requests on live systems without disturbing real traffic.", + "default": false + } + }, + { + "trigger": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/request-termination/3.8.x.json b/schemas/request-termination/3.8.x.json new file mode 100644 index 00000000..e06de3dc --- /dev/null +++ b/schemas/request-termination/3.8.x.json @@ -0,0 +1,81 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "status_code": { + "description": "The response code to send. Must be an integer between 100 and 599.", + "required": true, + "between": [ + 100, + 599 + ], + "type": "integer", + "default": 503 + } + }, + { + "message": { + "description": "The message to send, if using the default response generator.", + "type": "string" + } + }, + { + "content_type": { + "description": "Content type of the raw response configured with `config.body`.", + "type": "string" + } + }, + { + "body": { + "description": "The raw response body to send. This is mutually exclusive with the `config.message` field.", + "type": "string" + } + }, + { + "echo": { + "description": "When set, the plugin will echo a copy of the request back to the client. The main usecase for this is debugging. It can be combined with `trigger` in order to debug requests on live systems without disturbing real traffic.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "trigger": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/request-termination/3.9.x.json b/schemas/request-termination/3.9.x.json new file mode 100644 index 00000000..a95ead36 --- /dev/null +++ b/schemas/request-termination/3.9.x.json @@ -0,0 +1,81 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "status_code": { + "between": [ + 100, + 599 + ], + "required": true, + "type": "integer", + "default": 503, + "description": "The response code to send. Must be an integer between 100 and 599." + } + }, + { + "message": { + "description": "The message to send, if using the default response generator.", + "type": "string" + } + }, + { + "content_type": { + "description": "Content type of the raw response configured with `config.body`.", + "type": "string" + } + }, + { + "body": { + "description": "The raw response body to send. This is mutually exclusive with the `config.message` field.", + "type": "string" + } + }, + { + "echo": { + "default": false, + "description": "When set, the plugin will echo a copy of the request back to the client. The main usecase for this is debugging. It can be combined with `trigger` in order to debug requests on live systems without disturbing real traffic.", + "required": true, + "type": "boolean" + } + }, + { + "trigger": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-transformer-advanced/3.10.x.json b/schemas/request-transformer-advanced/3.10.x.json new file mode 100644 index 00000000..019f100e --- /dev/null +++ b/schemas/request-transformer-advanced/3.10.x.json @@ -0,0 +1,337 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "type": "string", + "match": "^%u+$" + } + }, + { + "remove": { + "type": "record", + "fields": [ + { + "body": { + "elements": { + "type": "string" + }, + "default": [ + + ], + "type": "array" + } + }, + { + "headers": { + "elements": { + "type": "string" + }, + "default": [ + + ], + "type": "array" + } + }, + { + "querystring": { + "elements": { + "type": "string" + }, + "default": [ + + ], + "type": "array" + } + } + ], + "required": true + } + }, + { + "rename": { + "type": "record", + "fields": [ + { + "body": { + "elements": { + "referenceable": true, + "type": "string" + }, + "default": [ + + ], + "type": "array" + } + }, + { + "headers": { + "elements": { + "referenceable": true, + "type": "string" + }, + "default": [ + + ], + "type": "array" + } + }, + { + "querystring": { + "elements": { + "referenceable": true, + "type": "string" + }, + "default": [ + + ], + "type": "array" + } + } + ], + "required": true + } + }, + { + "replace": { + "type": "record", + "fields": [ + { + "body": { + "elements": { + "referenceable": true, + "type": "string" + }, + "default": [ + + ], + "type": "array" + } + }, + { + "headers": { + "elements": { + "referenceable": true, + "type": "string" + }, + "default": [ + + ], + "type": "array" + } + }, + { + "querystring": { + "elements": { + "referenceable": true, + "type": "string" + }, + "default": [ + + ], + "type": "array" + } + }, + { + "json_types": { + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "default": [ + + ], + "type": "array" + } + }, + { + "uri": { + "type": "string" + } + } + ], + "required": true + } + }, + { + "add": { + "type": "record", + "fields": [ + { + "body": { + "elements": { + "referenceable": true, + "type": "string" + }, + "default": [ + + ], + "type": "array" + } + }, + { + "headers": { + "elements": { + "referenceable": true, + "type": "string" + }, + "default": [ + + ], + "type": "array" + } + }, + { + "querystring": { + "elements": { + "referenceable": true, + "type": "string" + }, + "default": [ + + ], + "type": "array" + } + }, + { + "json_types": { + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "default": [ + + ], + "type": "array" + } + } + ], + "required": true + } + }, + { + "append": { + "type": "record", + "fields": [ + { + "body": { + "elements": { + "referenceable": true, + "type": "string" + }, + "default": [ + + ], + "type": "array" + } + }, + { + "headers": { + "elements": { + "referenceable": true, + "type": "string" + }, + "default": [ + + ], + "type": "array" + } + }, + { + "querystring": { + "elements": { + "referenceable": true, + "type": "string" + }, + "default": [ + + ], + "type": "array" + } + }, + { + "json_types": { + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "default": [ + + ], + "type": "array" + } + } + ], + "required": true + } + }, + { + "allow": { + "type": "record", + "fields": [ + { + "body": { + "type": "set", + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + }, + { + "dots_in_keys": { + "description": "Specify whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects. See [Arrays and nested objects](#arrays-and-nested-objects).", + "default": true, + "type": "boolean" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-transformer-advanced/3.11.x.json b/schemas/request-transformer-advanced/3.11.x.json new file mode 100644 index 00000000..7e3bb65d --- /dev/null +++ b/schemas/request-transformer-advanced/3.11.x.json @@ -0,0 +1,337 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "http_method": { + "match": "^%u+$", + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "type": "string" + } + }, + { + "remove": { + "required": true, + "fields": [ + { + "body": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "querystring": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "rename": { + "required": true, + "fields": [ + { + "body": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "querystring": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "replace": { + "required": true, + "fields": [ + { + "body": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "querystring": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "json_types": { + "type": "array", + "default": [ + + ], + "elements": { + "one_of": [ + "boolean", + "number", + "string" + ], + "type": "string" + } + } + }, + { + "uri": { + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "add": { + "required": true, + "fields": [ + { + "body": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "querystring": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "json_types": { + "type": "array", + "default": [ + + ], + "elements": { + "one_of": [ + "boolean", + "number", + "string" + ], + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "append": { + "required": true, + "fields": [ + { + "body": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "querystring": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "json_types": { + "type": "array", + "default": [ + + ], + "elements": { + "one_of": [ + "boolean", + "number", + "string" + ], + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "allow": { + "required": true, + "fields": [ + { + "body": { + "type": "set", + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "dots_in_keys": { + "default": true, + "description": "Specify whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects. See [Arrays and nested objects](#arrays-and-nested-objects).", + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/request-transformer-advanced/3.12.x.json b/schemas/request-transformer-advanced/3.12.x.json new file mode 100644 index 00000000..1491c9aa --- /dev/null +++ b/schemas/request-transformer-advanced/3.12.x.json @@ -0,0 +1,299 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "http_method": { + "type": "string", + "match": "^%u+$", + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters." + } + }, + { + "remove": { + "type": "record", + "fields": [ + { + "body": { + "type": "array", + "default": [], + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string" + } + } + }, + { + "querystring": { + "type": "array", + "default": [], + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + }, + { + "rename": { + "type": "record", + "fields": [ + { + "body": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "querystring": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "referenceable": true + } + } + } + ], + "required": true + } + }, + { + "replace": { + "type": "record", + "fields": [ + { + "body": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "querystring": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "json_types": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "uri": { + "type": "string" + } + } + ], + "required": true + } + }, + { + "add": { + "type": "record", + "fields": [ + { + "body": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "querystring": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "json_types": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + } + ], + "required": true + } + }, + { + "append": { + "type": "record", + "fields": [ + { + "body": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "querystring": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "json_types": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + } + ], + "required": true + } + }, + { + "allow": { + "type": "record", + "fields": [ + { + "body": { + "type": "set", + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + }, + { + "dots_in_keys": { + "type": "boolean", + "default": true, + "description": "Specify whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects." + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-transformer-advanced/3.4.x.json b/schemas/request-transformer-advanced/3.4.x.json index 2f158aed..25ac3a01 100644 --- a/schemas/request-transformer-advanced/3.4.x.json +++ b/schemas/request-transformer-advanced/3.4.x.json @@ -8,39 +8,39 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } } }, { "config": { - "required": true, "fields": [ { "http_method": { "match": "^%u+$", + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", "type": "string" } }, { "remove": { - "required": true, "fields": [ { "body": { - "type": "array", "default": [ ], + "type": "array", "elements": { "type": "string" } @@ -48,10 +48,10 @@ }, { "headers": { - "type": "array", "default": [ ], + "type": "array", "elements": { "type": "string" } @@ -59,77 +59,77 @@ }, { "querystring": { - "type": "array", "default": [ ], + "type": "array", "elements": { "type": "string" } } } ], - "type": "record" + "type": "record", + "required": true } }, { "rename": { - "required": true, "fields": [ { "body": { - "type": "array", "default": [ ], + "type": "array", "elements": { - "referenceable": true, - "type": "string" + "type": "string", + "referenceable": true } } }, { "headers": { - "type": "array", "default": [ ], + "type": "array", "elements": { - "referenceable": true, - "type": "string" + "type": "string", + "referenceable": true } } }, { "querystring": { - "type": "array", "default": [ ], + "type": "array", "elements": { - "referenceable": true, - "type": "string" + "type": "string", + "referenceable": true } } } ], - "type": "record" + "type": "record", + "required": true } }, { "replace": { - "required": true, "fields": [ { "body": { "default": [ ], + "type": "array", "elements": { - "referenceable": true, - "type": "string" - }, - "type": "array" + "type": "string", + "referenceable": true + } } }, { @@ -137,11 +137,11 @@ "default": [ ], + "type": "array", "elements": { - "referenceable": true, - "type": "string" - }, - "type": "array" + "type": "string", + "referenceable": true + } } }, { @@ -149,15 +149,19 @@ "default": [ ], + "type": "array", "elements": { - "referenceable": true, - "type": "string" - }, - "type": "array" + "type": "string", + "referenceable": true + } } }, { "json_types": { + "default": [ + + ], + "type": "array", "elements": { "type": "string", "one_of": [ @@ -165,11 +169,7 @@ "number", "string" ] - }, - "type": "array", - "default": [ - - ] + } } }, { @@ -178,154 +178,160 @@ } } ], - "type": "record" + "type": "record", + "required": true } }, { "add": { - "required": true, "fields": [ { "body": { + "default": [ + + ], + "type": "array", "elements": { "type": "string", "referenceable": true - }, - "type": "array", - "default": [ - - ] + } } }, { "headers": { + "default": [ + + ], + "type": "array", "elements": { "type": "string", "referenceable": true - }, - "type": "array", - "default": [ - - ] + } } }, { "querystring": { + "default": [ + + ], + "type": "array", "elements": { "type": "string", "referenceable": true - }, - "type": "array", - "default": [ - - ] + } } }, { "json_types": { - "type": "array", "default": [ ], + "type": "array", "elements": { + "type": "string", "one_of": [ "boolean", "number", "string" - ], - "type": "string" + ] } } } ], - "type": "record" + "type": "record", + "required": true } }, { "append": { - "required": true, "fields": [ { "body": { + "default": [ + + ], + "type": "array", "elements": { "type": "string", "referenceable": true - }, - "type": "array", - "default": [ - - ] + } } }, { "headers": { + "default": [ + + ], + "type": "array", "elements": { "type": "string", "referenceable": true - }, - "type": "array", - "default": [ - - ] + } } }, { "querystring": { + "default": [ + + ], + "type": "array", "elements": { "type": "string", "referenceable": true - }, - "type": "array", - "default": [ - - ] + } } }, { "json_types": { - "type": "array", "default": [ ], + "type": "array", "elements": { + "type": "string", "one_of": [ "boolean", "number", "string" - ], - "type": "string" + ] } } } ], - "type": "record" + "type": "record", + "required": true } }, { "allow": { - "required": true, "fields": [ { "body": { + "type": "set", "elements": { "type": "string" - }, - "type": "set" + } } } ], - "type": "record" + "type": "record", + "required": true } }, { "dots_in_keys": { "default": true, - "type": "boolean" + "type": "boolean", + "description": "Specify whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects. See [Arrays and nested objects](#arrays-and-nested-objects)." } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/request-transformer-advanced/3.5.x.json b/schemas/request-transformer-advanced/3.5.x.json new file mode 100644 index 00000000..b0181b2f --- /dev/null +++ b/schemas/request-transformer-advanced/3.5.x.json @@ -0,0 +1,337 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "fields": [ + { + "http_method": { + "type": "string", + "match": "^%u+$", + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters." + } + }, + { + "remove": { + "fields": [ + { + "body": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "querystring": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "rename": { + "fields": [ + { + "body": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "headers": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "querystring": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "referenceable": true + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "replace": { + "fields": [ + { + "body": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "headers": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "querystring": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "json_types": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "uri": { + "type": "string" + } + } + ], + "type": "record", + "required": true + } + }, + { + "add": { + "fields": [ + { + "body": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "headers": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "querystring": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "json_types": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "append": { + "fields": [ + { + "body": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "headers": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "querystring": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "referenceable": true + } + } + }, + { + "json_types": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "allow": { + "fields": [ + { + "body": { + "type": "set", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "dots_in_keys": { + "default": true, + "type": "boolean", + "description": "Specify whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects. See [Arrays and nested objects](#arrays-and-nested-objects)." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/request-transformer-advanced/3.6.x.json b/schemas/request-transformer-advanced/3.6.x.json new file mode 100644 index 00000000..fdb450d9 --- /dev/null +++ b/schemas/request-transformer-advanced/3.6.x.json @@ -0,0 +1,337 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "http_method": { + "match": "^%u+$", + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "type": "string" + } + }, + { + "remove": { + "required": true, + "type": "record", + "fields": [ + { + "body": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "querystring": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ] + } + }, + { + "rename": { + "required": true, + "type": "record", + "fields": [ + { + "body": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "querystring": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ] + } + }, + { + "replace": { + "required": true, + "type": "record", + "fields": [ + { + "body": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "querystring": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "json_types": { + "elements": { + "one_of": [ + "boolean", + "number", + "string" + ], + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "uri": { + "type": "string" + } + } + ] + } + }, + { + "add": { + "required": true, + "type": "record", + "fields": [ + { + "body": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "querystring": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "json_types": { + "elements": { + "one_of": [ + "boolean", + "number", + "string" + ], + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ] + } + }, + { + "append": { + "required": true, + "type": "record", + "fields": [ + { + "body": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "querystring": { + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "json_types": { + "elements": { + "one_of": [ + "boolean", + "number", + "string" + ], + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ] + } + }, + { + "allow": { + "required": true, + "type": "record", + "fields": [ + { + "body": { + "elements": { + "type": "string" + }, + "type": "set" + } + } + ] + } + }, + { + "dots_in_keys": { + "type": "boolean", + "description": "Specify whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects. See [Arrays and nested objects](#arrays-and-nested-objects).", + "default": true + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-transformer-advanced/3.7.x.json b/schemas/request-transformer-advanced/3.7.x.json new file mode 100644 index 00000000..82c1b004 --- /dev/null +++ b/schemas/request-transformer-advanced/3.7.x.json @@ -0,0 +1,337 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "http_method": { + "match": "^%u+$", + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "type": "string" + } + }, + { + "remove": { + "fields": [ + { + "body": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "querystring": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "rename": { + "fields": [ + { + "body": { + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "default": [ + + ] + } + }, + { + "querystring": { + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "replace": { + "fields": [ + { + "body": { + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "default": [ + + ] + } + }, + { + "querystring": { + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "default": [ + + ] + } + }, + { + "json_types": { + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array", + "default": [ + + ] + } + }, + { + "uri": { + "type": "string" + } + } + ], + "type": "record", + "required": true + } + }, + { + "add": { + "fields": [ + { + "body": { + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "default": [ + + ] + } + }, + { + "querystring": { + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "default": [ + + ] + } + }, + { + "json_types": { + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "append": { + "fields": [ + { + "body": { + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "default": [ + + ] + } + }, + { + "querystring": { + "elements": { + "type": "string", + "referenceable": true + }, + "type": "array", + "default": [ + + ] + } + }, + { + "json_types": { + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "allow": { + "fields": [ + { + "body": { + "type": "set", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "dots_in_keys": { + "type": "boolean", + "description": "Specify whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects. See [Arrays and nested objects](#arrays-and-nested-objects).", + "default": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/request-transformer-advanced/3.8.x.json b/schemas/request-transformer-advanced/3.8.x.json new file mode 100644 index 00000000..fa602888 --- /dev/null +++ b/schemas/request-transformer-advanced/3.8.x.json @@ -0,0 +1,337 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "type": "string", + "match": "^%u+$" + } + }, + { + "remove": { + "fields": [ + { + "body": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "querystring": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "rename": { + "fields": [ + { + "body": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "querystring": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "replace": { + "fields": [ + { + "body": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "querystring": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "json_types": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "uri": { + "type": "string" + } + } + ], + "type": "record", + "required": true + } + }, + { + "add": { + "fields": [ + { + "body": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "querystring": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "json_types": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "append": { + "fields": [ + { + "body": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "querystring": { + "type": "array", + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + } + } + }, + { + "json_types": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "allow": { + "fields": [ + { + "body": { + "type": "set", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "dots_in_keys": { + "description": "Specify whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects. See [Arrays and nested objects](#arrays-and-nested-objects).", + "type": "boolean", + "default": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/request-transformer-advanced/3.9.x.json b/schemas/request-transformer-advanced/3.9.x.json new file mode 100644 index 00000000..90f58ca4 --- /dev/null +++ b/schemas/request-transformer-advanced/3.9.x.json @@ -0,0 +1,337 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "match": "^%u+$", + "type": "string" + } + }, + { + "remove": { + "fields": [ + { + "body": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "querystring": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "rename": { + "fields": [ + { + "body": { + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array" + } + }, + { + "querystring": { + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "replace": { + "fields": [ + { + "body": { + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array" + } + }, + { + "querystring": { + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array" + } + }, + { + "json_types": { + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array" + } + }, + { + "uri": { + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "add": { + "fields": [ + { + "body": { + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array" + } + }, + { + "querystring": { + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array" + } + }, + { + "json_types": { + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "append": { + "fields": [ + { + "body": { + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array" + } + }, + { + "querystring": { + "default": [ + + ], + "elements": { + "referenceable": true, + "type": "string" + }, + "type": "array" + } + }, + { + "json_types": { + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "allow": { + "fields": [ + { + "body": { + "elements": { + "type": "string" + }, + "type": "set" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "dots_in_keys": { + "default": true, + "description": "Specify whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects. See [Arrays and nested objects](#arrays-and-nested-objects).", + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-transformer/3.10.x.json b/schemas/request-transformer/3.10.x.json new file mode 100644 index 00000000..ce38146a --- /dev/null +++ b/schemas/request-transformer/3.10.x.json @@ -0,0 +1,280 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "type": "string", + "match": "^%u+$" + } + }, + { + "remove": { + "type": "record", + "fields": [ + { + "body": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + }, + { + "headers": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + }, + { + "querystring": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + } + ], + "required": true + } + }, + { + "rename": { + "type": "record", + "fields": [ + { + "body": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + }, + { + "headers": { + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + }, + { + "querystring": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + } + ], + "required": true + } + }, + { + "replace": { + "type": "record", + "fields": [ + { + "body": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + }, + { + "headers": { + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + }, + { + "querystring": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + }, + { + "uri": { + "type": "string" + } + } + ], + "required": true + } + }, + { + "add": { + "type": "record", + "fields": [ + { + "body": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + }, + { + "headers": { + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + }, + { + "querystring": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + } + ], + "required": true + } + }, + { + "append": { + "type": "record", + "fields": [ + { + "body": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + }, + { + "headers": { + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + }, + { + "querystring": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-transformer/3.11.x.json b/schemas/request-transformer/3.11.x.json new file mode 100644 index 00000000..cf502bde --- /dev/null +++ b/schemas/request-transformer/3.11.x.json @@ -0,0 +1,280 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "http_method": { + "match": "^%u+$", + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "type": "string" + } + }, + { + "remove": { + "required": true, + "fields": [ + { + "body": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "querystring": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "rename": { + "required": true, + "fields": [ + { + "body": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "querystring": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "replace": { + "required": true, + "fields": [ + { + "body": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "querystring": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "uri": { + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "add": { + "required": true, + "fields": [ + { + "body": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "querystring": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "append": { + "required": true, + "fields": [ + { + "body": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "querystring": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/request-transformer/3.12.x.json b/schemas/request-transformer/3.12.x.json new file mode 100644 index 00000000..7e291dc1 --- /dev/null +++ b/schemas/request-transformer/3.12.x.json @@ -0,0 +1,248 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "http_method": { + "type": "string", + "match": "^%u+$", + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters." + } + }, + { + "remove": { + "type": "record", + "fields": [ + { + "body": { + "type": "array", + "default": [], + "elements": { + "type": "string" + }, + "required": true + } + }, + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string" + }, + "required": true + } + }, + { + "querystring": { + "type": "array", + "default": [], + "elements": { + "type": "string" + }, + "required": true + } + } + ], + "required": true + } + }, + { + "rename": { + "type": "record", + "fields": [ + { + "body": { + "type": "array", + "default": [], + "elements": { + "type": "string" + }, + "required": true + } + }, + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + }, + "required": true + } + }, + { + "querystring": { + "type": "array", + "default": [], + "elements": { + "type": "string" + }, + "required": true + } + } + ], + "required": true + } + }, + { + "replace": { + "type": "record", + "fields": [ + { + "body": { + "type": "array", + "default": [], + "elements": { + "type": "string" + }, + "required": true + } + }, + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + }, + "required": true + } + }, + { + "querystring": { + "type": "array", + "default": [], + "elements": { + "type": "string" + }, + "required": true + } + }, + { + "uri": { + "type": "string" + } + } + ], + "required": true + } + }, + { + "add": { + "type": "record", + "fields": [ + { + "body": { + "type": "array", + "default": [], + "elements": { + "type": "string" + }, + "required": true + } + }, + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + }, + "required": true + } + }, + { + "querystring": { + "type": "array", + "default": [], + "elements": { + "type": "string" + }, + "required": true + } + } + ], + "required": true + } + }, + { + "append": { + "type": "record", + "fields": [ + { + "body": { + "type": "array", + "default": [], + "elements": { + "type": "string" + }, + "required": true + } + }, + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + }, + "required": true + } + }, + { + "querystring": { + "type": "array", + "default": [], + "elements": { + "type": "string" + }, + "required": true + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-transformer/3.4.x.json b/schemas/request-transformer/3.4.x.json index 00b0097d..109f34ca 100644 --- a/schemas/request-transformer/3.4.x.json +++ b/schemas/request-transformer/3.4.x.json @@ -8,6 +8,9 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", "elements": { "one_of": [ "grpc", @@ -21,36 +24,34 @@ "ws", "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } } }, { "config": { - "required": true, "fields": [ { "http_method": { "match": "^%u+$", + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", "type": "string" } }, { "remove": { - "required": true, "fields": [ { "body": { "default": [ ], + "type": "array", + "required": true, "elements": { "type": "string" - }, - "type": "array", - "required": true + } } }, { @@ -58,11 +59,11 @@ "default": [ ], + "type": "array", + "required": true, "elements": { "type": "string" - }, - "type": "array", - "required": true + } } }, { @@ -70,31 +71,31 @@ "default": [ ], + "type": "array", + "required": true, "elements": { "type": "string" - }, - "type": "array", - "required": true + } } } ], - "type": "record" + "type": "record", + "required": true } }, { "rename": { - "required": true, "fields": [ { "body": { "default": [ ], + "type": "array", + "required": true, "elements": { "type": "string" - }, - "type": "array", - "required": true + } } }, { @@ -102,12 +103,12 @@ "default": [ ], - "elements": { - "match": "^[^:]+:.*$", - "type": "string" - }, "type": "array", - "required": true + "required": true, + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } } }, { @@ -115,28 +116,28 @@ "default": [ ], + "type": "array", + "required": true, "elements": { "type": "string" - }, - "type": "array", - "required": true + } } } ], - "type": "record" + "type": "record", + "required": true } }, { "replace": { - "required": true, "fields": [ { "body": { - "required": true, - "type": "array", "default": [ ], + "type": "array", + "required": true, "elements": { "type": "string" } @@ -144,24 +145,24 @@ }, { "headers": { - "required": true, - "type": "array", "default": [ ], + "type": "array", + "required": true, "elements": { - "match": "^[^:]+:.*$", - "type": "string" + "type": "string", + "match": "^[^:]+:.*$" } } }, { "querystring": { - "required": true, - "type": "array", "default": [ ], + "type": "array", + "required": true, "elements": { "type": "string" } @@ -173,23 +174,23 @@ } } ], - "type": "record" + "type": "record", + "required": true } }, { "add": { - "required": true, "fields": [ { "body": { "default": [ ], + "type": "array", + "required": true, "elements": { "type": "string" - }, - "type": "array", - "required": true + } } }, { @@ -197,12 +198,12 @@ "default": [ ], - "elements": { - "match": "^[^:]+:.*$", - "type": "string" - }, "type": "array", - "required": true + "required": true, + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } } }, { @@ -210,31 +211,31 @@ "default": [ ], + "type": "array", + "required": true, "elements": { "type": "string" - }, - "type": "array", - "required": true + } } } ], - "type": "record" + "type": "record", + "required": true } }, { "append": { - "required": true, "fields": [ { "body": { "default": [ ], + "type": "array", + "required": true, "elements": { "type": "string" - }, - "type": "array", - "required": true + } } }, { @@ -242,12 +243,12 @@ "default": [ ], - "elements": { - "match": "^[^:]+:.*$", - "type": "string" - }, "type": "array", - "required": true + "required": true, + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } } }, { @@ -255,20 +256,25 @@ "default": [ ], + "type": "array", + "required": true, "elements": { "type": "string" - }, - "type": "array", - "required": true + } } } ], - "type": "record" + "type": "record", + "required": true } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/request-transformer/3.5.x.json b/schemas/request-transformer/3.5.x.json new file mode 100644 index 00000000..d34a533c --- /dev/null +++ b/schemas/request-transformer/3.5.x.json @@ -0,0 +1,280 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "description": "A set of strings representing protocols." + } + }, + { + "config": { + "fields": [ + { + "http_method": { + "type": "string", + "match": "^%u+$", + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters." + } + }, + { + "remove": { + "fields": [ + { + "body": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "querystring": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "rename": { + "fields": [ + { + "body": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } + } + }, + { + "querystring": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "replace": { + "fields": [ + { + "body": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } + } + }, + { + "querystring": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "uri": { + "type": "string" + } + } + ], + "type": "record", + "required": true + } + }, + { + "add": { + "fields": [ + { + "body": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } + } + }, + { + "querystring": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "append": { + "fields": [ + { + "body": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } + } + }, + { + "querystring": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/request-transformer/3.6.x.json b/schemas/request-transformer/3.6.x.json new file mode 100644 index 00000000..05c01e5c --- /dev/null +++ b/schemas/request-transformer/3.6.x.json @@ -0,0 +1,280 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "http_method": { + "match": "^%u+$", + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "type": "string" + } + }, + { + "remove": { + "required": true, + "type": "record", + "fields": [ + { + "body": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "querystring": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ] + } + }, + { + "rename": { + "required": true, + "type": "record", + "fields": [ + { + "body": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "querystring": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ] + } + }, + { + "replace": { + "required": true, + "type": "record", + "fields": [ + { + "body": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "querystring": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "uri": { + "type": "string" + } + } + ] + } + }, + { + "add": { + "required": true, + "type": "record", + "fields": [ + { + "body": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "querystring": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ] + } + }, + { + "append": { + "required": true, + "type": "record", + "fields": [ + { + "body": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "querystring": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-transformer/3.7.x.json b/schemas/request-transformer/3.7.x.json new file mode 100644 index 00000000..4de5fa5e --- /dev/null +++ b/schemas/request-transformer/3.7.x.json @@ -0,0 +1,280 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "http_method": { + "match": "^%u+$", + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "type": "string" + } + }, + { + "remove": { + "fields": [ + { + "body": { + "required": true, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "required": true, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "querystring": { + "required": true, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "rename": { + "fields": [ + { + "body": { + "required": true, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "required": true, + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "querystring": { + "required": true, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "replace": { + "fields": [ + { + "body": { + "required": true, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "required": true, + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "querystring": { + "required": true, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "uri": { + "type": "string" + } + } + ], + "type": "record", + "required": true + } + }, + { + "add": { + "fields": [ + { + "body": { + "required": true, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "required": true, + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "querystring": { + "required": true, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "append": { + "fields": [ + { + "body": { + "required": true, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "required": true, + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "querystring": { + "required": true, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/request-transformer/3.8.x.json b/schemas/request-transformer/3.8.x.json new file mode 100644 index 00000000..e6220243 --- /dev/null +++ b/schemas/request-transformer/3.8.x.json @@ -0,0 +1,280 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "type": "string", + "match": "^%u+$" + } + }, + { + "remove": { + "fields": [ + { + "body": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "type": "string" + } + } + }, + { + "querystring": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "rename": { + "fields": [ + { + "body": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "querystring": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "replace": { + "fields": [ + { + "body": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "querystring": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "type": "string" + } + } + }, + { + "uri": { + "type": "string" + } + } + ], + "type": "record", + "required": true + } + }, + { + "add": { + "fields": [ + { + "body": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "querystring": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "append": { + "fields": [ + { + "body": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "querystring": { + "default": [ + + ], + "type": "array", + "required": true, + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/request-transformer/3.9.x.json b/schemas/request-transformer/3.9.x.json new file mode 100644 index 00000000..ee8d790f --- /dev/null +++ b/schemas/request-transformer/3.9.x.json @@ -0,0 +1,280 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "config": { + "fields": [ + { + "http_method": { + "description": "A string representing an HTTP method, such as GET, POST, PUT, or DELETE. The string must contain only uppercase letters.", + "match": "^%u+$", + "type": "string" + } + }, + { + "remove": { + "fields": [ + { + "body": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "querystring": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "required": true, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "rename": { + "fields": [ + { + "body": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + }, + "required": true, + "type": "array" + } + }, + { + "querystring": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "required": true, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "replace": { + "fields": [ + { + "body": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + }, + "required": true, + "type": "array" + } + }, + { + "querystring": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "uri": { + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "add": { + "fields": [ + { + "body": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + }, + "required": true, + "type": "array" + } + }, + { + "querystring": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "required": true, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "append": { + "fields": [ + { + "body": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + }, + "required": true, + "type": "array" + } + }, + { + "querystring": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "required": true, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-validator/3.10.x.json b/schemas/request-validator/3.10.x.json new file mode 100644 index 00000000..0298f115 --- /dev/null +++ b/schemas/request-validator/3.10.x.json @@ -0,0 +1,189 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "body_schema", + "parameter_schema" + ] + } + ], + "type": "record", + "fields": [ + { + "body_schema": { + "description": "The request body schema specification. One of `body_schema` or `parameter_schema` must be specified.", + "type": "string", + "required": false + } + }, + { + "allowed_content_types": { + "description": "List of allowed content types. The value can be configured with the `charset` parameter. For example, `application/json; charset=UTF-8`.", + "type": "set", + "default": [ + "application/json" + ], + "elements": { + "required": true, + "type": "string" + } + } + }, + { + "version": { + "type": "string", + "description": "Which validator to use. Supported values are `kong` (default) for using Kong's own schema validator, or `draft4` for using a JSON Schema Draft 4-compliant validator.", + "default": "kong", + "one_of": [ + "kong", + "draft4" + ], + "required": true + } + }, + { + "parameter_schema": { + "description": "Array of parameter validator specification. One of `body_schema` or `parameter_schema` must be specified.", + "type": "array", + "elements": { + "entity_checks": [ + { + "mutually_required": [ + "style", + "explode", + "schema" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "style", + "in" + ] + } + } + ], + "type": "record", + "fields": [ + { + "in": { + "description": "The location of the parameter.", + "type": "string", + "one_of": [ + "query", + "header", + "path" + ], + "required": true + } + }, + { + "name": { + "description": "The name of the parameter. Parameter names are case-sensitive, and correspond to the parameter name used by the `in` property. If `in` is `path`, the `name` field MUST correspond to the named capture group from the configured `route`.", + "type": "string", + "required": true + } + }, + { + "required": { + "description": "Determines whether this parameter is mandatory.", + "type": "boolean", + "required": true + } + }, + { + "style": { + "description": "Required when `schema` and `explode` are set. Describes how the parameter value will be deserialized depending on the type of the parameter value.", + "type": "string", + "one_of": [ + "label", + "form", + "matrix", + "simple", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ] + } + }, + { + "explode": { + "description": "Required when `schema` and `style` are set. When `explode` is `true`, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters, this property has no effect.", + "type": "boolean" + } + }, + { + "schema": { + "description": "Requred when `style` and `explode` are set. This is the schema defining the type used for the parameter. It is validated using `draft4` for JSON Schema draft 4 compliant validator. In addition to being a valid JSON Schema, the parameter schema MUST have a top-level `type` property to enable proper deserialization before validating.", + "type": "string" + } + } + ] + }, + "required": false + } + }, + { + "verbose_response": { + "description": "If enabled, the plugin returns more verbose and detailed validation errors.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "content_type_parameter_validation": { + "description": "Determines whether to enable parameters validation of request content-type.", + "type": "boolean", + "default": true, + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-validator/3.11.x.json b/schemas/request-validator/3.11.x.json new file mode 100644 index 00000000..9c8e96b9 --- /dev/null +++ b/schemas/request-validator/3.11.x.json @@ -0,0 +1,193 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "entity_checks": [ + { + "at_least_one_of": [ + "body_schema", + "parameter_schema" + ] + } + ], + "fields": [ + { + "body_schema": { + "required": false, + "description": "The request body schema specification. One of `body_schema` or `parameter_schema` must be specified.", + "type": "string" + } + }, + { + "allowed_content_types": { + "type": "set", + "description": "List of allowed content types. The value can be configured with the `charset` parameter. For example, `application/json; charset=UTF-8`.", + "default": [ + "application/json" + ], + "elements": { + "type": "string", + "required": true + } + } + }, + { + "version": { + "required": true, + "description": "Which validator to use. Supported values are `kong` (default) for using Kong's own schema validator, or `draft4`, `draft7`, `draft201909`, and `draft202012` for using their respective JSON Schema Draft compliant validators.", + "one_of": [ + "kong", + "draft4", + "draft6", + "draft7", + "draft201909", + "draft202012" + ], + "default": "kong", + "type": "string" + } + }, + { + "parameter_schema": { + "type": "array", + "required": false, + "description": "Array of parameter validator specification. One of `body_schema` or `parameter_schema` must be specified.", + "elements": { + "entity_checks": [ + { + "mutually_required": [ + "style", + "explode", + "schema" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "style", + "in" + ] + } + } + ], + "fields": [ + { + "in": { + "one_of": [ + "query", + "header", + "path" + ], + "required": true, + "description": "The location of the parameter.", + "type": "string" + } + }, + { + "name": { + "required": true, + "description": "The name of the parameter. Parameter names are case-sensitive, and correspond to the parameter name used by the `in` property. If `in` is `path`, the `name` field MUST correspond to the named capture group from the configured `route`.", + "type": "string" + } + }, + { + "required": { + "required": true, + "description": "Determines whether this parameter is mandatory.", + "type": "boolean" + } + }, + { + "style": { + "one_of": [ + "label", + "form", + "matrix", + "simple", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ], + "description": "Required when `schema` and `explode` are set. Describes how the parameter value will be deserialized depending on the type of the parameter value.", + "type": "string" + } + }, + { + "explode": { + "description": "Required when `schema` and `style` are set. When `explode` is `true`, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters, this property has no effect.", + "type": "boolean" + } + }, + { + "schema": { + "description": "Required when `style` and `explode` are set. This is the schema defining the type used for the parameter. It is validated using `draft4` for JSON Schema draft 4 compliant validator. In addition to being a valid JSON Schema, the parameter schema MUST have a top-level `type` property to enable proper deserialization before validating.", + "type": "string" + } + } + ], + "type": "record" + } + } + }, + { + "verbose_response": { + "default": false, + "required": true, + "description": "If enabled, the plugin returns more verbose and detailed validation errors.", + "type": "boolean" + } + }, + { + "content_type_parameter_validation": { + "default": true, + "required": true, + "description": "Determines whether to enable parameters validation of request content-type.", + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-validator/3.12.x.json b/schemas/request-validator/3.12.x.json new file mode 100644 index 00000000..4dad5981 --- /dev/null +++ b/schemas/request-validator/3.12.x.json @@ -0,0 +1,193 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "body_schema": { + "type": "string", + "description": "The request body schema specification. One of `body_schema` or `parameter_schema` must be specified.", + "required": false + } + }, + { + "allowed_content_types": { + "type": "set", + "default": [ + "application/json" + ], + "description": "List of allowed content types. The value can be configured with the `charset` parameter. For example, `application/json; charset=UTF-8`.", + "elements": { + "type": "string", + "required": true + } + } + }, + { + "version": { + "type": "string", + "required": true, + "description": "Which validator to use. Supported values are `kong` (default) for using Kong's own schema validator, or `draft4`, `draft7`, `draft201909`, and `draft202012` for using their respective JSON Schema Draft compliant validators.", + "default": "kong", + "one_of": [ + "kong", + "draft4", + "draft6", + "draft7", + "draft201909", + "draft202012" + ] + } + }, + { + "parameter_schema": { + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "in": { + "type": "string", + "description": "The location of the parameter.", + "one_of": [ + "query", + "header", + "path" + ], + "required": true + } + }, + { + "name": { + "type": "string", + "description": "The name of the parameter. Parameter names are case-sensitive, and correspond to the parameter name used by the `in` property. If `in` is `path`, the `name` field MUST correspond to the named capture group from the configured `route`.", + "required": true + } + }, + { + "required": { + "type": "boolean", + "description": "Determines whether this parameter is mandatory.", + "required": true + } + }, + { + "style": { + "type": "string", + "one_of": [ + "label", + "form", + "matrix", + "simple", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ], + "description": "Required when `schema` and `explode` are set. Describes how the parameter value will be deserialized depending on the type of the parameter value." + } + }, + { + "explode": { + "description": "Required when `schema` and `style` are set. When `explode` is `true`, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters, this property has no effect.", + "type": "boolean" + } + }, + { + "schema": { + "type": "string", + "description": "Required when `style` and `explode` are set. This is the schema defining the type used for the parameter. It is validated using `draft4` for JSON Schema draft 4 compliant validator. In addition to being a valid JSON Schema, the parameter schema MUST have a top-level `type` property to enable proper deserialization before validating." + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "style", + "explode", + "schema" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "style", + "in" + ] + } + } + ] + }, + "description": "Array of parameter validator specification. One of `body_schema` or `parameter_schema` must be specified.", + "required": false + } + }, + { + "verbose_response": { + "type": "boolean", + "default": false, + "description": "If enabled, the plugin returns more verbose and detailed validation errors.", + "required": true + } + }, + { + "content_type_parameter_validation": { + "type": "boolean", + "default": true, + "description": "Determines whether to enable parameters validation of request content-type.", + "required": true + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "body_schema", + "parameter_schema" + ] + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-validator/3.4.x.json b/schemas/request-validator/3.4.x.json index e3e314b2..91fbb7eb 100644 --- a/schemas/request-validator/3.4.x.json +++ b/schemas/request-validator/3.4.x.json @@ -8,43 +8,45 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, - "entity_checks": [ - { - "at_least_one_of": [ - "body_schema", - "parameter_schema" - ] - } - ], "fields": [ { "body_schema": { "required": false, + "description": "The request body schema specification. One of `body_schema` or `parameter_schema` must be specified.", "type": "string" } }, { "allowed_content_types": { - "type": "set", "default": [ "application/json" ], + "description": "List of allowed content types. The value can be configured with the `charset` parameter. For example, `application/json; charset=UTF-8`.", + "type": "set", "elements": { "type": "string", "required": true @@ -53,58 +55,45 @@ }, { "version": { + "default": "kong", + "required": true, "one_of": [ "kong", "draft4" ], - "default": "kong", - "type": "string", - "required": true + "description": "Which validator to use. Supported values are `kong` (default) for using Kong's own schema validator, or `draft4` for using a JSON Schema Draft 4-compliant validator.", + "type": "string" } }, { "parameter_schema": { - "type": "array", "required": false, + "type": "array", "elements": { - "entity_checks": [ - { - "mutually_required": [ - "style", - "explode", - "schema" - ] - }, - { - "custom_entity_check": { - "field_sources": [ - "style", - "in" - ] - } - } - ], "fields": [ { "in": { - "required": true, "type": "string", "one_of": [ "query", "header", "path" - ] + ], + "description": "The location of the parameter.", + "required": true } }, { "name": { "required": true, + "description": "The name of the parameter. Parameter names are case-sensitive, and correspond to the parameter name used by the `in` property. If `in` is `path`, the `name` field MUST correspond to the named capture group from the configured `route`.", "type": "string" } }, { "required": { "required": true, + "description": "Determines whether this parameter is mandatory.", "type": "boolean" } }, @@ -119,33 +108,73 @@ "pipeDelimited", "deepObject" ], + "description": "Required when `schema` and `explode` are set. Describes how the parameter value will be deserialized depending on the type of the parameter value.", "type": "string" } }, { "explode": { + "description": "Required when `schema` and `style` are set. When `explode` is `true`, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters, this property has no effect.", "type": "boolean" } }, { "schema": { + "description": "Requred when `style` and `explode` are set. This is the schema defining the type used for the parameter. It is validated using `draft4` for JSON Schema draft 4 compliant validator. In addition to being a valid JSON Schema, the parameter schema MUST have a top-level `type` property to enable proper deserialization before validating.", "type": "string" } } ], + "entity_checks": [ + { + "mutually_required": [ + "style", + "explode", + "schema" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "style", + "in" + ] + } + } + ], "type": "record" - } + }, + "description": "Array of parameter validator specification. One of `body_schema` or `parameter_schema` must be specified." } }, { "verbose_response": { + "default": false, "type": "boolean", - "required": true, - "default": false + "description": "If enabled, the plugin returns more verbose and detailed validation errors.", + "required": true } } ], - "type": "record" + "entity_checks": [ + { + "at_least_one_of": [ + "body_schema", + "parameter_schema" + ] + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] } } ] diff --git a/schemas/request-validator/3.5.x.json b/schemas/request-validator/3.5.x.json new file mode 100644 index 00000000..d6edae38 --- /dev/null +++ b/schemas/request-validator/3.5.x.json @@ -0,0 +1,181 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "body_schema", + "parameter_schema" + ] + } + ], + "fields": [ + { + "body_schema": { + "required": false, + "type": "string", + "description": "The request body schema specification. One of `body_schema` or `parameter_schema` must be specified." + } + }, + { + "allowed_content_types": { + "description": "List of allowed content types. The value can be configured with the `charset` parameter. For example, `application/json; charset=UTF-8`.", + "default": [ + "application/json" + ], + "type": "set", + "elements": { + "type": "string", + "required": true + } + } + }, + { + "version": { + "type": "string", + "required": true, + "default": "kong", + "one_of": [ + "kong", + "draft4" + ], + "description": "Which validator to use. Supported values are `kong` (default) for using Kong's own schema validator, or `draft4` for using a JSON Schema Draft 4-compliant validator." + } + }, + { + "parameter_schema": { + "required": false, + "elements": { + "fields": [ + { + "in": { + "description": "The location of the parameter.", + "one_of": [ + "query", + "header", + "path" + ], + "type": "string", + "required": true + } + }, + { + "name": { + "required": true, + "type": "string", + "description": "The name of the parameter. Parameter names are case-sensitive, and correspond to the parameter name used by the `in` property. If `in` is `path`, the `name` field MUST correspond to the named capture group from the configured `route`." + } + }, + { + "required": { + "required": true, + "type": "boolean", + "description": "Determines whether this parameter is mandatory." + } + }, + { + "style": { + "one_of": [ + "label", + "form", + "matrix", + "simple", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ], + "type": "string", + "description": "Required when `schema` and `explode` are set. Describes how the parameter value will be deserialized depending on the type of the parameter value." + } + }, + { + "explode": { + "type": "boolean", + "description": "Required when `schema` and `style` are set. When `explode` is `true`, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters, this property has no effect." + } + }, + { + "schema": { + "type": "string", + "description": "Requred when `style` and `explode` are set. This is the schema defining the type used for the parameter. It is validated using `draft4` for JSON Schema draft 4 compliant validator. In addition to being a valid JSON Schema, the parameter schema MUST have a top-level `type` property to enable proper deserialization before validating." + } + } + ], + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "style", + "explode", + "schema" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "style", + "in" + ] + } + } + ] + }, + "type": "array", + "description": "Array of parameter validator specification. One of `body_schema` or `parameter_schema` must be specified." + } + }, + { + "verbose_response": { + "description": "If enabled, the plugin returns more verbose and detailed validation errors.", + "default": false, + "type": "boolean", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-validator/3.6.x.json b/schemas/request-validator/3.6.x.json new file mode 100644 index 00000000..a15acec3 --- /dev/null +++ b/schemas/request-validator/3.6.x.json @@ -0,0 +1,189 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "body_schema", + "parameter_schema" + ] + } + ], + "type": "record", + "fields": [ + { + "body_schema": { + "required": false, + "type": "string", + "description": "The request body schema specification. One of `body_schema` or `parameter_schema` must be specified." + } + }, + { + "allowed_content_types": { + "elements": { + "required": true, + "type": "string" + }, + "type": "set", + "description": "List of allowed content types. The value can be configured with the `charset` parameter. For example, `application/json; charset=UTF-8`.", + "default": [ + "application/json" + ] + } + }, + { + "version": { + "type": "string", + "default": "kong", + "required": true, + "description": "Which validator to use. Supported values are `kong` (default) for using Kong's own schema validator, or `draft4` for using a JSON Schema Draft 4-compliant validator.", + "one_of": [ + "kong", + "draft4" + ] + } + }, + { + "parameter_schema": { + "required": false, + "type": "array", + "description": "Array of parameter validator specification. One of `body_schema` or `parameter_schema` must be specified.", + "elements": { + "entity_checks": [ + { + "mutually_required": [ + "style", + "explode", + "schema" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "style", + "in" + ] + } + } + ], + "type": "record", + "fields": [ + { + "in": { + "required": true, + "type": "string", + "description": "The location of the parameter.", + "one_of": [ + "query", + "header", + "path" + ] + } + }, + { + "name": { + "required": true, + "type": "string", + "description": "The name of the parameter. Parameter names are case-sensitive, and correspond to the parameter name used by the `in` property. If `in` is `path`, the `name` field MUST correspond to the named capture group from the configured `route`." + } + }, + { + "required": { + "required": true, + "type": "boolean", + "description": "Determines whether this parameter is mandatory." + } + }, + { + "style": { + "one_of": [ + "label", + "form", + "matrix", + "simple", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ], + "type": "string", + "description": "Required when `schema` and `explode` are set. Describes how the parameter value will be deserialized depending on the type of the parameter value." + } + }, + { + "explode": { + "description": "Required when `schema` and `style` are set. When `explode` is `true`, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters, this property has no effect.", + "type": "boolean" + } + }, + { + "schema": { + "description": "Requred when `style` and `explode` are set. This is the schema defining the type used for the parameter. It is validated using `draft4` for JSON Schema draft 4 compliant validator. In addition to being a valid JSON Schema, the parameter schema MUST have a top-level `type` property to enable proper deserialization before validating.", + "type": "string" + } + } + ] + } + } + }, + { + "verbose_response": { + "required": true, + "type": "boolean", + "description": "If enabled, the plugin returns more verbose and detailed validation errors.", + "default": false + } + }, + { + "content_type_parameter_validation": { + "default": true, + "required": true, + "description": "Determines whether to enable parameters validation of request content-type.", + "type": "boolean" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-validator/3.7.x.json b/schemas/request-validator/3.7.x.json new file mode 100644 index 00000000..6a4c7c46 --- /dev/null +++ b/schemas/request-validator/3.7.x.json @@ -0,0 +1,189 @@ +{ + "fields": [ + { + "protocols": { + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "description": "A set of strings representing HTTP protocols.", + "required": true + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumer_groups", + "eq": null, + "type": "foreign" + } + }, + { + "config": { + "fields": [ + { + "body_schema": { + "required": false, + "type": "string", + "description": "The request body schema specification. One of `body_schema` or `parameter_schema` must be specified." + } + }, + { + "allowed_content_types": { + "default": [ + "application/json" + ], + "elements": { + "type": "string", + "required": true + }, + "type": "set", + "description": "List of allowed content types. The value can be configured with the `charset` parameter. For example, `application/json; charset=UTF-8`." + } + }, + { + "version": { + "default": "kong", + "one_of": [ + "kong", + "draft4" + ], + "description": "Which validator to use. Supported values are `kong` (default) for using Kong's own schema validator, or `draft4` for using a JSON Schema Draft 4-compliant validator.", + "required": true, + "type": "string" + } + }, + { + "parameter_schema": { + "required": false, + "elements": { + "fields": [ + { + "in": { + "required": true, + "description": "The location of the parameter.", + "one_of": [ + "query", + "header", + "path" + ], + "type": "string" + } + }, + { + "name": { + "required": true, + "type": "string", + "description": "The name of the parameter. Parameter names are case-sensitive, and correspond to the parameter name used by the `in` property. If `in` is `path`, the `name` field MUST correspond to the named capture group from the configured `route`." + } + }, + { + "required": { + "required": true, + "type": "boolean", + "description": "Determines whether this parameter is mandatory." + } + }, + { + "style": { + "type": "string", + "one_of": [ + "label", + "form", + "matrix", + "simple", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ], + "description": "Required when `schema` and `explode` are set. Describes how the parameter value will be deserialized depending on the type of the parameter value." + } + }, + { + "explode": { + "description": "Required when `schema` and `style` are set. When `explode` is `true`, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters, this property has no effect.", + "type": "boolean" + } + }, + { + "schema": { + "type": "string", + "description": "Requred when `style` and `explode` are set. This is the schema defining the type used for the parameter. It is validated using `draft4` for JSON Schema draft 4 compliant validator. In addition to being a valid JSON Schema, the parameter schema MUST have a top-level `type` property to enable proper deserialization before validating." + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "style", + "explode", + "schema" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "style", + "in" + ] + } + } + ], + "type": "record" + }, + "description": "Array of parameter validator specification. One of `body_schema` or `parameter_schema` must be specified.", + "type": "array" + } + }, + { + "verbose_response": { + "default": false, + "required": true, + "description": "If enabled, the plugin returns more verbose and detailed validation errors.", + "type": "boolean" + } + }, + { + "content_type_parameter_validation": { + "default": true, + "required": true, + "description": "Determines whether to enable parameters validation of request content-type.", + "type": "boolean" + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "body_schema", + "parameter_schema" + ] + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-validator/3.8.x.json b/schemas/request-validator/3.8.x.json new file mode 100644 index 00000000..c334e59e --- /dev/null +++ b/schemas/request-validator/3.8.x.json @@ -0,0 +1,189 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "body_schema": { + "description": "The request body schema specification. One of `body_schema` or `parameter_schema` must be specified.", + "required": false, + "type": "string" + } + }, + { + "allowed_content_types": { + "description": "List of allowed content types. The value can be configured with the `charset` parameter. For example, `application/json; charset=UTF-8`.", + "type": "set", + "default": [ + "application/json" + ], + "elements": { + "required": true, + "type": "string" + } + } + }, + { + "version": { + "description": "Which validator to use. Supported values are `kong` (default) for using Kong's own schema validator, or `draft4` for using a JSON Schema Draft 4-compliant validator.", + "required": true, + "one_of": [ + "kong", + "draft4" + ], + "type": "string", + "default": "kong" + } + }, + { + "parameter_schema": { + "description": "Array of parameter validator specification. One of `body_schema` or `parameter_schema` must be specified.", + "type": "array", + "required": false, + "elements": { + "fields": [ + { + "in": { + "description": "The location of the parameter.", + "type": "string", + "required": true, + "one_of": [ + "query", + "header", + "path" + ] + } + }, + { + "name": { + "description": "The name of the parameter. Parameter names are case-sensitive, and correspond to the parameter name used by the `in` property. If `in` is `path`, the `name` field MUST correspond to the named capture group from the configured `route`.", + "required": true, + "type": "string" + } + }, + { + "required": { + "description": "Determines whether this parameter is mandatory.", + "required": true, + "type": "boolean" + } + }, + { + "style": { + "description": "Required when `schema` and `explode` are set. Describes how the parameter value will be deserialized depending on the type of the parameter value.", + "type": "string", + "one_of": [ + "label", + "form", + "matrix", + "simple", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ] + } + }, + { + "explode": { + "description": "Required when `schema` and `style` are set. When `explode` is `true`, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters, this property has no effect.", + "type": "boolean" + } + }, + { + "schema": { + "description": "Requred when `style` and `explode` are set. This is the schema defining the type used for the parameter. It is validated using `draft4` for JSON Schema draft 4 compliant validator. In addition to being a valid JSON Schema, the parameter schema MUST have a top-level `type` property to enable proper deserialization before validating.", + "type": "string" + } + } + ], + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "style", + "explode", + "schema" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "style", + "in" + ] + } + } + ] + } + } + }, + { + "verbose_response": { + "description": "If enabled, the plugin returns more verbose and detailed validation errors.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "content_type_parameter_validation": { + "description": "Determines whether to enable parameters validation of request content-type.", + "type": "boolean", + "required": true, + "default": true + } + } + ], + "type": "record", + "entity_checks": [ + { + "at_least_one_of": [ + "body_schema", + "parameter_schema" + ] + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/request-validator/3.9.x.json b/schemas/request-validator/3.9.x.json new file mode 100644 index 00000000..b8b9d41d --- /dev/null +++ b/schemas/request-validator/3.9.x.json @@ -0,0 +1,189 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "body_schema", + "parameter_schema" + ] + } + ], + "fields": [ + { + "body_schema": { + "description": "The request body schema specification. One of `body_schema` or `parameter_schema` must be specified.", + "required": false, + "type": "string" + } + }, + { + "allowed_content_types": { + "default": [ + "application/json" + ], + "description": "List of allowed content types. The value can be configured with the `charset` parameter. For example, `application/json; charset=UTF-8`.", + "elements": { + "required": true, + "type": "string" + }, + "type": "set" + } + }, + { + "version": { + "required": true, + "type": "string", + "default": "kong", + "description": "Which validator to use. Supported values are `kong` (default) for using Kong's own schema validator, or `draft4` for using a JSON Schema Draft 4-compliant validator.", + "one_of": [ + "kong", + "draft4" + ] + } + }, + { + "parameter_schema": { + "elements": { + "entity_checks": [ + { + "mutually_required": [ + "style", + "explode", + "schema" + ] + }, + { + "custom_entity_check": { + "field_sources": [ + "style", + "in" + ] + } + } + ], + "fields": [ + { + "in": { + "type": "string", + "description": "The location of the parameter.", + "required": true, + "one_of": [ + "query", + "header", + "path" + ] + } + }, + { + "name": { + "description": "The name of the parameter. Parameter names are case-sensitive, and correspond to the parameter name used by the `in` property. If `in` is `path`, the `name` field MUST correspond to the named capture group from the configured `route`.", + "required": true, + "type": "string" + } + }, + { + "required": { + "description": "Determines whether this parameter is mandatory.", + "required": true, + "type": "boolean" + } + }, + { + "style": { + "description": "Required when `schema` and `explode` are set. Describes how the parameter value will be deserialized depending on the type of the parameter value.", + "type": "string", + "one_of": [ + "label", + "form", + "matrix", + "simple", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ] + } + }, + { + "explode": { + "type": "boolean", + "description": "Required when `schema` and `style` are set. When `explode` is `true`, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters, this property has no effect." + } + }, + { + "schema": { + "type": "string", + "description": "Requred when `style` and `explode` are set. This is the schema defining the type used for the parameter. It is validated using `draft4` for JSON Schema draft 4 compliant validator. In addition to being a valid JSON Schema, the parameter schema MUST have a top-level `type` property to enable proper deserialization before validating." + } + } + ], + "type": "record" + }, + "description": "Array of parameter validator specification. One of `body_schema` or `parameter_schema` must be specified.", + "required": false, + "type": "array" + } + }, + { + "verbose_response": { + "default": false, + "description": "If enabled, the plugin returns more verbose and detailed validation errors.", + "required": true, + "type": "boolean" + } + }, + { + "content_type_parameter_validation": { + "default": true, + "description": "Determines whether to enable parameters validation of request content-type.", + "required": true, + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/response-ratelimiting/3.10.x.json b/schemas/response-ratelimiting/3.10.x.json new file mode 100644 index 00000000..5f746c6c --- /dev/null +++ b/schemas/response-ratelimiting/3.10.x.json @@ -0,0 +1,444 @@ +{ + "entity_checks": [ + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.host", + "if_field": "config.policy", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.port", + "if_field": "config.policy", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.timeout", + "if_field": "config.policy", + "then_match": { + "required": true + } + } + } + ], + "supported_partials": { + "redis-ce": [ + "config.redis" + ] + }, + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "header_name": { + "description": "The name of the response header used to increment the counters.", + "type": "string", + "default": "x-kong-limit" + } + }, + { + "limit_by": { + "description": "The entity that will be used when aggregating the limits: `consumer`, `credential`, `ip`. If the `consumer` or the `credential` cannot be determined, the system will always fallback to `ip`.", + "default": "consumer", + "type": "string", + "one_of": [ + "consumer", + "credential", + "ip" + ] + } + }, + { + "policy": { + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "default": "local", + "type": "string", + "one_of": [ + "local", + "cluster", + "redis" + ] + } + }, + { + "fault_tolerant": { + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party datastore. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the datastore is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean", + "default": true, + "required": true + } + }, + { + "redis": { + "description": "Redis configuration", + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "type": "string", + "referenceable": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "len_min": 0 + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + } + ], + "required": true + } + }, + { + "block_on_first_violation": { + "description": "A boolean value that determines if the requests should be blocked as soon as one limit is being exceeded. This will block requests that are supposed to consume other limits too.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "hide_client_headers": { + "description": "Optionally hide informative response headers.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "limits": { + "type": "map", + "len_min": 1, + "description": "A map that defines rate limits for the plugin.", + "values": { + "entity_checks": [ + { + "at_least_one_of": [ + "second", + "minute", + "hour", + "day", + "month", + "year" + ] + } + ], + "type": "record", + "required": true, + "fields": [ + { + "second": { + "gt": 0, + "type": "number" + } + }, + { + "minute": { + "gt": 0, + "type": "number" + } + }, + { + "hour": { + "gt": 0, + "type": "number" + } + }, + { + "day": { + "gt": 0, + "type": "number" + } + }, + { + "month": { + "gt": 0, + "type": "number" + } + }, + { + "year": { + "gt": 0, + "type": "number" + } + } + ] + }, + "keys": { + "type": "string" + }, + "required": true + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "redis_host": { + "deprecation": { + "message": "response-ratelimiting: config.redis_host is deprecated, please use config.redis.host instead", + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "redis_port": { + "deprecation": { + "message": "response-ratelimiting: config.redis_port is deprecated, please use config.redis.port instead", + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "redis_password": { + "type": "string", + "len_min": 0, + "deprecation": { + "message": "response-ratelimiting: config.redis_password is deprecated, please use config.redis.password instead", + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "redis_username": { + "deprecation": { + "message": "response-ratelimiting: config.redis_username is deprecated, please use config.redis.username instead", + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "redis_ssl": { + "deprecation": { + "message": "response-ratelimiting: config.redis_ssl is deprecated, please use config.redis.ssl instead", + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "boolean" + } + }, + { + "redis_ssl_verify": { + "deprecation": { + "message": "response-ratelimiting: config.redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead", + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "boolean" + } + }, + { + "redis_server_name": { + "deprecation": { + "message": "response-ratelimiting: config.redis_server_name is deprecated, please use config.redis.server_name instead", + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "redis_timeout": { + "deprecation": { + "message": "response-ratelimiting: config.redis_timeout is deprecated, please use config.redis.timeout instead", + "replaced_with": [ + { + "path": [ + "redis", + "timeout" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "redis_database": { + "deprecation": { + "message": "response-ratelimiting: config.redis_database is deprecated, please use config.redis.database instead", + "replaced_with": [ + { + "path": [ + "redis", + "database" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/response-ratelimiting/3.11.x.json b/schemas/response-ratelimiting/3.11.x.json new file mode 100644 index 00000000..32fbdc11 --- /dev/null +++ b/schemas/response-ratelimiting/3.11.x.json @@ -0,0 +1,444 @@ +{ + "entity_checks": [ + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.host", + "if_field": "config.policy", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.port", + "if_field": "config.policy", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.timeout", + "if_field": "config.policy", + "then_match": { + "required": true + } + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "fields": [ + { + "header_name": { + "default": "x-kong-limit", + "description": "The name of the response header used to increment the counters.", + "type": "string" + } + }, + { + "limit_by": { + "one_of": [ + "consumer", + "credential", + "ip" + ], + "default": "consumer", + "description": "The entity that will be used when aggregating the limits: `consumer`, `credential`, `ip`. If the `consumer` or the `credential` cannot be determined, the system will always fallback to `ip`.", + "type": "string" + } + }, + { + "policy": { + "one_of": [ + "local", + "cluster", + "redis" + ], + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "type": "string" + } + }, + { + "fault_tolerant": { + "default": true, + "required": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party datastore. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the datastore is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean" + } + }, + { + "redis": { + "description": "Redis configuration", + "required": true, + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "len_min": 0, + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "block_on_first_violation": { + "default": false, + "required": true, + "description": "A boolean value that determines if the requests should be blocked as soon as one limit is being exceeded. This will block requests that are supposed to consume other limits too.", + "type": "boolean" + } + }, + { + "hide_client_headers": { + "default": false, + "required": true, + "description": "Optionally hide informative response headers.", + "type": "boolean" + } + }, + { + "limits": { + "required": true, + "description": "A map that defines rate limits for the plugin.", + "len_min": 1, + "keys": { + "type": "string" + }, + "values": { + "required": true, + "entity_checks": [ + { + "at_least_one_of": [ + "second", + "minute", + "hour", + "day", + "month", + "year" + ] + } + ], + "fields": [ + { + "second": { + "gt": 0, + "type": "number" + } + }, + { + "minute": { + "gt": 0, + "type": "number" + } + }, + { + "hour": { + "gt": 0, + "type": "number" + } + }, + { + "day": { + "gt": 0, + "type": "number" + } + }, + { + "month": { + "gt": 0, + "type": "number" + } + }, + { + "year": { + "gt": 0, + "type": "number" + } + } + ], + "type": "record" + }, + "type": "map" + } + } + ], + "required": true, + "shorthand_fields": [ + { + "redis_host": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ], + "message": "response-ratelimiting: config.redis_host is deprecated, please use config.redis.host instead" + }, + "type": "string" + } + }, + { + "redis_port": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ], + "message": "response-ratelimiting: config.redis_port is deprecated, please use config.redis.port instead" + }, + "type": "integer" + } + }, + { + "redis_password": { + "len_min": 0, + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ], + "message": "response-ratelimiting: config.redis_password is deprecated, please use config.redis.password instead" + }, + "type": "string" + } + }, + { + "redis_username": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ], + "message": "response-ratelimiting: config.redis_username is deprecated, please use config.redis.username instead" + }, + "type": "string" + } + }, + { + "redis_ssl": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ], + "message": "response-ratelimiting: config.redis_ssl is deprecated, please use config.redis.ssl instead" + }, + "type": "boolean" + } + }, + { + "redis_ssl_verify": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ], + "message": "response-ratelimiting: config.redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead" + }, + "type": "boolean" + } + }, + { + "redis_server_name": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ], + "message": "response-ratelimiting: config.redis_server_name is deprecated, please use config.redis.server_name instead" + }, + "type": "string" + } + }, + { + "redis_timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "timeout" + ] + } + ], + "message": "response-ratelimiting: config.redis_timeout is deprecated, please use config.redis.timeout instead" + }, + "type": "integer" + } + }, + { + "redis_database": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "database" + ] + } + ], + "message": "response-ratelimiting: config.redis_database is deprecated, please use config.redis.database instead" + }, + "type": "integer" + } + } + ], + "type": "record" + } + } + ], + "supported_partials": { + "redis-ce": [ + "config.redis" + ] + } +} \ No newline at end of file diff --git a/schemas/response-ratelimiting/3.12.x.json b/schemas/response-ratelimiting/3.12.x.json new file mode 100644 index 00000000..bf720c50 --- /dev/null +++ b/schemas/response-ratelimiting/3.12.x.json @@ -0,0 +1,444 @@ +{ + "supported_partials": { + "redis-ce": [ + "config.redis" + ] + }, + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "header_name": { + "description": "The name of the response header used to increment the counters.", + "default": "x-kong-limit", + "type": "string" + } + }, + { + "limit_by": { + "description": "The entity that will be used when aggregating the limits: `consumer`, `credential`, `ip`. If the `consumer` or the `credential` cannot be determined, the system will always fallback to `ip`.", + "default": "consumer", + "one_of": [ + "consumer", + "credential", + "ip" + ], + "type": "string" + } + }, + { + "policy": { + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "default": "local", + "one_of": [ + "local", + "cluster", + "redis" + ], + "type": "string" + } + }, + { + "fault_tolerant": { + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party datastore. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the datastore is working again. If `false`, then the clients will see `500` errors.", + "default": true, + "type": "boolean", + "required": true + } + }, + { + "redis": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "type": "string", + "len_min": 0, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + } + ], + "description": "Redis configuration", + "required": true + } + }, + { + "block_on_first_violation": { + "description": "A boolean value that determines if the requests should be blocked as soon as one limit is being exceeded. This will block requests that are supposed to consume other limits too.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "hide_client_headers": { + "description": "Optionally hide informative response headers.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "limits": { + "type": "map", + "len_min": 1, + "required": true, + "description": "A map that defines rate limits for the plugin.", + "values": { + "type": "record", + "fields": [ + { + "second": { + "type": "number", + "gt": 0 + } + }, + { + "minute": { + "type": "number", + "gt": 0 + } + }, + { + "hour": { + "type": "number", + "gt": 0 + } + }, + { + "day": { + "type": "number", + "gt": 0 + } + }, + { + "month": { + "type": "number", + "gt": 0 + } + }, + { + "year": { + "type": "number", + "gt": 0 + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "second", + "minute", + "hour", + "day", + "month", + "year" + ] + } + ], + "required": true + }, + "keys": { + "type": "string" + } + } + } + ], + "shorthand_fields": [ + { + "redis_host": { + "type": "string", + "deprecation": { + "message": "response-ratelimiting: config.redis_host is deprecated, please use config.redis.host instead", + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "redis_port": { + "type": "integer", + "deprecation": { + "message": "response-ratelimiting: config.redis_port is deprecated, please use config.redis.port instead", + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "redis_password": { + "type": "string", + "len_min": 0, + "deprecation": { + "message": "response-ratelimiting: config.redis_password is deprecated, please use config.redis.password instead", + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "redis_username": { + "type": "string", + "deprecation": { + "message": "response-ratelimiting: config.redis_username is deprecated, please use config.redis.username instead", + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "redis_ssl": { + "type": "boolean", + "deprecation": { + "message": "response-ratelimiting: config.redis_ssl is deprecated, please use config.redis.ssl instead", + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "redis_ssl_verify": { + "type": "boolean", + "deprecation": { + "message": "response-ratelimiting: config.redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead", + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "redis_server_name": { + "type": "string", + "deprecation": { + "message": "response-ratelimiting: config.redis_server_name is deprecated, please use config.redis.server_name instead", + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "redis_timeout": { + "type": "integer", + "deprecation": { + "message": "response-ratelimiting: config.redis_timeout is deprecated, please use config.redis.timeout instead", + "replaced_with": [ + { + "path": [ + "redis", + "timeout" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "redis_database": { + "type": "integer", + "deprecation": { + "message": "response-ratelimiting: config.redis_database is deprecated, please use config.redis.database instead", + "replaced_with": [ + { + "path": [ + "redis", + "database" + ] + } + ], + "removal_in_version": "4.0" + } + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.host", + "if_field": "config.policy" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.port", + "if_field": "config.policy" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.timeout", + "if_field": "config.policy" + } + } + ] +} \ No newline at end of file diff --git a/schemas/response-ratelimiting/3.4.x.json b/schemas/response-ratelimiting/3.4.x.json index 3dbf1716..301d1410 100644 --- a/schemas/response-ratelimiting/3.4.x.json +++ b/schemas/response-ratelimiting/3.4.x.json @@ -8,197 +8,260 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "header_name": { + "default": "x-kong-limit", "type": "string", - "default": "x-kong-limit" + "description": "The name of the response header used to increment the counters." } }, { "limit_by": { "default": "consumer", - "type": "string", "one_of": [ "consumer", "credential", "ip" - ] + ], + "type": "string", + "description": "The entity that will be used when aggregating the limits: `consumer`, `credential`, `ip`. If the `consumer` or the `credential` cannot be determined, the system will always fallback to `ip`." } }, { "policy": { "default": "local", - "type": "string", "one_of": [ "local", "cluster", "redis" - ] + ], + "type": "string", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits." } }, { "fault_tolerant": { + "default": true, "type": "boolean", "required": true, - "default": true + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party datastore. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the datastore is working again. If `false`, then the clients will see `500` errors." } }, { "redis_host": { - "type": "string" + "type": "string", + "description": "When using the `redis` policy, this property specifies the address to the Redis server." } }, { "redis_port": { + "default": 6379, + "description": "When using the `redis` policy, this property specifies the port of the Redis server.", "between": [ 0, 65535 ], - "type": "integer", - "default": 6379 + "type": "integer" } }, { "redis_password": { "len_min": 0, + "referenceable": true, "type": "string", - "referenceable": true + "description": "When using the `redis` policy, this property specifies the password to connect to the Redis server." } }, { "redis_username": { + "referenceable": true, "type": "string", - "referenceable": true + "description": "When using the `redis` policy, this property specifies the username to connect to the Redis server when ACL authentication is desired.\nThis requires Redis v6.0.0+. The username **cannot** be set to `default`." } }, { "redis_ssl": { + "default": false, "type": "boolean", "required": true, - "default": false + "description": "When using the `redis` policy, this property specifies if SSL is used to connect to the Redis server." } }, { "redis_ssl_verify": { + "default": false, "type": "boolean", "required": true, - "default": false + "description": "When using the `redis` policy with `redis_ssl` set to `true`, this property specifies if the server SSL certificate is validated. Note that you need to configure the `lua_ssl_trusted_certificate` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly." } }, { "redis_server_name": { - "type": "string" + "type": "string", + "description": "When using the `redis` policy with `redis_ssl` set to `true`, this property specifies the server name for the TLS extension Server Name Indication (SNI)." } }, { "redis_timeout": { + "default": 2000, "type": "number", - "default": 2000 + "description": "When using the `redis` policy, this property specifies the timeout in milliseconds of any command submitted to the Redis server." } }, { "redis_database": { + "default": 0, "type": "number", - "default": 0 + "description": "When using the `redis` policy, this property specifies Redis database to use." } }, { "block_on_first_violation": { + "default": false, "type": "boolean", "required": true, - "default": false + "description": "A boolean value that determines if the requests should be blocked as soon as one limit is being exceeded. This will block requests that are supposed to consume other limits too." } }, { "hide_client_headers": { + "default": false, "type": "boolean", "required": true, - "default": false + "description": "Optionally hide informative response headers." } }, { "limits": { - "len_min": 1, "keys": { "type": "string" }, + "required": true, + "len_min": 1, + "description": "A map that defines rate limits for the plugin.", + "type": "map", "values": { - "type": "record", - "entity_checks": [ - { - "at_least_one_of": [ - "second", - "minute", - "hour", - "day", - "month", - "year" - ] - } - ], "fields": [ { "second": { - "gt": 0, - "type": "number" + "type": "number", + "gt": 0 } }, { "minute": { - "gt": 0, - "type": "number" + "type": "number", + "gt": 0 } }, { "hour": { - "gt": 0, - "type": "number" + "type": "number", + "gt": 0 } }, { "day": { - "gt": 0, - "type": "number" + "type": "number", + "gt": 0 } }, { "month": { - "gt": 0, - "type": "number" + "type": "number", + "gt": 0 } }, { "year": { - "gt": 0, - "type": "number" + "type": "number", + "gt": 0 } } ], - "required": true - }, - "required": true, - "type": "map" + "entity_checks": [ + { + "at_least_one_of": [ + "second", + "minute", + "hour", + "day", + "month", + "year" + ] + } + ], + "required": true, + "type": "record" + } } } ], - "type": "record" + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_field": "config.redis_host", + "if_match": { + "eq": "redis" + }, + "then_match": { + "required": true + }, + "if_field": "config.policy" + } + }, + { + "conditional": { + "then_field": "config.redis_port", + "if_match": { + "eq": "redis" + }, + "then_match": { + "required": true + }, + "if_field": "config.policy" + } + }, + { + "conditional": { + "then_field": "config.redis_timeout", + "if_match": { + "eq": "redis" + }, + "then_match": { + "required": true + }, + "if_field": "config.policy" } } ] diff --git a/schemas/response-ratelimiting/3.5.x.json b/schemas/response-ratelimiting/3.5.x.json new file mode 100644 index 00000000..5335fca2 --- /dev/null +++ b/schemas/response-ratelimiting/3.5.x.json @@ -0,0 +1,268 @@ +{ + "entity_checks": [ + { + "conditional": { + "then_field": "config.redis_host", + "if_field": "config.policy", + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + } + } + }, + { + "conditional": { + "then_field": "config.redis_port", + "if_field": "config.policy", + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + } + } + }, + { + "conditional": { + "then_field": "config.redis_timeout", + "if_field": "config.policy", + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + } + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumer_groups" + } + }, + { + "config": { + "fields": [ + { + "header_name": { + "description": "The name of the response header used to increment the counters.", + "type": "string", + "default": "x-kong-limit" + } + }, + { + "limit_by": { + "one_of": [ + "consumer", + "credential", + "ip" + ], + "description": "The entity that will be used when aggregating the limits: `consumer`, `credential`, `ip`. If the `consumer` or the `credential` cannot be determined, the system will always fallback to `ip`.", + "type": "string", + "default": "consumer" + } + }, + { + "policy": { + "one_of": [ + "local", + "cluster", + "redis" + ], + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "type": "string", + "default": "local" + } + }, + { + "fault_tolerant": { + "required": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party datastore. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the datastore is working again. If `false`, then the clients will see `500` errors.", + "type": "boolean", + "default": true + } + }, + { + "redis_host": { + "type": "string", + "description": "When using the `redis` policy, this property specifies the address to the Redis server." + } + }, + { + "redis_port": { + "default": 6379, + "description": "When using the `redis` policy, this property specifies the port of the Redis server.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "redis_password": { + "referenceable": true, + "description": "When using the `redis` policy, this property specifies the password to connect to the Redis server.", + "type": "string", + "len_min": 0 + } + }, + { + "redis_username": { + "referenceable": true, + "description": "When using the `redis` policy, this property specifies the username to connect to the Redis server when ACL authentication is desired.\nThis requires Redis v6.0.0+. The username **cannot** be set to `default`.", + "type": "string" + } + }, + { + "redis_ssl": { + "required": true, + "description": "When using the `redis` policy, this property specifies if SSL is used to connect to the Redis server.", + "type": "boolean", + "default": false + } + }, + { + "redis_ssl_verify": { + "required": true, + "description": "When using the `redis` policy with `redis_ssl` set to `true`, this property specifies if the server SSL certificate is validated. Note that you need to configure the `lua_ssl_trusted_certificate` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean", + "default": false + } + }, + { + "redis_server_name": { + "type": "string", + "description": "When using the `redis` policy with `redis_ssl` set to `true`, this property specifies the server name for the TLS extension Server Name Indication (SNI)." + } + }, + { + "redis_timeout": { + "description": "When using the `redis` policy, this property specifies the timeout in milliseconds of any command submitted to the Redis server.", + "type": "number", + "default": 2000 + } + }, + { + "redis_database": { + "description": "When using the `redis` policy, this property specifies Redis database to use.", + "type": "number", + "default": 0 + } + }, + { + "block_on_first_violation": { + "required": true, + "description": "A boolean value that determines if the requests should be blocked as soon as one limit is being exceeded. This will block requests that are supposed to consume other limits too.", + "type": "boolean", + "default": false + } + }, + { + "hide_client_headers": { + "required": true, + "description": "Optionally hide informative response headers.", + "type": "boolean", + "default": false + } + }, + { + "limits": { + "required": true, + "type": "map", + "len_min": 1, + "values": { + "required": true, + "entity_checks": [ + { + "at_least_one_of": [ + "second", + "minute", + "hour", + "day", + "month", + "year" + ] + } + ], + "type": "record", + "fields": [ + { + "second": { + "gt": 0, + "type": "number" + } + }, + { + "minute": { + "gt": 0, + "type": "number" + } + }, + { + "hour": { + "gt": 0, + "type": "number" + } + }, + { + "day": { + "gt": 0, + "type": "number" + } + }, + { + "month": { + "gt": 0, + "type": "number" + } + }, + { + "year": { + "gt": 0, + "type": "number" + } + } + ] + }, + "description": "A map that defines rate limits for the plugin.", + "keys": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/response-ratelimiting/3.6.x.json b/schemas/response-ratelimiting/3.6.x.json new file mode 100644 index 00000000..5ab45fb6 --- /dev/null +++ b/schemas/response-ratelimiting/3.6.x.json @@ -0,0 +1,367 @@ +{ + "entity_checks": [ + { + "conditional": { + "then_field": "config.redis.host", + "if_field": "config.policy", + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + } + } + }, + { + "conditional": { + "then_field": "config.redis.port", + "if_field": "config.policy", + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + } + } + }, + { + "conditional": { + "then_field": "config.redis.timeout", + "if_field": "config.policy", + "then_match": { + "required": true + }, + "if_match": { + "eq": "redis" + } + } + } + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "header_name": { + "type": "string", + "default": "x-kong-limit", + "description": "The name of the response header used to increment the counters." + } + }, + { + "limit_by": { + "one_of": [ + "consumer", + "credential", + "ip" + ], + "type": "string", + "default": "consumer", + "description": "The entity that will be used when aggregating the limits: `consumer`, `credential`, `ip`. If the `consumer` or the `credential` cannot be determined, the system will always fallback to `ip`." + } + }, + { + "policy": { + "one_of": [ + "local", + "cluster", + "redis" + ], + "type": "string", + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits." + } + }, + { + "fault_tolerant": { + "required": true, + "type": "boolean", + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party datastore. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the datastore is working again. If `false`, then the clients will see `500` errors." + } + }, + { + "redis": { + "required": true, + "type": "record", + "description": "Redis configuration", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "timeout": { + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "username": { + "referenceable": true, + "type": "string", + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "referenceable": true, + "type": "string", + "len_min": 0, + "encrypted": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis." + } + }, + { + "database": { + "type": "integer", + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0 + } + }, + { + "ssl": { + "required": false, + "type": "boolean", + "description": "If set to true, uses SSL to connect to Redis.", + "default": false + } + }, + { + "ssl_verify": { + "required": false, + "type": "boolean", + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false + } + }, + { + "server_name": { + "required": false, + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS." + } + } + ] + } + }, + { + "block_on_first_violation": { + "required": true, + "type": "boolean", + "default": false, + "description": "A boolean value that determines if the requests should be blocked as soon as one limit is being exceeded. This will block requests that are supposed to consume other limits too." + } + }, + { + "hide_client_headers": { + "required": true, + "type": "boolean", + "default": false, + "description": "Optionally hide informative response headers." + } + }, + { + "limits": { + "keys": { + "type": "string" + }, + "type": "map", + "len_min": 1, + "required": true, + "description": "A map that defines rate limits for the plugin.", + "values": { + "entity_checks": [ + { + "at_least_one_of": [ + "second", + "minute", + "hour", + "day", + "month", + "year" + ] + } + ], + "type": "record", + "fields": [ + { + "second": { + "gt": 0, + "type": "number" + } + }, + { + "minute": { + "gt": 0, + "type": "number" + } + }, + { + "hour": { + "gt": 0, + "type": "number" + } + }, + { + "day": { + "gt": 0, + "type": "number" + } + }, + { + "month": { + "gt": 0, + "type": "number" + } + }, + { + "year": { + "gt": 0, + "type": "number" + } + } + ], + "required": true + } + } + } + ], + "shorthand_fields": [ + { + "redis_host": { + "translate_backwards": [ + "redis", + "host" + ], + "type": "string" + } + }, + { + "redis_port": { + "translate_backwards": [ + "redis", + "port" + ], + "type": "integer" + } + }, + { + "redis_password": { + "translate_backwards": [ + "redis", + "password" + ], + "type": "string", + "len_min": 0 + } + }, + { + "redis_username": { + "translate_backwards": [ + "redis", + "username" + ], + "type": "string" + } + }, + { + "redis_ssl": { + "translate_backwards": [ + "redis", + "ssl" + ], + "type": "boolean" + } + }, + { + "redis_ssl_verify": { + "translate_backwards": [ + "redis", + "ssl_verify" + ], + "type": "boolean" + } + }, + { + "redis_server_name": { + "translate_backwards": [ + "redis", + "server_name" + ], + "type": "string" + } + }, + { + "redis_timeout": { + "translate_backwards": [ + "redis", + "timeout" + ], + "type": "integer" + } + }, + { + "redis_database": { + "translate_backwards": [ + "redis", + "database" + ], + "type": "integer" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/response-ratelimiting/3.7.x.json b/schemas/response-ratelimiting/3.7.x.json new file mode 100644 index 00000000..bee283f1 --- /dev/null +++ b/schemas/response-ratelimiting/3.7.x.json @@ -0,0 +1,403 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "header_name": { + "type": "string", + "description": "The name of the response header used to increment the counters.", + "default": "x-kong-limit" + } + }, + { + "limit_by": { + "default": "consumer", + "type": "string", + "description": "The entity that will be used when aggregating the limits: `consumer`, `credential`, `ip`. If the `consumer` or the `credential` cannot be determined, the system will always fallback to `ip`.", + "one_of": [ + "consumer", + "credential", + "ip" + ] + } + }, + { + "policy": { + "default": "local", + "type": "string", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "one_of": [ + "local", + "cluster", + "redis" + ] + } + }, + { + "fault_tolerant": { + "required": true, + "type": "boolean", + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party datastore. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the datastore is working again. If `false`, then the clients will see `500` errors.", + "default": true + } + }, + { + "redis": { + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "len_min": 0 + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "ssl": { + "required": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "required": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + } + ], + "description": "Redis configuration", + "type": "record", + "required": true + } + }, + { + "block_on_first_violation": { + "required": true, + "type": "boolean", + "description": "A boolean value that determines if the requests should be blocked as soon as one limit is being exceeded. This will block requests that are supposed to consume other limits too.", + "default": false + } + }, + { + "hide_client_headers": { + "required": true, + "type": "boolean", + "description": "Optionally hide informative response headers.", + "default": false + } + }, + { + "limits": { + "keys": { + "type": "string" + }, + "len_min": 1, + "required": true, + "description": "A map that defines rate limits for the plugin.", + "type": "map", + "values": { + "required": true, + "entity_checks": [ + { + "at_least_one_of": [ + "second", + "minute", + "hour", + "day", + "month", + "year" + ] + } + ], + "type": "record", + "fields": [ + { + "second": { + "type": "number", + "gt": 0 + } + }, + { + "minute": { + "type": "number", + "gt": 0 + } + }, + { + "hour": { + "type": "number", + "gt": 0 + } + }, + { + "day": { + "type": "number", + "gt": 0 + } + }, + { + "month": { + "type": "number", + "gt": 0 + } + }, + { + "year": { + "type": "number", + "gt": 0 + } + } + ] + } + } + } + ], + "shorthand_fields": [ + { + "redis_host": { + "deprecation": { + "message": "response-ratelimiting: config.redis_host is deprecated, please use config.redis.host instead", + "removal_in_version": "4.0" + }, + "type": "string", + "translate_backwards": [ + "redis", + "host" + ] + } + }, + { + "redis_port": { + "deprecation": { + "message": "response-ratelimiting: config.redis_port is deprecated, please use config.redis.port instead", + "removal_in_version": "4.0" + }, + "type": "integer", + "translate_backwards": [ + "redis", + "port" + ] + } + }, + { + "redis_password": { + "len_min": 0, + "deprecation": { + "message": "response-ratelimiting: config.redis_password is deprecated, please use config.redis.password instead", + "removal_in_version": "4.0" + }, + "type": "string", + "translate_backwards": [ + "redis", + "password" + ] + } + }, + { + "redis_username": { + "deprecation": { + "message": "response-ratelimiting: config.redis_username is deprecated, please use config.redis.username instead", + "removal_in_version": "4.0" + }, + "type": "string", + "translate_backwards": [ + "redis", + "username" + ] + } + }, + { + "redis_ssl": { + "deprecation": { + "message": "response-ratelimiting: config.redis_ssl is deprecated, please use config.redis.ssl instead", + "removal_in_version": "4.0" + }, + "type": "boolean", + "translate_backwards": [ + "redis", + "ssl" + ] + } + }, + { + "redis_ssl_verify": { + "deprecation": { + "message": "response-ratelimiting: config.redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead", + "removal_in_version": "4.0" + }, + "type": "boolean", + "translate_backwards": [ + "redis", + "ssl_verify" + ] + } + }, + { + "redis_server_name": { + "deprecation": { + "message": "response-ratelimiting: config.redis_server_name is deprecated, please use config.redis.server_name instead", + "removal_in_version": "4.0" + }, + "type": "string", + "translate_backwards": [ + "redis", + "server_name" + ] + } + }, + { + "redis_timeout": { + "deprecation": { + "message": "response-ratelimiting: config.redis_timeout is deprecated, please use config.redis.timeout instead", + "removal_in_version": "4.0" + }, + "type": "integer", + "translate_backwards": [ + "redis", + "timeout" + ] + } + }, + { + "redis_database": { + "deprecation": { + "message": "response-ratelimiting: config.redis_database is deprecated, please use config.redis.database instead", + "removal_in_version": "4.0" + }, + "type": "integer", + "translate_backwards": [ + "redis", + "database" + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_field": "config.policy", + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.host", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "config.policy", + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.port", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "config.policy", + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.timeout", + "then_match": { + "required": true + } + } + } + ] +} \ No newline at end of file diff --git a/schemas/response-ratelimiting/3.8.x.json b/schemas/response-ratelimiting/3.8.x.json new file mode 100644 index 00000000..e443ef90 --- /dev/null +++ b/schemas/response-ratelimiting/3.8.x.json @@ -0,0 +1,475 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "header_name": { + "description": "The name of the response header used to increment the counters.", + "type": "string", + "default": "x-kong-limit" + } + }, + { + "limit_by": { + "description": "The entity that will be used when aggregating the limits: `consumer`, `credential`, `ip`. If the `consumer` or the `credential` cannot be determined, the system will always fallback to `ip`.", + "type": "string", + "default": "consumer", + "one_of": [ + "consumer", + "credential", + "ip" + ] + } + }, + { + "policy": { + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "type": "string", + "default": "local", + "one_of": [ + "local", + "cluster", + "redis" + ] + } + }, + { + "fault_tolerant": { + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party datastore. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the datastore is working again. If `false`, then the clients will see `500` errors.", + "required": true, + "type": "boolean", + "default": true + } + }, + { + "redis": { + "description": "Redis configuration", + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + }, + { + "timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "len_min": 0, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean", + "required": false, + "default": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + } + ], + "required": true + } + }, + { + "block_on_first_violation": { + "description": "A boolean value that determines if the requests should be blocked as soon as one limit is being exceeded. This will block requests that are supposed to consume other limits too.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "hide_client_headers": { + "description": "Optionally hide informative response headers.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "limits": { + "description": "A map that defines rate limits for the plugin.", + "len_min": 1, + "values": { + "fields": [ + { + "second": { + "gt": 0, + "type": "number" + } + }, + { + "minute": { + "gt": 0, + "type": "number" + } + }, + { + "hour": { + "gt": 0, + "type": "number" + } + }, + { + "day": { + "gt": 0, + "type": "number" + } + }, + { + "month": { + "gt": 0, + "type": "number" + } + }, + { + "year": { + "gt": 0, + "type": "number" + } + } + ], + "required": true, + "entity_checks": [ + { + "at_least_one_of": [ + "second", + "minute", + "hour", + "day", + "month", + "year" + ] + } + ], + "type": "record" + }, + "keys": { + "type": "string" + }, + "type": "map", + "required": true + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "redis_host": { + "type": "string", + "translate_backwards": [ + "redis", + "host" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ], + "message": "response-ratelimiting: config.redis_host is deprecated, please use config.redis.host instead", + "removal_in_version": "4.0" + } + } + }, + { + "redis_port": { + "type": "integer", + "translate_backwards": [ + "redis", + "port" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ], + "message": "response-ratelimiting: config.redis_port is deprecated, please use config.redis.port instead", + "removal_in_version": "4.0" + } + } + }, + { + "redis_password": { + "len_min": 0, + "type": "string", + "translate_backwards": [ + "redis", + "password" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ], + "message": "response-ratelimiting: config.redis_password is deprecated, please use config.redis.password instead", + "removal_in_version": "4.0" + } + } + }, + { + "redis_username": { + "type": "string", + "translate_backwards": [ + "redis", + "username" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ], + "message": "response-ratelimiting: config.redis_username is deprecated, please use config.redis.username instead", + "removal_in_version": "4.0" + } + } + }, + { + "redis_ssl": { + "type": "boolean", + "translate_backwards": [ + "redis", + "ssl" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ], + "message": "response-ratelimiting: config.redis_ssl is deprecated, please use config.redis.ssl instead", + "removal_in_version": "4.0" + } + } + }, + { + "redis_ssl_verify": { + "type": "boolean", + "translate_backwards": [ + "redis", + "ssl_verify" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ], + "message": "response-ratelimiting: config.redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead", + "removal_in_version": "4.0" + } + } + }, + { + "redis_server_name": { + "type": "string", + "translate_backwards": [ + "redis", + "server_name" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ], + "message": "response-ratelimiting: config.redis_server_name is deprecated, please use config.redis.server_name instead", + "removal_in_version": "4.0" + } + } + }, + { + "redis_timeout": { + "type": "integer", + "translate_backwards": [ + "redis", + "timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "timeout" + ] + } + ], + "message": "response-ratelimiting: config.redis_timeout is deprecated, please use config.redis.timeout instead", + "removal_in_version": "4.0" + } + } + }, + { + "redis_database": { + "type": "integer", + "translate_backwards": [ + "redis", + "database" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "database" + ] + } + ], + "message": "response-ratelimiting: config.redis_database is deprecated, please use config.redis.database instead", + "removal_in_version": "4.0" + } + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_field": "config.policy", + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.host", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "config.policy", + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.port", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "config.policy", + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.timeout", + "then_match": { + "required": true + } + } + } + ] +} \ No newline at end of file diff --git a/schemas/response-ratelimiting/3.9.x.json b/schemas/response-ratelimiting/3.9.x.json new file mode 100644 index 00000000..b6e0eba1 --- /dev/null +++ b/schemas/response-ratelimiting/3.9.x.json @@ -0,0 +1,439 @@ +{ + "entity_checks": [ + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.host", + "if_field": "config.policy", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.port", + "if_field": "config.policy", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": "redis" + }, + "then_field": "config.redis.timeout", + "if_field": "config.policy", + "then_match": { + "required": true + } + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "header_name": { + "default": "x-kong-limit", + "description": "The name of the response header used to increment the counters.", + "type": "string" + } + }, + { + "limit_by": { + "default": "consumer", + "description": "The entity that will be used when aggregating the limits: `consumer`, `credential`, `ip`. If the `consumer` or the `credential` cannot be determined, the system will always fallback to `ip`.", + "type": "string", + "one_of": [ + "consumer", + "credential", + "ip" + ] + } + }, + { + "policy": { + "default": "local", + "description": "The rate-limiting policies to use for retrieving and incrementing the limits.", + "type": "string", + "one_of": [ + "local", + "cluster", + "redis" + ] + } + }, + { + "fault_tolerant": { + "default": true, + "description": "A boolean value that determines if the requests should be proxied even if Kong has troubles connecting a third-party datastore. If `true`, requests will be proxied anyway, effectively disabling the rate-limiting function until the datastore is working again. If `false`, then the clients will see `500` errors.", + "required": true, + "type": "boolean" + } + }, + { + "redis": { + "type": "record", + "description": "Redis configuration", + "required": true, + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "len_min": 0 + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean" + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + } + ] + } + }, + { + "block_on_first_violation": { + "default": false, + "description": "A boolean value that determines if the requests should be blocked as soon as one limit is being exceeded. This will block requests that are supposed to consume other limits too.", + "required": true, + "type": "boolean" + } + }, + { + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers.", + "required": true, + "type": "boolean" + } + }, + { + "limits": { + "values": { + "entity_checks": [ + { + "at_least_one_of": [ + "second", + "minute", + "hour", + "day", + "month", + "year" + ] + } + ], + "type": "record", + "required": true, + "fields": [ + { + "second": { + "gt": 0, + "type": "number" + } + }, + { + "minute": { + "gt": 0, + "type": "number" + } + }, + { + "hour": { + "gt": 0, + "type": "number" + } + }, + { + "day": { + "gt": 0, + "type": "number" + } + }, + { + "month": { + "gt": 0, + "type": "number" + } + }, + { + "year": { + "gt": 0, + "type": "number" + } + } + ] + }, + "required": true, + "type": "map", + "description": "A map that defines rate limits for the plugin.", + "keys": { + "type": "string" + }, + "len_min": 1 + } + } + ], + "shorthand_fields": [ + { + "redis_host": { + "deprecation": { + "message": "response-ratelimiting: config.redis_host is deprecated, please use config.redis.host instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ] + }, + "type": "string" + } + }, + { + "redis_port": { + "deprecation": { + "message": "response-ratelimiting: config.redis_port is deprecated, please use config.redis.port instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ] + }, + "type": "integer" + } + }, + { + "redis_password": { + "len_min": 0, + "deprecation": { + "message": "response-ratelimiting: config.redis_password is deprecated, please use config.redis.password instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ] + }, + "type": "string" + } + }, + { + "redis_username": { + "deprecation": { + "message": "response-ratelimiting: config.redis_username is deprecated, please use config.redis.username instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ] + }, + "type": "string" + } + }, + { + "redis_ssl": { + "deprecation": { + "message": "response-ratelimiting: config.redis_ssl is deprecated, please use config.redis.ssl instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ] + }, + "type": "boolean" + } + }, + { + "redis_ssl_verify": { + "deprecation": { + "message": "response-ratelimiting: config.redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ] + }, + "type": "boolean" + } + }, + { + "redis_server_name": { + "deprecation": { + "message": "response-ratelimiting: config.redis_server_name is deprecated, please use config.redis.server_name instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ] + }, + "type": "string" + } + }, + { + "redis_timeout": { + "deprecation": { + "message": "response-ratelimiting: config.redis_timeout is deprecated, please use config.redis.timeout instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "timeout" + ] + } + ] + }, + "type": "integer" + } + }, + { + "redis_database": { + "deprecation": { + "message": "response-ratelimiting: config.redis_database is deprecated, please use config.redis.database instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "database" + ] + } + ] + }, + "type": "integer" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/response-transformer-advanced/3.10.x.json b/schemas/response-transformer-advanced/3.10.x.json new file mode 100644 index 00000000..f90a06b3 --- /dev/null +++ b/schemas/response-transformer-advanced/3.10.x.json @@ -0,0 +1,350 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "remove": { + "type": "record", + "fields": [ + { + "json": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "if_status": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + } + ], + "required": true + } + }, + { + "rename": { + "type": "record", + "fields": [ + { + "headers": { + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array" + } + }, + { + "if_status": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + } + ], + "required": true + } + }, + { + "replace": { + "type": "record", + "fields": [ + { + "body": { + "description": "String with which to replace the entire response body.", + "type": "string" + } + }, + { + "json": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "json_types": { + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "if_status": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + } + ], + "required": true + } + }, + { + "add": { + "type": "record", + "fields": [ + { + "json": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "json_types": { + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "if_status": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + } + ], + "required": true + } + }, + { + "append": { + "type": "record", + "fields": [ + { + "json": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "json_types": { + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "if_status": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + } + ], + "required": true + } + }, + { + "allow": { + "type": "record", + "fields": [ + { + "json": { + "type": "set", + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + }, + { + "transform": { + "type": "record", + "fields": [ + { + "functions": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "if_status": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "json": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + } + ], + "required": true + } + }, + { + "dots_in_keys": { + "description": "Whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects..", + "default": true, + "type": "boolean" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/response-transformer-advanced/3.11.x.json b/schemas/response-transformer-advanced/3.11.x.json new file mode 100644 index 00000000..f8c959ea --- /dev/null +++ b/schemas/response-transformer-advanced/3.11.x.json @@ -0,0 +1,350 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "remove": { + "required": true, + "fields": [ + { + "json": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "rename": { + "required": true, + "fields": [ + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "if_status": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "replace": { + "required": true, + "fields": [ + { + "body": { + "description": "String with which to replace the entire response body.", + "type": "string" + } + }, + { + "json": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "json_types": { + "type": "array", + "default": [ + + ], + "elements": { + "one_of": [ + "boolean", + "number", + "string" + ], + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "add": { + "required": true, + "fields": [ + { + "json": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "json_types": { + "type": "array", + "default": [ + + ], + "elements": { + "one_of": [ + "boolean", + "number", + "string" + ], + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "append": { + "required": true, + "fields": [ + { + "json": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "json_types": { + "type": "array", + "default": [ + + ], + "elements": { + "one_of": [ + "boolean", + "number", + "string" + ], + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "allow": { + "required": true, + "fields": [ + { + "json": { + "type": "set", + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "transform": { + "required": true, + "fields": [ + { + "functions": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "json": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "dots_in_keys": { + "default": true, + "description": "Whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects..", + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/response-transformer-advanced/3.12.x.json b/schemas/response-transformer-advanced/3.12.x.json new file mode 100644 index 00000000..af40f9e2 --- /dev/null +++ b/schemas/response-transformer-advanced/3.12.x.json @@ -0,0 +1,308 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "remove": { + "type": "record", + "fields": [ + { + "json": { + "type": "array", + "default": [], + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "type": "array", + "default": [], + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + }, + { + "rename": { + "type": "record", + "fields": [ + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } + } + }, + { + "if_status": { + "type": "array", + "default": [], + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + }, + { + "replace": { + "type": "record", + "fields": [ + { + "body": { + "description": "String with which to replace the entire response body.", + "type": "string" + } + }, + { + "json": { + "type": "array", + "default": [], + "elements": { + "type": "string" + } + } + }, + { + "json_types": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "type": "array", + "default": [], + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + }, + { + "add": { + "type": "record", + "fields": [ + { + "json": { + "type": "array", + "default": [], + "elements": { + "type": "string" + } + } + }, + { + "json_types": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "type": "array", + "default": [], + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + }, + { + "append": { + "type": "record", + "fields": [ + { + "json": { + "type": "array", + "default": [], + "elements": { + "type": "string" + } + } + }, + { + "json_types": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "type": "array", + "default": [], + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + }, + { + "allow": { + "type": "record", + "fields": [ + { + "json": { + "type": "set", + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + }, + { + "transform": { + "type": "record", + "fields": [ + { + "functions": { + "type": "array", + "default": [], + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "type": "array", + "default": [], + "elements": { + "type": "string" + } + } + }, + { + "json": { + "type": "array", + "default": [], + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + }, + { + "dots_in_keys": { + "type": "boolean", + "default": true, + "description": "Whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects.." + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/response-transformer-advanced/3.4.x.json b/schemas/response-transformer-advanced/3.4.x.json index 48a5b19c..67a8f9ba 100644 --- a/schemas/response-transformer-advanced/3.4.x.json +++ b/schemas/response-transformer-advanced/3.4.x.json @@ -8,33 +8,32 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } } }, { "config": { - "required": true, "fields": [ { "remove": { - "required": true, "fields": [ { "json": { - "type": "array", "default": [ ], + "type": "array", "elements": { "type": "string" } @@ -42,10 +41,10 @@ }, { "headers": { - "type": "array", "default": [ ], + "type": "array", "elements": { "type": "string" } @@ -53,65 +52,66 @@ }, { "if_status": { - "type": "array", "default": [ ], + "type": "array", "elements": { "type": "string" } } } ], - "type": "record" + "type": "record", + "required": true } }, { "rename": { - "required": true, "fields": [ { "headers": { - "type": "array", "default": [ ], + "type": "array", "elements": { - "match": "^[^:]+:.*$", - "type": "string" + "type": "string", + "match": "^[^:]+:.*$" } } }, { "if_status": { - "type": "array", "default": [ ], + "type": "array", "elements": { "type": "string" } } } ], - "type": "record" + "type": "record", + "required": true } }, { "replace": { - "required": true, "fields": [ { "body": { + "description": "String with which to replace the entire response body.", "type": "string" } }, { "json": { - "type": "array", "default": [ ], + "type": "array", "elements": { "type": "string" } @@ -119,26 +119,26 @@ }, { "json_types": { - "type": "array", "default": [ ], + "type": "array", "elements": { + "type": "string", "one_of": [ "boolean", "number", "string" - ], - "type": "string" + ] } } }, { "headers": { - "type": "array", "default": [ ], + "type": "array", "elements": { "type": "string" } @@ -146,29 +146,29 @@ }, { "if_status": { - "type": "array", "default": [ ], + "type": "array", "elements": { "type": "string" } } } ], - "type": "record" + "type": "record", + "required": true } }, { "add": { - "required": true, "fields": [ { "json": { - "type": "array", "default": [ ], + "type": "array", "elements": { "type": "string" } @@ -176,26 +176,26 @@ }, { "json_types": { - "type": "array", "default": [ ], + "type": "array", "elements": { + "type": "string", "one_of": [ "boolean", "number", "string" - ], - "type": "string" + ] } } }, { "headers": { - "type": "array", "default": [ ], + "type": "array", "elements": { "type": "string" } @@ -203,29 +203,29 @@ }, { "if_status": { - "type": "array", "default": [ ], + "type": "array", "elements": { "type": "string" } } } ], - "type": "record" + "type": "record", + "required": true } }, { "append": { - "required": true, "fields": [ { "json": { - "type": "array", "default": [ ], + "type": "array", "elements": { "type": "string" } @@ -233,26 +233,26 @@ }, { "json_types": { - "type": "array", "default": [ ], + "type": "array", "elements": { + "type": "string", "one_of": [ "boolean", "number", "string" - ], - "type": "string" + ] } } }, { "headers": { - "type": "array", "default": [ ], + "type": "array", "elements": { "type": "string" } @@ -260,45 +260,45 @@ }, { "if_status": { - "type": "array", "default": [ ], + "type": "array", "elements": { "type": "string" } } } ], - "type": "record" + "type": "record", + "required": true } }, { "allow": { - "required": true, "fields": [ { "json": { + "type": "set", "elements": { "type": "string" - }, - "type": "set" + } } } ], - "type": "record" + "type": "record", + "required": true } }, { "transform": { - "required": true, "fields": [ { "functions": { - "type": "array", "default": [ ], + "type": "array", "elements": { "type": "string" } @@ -306,10 +306,10 @@ }, { "if_status": { - "type": "array", "default": [ ], + "type": "array", "elements": { "type": "string" } @@ -317,28 +317,34 @@ }, { "json": { - "type": "array", "default": [ ], + "type": "array", "elements": { "type": "string" } } } ], - "type": "record" + "type": "record", + "required": true } }, { "dots_in_keys": { "default": true, - "type": "boolean" + "type": "boolean", + "description": "Whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects.." } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/response-transformer-advanced/3.5.x.json b/schemas/response-transformer-advanced/3.5.x.json new file mode 100644 index 00000000..9a910822 --- /dev/null +++ b/schemas/response-transformer-advanced/3.5.x.json @@ -0,0 +1,350 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "fields": [ + { + "remove": { + "fields": [ + { + "json": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "rename": { + "fields": [ + { + "headers": { + "default": [ + + ], + "type": "array", + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "if_status": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "replace": { + "fields": [ + { + "body": { + "type": "string", + "description": "String with which to replace the entire response body." + } + }, + { + "json": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "json_types": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "headers": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "add": { + "fields": [ + { + "json": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "json_types": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "headers": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "append": { + "fields": [ + { + "json": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "json_types": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "headers": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "allow": { + "fields": [ + { + "json": { + "type": "set", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "transform": { + "fields": [ + { + "functions": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "json": { + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "dots_in_keys": { + "default": true, + "type": "boolean", + "description": "Whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects.." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/response-transformer-advanced/3.6.x.json b/schemas/response-transformer-advanced/3.6.x.json new file mode 100644 index 00000000..50264772 --- /dev/null +++ b/schemas/response-transformer-advanced/3.6.x.json @@ -0,0 +1,350 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "remove": { + "required": true, + "type": "record", + "fields": [ + { + "json": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "if_status": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ] + } + }, + { + "rename": { + "required": true, + "type": "record", + "fields": [ + { + "headers": { + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "if_status": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ] + } + }, + { + "replace": { + "required": true, + "type": "record", + "fields": [ + { + "body": { + "description": "String with which to replace the entire response body.", + "type": "string" + } + }, + { + "json": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "json_types": { + "elements": { + "one_of": [ + "boolean", + "number", + "string" + ], + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "if_status": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ] + } + }, + { + "add": { + "required": true, + "type": "record", + "fields": [ + { + "json": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "json_types": { + "elements": { + "one_of": [ + "boolean", + "number", + "string" + ], + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "if_status": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ] + } + }, + { + "append": { + "required": true, + "type": "record", + "fields": [ + { + "json": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "json_types": { + "elements": { + "one_of": [ + "boolean", + "number", + "string" + ], + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "if_status": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ] + } + }, + { + "allow": { + "required": true, + "type": "record", + "fields": [ + { + "json": { + "elements": { + "type": "string" + }, + "type": "set" + } + } + ] + } + }, + { + "transform": { + "required": true, + "type": "record", + "fields": [ + { + "functions": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "if_status": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "json": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ] + } + }, + { + "dots_in_keys": { + "type": "boolean", + "default": true, + "description": "Whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects.." + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/response-transformer-advanced/3.7.x.json b/schemas/response-transformer-advanced/3.7.x.json new file mode 100644 index 00000000..30740564 --- /dev/null +++ b/schemas/response-transformer-advanced/3.7.x.json @@ -0,0 +1,350 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "remove": { + "fields": [ + { + "json": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "if_status": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "rename": { + "fields": [ + { + "headers": { + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "if_status": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "replace": { + "fields": [ + { + "body": { + "description": "String with which to replace the entire response body.", + "type": "string" + } + }, + { + "json": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "json_types": { + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "if_status": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "add": { + "fields": [ + { + "json": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "json_types": { + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "if_status": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "append": { + "fields": [ + { + "json": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "json_types": { + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "if_status": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "allow": { + "fields": [ + { + "json": { + "type": "set", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "transform": { + "fields": [ + { + "functions": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "if_status": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "json": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "dots_in_keys": { + "type": "boolean", + "description": "Whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects..", + "default": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/response-transformer-advanced/3.8.x.json b/schemas/response-transformer-advanced/3.8.x.json new file mode 100644 index 00000000..1d32331c --- /dev/null +++ b/schemas/response-transformer-advanced/3.8.x.json @@ -0,0 +1,350 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "remove": { + "fields": [ + { + "json": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "rename": { + "fields": [ + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "if_status": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "replace": { + "fields": [ + { + "body": { + "description": "String with which to replace the entire response body.", + "type": "string" + } + }, + { + "json": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "json_types": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "add": { + "fields": [ + { + "json": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "json_types": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "append": { + "fields": [ + { + "json": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "json_types": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "headers": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "allow": { + "fields": [ + { + "json": { + "type": "set", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "transform": { + "fields": [ + { + "functions": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "if_status": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "json": { + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "dots_in_keys": { + "description": "Whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects..", + "type": "boolean", + "default": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/response-transformer-advanced/3.9.x.json b/schemas/response-transformer-advanced/3.9.x.json new file mode 100644 index 00000000..acf4ee71 --- /dev/null +++ b/schemas/response-transformer-advanced/3.9.x.json @@ -0,0 +1,350 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "remove": { + "fields": [ + { + "json": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "if_status": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "rename": { + "fields": [ + { + "headers": { + "default": [ + + ], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + }, + "type": "array" + } + }, + { + "if_status": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "replace": { + "fields": [ + { + "body": { + "description": "String with which to replace the entire response body.", + "type": "string" + } + }, + { + "json": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "json_types": { + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "if_status": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "add": { + "fields": [ + { + "json": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "json_types": { + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "if_status": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "append": { + "fields": [ + { + "json": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "json_types": { + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "if_status": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "allow": { + "fields": [ + { + "json": { + "elements": { + "type": "string" + }, + "type": "set" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "transform": { + "fields": [ + { + "functions": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "if_status": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + }, + { + "json": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "dots_in_keys": { + "default": true, + "description": "Whether dots (for example, `customers.info.phone`) should be treated as part of a property name or used to descend into nested JSON objects..", + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/response-transformer/3.10.x.json b/schemas/response-transformer/3.10.x.json new file mode 100644 index 00000000..6d49d0ce --- /dev/null +++ b/schemas/response-transformer/3.10.x.json @@ -0,0 +1,259 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "remove": { + "type": "record", + "fields": [ + { + "json": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + }, + { + "headers": { + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + } + ], + "required": true + } + }, + { + "rename": { + "type": "record", + "fields": [ + { + "json": { + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + }, + { + "headers": { + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + } + ], + "required": true + } + }, + { + "replace": { + "type": "record", + "fields": [ + { + "json": { + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + }, + { + "json_types": { + "type": "array", + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "required": true + } + }, + { + "headers": { + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + } + ], + "required": true + } + }, + { + "add": { + "type": "record", + "fields": [ + { + "json": { + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + }, + { + "json_types": { + "type": "array", + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "required": true + } + }, + { + "headers": { + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + } + ], + "required": true + } + }, + { + "append": { + "type": "record", + "fields": [ + { + "json": { + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + }, + { + "json_types": { + "type": "array", + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "default": [ + + ], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "required": true + } + }, + { + "headers": { + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/response-transformer/3.11.x.json b/schemas/response-transformer/3.11.x.json new file mode 100644 index 00000000..787ad6aa --- /dev/null +++ b/schemas/response-transformer/3.11.x.json @@ -0,0 +1,259 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "remove": { + "required": true, + "fields": [ + { + "json": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "rename": { + "required": true, + "fields": [ + { + "json": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "replace": { + "required": true, + "fields": [ + { + "json": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "json_types": { + "required": true, + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "type": "array", + "default": [ + + ], + "elements": { + "one_of": [ + "boolean", + "number", + "string" + ], + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "add": { + "required": true, + "fields": [ + { + "json": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "json_types": { + "required": true, + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "type": "array", + "default": [ + + ], + "elements": { + "one_of": [ + "boolean", + "number", + "string" + ], + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "append": { + "required": true, + "fields": [ + { + "json": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "json_types": { + "required": true, + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "type": "array", + "default": [ + + ], + "elements": { + "one_of": [ + "boolean", + "number", + "string" + ], + "type": "string" + } + } + }, + { + "headers": { + "type": "array", + "required": true, + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/response-transformer/3.12.x.json b/schemas/response-transformer/3.12.x.json new file mode 100644 index 00000000..3ede150b --- /dev/null +++ b/schemas/response-transformer/3.12.x.json @@ -0,0 +1,231 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "remove": { + "type": "record", + "fields": [ + { + "json": { + "type": "array", + "default": [], + "elements": { + "type": "string" + }, + "required": true + } + }, + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string" + }, + "required": true + } + } + ], + "required": true + } + }, + { + "rename": { + "type": "record", + "fields": [ + { + "json": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + }, + "required": true + } + }, + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + }, + "required": true + } + } + ], + "required": true + } + }, + { + "replace": { + "type": "record", + "fields": [ + { + "json": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + }, + "required": true + } + }, + { + "json_types": { + "type": "array", + "required": true, + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "default": [], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + }, + "required": true + } + } + ], + "required": true + } + }, + { + "add": { + "type": "record", + "fields": [ + { + "json": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + }, + "required": true + } + }, + { + "json_types": { + "type": "array", + "required": true, + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "default": [], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + }, + "required": true + } + } + ], + "required": true + } + }, + { + "append": { + "type": "record", + "fields": [ + { + "json": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + }, + "required": true + } + }, + { + "json_types": { + "type": "array", + "required": true, + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "default": [], + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "headers": { + "type": "array", + "default": [], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + }, + "required": true + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/response-transformer/3.4.x.json b/schemas/response-transformer/3.4.x.json index 58468539..6e81953c 100644 --- a/schemas/response-transformer/3.4.x.json +++ b/schemas/response-transformer/3.4.x.json @@ -8,37 +8,36 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } } }, { "config": { - "required": true, "fields": [ { "remove": { - "required": true, "fields": [ { "json": { "default": [ ], + "type": "array", + "required": true, "elements": { "type": "string" - }, - "required": true, - "type": "array" + } } }, { @@ -46,53 +45,53 @@ "default": [ ], + "type": "array", + "required": true, "elements": { "type": "string" - }, - "required": true, - "type": "array" + } } } ], - "type": "record" + "type": "record", + "required": true } }, { "rename": { - "required": true, "fields": [ { "headers": { "default": [ ], - "elements": { - "match": "^[^:]+:.*$", - "type": "string" - }, + "type": "array", "required": true, - "type": "array" + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } } } ], - "type": "record" + "type": "record", + "required": true } }, { "replace": { - "required": true, "fields": [ { "json": { "default": [ ], + "type": "array", + "required": true, "elements": { "match": "^[^:]+:.*$", "type": "string" - }, - "required": true, - "type": "array" + } } }, { @@ -100,16 +99,17 @@ "default": [ ], + "required": true, + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "type": "array", "elements": { + "type": "string", "one_of": [ "boolean", "number", "string" - ], - "type": "string" - }, - "required": true, - "type": "array" + ] + } } }, { @@ -117,33 +117,33 @@ "default": [ ], + "type": "array", + "required": true, "elements": { "match": "^[^:]+:.*$", "type": "string" - }, - "required": true, - "type": "array" + } } } ], - "type": "record" + "type": "record", + "required": true } }, { "add": { - "required": true, "fields": [ { "json": { "default": [ ], + "type": "array", + "required": true, "elements": { "match": "^[^:]+:.*$", "type": "string" - }, - "required": true, - "type": "array" + } } }, { @@ -151,16 +151,17 @@ "default": [ ], + "required": true, + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "type": "array", "elements": { + "type": "string", "one_of": [ "boolean", "number", "string" - ], - "type": "string" - }, - "required": true, - "type": "array" + ] + } } }, { @@ -168,33 +169,33 @@ "default": [ ], + "type": "array", + "required": true, "elements": { "match": "^[^:]+:.*$", "type": "string" - }, - "required": true, - "type": "array" + } } } ], - "type": "record" + "type": "record", + "required": true } }, { "append": { - "required": true, "fields": [ { "json": { "default": [ ], + "type": "array", + "required": true, "elements": { "match": "^[^:]+:.*$", "type": "string" - }, - "required": true, - "type": "array" + } } }, { @@ -202,16 +203,17 @@ "default": [ ], + "required": true, + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "type": "array", "elements": { + "type": "string", "one_of": [ "boolean", "number", "string" - ], - "type": "string" - }, - "required": true, - "type": "array" + ] + } } }, { @@ -219,21 +221,26 @@ "default": [ ], + "type": "array", + "required": true, "elements": { "match": "^[^:]+:.*$", "type": "string" - }, - "required": true, - "type": "array" + } } } ], - "type": "record" + "type": "record", + "required": true } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/response-transformer/3.5.x.json b/schemas/response-transformer/3.5.x.json new file mode 100644 index 00000000..41769345 --- /dev/null +++ b/schemas/response-transformer/3.5.x.json @@ -0,0 +1,246 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "fields": [ + { + "remove": { + "fields": [ + { + "json": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "rename": { + "fields": [ + { + "headers": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "replace": { + "fields": [ + { + "json": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } + } + }, + { + "json_types": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "headers": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "add": { + "fields": [ + { + "json": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } + } + }, + { + "json_types": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "headers": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "append": { + "fields": [ + { + "json": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } + } + }, + { + "json_types": { + "type": "array", + "required": true, + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "headers": { + "required": true, + "default": [ + + ], + "type": "array", + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/response-transformer/3.6.x.json b/schemas/response-transformer/3.6.x.json new file mode 100644 index 00000000..60b592c4 --- /dev/null +++ b/schemas/response-transformer/3.6.x.json @@ -0,0 +1,246 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "remove": { + "required": true, + "type": "record", + "fields": [ + { + "json": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ] + } + }, + { + "rename": { + "required": true, + "type": "record", + "fields": [ + { + "headers": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } + } + } + ] + } + }, + { + "replace": { + "required": true, + "type": "record", + "fields": [ + { + "json": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } + } + }, + { + "json_types": { + "elements": { + "one_of": [ + "boolean", + "number", + "string" + ], + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true, + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string." + } + }, + { + "headers": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } + } + } + ] + } + }, + { + "add": { + "required": true, + "type": "record", + "fields": [ + { + "json": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } + } + }, + { + "json_types": { + "elements": { + "one_of": [ + "boolean", + "number", + "string" + ], + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true, + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string." + } + }, + { + "headers": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } + } + } + ] + } + }, + { + "append": { + "required": true, + "type": "record", + "fields": [ + { + "json": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } + } + }, + { + "json_types": { + "elements": { + "one_of": [ + "boolean", + "number", + "string" + ], + "type": "string" + }, + "type": "array", + "default": [ + + ], + "required": true, + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string." + } + }, + { + "headers": { + "required": true, + "type": "array", + "default": [ + + ], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + } + } + } + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/response-transformer/3.7.x.json b/schemas/response-transformer/3.7.x.json new file mode 100644 index 00000000..67d2c9ec --- /dev/null +++ b/schemas/response-transformer/3.7.x.json @@ -0,0 +1,246 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "remove": { + "fields": [ + { + "json": { + "required": true, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "required": true, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "rename": { + "fields": [ + { + "headers": { + "required": true, + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "replace": { + "fields": [ + { + "json": { + "required": true, + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "json_types": { + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "required": true, + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "add": { + "fields": [ + { + "json": { + "required": true, + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "json_types": { + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "required": true, + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "append": { + "fields": [ + { + "json": { + "required": true, + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + }, + { + "json_types": { + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "required": true, + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/response-transformer/3.8.x.json b/schemas/response-transformer/3.8.x.json new file mode 100644 index 00000000..0219110a --- /dev/null +++ b/schemas/response-transformer/3.8.x.json @@ -0,0 +1,259 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "remove": { + "fields": [ + { + "json": { + "default": [ + + ], + "required": true, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "headers": { + "default": [ + + ], + "required": true, + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "rename": { + "fields": [ + { + "json": { + "default": [ + + ], + "required": true, + "type": "array", + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "headers": { + "default": [ + + ], + "required": true, + "type": "array", + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "replace": { + "fields": [ + { + "json": { + "default": [ + + ], + "required": true, + "type": "array", + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "json_types": { + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "default": [ + + ], + "required": true, + "type": "array", + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "add": { + "fields": [ + { + "json": { + "default": [ + + ], + "required": true, + "type": "array", + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "json_types": { + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "default": [ + + ], + "required": true, + "type": "array", + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "append": { + "fields": [ + { + "json": { + "default": [ + + ], + "required": true, + "type": "array", + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + }, + { + "json_types": { + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + }, + "type": "array", + "default": [ + + ] + } + }, + { + "headers": { + "default": [ + + ], + "required": true, + "type": "array", + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/response-transformer/3.9.x.json b/schemas/response-transformer/3.9.x.json new file mode 100644 index 00000000..eb4a6258 --- /dev/null +++ b/schemas/response-transformer/3.9.x.json @@ -0,0 +1,259 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "remove": { + "fields": [ + { + "json": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "type": "string" + }, + "required": true, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "rename": { + "fields": [ + { + "json": { + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "type": "string", + "match": "^[^:]+:.*$" + }, + "required": true, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "replace": { + "fields": [ + { + "json": { + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "json_types": { + "required": true, + "type": "array", + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "required": true, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "add": { + "fields": [ + { + "json": { + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "json_types": { + "required": true, + "type": "array", + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "required": true, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "append": { + "fields": [ + { + "json": { + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "required": true, + "type": "array" + } + }, + { + "json_types": { + "required": true, + "type": "array", + "default": [ + + ], + "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.", + "elements": { + "type": "string", + "one_of": [ + "boolean", + "number", + "string" + ] + } + } + }, + { + "headers": { + "default": [ + + ], + "elements": { + "match": "^[^:]+:.*$", + "type": "string" + }, + "required": true, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/route-by-header/3.10.x.json b/schemas/route-by-header/3.10.x.json new file mode 100644 index 00000000..e6b60cc1 --- /dev/null +++ b/schemas/route-by-header/3.10.x.json @@ -0,0 +1,78 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "rules": { + "description": "Route by header rules.", + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "upstream_name": { + "required": true, + "type": "string" + } + }, + { + "condition": { + "type": "map", + "keys": { + "type": "string" + }, + "values": { + "type": "string" + }, + "len_min": 1, + "required": true + } + } + ] + }, + "default": [ + + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/route-by-header/3.11.x.json b/schemas/route-by-header/3.11.x.json new file mode 100644 index 00000000..247419b8 --- /dev/null +++ b/schemas/route-by-header/3.11.x.json @@ -0,0 +1,78 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "rules": { + "type": "array", + "description": "Route by header rules.", + "default": [ + + ], + "elements": { + "fields": [ + { + "upstream_name": { + "required": true, + "type": "string" + } + }, + { + "condition": { + "required": true, + "len_min": 1, + "keys": { + "type": "string" + }, + "values": { + "type": "string" + }, + "type": "map" + } + } + ], + "type": "record" + } + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/route-by-header/3.12.x.json b/schemas/route-by-header/3.12.x.json new file mode 100644 index 00000000..a29672da --- /dev/null +++ b/schemas/route-by-header/3.12.x.json @@ -0,0 +1,74 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "rules": { + "description": "Route by header rules.", + "default": [], + "elements": { + "type": "record", + "fields": [ + { + "upstream_name": { + "type": "string", + "required": true + } + }, + { + "condition": { + "type": "map", + "len_min": 1, + "required": true, + "values": { + "type": "string" + }, + "keys": { + "type": "string" + } + } + } + ] + }, + "type": "array" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/route-by-header/3.4.x.json b/schemas/route-by-header/3.4.x.json index dc8a336b..b1e7d36b 100644 --- a/schemas/route-by-header/3.4.x.json +++ b/schemas/route-by-header/3.4.x.json @@ -8,48 +8,57 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "rules": { - "type": "array", "default": [ ], + "description": "Route by header rules.", + "type": "array", "elements": { "fields": [ { "upstream_name": { - "type": "string", - "required": true + "required": true, + "type": "string" } }, { "condition": { - "len_min": 1, "keys": { "type": "string" }, + "required": true, + "len_min": 1, + "type": "map", "values": { "type": "string" - }, - "required": true, - "type": "map" + } } } ], @@ -58,8 +67,12 @@ } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/route-by-header/3.5.x.json b/schemas/route-by-header/3.5.x.json new file mode 100644 index 00000000..7b442cae --- /dev/null +++ b/schemas/route-by-header/3.5.x.json @@ -0,0 +1,78 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "rules": { + "description": "Route by header rules.", + "default": [ + + ], + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "upstream_name": { + "type": "string", + "required": true + } + }, + { + "condition": { + "keys": { + "type": "string" + }, + "type": "map", + "required": true, + "len_min": 1, + "values": { + "type": "string" + } + } + } + ] + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/route-by-header/3.6.x.json b/schemas/route-by-header/3.6.x.json new file mode 100644 index 00000000..f29a072b --- /dev/null +++ b/schemas/route-by-header/3.6.x.json @@ -0,0 +1,78 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "rules": { + "elements": { + "fields": [ + { + "upstream_name": { + "required": true, + "type": "string" + } + }, + { + "condition": { + "keys": { + "type": "string" + }, + "type": "map", + "len_min": 1, + "required": true, + "values": { + "type": "string" + } + } + } + ], + "type": "record" + }, + "type": "array", + "description": "Route by header rules.", + "default": [ + + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/route-by-header/3.7.x.json b/schemas/route-by-header/3.7.x.json new file mode 100644 index 00000000..d782454b --- /dev/null +++ b/schemas/route-by-header/3.7.x.json @@ -0,0 +1,78 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "rules": { + "description": "Route by header rules.", + "elements": { + "type": "record", + "fields": [ + { + "upstream_name": { + "required": true, + "type": "string" + } + }, + { + "condition": { + "keys": { + "type": "string" + }, + "required": true, + "type": "map", + "len_min": 1, + "values": { + "type": "string" + } + } + } + ] + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/route-by-header/3.8.x.json b/schemas/route-by-header/3.8.x.json new file mode 100644 index 00000000..df002542 --- /dev/null +++ b/schemas/route-by-header/3.8.x.json @@ -0,0 +1,78 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "rules": { + "description": "Route by header rules.", + "type": "array", + "default": [ + + ], + "elements": { + "fields": [ + { + "upstream_name": { + "type": "string", + "required": true + } + }, + { + "condition": { + "len_min": 1, + "values": { + "type": "string" + }, + "keys": { + "type": "string" + }, + "type": "map", + "required": true + } + } + ], + "type": "record" + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/route-by-header/3.9.x.json b/schemas/route-by-header/3.9.x.json new file mode 100644 index 00000000..fb2008cd --- /dev/null +++ b/schemas/route-by-header/3.9.x.json @@ -0,0 +1,78 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "rules": { + "default": [ + + ], + "description": "Route by header rules.", + "elements": { + "type": "record", + "fields": [ + { + "upstream_name": { + "required": true, + "type": "string" + } + }, + { + "condition": { + "values": { + "type": "string" + }, + "required": true, + "type": "map", + "keys": { + "type": "string" + }, + "len_min": 1 + } + } + ] + }, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/route-transformer-advanced/3.10.x.json b/schemas/route-transformer-advanced/3.10.x.json new file mode 100644 index 00000000..6e948d2e --- /dev/null +++ b/schemas/route-transformer-advanced/3.10.x.json @@ -0,0 +1,75 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "path", + "port", + "host" + ] + } + ], + "type": "record", + "fields": [ + { + "path": { + "type": "string" + } + }, + { + "port": { + "type": "string" + } + }, + { + "host": { + "type": "string" + } + }, + { + "escape_path": { + "type": "boolean", + "default": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/route-transformer-advanced/3.11.x.json b/schemas/route-transformer-advanced/3.11.x.json new file mode 100644 index 00000000..a136455d --- /dev/null +++ b/schemas/route-transformer-advanced/3.11.x.json @@ -0,0 +1,75 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "entity_checks": [ + { + "at_least_one_of": [ + "path", + "port", + "host" + ] + } + ], + "fields": [ + { + "path": { + "type": "string" + } + }, + { + "port": { + "type": "string" + } + }, + { + "host": { + "type": "string" + } + }, + { + "escape_path": { + "default": false, + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/route-transformer-advanced/3.12.x.json b/schemas/route-transformer-advanced/3.12.x.json new file mode 100644 index 00000000..76776469 --- /dev/null +++ b/schemas/route-transformer-advanced/3.12.x.json @@ -0,0 +1,73 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "path": { + "type": "string" + } + }, + { + "port": { + "type": "string" + } + }, + { + "host": { + "type": "string" + } + }, + { + "escape_path": { + "type": "boolean", + "default": false + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "path", + "port", + "host" + ] + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/route-transformer-advanced/3.4.x.json b/schemas/route-transformer-advanced/3.4.x.json index f743be94..a3f7dc31 100644 --- a/schemas/route-transformer-advanced/3.4.x.json +++ b/schemas/route-transformer-advanced/3.4.x.json @@ -8,31 +8,30 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, - "entity_checks": [ - { - "at_least_one_of": [ - "path", - "port", - "host" - ] - } - ], "fields": [ { "path": { @@ -56,8 +55,21 @@ } } ], - "type": "record" + "entity_checks": [ + { + "at_least_one_of": [ + "path", + "port", + "host" + ] + } + ], + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/route-transformer-advanced/3.5.x.json b/schemas/route-transformer-advanced/3.5.x.json new file mode 100644 index 00000000..6c975272 --- /dev/null +++ b/schemas/route-transformer-advanced/3.5.x.json @@ -0,0 +1,75 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "path", + "port", + "host" + ] + } + ], + "fields": [ + { + "path": { + "type": "string" + } + }, + { + "port": { + "type": "string" + } + }, + { + "host": { + "type": "string" + } + }, + { + "escape_path": { + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/route-transformer-advanced/3.6.x.json b/schemas/route-transformer-advanced/3.6.x.json new file mode 100644 index 00000000..1a05a404 --- /dev/null +++ b/schemas/route-transformer-advanced/3.6.x.json @@ -0,0 +1,75 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "path", + "port", + "host" + ] + } + ], + "type": "record", + "fields": [ + { + "path": { + "type": "string" + } + }, + { + "port": { + "type": "string" + } + }, + { + "host": { + "type": "string" + } + }, + { + "escape_path": { + "default": false, + "type": "boolean" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/route-transformer-advanced/3.7.x.json b/schemas/route-transformer-advanced/3.7.x.json new file mode 100644 index 00000000..65d20343 --- /dev/null +++ b/schemas/route-transformer-advanced/3.7.x.json @@ -0,0 +1,75 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "path": { + "type": "string" + } + }, + { + "port": { + "type": "string" + } + }, + { + "host": { + "type": "string" + } + }, + { + "escape_path": { + "type": "boolean", + "default": false + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "path", + "port", + "host" + ] + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/route-transformer-advanced/3.8.x.json b/schemas/route-transformer-advanced/3.8.x.json new file mode 100644 index 00000000..76ec77f4 --- /dev/null +++ b/schemas/route-transformer-advanced/3.8.x.json @@ -0,0 +1,75 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "path": { + "type": "string" + } + }, + { + "port": { + "type": "string" + } + }, + { + "host": { + "type": "string" + } + }, + { + "escape_path": { + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "entity_checks": [ + { + "at_least_one_of": [ + "path", + "port", + "host" + ] + } + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/route-transformer-advanced/3.9.x.json b/schemas/route-transformer-advanced/3.9.x.json new file mode 100644 index 00000000..a640c0ff --- /dev/null +++ b/schemas/route-transformer-advanced/3.9.x.json @@ -0,0 +1,75 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "path", + "port", + "host" + ] + } + ], + "fields": [ + { + "path": { + "type": "string" + } + }, + { + "port": { + "type": "string" + } + }, + { + "host": { + "type": "string" + } + }, + { + "escape_path": { + "default": false, + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/saml/3.10.x.json b/schemas/saml/3.10.x.json new file mode 100644 index 00000000..957e0ba7 --- /dev/null +++ b/schemas/saml/3.10.x.json @@ -0,0 +1,1234 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + }, + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "required": true, + "type": "record", + "shorthand_fields": [ + { + "session_cookie_lifetime": { + "deprecation": { + "message": "openid-connect: config.session_cookie_lifetime is deprecated, please use config.session_rolling_timeout instead", + "removal_in_version": "4.0" + }, + "type": "number" + } + }, + { + "session_cookie_idletime": { + "deprecation": { + "message": "openid-connect: config.session_cookie_idletime is deprecated, please use config.session_idling_timeout instead", + "removal_in_version": "4.0" + }, + "type": "number" + } + }, + { + "session_cookie_samesite": { + "deprecation": { + "message": "openid-connect: config.session_cookie_samesite is deprecated, please use config.session_cookie_same_site instead", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_cookie_httponly": { + "deprecation": { + "message": "openid-connect: config.session_cookie_httponly is deprecated, please use config.session_cookie_http_only instead", + "removal_in_version": "4.0" + }, + "type": "boolean" + } + }, + { + "session_memcache_prefix": { + "deprecation": { + "message": "openid-connect: config.session_memcache_prefix is deprecated, please use config.session_memcached_prefix instead", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_memcache_socket": { + "deprecation": { + "message": "openid-connect: config.session_memcache_socket is deprecated, please use config.session_memcached_socket instead", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_memcache_host": { + "deprecation": { + "message": "openid-connect: config.session_memcache_host is deprecated, please use config.session_memcached_host instead", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_memcache_port": { + "deprecation": { + "message": "openid-connect: config.session_memcache_port is deprecated, please use config.session_memcached_port instead", + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "session_cookie_renew": { + "deprecation": { + "message": "openid-connect: config.session_cookie_renew option does not exist anymore", + "removal_in_version": "4.0" + }, + "type": "number" + } + }, + { + "session_cookie_maxsize": { + "deprecation": { + "message": "openid-connect: config.session_cookie_maxsize option does not exist anymore", + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "session_strategy": { + "deprecation": { + "message": "openid-connect: config.session_strategy option does not exist anymore", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_compressor": { + "deprecation": { + "message": "openid-connect: config.session_compressor option does not exist anymore", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_auth_ttl": { + "deprecation": { + "message": "openid-connect: config.session_auth_ttl option does not exist anymore", + "removal_in_version": "4.0" + }, + "type": "number" + } + }, + { + "session_redis_prefix": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "prefix" + ] + } + ], + "message": "saml: config.session_redis_prefix is deprecated, please use config.redis.prefix instead" + }, + "type": "string" + } + }, + { + "session_redis_socket": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "socket" + ] + } + ], + "message": "saml: config.session_redis_socket is deprecated, please use config.redis.socket instead" + }, + "type": "string" + } + }, + { + "session_redis_host": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ], + "message": "saml: config.session_redis_host is deprecated, please use config.redis.host instead" + }, + "type": "string" + } + }, + { + "session_redis_port": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ], + "message": "saml: config.session_redis_port is deprecated, please use config.redis.port instead" + }, + "type": "integer" + } + }, + { + "session_redis_username": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ], + "message": "saml: config.redis_host is deprecated, please use config.redis.host instead" + }, + "type": "string" + } + }, + { + "session_redis_password": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ], + "message": "saml: config.session_redis_password is deprecated, please use config.redis.password instead" + }, + "type": "string" + } + }, + { + "session_redis_connect_timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "connect_timeout" + ] + } + ], + "message": "saml: config.session_redis_connect_timeout is deprecated, please use config.redis.connect_timeout instead" + }, + "type": "integer" + } + }, + { + "session_redis_read_timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "read_timeout" + ] + } + ], + "message": "saml: config.session_redis_read_timeout is deprecated, please use config.redis.read_timeout instead" + }, + "type": "integer" + } + }, + { + "session_redis_send_timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "send_timeout" + ] + } + ], + "message": "saml: config.session_redis_send_timeout is deprecated, please use config.redis.send_timeout instead" + }, + "type": "integer" + } + }, + { + "session_redis_ssl": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ], + "message": "saml: config.session_redis_ssl is deprecated, please use config.redis.ssl instead" + }, + "type": "boolean" + } + }, + { + "session_redis_ssl_verify": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ], + "message": "saml: config.session_redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead" + }, + "type": "boolean" + } + }, + { + "session_redis_server_name": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ], + "message": "saml: config.session_redis_server_name is deprecated, please use config.redis.server_name instead" + }, + "type": "string" + } + }, + { + "session_redis_cluster_nodes": { + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "type": "array", + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_nodes" + ] + } + ], + "message": "saml: config.session_redis_cluster_nodes is deprecated, please use config.redis.cluster_nodes instead" + } + } + }, + { + "session_redis_cluster_max_redirections": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_max_redirections" + ] + } + ], + "message": "saml: config.session_redis_cluster_max_redirections is deprecated, please use config.redis.cluster_max_redirections instead" + }, + "type": "integer" + } + }, + { + "session_redis_cluster_maxredirections": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_max_redirections" + ] + } + ], + "message": "saml: config.session_redis_cluster_maxredirections is deprecated, please use config.redis.cluster_max_redirections instead" + }, + "type": "integer" + } + } + ], + "fields": [ + { + "assertion_consumer_path": { + "type": "string", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "required": true + } + }, + { + "idp_sso_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string", + "required": true + } + }, + { + "idp_certificate": { + "type": "string", + "referenceable": true, + "description": "The public certificate provided by the IdP. This is used to validate responses from the IdP. Only include the contents of the certificate. Do not include the header (`BEGIN CERTIFICATE`) and footer (`END CERTIFICATE`) lines.", + "encrypted": true, + "required": false + } + }, + { + "response_encryption_key": { + "type": "string", + "referenceable": true, + "description": "The private encryption key required to decrypt encrypted assertions.", + "encrypted": true, + "required": false + } + }, + { + "request_signing_key": { + "type": "string", + "referenceable": true, + "description": "The private key for signing requests. If this parameter is set, requests sent to the IdP are signed. The `request_signing_certificate` parameter must be set as well.", + "encrypted": true, + "required": false + } + }, + { + "request_signing_certificate": { + "type": "string", + "referenceable": true, + "description": "The certificate for signing requests.", + "encrypted": true, + "required": false + } + }, + { + "request_signature_algorithm": { + "type": "string", + "description": "The signature algorithm for signing Authn requests. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "one_of": [ + "SHA256", + "SHA384", + "SHA512" + ], + "default": "SHA256", + "required": false + } + }, + { + "request_digest_algorithm": { + "type": "string", + "description": "The digest algorithm for Authn requests: - `SHA256` - `SHA1`", + "one_of": [ + "SHA256", + "SHA1" + ], + "default": "SHA256", + "required": false + } + }, + { + "response_signature_algorithm": { + "type": "string", + "description": "The algorithm for validating signatures in SAML responses. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "one_of": [ + "SHA256", + "SHA384", + "SHA512" + ], + "default": "SHA256", + "required": false + } + }, + { + "response_digest_algorithm": { + "type": "string", + "description": "The algorithm for verifying digest in SAML responses: - `SHA256` - `SHA1`", + "one_of": [ + "SHA256", + "SHA1" + ], + "default": "SHA256", + "required": false + } + }, + { + "issuer": { + "description": "The unique identifier of the IdP application. Formatted as a URL containing information about the IdP so the SP can validate that the SAML assertions it receives are issued from the correct IdP.", + "type": "string", + "required": true + } + }, + { + "nameid_format": { + "type": "string", + "description": "The requested `NameId` format. Options available are: - `Unspecified` - `EmailAddress` - `Persistent` - `Transient`", + "one_of": [ + "Unspecified", + "EmailAddress", + "Persistent", + "Transient" + ], + "default": "EmailAddress", + "required": false + } + }, + { + "validate_assertion_signature": { + "description": "Enable signature validation for SAML responses.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer. If not set, a Kong Consumer must exist for the SAML IdP user credentials, mapping the username format to the Kong Consumer username.", + "type": "string", + "required": false + } + }, + { + "session_secret": { + "len_max": 32, + "type": "string", + "match": "^[0-9a-zA-Z/_+]+$", + "referenceable": true, + "description": "The session secret. This must be a random string of 32 characters from the base64 alphabet (letters, numbers, `/`, `_` and `+`). It is used as the secret key for encrypting session data as well as state information that is sent to the IdP in the authentication exchange.", + "encrypted": true, + "len_min": 32, + "required": true + } + }, + { + "session_audience": { + "description": "The session audience, for example \"my-application\"", + "type": "string", + "default": "default", + "required": false + } + }, + { + "session_cookie_name": { + "description": "The session cookie name.", + "type": "string", + "default": "session", + "required": false + } + }, + { + "session_remember": { + "description": "Enables or disables persistent sessions", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "session_remember_cookie_name": { + "description": "Persistent session cookie name", + "type": "string", + "default": "remember", + "required": false + } + }, + { + "session_remember_rolling_timeout": { + "description": "Persistent session rolling timeout in seconds.", + "type": "number", + "default": 604800, + "required": false + } + }, + { + "session_remember_absolute_timeout": { + "description": "Persistent session absolute timeout in seconds.", + "type": "number", + "default": 2592000, + "required": false + } + }, + { + "session_idling_timeout": { + "description": "The session cookie idle time in seconds.", + "type": "number", + "default": 900, + "required": false + } + }, + { + "session_rolling_timeout": { + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number", + "default": 3600, + "required": false + } + }, + { + "session_absolute_timeout": { + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number", + "default": 86400, + "required": false + } + }, + { + "session_cookie_path": { + "type": "string", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "default": "/", + "starts_with": "/", + "required": false + } + }, + { + "session_cookie_domain": { + "description": "The session cookie domain flag.", + "type": "string", + "required": false + } + }, + { + "session_cookie_same_site": { + "type": "string", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "default": "Lax", + "required": false + } + }, + { + "session_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean", + "default": true, + "required": false + } + }, + { + "session_cookie_secure": { + "description": "The cookie is only sent to the server when a request is made with the https:scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean", + "required": false + } + }, + { + "session_request_headers": { + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "session_response_headers": { + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "session_storage": { + "type": "string", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie. The session cannot be invalidated or revoked without changing the session secret, but is stateless, and doesn't require a database. - `memcached`: stores session data in memcached - `redis`: stores session data in Redis", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "default": "cookie", + "required": false + } + }, + { + "session_store_metadata": { + "description": "Configures whether or not session metadata should be stored. This includes information about the active sessions for the `specific_audience` belonging to a specific subject.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "session_enforce_same_subject": { + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "session_hash_subject": { + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "session_hash_storage_key": { + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean", + "default": false, + "required": false + } + }, + { + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "type": "string", + "required": false + } + }, + { + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "type": "string", + "required": false + } + }, + { + "session_memcached_host": { + "description": "The memcached host.", + "type": "string", + "default": "127.0.0.1", + "required": false + } + }, + { + "session_memcached_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 11211, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": false + } + }, + { + "redis": { + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + }, + "required": false + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + }, + "required": false + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "prefix": { + "description": "The Redis session key prefix.", + "type": "string", + "required": false + } + }, + { + "socket": { + "description": "The Redis unix socket path.", + "type": "string", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "type": "array", + "elements": { + "type": "string" + }, + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "len_min": 1 + } + }, + { + "cluster_addresses": { + "type": "array", + "elements": { + "type": "string" + }, + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "len_min": 1 + } + } + ], + "required": true + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/saml/3.11.x.json b/schemas/saml/3.11.x.json new file mode 100644 index 00000000..09636c85 --- /dev/null +++ b/schemas/saml/3.11.x.json @@ -0,0 +1,1234 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "shorthand_fields": [ + { + "session_cookie_lifetime": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_lifetime is deprecated, please use config.session_rolling_timeout instead" + }, + "type": "number" + } + }, + { + "session_cookie_idletime": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_idletime is deprecated, please use config.session_idling_timeout instead" + }, + "type": "number" + } + }, + { + "session_cookie_samesite": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_samesite is deprecated, please use config.session_cookie_same_site instead" + }, + "type": "string" + } + }, + { + "session_cookie_httponly": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_httponly is deprecated, please use config.session_cookie_http_only instead" + }, + "type": "boolean" + } + }, + { + "session_memcache_prefix": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_prefix is deprecated, please use config.session_memcached_prefix instead" + }, + "type": "string" + } + }, + { + "session_memcache_socket": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_socket is deprecated, please use config.session_memcached_socket instead" + }, + "type": "string" + } + }, + { + "session_memcache_host": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_host is deprecated, please use config.session_memcached_host instead" + }, + "type": "string" + } + }, + { + "session_memcache_port": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_port is deprecated, please use config.session_memcached_port instead" + }, + "type": "integer" + } + }, + { + "session_cookie_renew": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_renew option does not exist anymore" + }, + "type": "number" + } + }, + { + "session_cookie_maxsize": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_maxsize option does not exist anymore" + }, + "type": "integer" + } + }, + { + "session_strategy": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_strategy option does not exist anymore" + }, + "type": "string" + } + }, + { + "session_compressor": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_compressor option does not exist anymore" + }, + "type": "string" + } + }, + { + "session_auth_ttl": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_auth_ttl option does not exist anymore" + }, + "type": "number" + } + }, + { + "session_redis_prefix": { + "deprecation": { + "message": "saml: config.session_redis_prefix is deprecated, please use config.redis.prefix instead", + "replaced_with": [ + { + "path": [ + "redis", + "prefix" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_redis_socket": { + "deprecation": { + "message": "saml: config.session_redis_socket is deprecated, please use config.redis.socket instead", + "replaced_with": [ + { + "path": [ + "redis", + "socket" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_redis_host": { + "deprecation": { + "message": "saml: config.session_redis_host is deprecated, please use config.redis.host instead", + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_redis_port": { + "deprecation": { + "message": "saml: config.session_redis_port is deprecated, please use config.redis.port instead", + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "session_redis_username": { + "deprecation": { + "message": "saml: config.redis_host is deprecated, please use config.redis.host instead", + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_redis_password": { + "deprecation": { + "message": "saml: config.session_redis_password is deprecated, please use config.redis.password instead", + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_redis_connect_timeout": { + "deprecation": { + "message": "saml: config.session_redis_connect_timeout is deprecated, please use config.redis.connect_timeout instead", + "replaced_with": [ + { + "path": [ + "redis", + "connect_timeout" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "session_redis_read_timeout": { + "deprecation": { + "message": "saml: config.session_redis_read_timeout is deprecated, please use config.redis.read_timeout instead", + "replaced_with": [ + { + "path": [ + "redis", + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "session_redis_send_timeout": { + "deprecation": { + "message": "saml: config.session_redis_send_timeout is deprecated, please use config.redis.send_timeout instead", + "replaced_with": [ + { + "path": [ + "redis", + "send_timeout" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "session_redis_ssl": { + "deprecation": { + "message": "saml: config.session_redis_ssl is deprecated, please use config.redis.ssl instead", + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "boolean" + } + }, + { + "session_redis_ssl_verify": { + "deprecation": { + "message": "saml: config.session_redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead", + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "boolean" + } + }, + { + "session_redis_server_name": { + "deprecation": { + "message": "saml: config.session_redis_server_name is deprecated, please use config.redis.server_name instead", + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_redis_cluster_nodes": { + "deprecation": { + "message": "saml: config.session_redis_cluster_nodes is deprecated, please use config.redis.cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "array", + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "session_redis_cluster_max_redirections": { + "deprecation": { + "message": "saml: config.session_redis_cluster_max_redirections is deprecated, please use config.redis.cluster_max_redirections instead", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_max_redirections" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "session_redis_cluster_maxredirections": { + "deprecation": { + "message": "saml: config.session_redis_cluster_maxredirections is deprecated, please use config.redis.cluster_max_redirections instead", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_max_redirections" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + } + ], + "required": true, + "fields": [ + { + "assertion_consumer_path": { + "required": true, + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "starts_with": "/", + "type": "string" + } + }, + { + "idp_sso_url": { + "required": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "idp_certificate": { + "required": false, + "description": "The public certificate provided by the IdP. This is used to validate responses from the IdP. Only include the contents of the certificate. Do not include the header (`BEGIN CERTIFICATE`) and footer (`END CERTIFICATE`) lines.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "response_encryption_key": { + "required": false, + "description": "The private encryption key required to decrypt encrypted assertions.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "request_signing_key": { + "required": false, + "description": "The private key for signing requests. If this parameter is set, requests sent to the IdP are signed. The `request_signing_certificate` parameter must be set as well.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "request_signing_certificate": { + "required": false, + "description": "The certificate for signing requests.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "request_signature_algorithm": { + "required": false, + "description": "The signature algorithm for signing Authn requests. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "one_of": [ + "SHA256", + "SHA384", + "SHA512" + ], + "default": "SHA256", + "type": "string" + } + }, + { + "request_digest_algorithm": { + "required": false, + "description": "The digest algorithm for Authn requests: - `SHA256` - `SHA1`", + "one_of": [ + "SHA256", + "SHA1" + ], + "default": "SHA256", + "type": "string" + } + }, + { + "response_signature_algorithm": { + "required": false, + "description": "The algorithm for validating signatures in SAML responses. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "one_of": [ + "SHA256", + "SHA384", + "SHA512" + ], + "default": "SHA256", + "type": "string" + } + }, + { + "response_digest_algorithm": { + "required": false, + "description": "The algorithm for verifying digest in SAML responses: - `SHA256` - `SHA1`", + "one_of": [ + "SHA256", + "SHA1" + ], + "default": "SHA256", + "type": "string" + } + }, + { + "issuer": { + "required": true, + "description": "The unique identifier of the IdP application. Formatted as a URL containing information about the IdP so the SP can validate that the SAML assertions it receives are issued from the correct IdP.", + "type": "string" + } + }, + { + "nameid_format": { + "required": false, + "description": "The requested `NameId` format. Options available are: - `Unspecified` - `EmailAddress` - `Persistent` - `Transient`", + "one_of": [ + "Unspecified", + "EmailAddress", + "Persistent", + "Transient" + ], + "default": "EmailAddress", + "type": "string" + } + }, + { + "validate_assertion_signature": { + "description": "Enable signature validation for SAML responses.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "anonymous": { + "required": false, + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer. If not set, a Kong Consumer must exist for the SAML IdP user credentials, mapping the username format to the Kong Consumer username.", + "type": "string" + } + }, + { + "session_secret": { + "match": "^[0-9a-zA-Z/_+]+$", + "required": true, + "description": "The session secret. This must be a random string of 32 characters from the base64 alphabet (letters, numbers, `/`, `_` and `+`). It is used as the secret key for encrypting session data as well as state information that is sent to the IdP in the authentication exchange.", + "encrypted": true, + "len_min": 32, + "len_max": 32, + "referenceable": true, + "type": "string" + } + }, + { + "session_audience": { + "description": "The session audience, for example \"my-application\"", + "required": false, + "default": "default", + "type": "string" + } + }, + { + "session_cookie_name": { + "description": "The session cookie name.", + "required": false, + "default": "session", + "type": "string" + } + }, + { + "session_remember": { + "description": "Enables or disables persistent sessions", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "session_remember_cookie_name": { + "description": "Persistent session cookie name", + "required": false, + "default": "remember", + "type": "string" + } + }, + { + "session_remember_rolling_timeout": { + "description": "Persistent session rolling timeout in seconds.", + "required": false, + "default": 604800, + "type": "number" + } + }, + { + "session_remember_absolute_timeout": { + "description": "Persistent session absolute timeout in seconds.", + "required": false, + "default": 2592000, + "type": "number" + } + }, + { + "session_idling_timeout": { + "description": "The session cookie idle time in seconds.", + "required": false, + "default": 900, + "type": "number" + } + }, + { + "session_rolling_timeout": { + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "required": false, + "default": 3600, + "type": "number" + } + }, + { + "session_absolute_timeout": { + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "required": false, + "default": 86400, + "type": "number" + } + }, + { + "session_cookie_path": { + "required": false, + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "starts_with": "/", + "default": "/", + "type": "string" + } + }, + { + "session_cookie_domain": { + "required": false, + "description": "The session cookie domain flag.", + "type": "string" + } + }, + { + "session_cookie_same_site": { + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "default": "Lax", + "type": "string" + } + }, + { + "session_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "required": false, + "default": true, + "type": "boolean" + } + }, + { + "session_cookie_secure": { + "required": false, + "description": "The cookie is only sent to the server when a request is made with the https:scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + } + }, + { + "session_request_headers": { + "type": "set", + "elements": { + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ], + "type": "string" + } + } + }, + { + "session_response_headers": { + "type": "set", + "elements": { + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ], + "type": "string" + } + } + }, + { + "session_storage": { + "required": false, + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie. The session cannot be invalidated or revoked without changing the session secret, but is stateless, and doesn't require a database. - `memcached`: stores session data in memcached - `redis`: stores session data in Redis", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "default": "cookie", + "type": "string" + } + }, + { + "session_store_metadata": { + "description": "Configures whether or not session metadata should be stored. This includes information about the active sessions for the `specific_audience` belonging to a specific subject.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "session_enforce_same_subject": { + "description": "When set to `true`, audiences are forced to share the same subject.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "session_hash_subject": { + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "session_hash_storage_key": { + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "session_memcached_prefix": { + "required": false, + "description": "The memcached session key prefix.", + "type": "string" + } + }, + { + "session_memcached_socket": { + "required": false, + "description": "The memcached unix socket path.", + "type": "string" + } + }, + { + "session_memcached_host": { + "description": "The memcached host.", + "required": false, + "default": "127.0.0.1", + "type": "string" + } + }, + { + "session_memcached_port": { + "required": false, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 11211, + "type": "integer" + } + }, + { + "redis": { + "required": true, + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer" + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer" + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer" + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer" + } + }, + { + "username": { + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string" + } + }, + { + "sentinel_username": { + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "referenceable": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "default": 256, + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1, + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer" + } + } + ], + "type": "record" + }, + "type": "array" + } + }, + { + "cluster_nodes": { + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1, + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer" + } + } + ], + "type": "record" + }, + "type": "array" + } + }, + { + "ssl": { + "default": false, + "required": false, + "description": "If set to true, uses SSL to connect to Redis.", + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "required": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "required": false, + "description": "Maximum retry attempts for redirection.", + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "required": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "type": "boolean" + } + }, + { + "prefix": { + "required": false, + "description": "The Redis session key prefix.", + "type": "string" + } + }, + { + "socket": { + "required": false, + "description": "The Redis unix socket path.", + "type": "string" + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "array" + } + }, + { + "cluster_addresses": { + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + }, + "type": "array" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + } +} \ No newline at end of file diff --git a/schemas/saml/3.12.x.json b/schemas/saml/3.12.x.json new file mode 100644 index 00000000..385ed361 --- /dev/null +++ b/schemas/saml/3.12.x.json @@ -0,0 +1,1234 @@ +{ + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + }, + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "assertion_consumer_path": { + "type": "string", + "starts_with": "/", + "required": true, + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + }, + { + "idp_sso_url": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": true + } + }, + { + "idp_certificate": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "The public certificate provided by the IdP. This is used to validate responses from the IdP. Only include the contents of the certificate. Do not include the header (`BEGIN CERTIFICATE`) and footer (`END CERTIFICATE`) lines." + } + }, + { + "response_encryption_key": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "The private encryption key required to decrypt encrypted assertions." + } + }, + { + "request_signing_key": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "The private key for signing requests. If this parameter is set, requests sent to the IdP are signed. The `request_signing_certificate` parameter must be set as well." + } + }, + { + "request_signing_certificate": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "The certificate for signing requests." + } + }, + { + "request_signature_algorithm": { + "type": "string", + "required": false, + "description": "The signature algorithm for signing Authn requests. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "default": "SHA256", + "one_of": [ + "SHA256", + "SHA384", + "SHA512" + ] + } + }, + { + "request_digest_algorithm": { + "type": "string", + "required": false, + "description": "The digest algorithm for Authn requests: - `SHA256` - `SHA1`", + "default": "SHA256", + "one_of": [ + "SHA256", + "SHA1" + ] + } + }, + { + "response_signature_algorithm": { + "type": "string", + "required": false, + "description": "The algorithm for validating signatures in SAML responses. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "default": "SHA256", + "one_of": [ + "SHA256", + "SHA384", + "SHA512" + ] + } + }, + { + "response_digest_algorithm": { + "type": "string", + "required": false, + "description": "The algorithm for verifying digest in SAML responses: - `SHA256` - `SHA1`", + "default": "SHA256", + "one_of": [ + "SHA256", + "SHA1" + ] + } + }, + { + "issuer": { + "description": "The unique identifier of the IdP application. Formatted as a URL containing information about the IdP so the SP can validate that the SAML assertions it receives are issued from the correct IdP.", + "type": "string", + "required": true + } + }, + { + "nameid_format": { + "type": "string", + "required": false, + "description": "The requested `NameId` format. Options available are: - `Unspecified` - `EmailAddress` - `Persistent` - `Transient`", + "default": "EmailAddress", + "one_of": [ + "Unspecified", + "EmailAddress", + "Persistent", + "Transient" + ] + } + }, + { + "validate_assertion_signature": { + "description": "Enable signature validation for SAML responses.", + "default": true, + "type": "boolean", + "required": false + } + }, + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer. If not set, a Kong Consumer must exist for the SAML IdP user credentials, mapping the username format to the Kong Consumer username.", + "required": false + } + }, + { + "session_secret": { + "type": "string", + "match": "^[0-9a-zA-Z/_+]+$", + "len_max": 32, + "required": true, + "encrypted": true, + "len_min": 32, + "referenceable": true, + "description": "The session secret. This must be a random string of 32 characters from the base64 alphabet (letters, numbers, `/`, `_` and `+`). It is used as the secret key for encrypting session data as well as state information that is sent to the IdP in the authentication exchange." + } + }, + { + "session_audience": { + "type": "string", + "default": "default", + "description": "The session audience, for example \"my-application\"", + "required": false + } + }, + { + "session_cookie_name": { + "type": "string", + "default": "session", + "description": "The session cookie name.", + "required": false + } + }, + { + "session_remember": { + "type": "boolean", + "default": false, + "description": "Enables or disables persistent sessions", + "required": false + } + }, + { + "session_remember_cookie_name": { + "type": "string", + "default": "remember", + "description": "Persistent session cookie name", + "required": false + } + }, + { + "session_remember_rolling_timeout": { + "type": "number", + "default": 604800, + "description": "Persistent session rolling timeout in seconds.", + "required": false + } + }, + { + "session_remember_absolute_timeout": { + "type": "number", + "default": 2592000, + "description": "Persistent session absolute timeout in seconds.", + "required": false + } + }, + { + "session_idling_timeout": { + "type": "number", + "default": 900, + "description": "The session cookie idle time in seconds.", + "required": false + } + }, + { + "session_rolling_timeout": { + "type": "number", + "default": 3600, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "required": false + } + }, + { + "session_absolute_timeout": { + "type": "number", + "default": 86400, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "required": false + } + }, + { + "session_cookie_path": { + "type": "string", + "starts_with": "/", + "required": false, + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "default": "/", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + }, + { + "session_cookie_domain": { + "type": "string", + "description": "The session cookie domain flag.", + "required": false + } + }, + { + "session_cookie_same_site": { + "type": "string", + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "default": "Lax", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "session_cookie_http_only": { + "type": "boolean", + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "required": false + } + }, + { + "session_cookie_secure": { + "type": "boolean", + "description": "The cookie is only sent to the server when a request is made with the https:scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "required": false + } + }, + { + "session_request_headers": { + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "session_response_headers": { + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "session_storage": { + "type": "string", + "required": false, + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie. The session cannot be invalidated or revoked without changing the session secret, but is stateless, and doesn't require a database. - `memcached`: stores session data in memcached - `redis`: stores session data in Redis", + "default": "cookie", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ] + } + }, + { + "session_store_metadata": { + "type": "boolean", + "default": false, + "description": "Configures whether or not session metadata should be stored. This includes information about the active sessions for the `specific_audience` belonging to a specific subject.", + "required": false + } + }, + { + "session_enforce_same_subject": { + "type": "boolean", + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "required": false + } + }, + { + "session_hash_subject": { + "type": "boolean", + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "required": false + } + }, + { + "session_hash_storage_key": { + "type": "boolean", + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "required": false + } + }, + { + "session_memcached_prefix": { + "type": "string", + "description": "The memcached session key prefix.", + "required": false + } + }, + { + "session_memcached_socket": { + "type": "string", + "description": "The memcached unix socket path.", + "required": false + } + }, + { + "session_memcached_host": { + "type": "string", + "default": "127.0.0.1", + "description": "The memcached host.", + "required": false + } + }, + { + "session_memcached_port": { + "type": "integer", + "between": [ + 0, + 65535 + ], + "required": false, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "default": 11211 + } + }, + { + "redis": { + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "database", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + } + ], + "required": true, + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis." + } + }, + { + "sentinel_username": { + "type": "string", + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "type": "string", + "encrypted": true, + "referenceable": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels." + } + }, + { + "database": { + "type": "integer", + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy" + } + }, + { + "keepalive_pool_size": { + "type": "integer", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low." + } + }, + { + "keepalive_backlog": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "type": "boolean", + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false + } + }, + { + "prefix": { + "type": "string", + "description": "The Redis session key prefix.", + "required": false + } + }, + { + "socket": { + "type": "string", + "description": "The Redis unix socket path.", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + } + } + }, + { + "cluster_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + } + } + } + ] + } + } + ], + "shorthand_fields": [ + { + "session_cookie_lifetime": { + "type": "number", + "deprecation": { + "message": "openid-connect: config.session_cookie_lifetime is deprecated, please use config.session_rolling_timeout instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_cookie_idletime": { + "type": "number", + "deprecation": { + "message": "openid-connect: config.session_cookie_idletime is deprecated, please use config.session_idling_timeout instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_cookie_samesite": { + "type": "string", + "deprecation": { + "message": "openid-connect: config.session_cookie_samesite is deprecated, please use config.session_cookie_same_site instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_cookie_httponly": { + "type": "boolean", + "deprecation": { + "message": "openid-connect: config.session_cookie_httponly is deprecated, please use config.session_cookie_http_only instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_memcache_prefix": { + "type": "string", + "deprecation": { + "message": "openid-connect: config.session_memcache_prefix is deprecated, please use config.session_memcached_prefix instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_memcache_socket": { + "type": "string", + "deprecation": { + "message": "openid-connect: config.session_memcache_socket is deprecated, please use config.session_memcached_socket instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_memcache_host": { + "type": "string", + "deprecation": { + "message": "openid-connect: config.session_memcache_host is deprecated, please use config.session_memcached_host instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_memcache_port": { + "type": "integer", + "deprecation": { + "message": "openid-connect: config.session_memcache_port is deprecated, please use config.session_memcached_port instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_cookie_renew": { + "type": "number", + "deprecation": { + "message": "openid-connect: config.session_cookie_renew option does not exist anymore", + "removal_in_version": "4.0" + } + } + }, + { + "session_cookie_maxsize": { + "type": "integer", + "deprecation": { + "message": "openid-connect: config.session_cookie_maxsize option does not exist anymore", + "removal_in_version": "4.0" + } + } + }, + { + "session_strategy": { + "type": "string", + "deprecation": { + "message": "openid-connect: config.session_strategy option does not exist anymore", + "removal_in_version": "4.0" + } + } + }, + { + "session_compressor": { + "type": "string", + "deprecation": { + "message": "openid-connect: config.session_compressor option does not exist anymore", + "removal_in_version": "4.0" + } + } + }, + { + "session_auth_ttl": { + "type": "number", + "deprecation": { + "message": "openid-connect: config.session_auth_ttl option does not exist anymore", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_prefix": { + "type": "string", + "deprecation": { + "message": "saml: config.session_redis_prefix is deprecated, please use config.redis.prefix instead", + "replaced_with": [ + { + "path": [ + "redis", + "prefix" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_socket": { + "type": "string", + "deprecation": { + "message": "saml: config.session_redis_socket is deprecated, please use config.redis.socket instead", + "replaced_with": [ + { + "path": [ + "redis", + "socket" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_host": { + "type": "string", + "deprecation": { + "message": "saml: config.session_redis_host is deprecated, please use config.redis.host instead", + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_port": { + "type": "integer", + "deprecation": { + "message": "saml: config.session_redis_port is deprecated, please use config.redis.port instead", + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_username": { + "type": "string", + "deprecation": { + "message": "saml: config.redis_host is deprecated, please use config.redis.host instead", + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_password": { + "type": "string", + "deprecation": { + "message": "saml: config.session_redis_password is deprecated, please use config.redis.password instead", + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_connect_timeout": { + "type": "integer", + "deprecation": { + "message": "saml: config.session_redis_connect_timeout is deprecated, please use config.redis.connect_timeout instead", + "replaced_with": [ + { + "path": [ + "redis", + "connect_timeout" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_read_timeout": { + "type": "integer", + "deprecation": { + "message": "saml: config.session_redis_read_timeout is deprecated, please use config.redis.read_timeout instead", + "replaced_with": [ + { + "path": [ + "redis", + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_send_timeout": { + "type": "integer", + "deprecation": { + "message": "saml: config.session_redis_send_timeout is deprecated, please use config.redis.send_timeout instead", + "replaced_with": [ + { + "path": [ + "redis", + "send_timeout" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_ssl": { + "type": "boolean", + "deprecation": { + "message": "saml: config.session_redis_ssl is deprecated, please use config.redis.ssl instead", + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_ssl_verify": { + "type": "boolean", + "deprecation": { + "message": "saml: config.session_redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead", + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_server_name": { + "type": "string", + "deprecation": { + "message": "saml: config.session_redis_server_name is deprecated, please use config.redis.server_name instead", + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_cluster_nodes": { + "type": "array", + "deprecation": { + "message": "saml: config.session_redis_cluster_nodes is deprecated, please use config.redis.cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + }, + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "session_redis_cluster_max_redirections": { + "type": "integer", + "deprecation": { + "message": "saml: config.session_redis_cluster_max_redirections is deprecated, please use config.redis.cluster_max_redirections instead", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_max_redirections" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_cluster_maxredirections": { + "type": "integer", + "deprecation": { + "message": "saml: config.session_redis_cluster_maxredirections is deprecated, please use config.redis.cluster_max_redirections instead", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_max_redirections" + ] + } + ], + "removal_in_version": "4.0" + } + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/saml/3.4.x.json b/schemas/saml/3.4.x.json index 60c0881c..6980b35a 100644 --- a/schemas/saml/3.4.x.json +++ b/schemas/saml/3.4.x.json @@ -2,6 +2,7 @@ "fields": [ { "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, "reference": "consumers", "type": "foreign" @@ -9,25 +10,34 @@ }, { "protocols": { - "default": [ - "grpc", - "grpcs", - "http", - "https" - ], + "description": "A set of strings representing HTTP protocols.", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" + ] }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], "required": true, "type": "set" } }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, { "config": { "shorthand_fields": [ @@ -102,260 +112,290 @@ } } ], - "type": "record", "fields": [ { "assertion_consumer_path": { + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "required": true, "match_none": [ { "err": "must not have empty segments", "pattern": "//" } ], - "type": "string", - "starts_with": "/", - "required": true + "type": "string" } }, { "idp_sso_url": { - "type": "string", - "required": true + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": true, + "type": "string" } }, { "idp_certificate": { - "required": false, + "description": "The public certificate provided by the IdP. This is used to validate responses from the IdP. Only include the contents of the certificate. Do not include the header (`BEGIN CERTIFICATE`) and footer (`END CERTIFICATE`) lines.", + "referenceable": true, "encrypted": true, "type": "string", - "referenceable": true + "required": false } }, { "response_encryption_key": { - "required": false, + "description": "The private encryption key required to decrypt encrypted assertions.", + "referenceable": true, "encrypted": true, "type": "string", - "referenceable": true + "required": false } }, { "request_signing_key": { - "required": false, + "description": "The private key for signing requests. If this parameter is set, requests sent to the IdP are signed. The `request_signing_certificate` parameter must be set as well.", + "referenceable": true, "encrypted": true, "type": "string", - "referenceable": true + "required": false } }, { "request_signing_certificate": { - "required": false, + "description": "The certificate for signing requests.", + "referenceable": true, "encrypted": true, "type": "string", - "referenceable": true + "required": false } }, { "request_signature_algorithm": { - "required": false, + "description": "The signature algorithm for signing Authn requests. Options available are: - `SHA256` - `SHA384` - `SHA512`", "one_of": [ "SHA256", "SHA384", "SHA512" ], - "type": "string", - "default": "SHA256" + "default": "SHA256", + "required": false, + "type": "string" } }, { "request_digest_algorithm": { - "required": false, + "description": "The digest algorithm for Authn requests: - `SHA256` - `SHA1`", "one_of": [ "SHA256", "SHA1" ], - "type": "string", - "default": "SHA256" + "default": "SHA256", + "required": false, + "type": "string" } }, { "response_signature_algorithm": { - "required": false, + "description": "The algorithm for validating signatures in SAML responses. Options available are: - `SHA256` - `SHA384` - `SHA512`", "one_of": [ "SHA256", "SHA384", "SHA512" ], - "type": "string", - "default": "SHA256" + "default": "SHA256", + "required": false, + "type": "string" } }, { "response_digest_algorithm": { - "required": false, + "description": "The algorithm for verifying digest in SAML responses: - `SHA256` - `SHA1`", "one_of": [ "SHA256", "SHA1" ], - "type": "string", - "default": "SHA256" + "default": "SHA256", + "required": false, + "type": "string" } }, { "issuer": { + "description": "The unique identifier of the IdP application. Formatted as a URL containing information about the IdP so the SP can validate that the SAML assertions it receives are issued from the correct IdP.", "required": true, "type": "string" } }, { "nameid_format": { - "required": false, + "description": "The requested `NameId` format. Options available are: - `Unspecified` - `EmailAddress` - `Persistent` - `Transient`", "one_of": [ "Unspecified", "EmailAddress", "Persistent", "Transient" ], - "type": "string", - "default": "EmailAddress" + "default": "EmailAddress", + "required": false, + "type": "string" } }, { "validate_assertion_signature": { - "default": true, + "description": "Enable signature validation for SAML responses.", + "required": false, "type": "boolean", - "required": false + "default": true } }, { "anonymous": { - "type": "string", - "required": false + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer. If not set, a Kong Consumer must exist for the SAML IdP user credentials, mapping the username format to the Kong Consumer username.", + "required": false, + "type": "string" } }, { "session_secret": { + "description": "The session secret. This must be a random string of 32 characters from the base64 alphabet (letters, numbers, `/`, `_` and `+`). It is used as the secret key for encrypting session data as well as state information that is sent to the IdP in the authentication exchange.", + "referenceable": true, "match": "^[0-9a-zA-Z/_+]+$", "len_min": 32, - "len_max": 32, - "required": true, - "referenceable": true, "encrypted": true, - "type": "string" + "required": true, + "type": "string", + "len_max": 32 } }, { "session_audience": { - "default": "default", + "description": "The session audience, for example \"my-application\"", + "required": false, "type": "string", - "required": false + "default": "default" } }, { "session_cookie_name": { - "default": "session", + "description": "The session cookie name.", + "required": false, "type": "string", - "required": false + "default": "session" } }, { "session_remember": { - "default": false, + "description": "Enables or disables persistent sessions", + "required": false, "type": "boolean", - "required": false + "default": false } }, { "session_remember_cookie_name": { - "default": "remember", + "description": "Persistent session cookie name", + "required": false, "type": "string", - "required": false + "default": "remember" } }, { "session_remember_rolling_timeout": { - "default": 604800, + "description": "Persistent session rolling timeout in seconds.", + "required": false, "type": "number", - "required": false + "default": 604800 } }, { "session_remember_absolute_timeout": { - "default": 2592000, + "description": "Persistent session absolute timeout in seconds.", + "required": false, "type": "number", - "required": false + "default": 2592000 } }, { "session_idling_timeout": { - "default": 900, + "description": "The session cookie idle time in seconds.", + "required": false, "type": "number", - "required": false + "default": 900 } }, { "session_rolling_timeout": { - "default": 3600, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "required": false, "type": "number", - "required": false + "default": 3600 } }, { "session_absolute_timeout": { - "default": 86400, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "required": false, "type": "number", - "required": false + "default": 86400 } }, { "session_cookie_path": { + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "default": "/", + "required": false, "match_none": [ { "err": "must not have empty segments", "pattern": "//" } ], - "starts_with": "/", - "default": "/", - "required": false, "type": "string" } }, { "session_cookie_domain": { - "type": "string", - "required": false + "description": "The session cookie domain flag.", + "required": false, + "type": "string" } }, { "session_cookie_same_site": { - "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", "one_of": [ "Strict", "Lax", "None", "Default" ], - "type": "string", - "default": "Lax" + "default": "Lax", + "required": false, + "type": "string" } }, { "session_cookie_http_only": { - "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "required": false, "type": "boolean", - "required": false + "default": true } }, { "session_cookie_secure": { - "type": "boolean", - "required": false + "description": "The cookie is only sent to the server when a request is made with the https:scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "required": false, + "type": "boolean" } }, { "session_request_headers": { + "type": "set", "elements": { + "type": "string", "one_of": [ "id", "audience", @@ -364,15 +404,15 @@ "idling-timeout", "rolling-timeout", "absolute-timeout" - ], - "type": "string" - }, - "type": "set" + ] + } } }, { "session_response_headers": { + "type": "set", "elements": { + "type": "string", "one_of": [ "id", "audience", @@ -381,115 +421,127 @@ "idling-timeout", "rolling-timeout", "absolute-timeout" - ], - "type": "string" - }, - "type": "set" + ] + } } }, { "session_storage": { - "required": false, + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie. The session cannot be invalidated or revoked without changing the session secret, but is stateless, and doesn't require a database. - `memcached`: stores session data in memcached - `redis`: stores session data in Redis", "one_of": [ "cookie", "memcache", "memcached", "redis" ], - "type": "string", - "default": "cookie" + "default": "cookie", + "required": false, + "type": "string" } }, { "session_store_metadata": { - "default": false, + "description": "Configures whether or not session metadata should be stored. This includes information about the active sessions for the `specific_audience` belonging to a specific subject.", + "required": false, "type": "boolean", - "required": false + "default": false } }, { "session_enforce_same_subject": { - "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "required": false, "type": "boolean", - "required": false + "default": false } }, { "session_hash_subject": { - "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "required": false, "type": "boolean", - "required": false + "default": false } }, { "session_hash_storage_key": { - "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "required": false, "type": "boolean", - "required": false + "default": false } }, { "session_memcached_prefix": { - "type": "string", - "required": false + "description": "The memcached session key prefix.", + "required": false, + "type": "string" } }, { "session_memcached_socket": { - "type": "string", - "required": false + "description": "The memcached unix socket path.", + "required": false, + "type": "string" } }, { "session_memcached_host": { - "default": "127.0.0.1", + "description": "The memcached host.", + "required": false, "type": "string", - "required": false + "default": "127.0.0.1" } }, { "session_memcached_port": { - "type": "integer", "between": [ 0, 65535 ], + "default": 11211, "required": false, - "default": 11211 + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." } }, { "session_redis_prefix": { - "type": "string", - "required": false + "description": "The Redis session key prefix.", + "required": false, + "type": "string" } }, { "session_redis_socket": { - "type": "string", - "required": false + "description": "The Redis unix socket path.", + "required": false, + "type": "string" } }, { "session_redis_host": { - "default": "127.0.0.1", + "description": "The Redis host IP.", + "required": false, "type": "string", - "required": false + "default": "127.0.0.1" } }, { "session_redis_port": { - "type": "integer", "between": [ 0, 65535 ], + "default": 6379, "required": false, - "default": 6379 + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." } }, { "session_redis_username": { + "description": "Redis username if the `redis` session storage is defined and ACL authentication is desired.If undefined, ACL authentication will not be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`.", "referenceable": true, "type": "string", "required": false @@ -497,87 +549,102 @@ }, { "session_redis_password": { - "required": false, + "description": "Password to use for Redis connection when the `redis` session storage is defined. If undefined, no auth commands are sent to Redis. This value is pulled from", + "referenceable": true, "encrypted": true, "type": "string", - "referenceable": true + "required": false } }, { "session_redis_connect_timeout": { - "type": "integer", - "required": false + "description": "The Redis connection timeout in milliseconds.", + "required": false, + "type": "integer" } }, { "session_redis_read_timeout": { - "type": "integer", - "required": false + "description": "The Redis read timeout in milliseconds.", + "required": false, + "type": "integer" } }, { "session_redis_send_timeout": { - "type": "integer", - "required": false + "description": "The Redis send timeout in milliseconds.", + "required": false, + "type": "integer" } }, { "session_redis_ssl": { - "default": false, + "description": "Use SSL/TLS for the Redis connection.", + "required": false, "type": "boolean", - "required": false + "default": false } }, { "session_redis_ssl_verify": { - "default": false, + "description": "Verify the Redis server certificate.", + "required": false, "type": "boolean", - "required": false + "default": false } }, { "session_redis_server_name": { - "type": "string", - "required": false + "description": "The SNI used for connecting to the Redis server.", + "required": false, + "type": "string" } }, { "session_redis_cluster_nodes": { - "type": "array", + "description": "The Redis cluster node host. Takes an array of host records, with either `ip` or `host`, and `port` values.", "required": false, + "type": "array", "elements": { + "type": "record", "fields": [ { "ip": { + "description": "A string representing a host name, such as example.com.", + "required": true, "type": "string", - "default": "127.0.0.1", - "required": true + "default": "127.0.0.1" } }, { "port": { + "default": 6379, "between": [ 0, 65535 ], "type": "integer", - "default": 6379 + "description": "An integer representing a port number between 0 and 65535, inclusive." } } - ], - "type": "record" + ] } } }, { "session_redis_cluster_max_redirections": { - "type": "integer", - "required": false + "description": "The Redis cluster maximum redirects.", + "required": false, + "type": "integer" } } ], + "type": "record", "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/saml/3.5.x.json b/schemas/saml/3.5.x.json new file mode 100644 index 00000000..2157566c --- /dev/null +++ b/schemas/saml/3.5.x.json @@ -0,0 +1,650 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumers" + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumer_groups" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "assertion_consumer_path": { + "required": true, + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "type": "string", + "starts_with": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)." + } + }, + { + "idp_sso_url": { + "required": true, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "idp_certificate": { + "required": false, + "type": "string", + "referenceable": true, + "description": "The public certificate provided by the IdP. This is used to validate responses from the IdP. Only include the contents of the certificate. Do not include the header (`BEGIN CERTIFICATE`) and footer (`END CERTIFICATE`) lines.", + "encrypted": true + } + }, + { + "response_encryption_key": { + "required": false, + "type": "string", + "referenceable": true, + "description": "The private encryption key required to decrypt encrypted assertions.", + "encrypted": true + } + }, + { + "request_signing_key": { + "required": false, + "type": "string", + "referenceable": true, + "description": "The private key for signing requests. If this parameter is set, requests sent to the IdP are signed. The `request_signing_certificate` parameter must be set as well.", + "encrypted": true + } + }, + { + "request_signing_certificate": { + "required": false, + "type": "string", + "referenceable": true, + "description": "The certificate for signing requests.", + "encrypted": true + } + }, + { + "request_signature_algorithm": { + "required": false, + "type": "string", + "default": "SHA256", + "one_of": [ + "SHA256", + "SHA384", + "SHA512" + ], + "description": "The signature algorithm for signing Authn requests. Options available are: - `SHA256` - `SHA384` - `SHA512`" + } + }, + { + "request_digest_algorithm": { + "required": false, + "type": "string", + "default": "SHA256", + "one_of": [ + "SHA256", + "SHA1" + ], + "description": "The digest algorithm for Authn requests: - `SHA256` - `SHA1`" + } + }, + { + "response_signature_algorithm": { + "required": false, + "type": "string", + "default": "SHA256", + "one_of": [ + "SHA256", + "SHA384", + "SHA512" + ], + "description": "The algorithm for validating signatures in SAML responses. Options available are: - `SHA256` - `SHA384` - `SHA512`" + } + }, + { + "response_digest_algorithm": { + "required": false, + "type": "string", + "default": "SHA256", + "one_of": [ + "SHA256", + "SHA1" + ], + "description": "The algorithm for verifying digest in SAML responses: - `SHA256` - `SHA1`" + } + }, + { + "issuer": { + "required": true, + "type": "string", + "description": "The unique identifier of the IdP application. Formatted as a URL containing information about the IdP so the SP can validate that the SAML assertions it receives are issued from the correct IdP." + } + }, + { + "nameid_format": { + "required": false, + "type": "string", + "default": "EmailAddress", + "one_of": [ + "Unspecified", + "EmailAddress", + "Persistent", + "Transient" + ], + "description": "The requested `NameId` format. Options available are: - `Unspecified` - `EmailAddress` - `Persistent` - `Transient`" + } + }, + { + "validate_assertion_signature": { + "required": false, + "type": "boolean", + "description": "Enable signature validation for SAML responses.", + "default": true + } + }, + { + "anonymous": { + "required": false, + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer. If not set, a Kong Consumer must exist for the SAML IdP user credentials, mapping the username format to the Kong Consumer username." + } + }, + { + "session_secret": { + "required": true, + "referenceable": true, + "type": "string", + "len_min": 32, + "len_max": 32, + "match": "^[0-9a-zA-Z/_+]+$", + "description": "The session secret. This must be a random string of 32 characters from the base64 alphabet (letters, numbers, `/`, `_` and `+`). It is used as the secret key for encrypting session data as well as state information that is sent to the IdP in the authentication exchange.", + "encrypted": true + } + }, + { + "session_audience": { + "required": false, + "type": "string", + "description": "The session audience, for example \"my-application\"", + "default": "default" + } + }, + { + "session_cookie_name": { + "required": false, + "type": "string", + "description": "The session cookie name.", + "default": "session" + } + }, + { + "session_remember": { + "required": false, + "type": "boolean", + "description": "Enables or disables persistent sessions", + "default": false + } + }, + { + "session_remember_cookie_name": { + "required": false, + "type": "string", + "description": "Persistent session cookie name", + "default": "remember" + } + }, + { + "session_remember_rolling_timeout": { + "required": false, + "type": "number", + "description": "Persistent session rolling timeout in seconds.", + "default": 604800 + } + }, + { + "session_remember_absolute_timeout": { + "required": false, + "type": "number", + "description": "Persistent session absolute timeout in seconds.", + "default": 2592000 + } + }, + { + "session_idling_timeout": { + "required": false, + "type": "number", + "description": "The session cookie idle time in seconds.", + "default": 900 + } + }, + { + "session_rolling_timeout": { + "required": false, + "type": "number", + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "default": 3600 + } + }, + { + "session_absolute_timeout": { + "required": false, + "type": "number", + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "default": 86400 + } + }, + { + "session_cookie_path": { + "required": false, + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "type": "string", + "default": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "starts_with": "/" + } + }, + { + "session_cookie_domain": { + "required": false, + "type": "string", + "description": "The session cookie domain flag." + } + }, + { + "session_cookie_same_site": { + "required": false, + "type": "string", + "default": "Lax", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks." + } + }, + { + "session_cookie_http_only": { + "required": false, + "type": "boolean", + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "default": true + } + }, + { + "session_cookie_secure": { + "required": false, + "type": "boolean", + "description": "The cookie is only sent to the server when a request is made with the https:scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks." + } + }, + { + "session_request_headers": { + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "session_response_headers": { + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "session_storage": { + "required": false, + "type": "string", + "default": "cookie", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie. The session cannot be invalidated or revoked without changing the session secret, but is stateless, and doesn't require a database. - `memcached`: stores session data in memcached - `redis`: stores session data in Redis" + } + }, + { + "session_store_metadata": { + "required": false, + "type": "boolean", + "description": "Configures whether or not session metadata should be stored. This includes information about the active sessions for the `specific_audience` belonging to a specific subject.", + "default": false + } + }, + { + "session_enforce_same_subject": { + "required": false, + "type": "boolean", + "description": "When set to `true`, audiences are forced to share the same subject.", + "default": false + } + }, + { + "session_hash_subject": { + "required": false, + "type": "boolean", + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "default": false + } + }, + { + "session_hash_storage_key": { + "required": false, + "type": "boolean", + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "default": false + } + }, + { + "session_memcached_prefix": { + "required": false, + "type": "string", + "description": "The memcached session key prefix." + } + }, + { + "session_memcached_socket": { + "required": false, + "type": "string", + "description": "The memcached unix socket path." + } + }, + { + "session_memcached_host": { + "required": false, + "type": "string", + "description": "The memcached host.", + "default": "127.0.0.1" + } + }, + { + "session_memcached_port": { + "required": false, + "type": "integer", + "default": 11211, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "session_redis_prefix": { + "required": false, + "type": "string", + "description": "The Redis session key prefix." + } + }, + { + "session_redis_socket": { + "required": false, + "type": "string", + "description": "The Redis unix socket path." + } + }, + { + "session_redis_host": { + "required": false, + "type": "string", + "description": "The Redis host IP.", + "default": "127.0.0.1" + } + }, + { + "session_redis_port": { + "required": false, + "type": "integer", + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "session_redis_username": { + "referenceable": true, + "required": false, + "description": "Redis username if the `redis` session storage is defined and ACL authentication is desired.If undefined, ACL authentication will not be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`.", + "type": "string" + } + }, + { + "session_redis_password": { + "required": false, + "type": "string", + "referenceable": true, + "description": "Password to use for Redis connection when the `redis` session storage is defined. If undefined, no auth commands are sent to Redis. This value is pulled from", + "encrypted": true + } + }, + { + "session_redis_connect_timeout": { + "required": false, + "type": "integer", + "description": "The Redis connection timeout in milliseconds." + } + }, + { + "session_redis_read_timeout": { + "required": false, + "type": "integer", + "description": "The Redis read timeout in milliseconds." + } + }, + { + "session_redis_send_timeout": { + "required": false, + "type": "integer", + "description": "The Redis send timeout in milliseconds." + } + }, + { + "session_redis_ssl": { + "required": false, + "type": "boolean", + "description": "Use SSL/TLS for the Redis connection.", + "default": false + } + }, + { + "session_redis_ssl_verify": { + "required": false, + "type": "boolean", + "description": "Verify the Redis server certificate.", + "default": false + } + }, + { + "session_redis_server_name": { + "required": false, + "type": "string", + "description": "The SNI used for connecting to the Redis server." + } + }, + { + "session_redis_cluster_nodes": { + "required": false, + "description": "The Redis cluster node host. Takes an array of host records, with either `ip` or `host`, and `port` values.", + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + } + ] + } + } + }, + { + "session_redis_cluster_max_redirections": { + "required": false, + "type": "integer", + "description": "The Redis cluster maximum redirects." + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "session_cookie_lifetime": { + "type": "number" + } + }, + { + "session_cookie_idletime": { + "type": "number" + } + }, + { + "session_cookie_samesite": { + "type": "string" + } + }, + { + "session_cookie_httponly": { + "type": "boolean" + } + }, + { + "session_memcache_prefix": { + "type": "string" + } + }, + { + "session_memcache_socket": { + "type": "string" + } + }, + { + "session_memcache_host": { + "type": "string" + } + }, + { + "session_memcache_port": { + "type": "integer" + } + }, + { + "session_redis_cluster_maxredirections": { + "type": "integer" + } + }, + { + "session_cookie_renew": { + "type": "number" + } + }, + { + "session_cookie_maxsize": { + "type": "integer" + } + }, + { + "session_strategy": { + "type": "string" + } + }, + { + "session_compressor": { + "type": "string" + } + }, + { + "session_auth_ttl": { + "type": "number" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/saml/3.6.x.json b/schemas/saml/3.6.x.json new file mode 100644 index 00000000..cc74d5da --- /dev/null +++ b/schemas/saml/3.6.x.json @@ -0,0 +1,650 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "assertion_consumer_path": { + "type": "string", + "starts_with": "/", + "required": true, + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + }, + { + "idp_sso_url": { + "required": true, + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "idp_certificate": { + "referenceable": true, + "type": "string", + "required": false, + "description": "The public certificate provided by the IdP. This is used to validate responses from the IdP. Only include the contents of the certificate. Do not include the header (`BEGIN CERTIFICATE`) and footer (`END CERTIFICATE`) lines.", + "encrypted": true + } + }, + { + "response_encryption_key": { + "referenceable": true, + "type": "string", + "required": false, + "description": "The private encryption key required to decrypt encrypted assertions.", + "encrypted": true + } + }, + { + "request_signing_key": { + "referenceable": true, + "type": "string", + "required": false, + "description": "The private key for signing requests. If this parameter is set, requests sent to the IdP are signed. The `request_signing_certificate` parameter must be set as well.", + "encrypted": true + } + }, + { + "request_signing_certificate": { + "referenceable": true, + "type": "string", + "required": false, + "description": "The certificate for signing requests.", + "encrypted": true + } + }, + { + "request_signature_algorithm": { + "type": "string", + "default": "SHA256", + "required": false, + "description": "The signature algorithm for signing Authn requests. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "one_of": [ + "SHA256", + "SHA384", + "SHA512" + ] + } + }, + { + "request_digest_algorithm": { + "type": "string", + "default": "SHA256", + "required": false, + "description": "The digest algorithm for Authn requests: - `SHA256` - `SHA1`", + "one_of": [ + "SHA256", + "SHA1" + ] + } + }, + { + "response_signature_algorithm": { + "type": "string", + "default": "SHA256", + "required": false, + "description": "The algorithm for validating signatures in SAML responses. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "one_of": [ + "SHA256", + "SHA384", + "SHA512" + ] + } + }, + { + "response_digest_algorithm": { + "type": "string", + "default": "SHA256", + "required": false, + "description": "The algorithm for verifying digest in SAML responses: - `SHA256` - `SHA1`", + "one_of": [ + "SHA256", + "SHA1" + ] + } + }, + { + "issuer": { + "required": true, + "type": "string", + "description": "The unique identifier of the IdP application. Formatted as a URL containing information about the IdP so the SP can validate that the SAML assertions it receives are issued from the correct IdP." + } + }, + { + "nameid_format": { + "type": "string", + "default": "EmailAddress", + "required": false, + "description": "The requested `NameId` format. Options available are: - `Unspecified` - `EmailAddress` - `Persistent` - `Transient`", + "one_of": [ + "Unspecified", + "EmailAddress", + "Persistent", + "Transient" + ] + } + }, + { + "validate_assertion_signature": { + "required": false, + "type": "boolean", + "description": "Enable signature validation for SAML responses.", + "default": true + } + }, + { + "anonymous": { + "required": false, + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer. If not set, a Kong Consumer must exist for the SAML IdP user credentials, mapping the username format to the Kong Consumer username." + } + }, + { + "session_secret": { + "referenceable": true, + "type": "string", + "len_max": 32, + "len_min": 32, + "encrypted": true, + "match": "^[0-9a-zA-Z/_+]+$", + "description": "The session secret. This must be a random string of 32 characters from the base64 alphabet (letters, numbers, `/`, `_` and `+`). It is used as the secret key for encrypting session data as well as state information that is sent to the IdP in the authentication exchange.", + "required": true + } + }, + { + "session_audience": { + "required": false, + "type": "string", + "description": "The session audience, for example \"my-application\"", + "default": "default" + } + }, + { + "session_cookie_name": { + "required": false, + "type": "string", + "description": "The session cookie name.", + "default": "session" + } + }, + { + "session_remember": { + "required": false, + "type": "boolean", + "description": "Enables or disables persistent sessions", + "default": false + } + }, + { + "session_remember_cookie_name": { + "required": false, + "type": "string", + "description": "Persistent session cookie name", + "default": "remember" + } + }, + { + "session_remember_rolling_timeout": { + "required": false, + "type": "number", + "description": "Persistent session rolling timeout in seconds.", + "default": 604800 + } + }, + { + "session_remember_absolute_timeout": { + "required": false, + "type": "number", + "description": "Persistent session absolute timeout in seconds.", + "default": 2592000 + } + }, + { + "session_idling_timeout": { + "required": false, + "type": "number", + "description": "The session cookie idle time in seconds.", + "default": 900 + } + }, + { + "session_rolling_timeout": { + "required": false, + "type": "number", + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "default": 3600 + } + }, + { + "session_absolute_timeout": { + "required": false, + "type": "number", + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "default": 86400 + } + }, + { + "session_cookie_path": { + "type": "string", + "default": "/", + "starts_with": "/", + "required": false, + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ] + } + }, + { + "session_cookie_domain": { + "required": false, + "type": "string", + "description": "The session cookie domain flag." + } + }, + { + "session_cookie_same_site": { + "type": "string", + "default": "Lax", + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "session_cookie_http_only": { + "required": false, + "type": "boolean", + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "default": true + } + }, + { + "session_cookie_secure": { + "required": false, + "type": "boolean", + "description": "The cookie is only sent to the server when a request is made with the https:scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks." + } + }, + { + "session_request_headers": { + "elements": { + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ], + "type": "string" + }, + "type": "set" + } + }, + { + "session_response_headers": { + "elements": { + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ], + "type": "string" + }, + "type": "set" + } + }, + { + "session_storage": { + "type": "string", + "default": "cookie", + "required": false, + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie. The session cannot be invalidated or revoked without changing the session secret, but is stateless, and doesn't require a database. - `memcached`: stores session data in memcached - `redis`: stores session data in Redis", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ] + } + }, + { + "session_store_metadata": { + "required": false, + "type": "boolean", + "description": "Configures whether or not session metadata should be stored. This includes information about the active sessions for the `specific_audience` belonging to a specific subject.", + "default": false + } + }, + { + "session_enforce_same_subject": { + "required": false, + "type": "boolean", + "description": "When set to `true`, audiences are forced to share the same subject.", + "default": false + } + }, + { + "session_hash_subject": { + "required": false, + "type": "boolean", + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "default": false + } + }, + { + "session_hash_storage_key": { + "required": false, + "type": "boolean", + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "default": false + } + }, + { + "session_memcached_prefix": { + "required": false, + "type": "string", + "description": "The memcached session key prefix." + } + }, + { + "session_memcached_socket": { + "required": false, + "type": "string", + "description": "The memcached unix socket path." + } + }, + { + "session_memcached_host": { + "required": false, + "type": "string", + "description": "The memcached host.", + "default": "127.0.0.1" + } + }, + { + "session_memcached_port": { + "type": "integer", + "default": 11211, + "between": [ + 0, + 65535 + ], + "required": false, + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "session_redis_prefix": { + "required": false, + "type": "string", + "description": "The Redis session key prefix." + } + }, + { + "session_redis_socket": { + "required": false, + "type": "string", + "description": "The Redis unix socket path." + } + }, + { + "session_redis_host": { + "required": false, + "type": "string", + "description": "The Redis host IP.", + "default": "127.0.0.1" + } + }, + { + "session_redis_port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "required": false, + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "session_redis_username": { + "required": false, + "type": "string", + "description": "Redis username if the `redis` session storage is defined and ACL authentication is desired.If undefined, ACL authentication will not be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`.", + "referenceable": true + } + }, + { + "session_redis_password": { + "referenceable": true, + "type": "string", + "required": false, + "description": "Password to use for Redis connection when the `redis` session storage is defined. If undefined, no auth commands are sent to Redis. This value is pulled from", + "encrypted": true + } + }, + { + "session_redis_connect_timeout": { + "required": false, + "type": "integer", + "description": "The Redis connection timeout in milliseconds." + } + }, + { + "session_redis_read_timeout": { + "required": false, + "type": "integer", + "description": "The Redis read timeout in milliseconds." + } + }, + { + "session_redis_send_timeout": { + "required": false, + "type": "integer", + "description": "The Redis send timeout in milliseconds." + } + }, + { + "session_redis_ssl": { + "required": false, + "type": "boolean", + "description": "Use SSL/TLS for the Redis connection.", + "default": false + } + }, + { + "session_redis_ssl_verify": { + "required": false, + "type": "boolean", + "description": "Verify the Redis server certificate.", + "default": false + } + }, + { + "session_redis_server_name": { + "required": false, + "type": "string", + "description": "The SNI used for connecting to the Redis server." + } + }, + { + "session_redis_cluster_nodes": { + "required": false, + "type": "array", + "description": "The Redis cluster node host. Takes an array of host records, with either `ip` or `host`, and `port` values.", + "elements": { + "fields": [ + { + "ip": { + "required": true, + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + } + ], + "type": "record" + } + } + }, + { + "session_redis_cluster_max_redirections": { + "required": false, + "type": "integer", + "description": "The Redis cluster maximum redirects." + } + } + ], + "shorthand_fields": [ + { + "session_cookie_lifetime": { + "type": "number" + } + }, + { + "session_cookie_idletime": { + "type": "number" + } + }, + { + "session_cookie_samesite": { + "type": "string" + } + }, + { + "session_cookie_httponly": { + "type": "boolean" + } + }, + { + "session_memcache_prefix": { + "type": "string" + } + }, + { + "session_memcache_socket": { + "type": "string" + } + }, + { + "session_memcache_host": { + "type": "string" + } + }, + { + "session_memcache_port": { + "type": "integer" + } + }, + { + "session_redis_cluster_maxredirections": { + "type": "integer" + } + }, + { + "session_cookie_renew": { + "type": "number" + } + }, + { + "session_cookie_maxsize": { + "type": "integer" + } + }, + { + "session_strategy": { + "type": "string" + } + }, + { + "session_compressor": { + "type": "string" + } + }, + { + "session_auth_ttl": { + "type": "number" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/saml/3.7.x.json b/schemas/saml/3.7.x.json new file mode 100644 index 00000000..443de58e --- /dev/null +++ b/schemas/saml/3.7.x.json @@ -0,0 +1,706 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "assertion_consumer_path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "required": true, + "type": "string", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "starts_with": "/" + } + }, + { + "idp_sso_url": { + "required": true, + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "idp_certificate": { + "encrypted": true, + "referenceable": true, + "required": false, + "description": "The public certificate provided by the IdP. This is used to validate responses from the IdP. Only include the contents of the certificate. Do not include the header (`BEGIN CERTIFICATE`) and footer (`END CERTIFICATE`) lines.", + "type": "string" + } + }, + { + "response_encryption_key": { + "encrypted": true, + "referenceable": true, + "required": false, + "description": "The private encryption key required to decrypt encrypted assertions.", + "type": "string" + } + }, + { + "request_signing_key": { + "encrypted": true, + "referenceable": true, + "required": false, + "description": "The private key for signing requests. If this parameter is set, requests sent to the IdP are signed. The `request_signing_certificate` parameter must be set as well.", + "type": "string" + } + }, + { + "request_signing_certificate": { + "encrypted": true, + "referenceable": true, + "required": false, + "description": "The certificate for signing requests.", + "type": "string" + } + }, + { + "request_signature_algorithm": { + "default": "SHA256", + "required": false, + "description": "The signature algorithm for signing Authn requests. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "type": "string", + "one_of": [ + "SHA256", + "SHA384", + "SHA512" + ] + } + }, + { + "request_digest_algorithm": { + "default": "SHA256", + "required": false, + "description": "The digest algorithm for Authn requests: - `SHA256` - `SHA1`", + "type": "string", + "one_of": [ + "SHA256", + "SHA1" + ] + } + }, + { + "response_signature_algorithm": { + "default": "SHA256", + "required": false, + "description": "The algorithm for validating signatures in SAML responses. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "type": "string", + "one_of": [ + "SHA256", + "SHA384", + "SHA512" + ] + } + }, + { + "response_digest_algorithm": { + "default": "SHA256", + "required": false, + "description": "The algorithm for verifying digest in SAML responses: - `SHA256` - `SHA1`", + "type": "string", + "one_of": [ + "SHA256", + "SHA1" + ] + } + }, + { + "issuer": { + "required": true, + "description": "The unique identifier of the IdP application. Formatted as a URL containing information about the IdP so the SP can validate that the SAML assertions it receives are issued from the correct IdP.", + "type": "string" + } + }, + { + "nameid_format": { + "default": "EmailAddress", + "required": false, + "description": "The requested `NameId` format. Options available are: - `Unspecified` - `EmailAddress` - `Persistent` - `Transient`", + "type": "string", + "one_of": [ + "Unspecified", + "EmailAddress", + "Persistent", + "Transient" + ] + } + }, + { + "validate_assertion_signature": { + "required": false, + "description": "Enable signature validation for SAML responses.", + "type": "boolean", + "default": true + } + }, + { + "anonymous": { + "required": false, + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer. If not set, a Kong Consumer must exist for the SAML IdP user credentials, mapping the username format to the Kong Consumer username.", + "type": "string" + } + }, + { + "session_secret": { + "match": "^[0-9a-zA-Z/_+]+$", + "encrypted": true, + "referenceable": true, + "description": "The session secret. This must be a random string of 32 characters from the base64 alphabet (letters, numbers, `/`, `_` and `+`). It is used as the secret key for encrypting session data as well as state information that is sent to the IdP in the authentication exchange.", + "required": true, + "len_min": 32, + "type": "string", + "len_max": 32 + } + }, + { + "session_audience": { + "required": false, + "description": "The session audience, for example \"my-application\"", + "type": "string", + "default": "default" + } + }, + { + "session_cookie_name": { + "required": false, + "description": "The session cookie name.", + "type": "string", + "default": "session" + } + }, + { + "session_remember": { + "required": false, + "description": "Enables or disables persistent sessions", + "type": "boolean", + "default": false + } + }, + { + "session_remember_cookie_name": { + "required": false, + "description": "Persistent session cookie name", + "type": "string", + "default": "remember" + } + }, + { + "session_remember_rolling_timeout": { + "required": false, + "description": "Persistent session rolling timeout in seconds.", + "type": "number", + "default": 604800 + } + }, + { + "session_remember_absolute_timeout": { + "required": false, + "description": "Persistent session absolute timeout in seconds.", + "type": "number", + "default": 2592000 + } + }, + { + "session_idling_timeout": { + "required": false, + "description": "The session cookie idle time in seconds.", + "type": "number", + "default": 900 + } + }, + { + "session_rolling_timeout": { + "required": false, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number", + "default": 3600 + } + }, + { + "session_absolute_timeout": { + "required": false, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number", + "default": 86400 + } + }, + { + "session_cookie_path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "required": false, + "type": "string", + "starts_with": "/", + "default": "/" + } + }, + { + "session_cookie_domain": { + "required": false, + "description": "The session cookie domain flag.", + "type": "string" + } + }, + { + "session_cookie_same_site": { + "default": "Lax", + "required": false, + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "type": "string", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "session_cookie_http_only": { + "required": false, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "type": "boolean", + "default": true + } + }, + { + "session_cookie_secure": { + "required": false, + "description": "The cookie is only sent to the server when a request is made with the https:scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "type": "boolean" + } + }, + { + "session_request_headers": { + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "session_response_headers": { + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "session_storage": { + "default": "cookie", + "required": false, + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie. The session cannot be invalidated or revoked without changing the session secret, but is stateless, and doesn't require a database. - `memcached`: stores session data in memcached - `redis`: stores session data in Redis", + "type": "string", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ] + } + }, + { + "session_store_metadata": { + "required": false, + "description": "Configures whether or not session metadata should be stored. This includes information about the active sessions for the `specific_audience` belonging to a specific subject.", + "type": "boolean", + "default": false + } + }, + { + "session_enforce_same_subject": { + "required": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "type": "boolean", + "default": false + } + }, + { + "session_hash_subject": { + "required": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "type": "boolean", + "default": false + } + }, + { + "session_hash_storage_key": { + "required": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "type": "boolean", + "default": false + } + }, + { + "session_memcached_prefix": { + "required": false, + "description": "The memcached session key prefix.", + "type": "string" + } + }, + { + "session_memcached_socket": { + "required": false, + "description": "The memcached unix socket path.", + "type": "string" + } + }, + { + "session_memcached_host": { + "required": false, + "description": "The memcached host.", + "type": "string", + "default": "127.0.0.1" + } + }, + { + "session_memcached_port": { + "default": 11211, + "required": false, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "session_redis_prefix": { + "required": false, + "description": "The Redis session key prefix.", + "type": "string" + } + }, + { + "session_redis_socket": { + "required": false, + "description": "The Redis unix socket path.", + "type": "string" + } + }, + { + "session_redis_host": { + "required": false, + "description": "The Redis host IP.", + "type": "string", + "default": "127.0.0.1" + } + }, + { + "session_redis_port": { + "default": 6379, + "required": false, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "session_redis_username": { + "required": false, + "type": "string", + "referenceable": true, + "description": "Redis username if the `redis` session storage is defined and ACL authentication is desired.If undefined, ACL authentication will not be performed. This requires Redis v6.0.0+. The username **cannot** be set to `default`." + } + }, + { + "session_redis_password": { + "encrypted": true, + "referenceable": true, + "required": false, + "description": "Password to use for Redis connection when the `redis` session storage is defined. If undefined, no auth commands are sent to Redis. This value is pulled from", + "type": "string" + } + }, + { + "session_redis_connect_timeout": { + "required": false, + "description": "The Redis connection timeout in milliseconds.", + "type": "integer" + } + }, + { + "session_redis_read_timeout": { + "required": false, + "description": "The Redis read timeout in milliseconds.", + "type": "integer" + } + }, + { + "session_redis_send_timeout": { + "required": false, + "description": "The Redis send timeout in milliseconds.", + "type": "integer" + } + }, + { + "session_redis_ssl": { + "required": false, + "description": "Use SSL/TLS for the Redis connection.", + "type": "boolean", + "default": false + } + }, + { + "session_redis_ssl_verify": { + "required": false, + "description": "Verify the Redis server certificate.", + "type": "boolean", + "default": false + } + }, + { + "session_redis_server_name": { + "required": false, + "description": "The SNI used for connecting to the Redis server.", + "type": "string" + } + }, + { + "session_redis_cluster_nodes": { + "required": false, + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "required": true, + "type": "string", + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + } + ] + }, + "description": "The Redis cluster node host. Takes an array of host records, with either `ip` or `host`, and `port` values.", + "type": "array" + } + }, + { + "session_redis_cluster_max_redirections": { + "required": false, + "description": "The Redis cluster maximum redirects.", + "type": "integer" + } + } + ], + "required": true, + "shorthand_fields": [ + { + "session_cookie_lifetime": { + "type": "number", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_lifetime is deprecated, please use config.session_rolling_timeout instead" + } + } + }, + { + "session_cookie_idletime": { + "type": "number", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_idletime is deprecated, please use config.session_idling_timeout instead" + } + } + }, + { + "session_cookie_samesite": { + "type": "string", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_samesite is deprecated, please use config.session_cookie_same_site instead" + } + } + }, + { + "session_cookie_httponly": { + "type": "boolean", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_httponly is deprecated, please use config.session_cookie_http_only instead" + } + } + }, + { + "session_memcache_prefix": { + "type": "string", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_prefix is deprecated, please use config.session_memcached_prefix instead" + } + } + }, + { + "session_memcache_socket": { + "type": "string", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_socket is deprecated, please use config.session_memcached_socket instead" + } + } + }, + { + "session_memcache_host": { + "type": "string", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_host is deprecated, please use config.session_memcached_host instead" + } + } + }, + { + "session_memcache_port": { + "type": "integer", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_port is deprecated, please use config.session_memcached_port instead" + } + } + }, + { + "session_redis_cluster_maxredirections": { + "type": "integer", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_redis_cluster_maxredirections is deprecated, please use config.session_redis_cluster_max_redirections instead" + } + } + }, + { + "session_cookie_renew": { + "type": "number", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_renew option does not exist anymore" + } + } + }, + { + "session_cookie_maxsize": { + "type": "integer", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_maxsize option does not exist anymore" + } + } + }, + { + "session_strategy": { + "type": "string", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_strategy option does not exist anymore" + } + } + }, + { + "session_compressor": { + "type": "string", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_compressor option does not exist anymore" + } + } + }, + { + "session_auth_ttl": { + "type": "number", + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_auth_ttl option does not exist anymore" + } + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/saml/3.8.x.json b/schemas/saml/3.8.x.json new file mode 100644 index 00000000..18157277 --- /dev/null +++ b/schemas/saml/3.8.x.json @@ -0,0 +1,1326 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "assertion_consumer_path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "required": true, + "starts_with": "/", + "type": "string", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)." + } + }, + { + "idp_sso_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": true, + "type": "string" + } + }, + { + "idp_certificate": { + "description": "The public certificate provided by the IdP. This is used to validate responses from the IdP. Only include the contents of the certificate. Do not include the header (`BEGIN CERTIFICATE`) and footer (`END CERTIFICATE`) lines.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "response_encryption_key": { + "description": "The private encryption key required to decrypt encrypted assertions.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "request_signing_key": { + "description": "The private key for signing requests. If this parameter is set, requests sent to the IdP are signed. The `request_signing_certificate` parameter must be set as well.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "request_signing_certificate": { + "description": "The certificate for signing requests.", + "required": false, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "request_signature_algorithm": { + "description": "The signature algorithm for signing Authn requests. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "required": false, + "one_of": [ + "SHA256", + "SHA384", + "SHA512" + ], + "type": "string", + "default": "SHA256" + } + }, + { + "request_digest_algorithm": { + "description": "The digest algorithm for Authn requests: - `SHA256` - `SHA1`", + "required": false, + "one_of": [ + "SHA256", + "SHA1" + ], + "type": "string", + "default": "SHA256" + } + }, + { + "response_signature_algorithm": { + "description": "The algorithm for validating signatures in SAML responses. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "required": false, + "one_of": [ + "SHA256", + "SHA384", + "SHA512" + ], + "type": "string", + "default": "SHA256" + } + }, + { + "response_digest_algorithm": { + "description": "The algorithm for verifying digest in SAML responses: - `SHA256` - `SHA1`", + "required": false, + "one_of": [ + "SHA256", + "SHA1" + ], + "type": "string", + "default": "SHA256" + } + }, + { + "issuer": { + "description": "The unique identifier of the IdP application. Formatted as a URL containing information about the IdP so the SP can validate that the SAML assertions it receives are issued from the correct IdP.", + "required": true, + "type": "string" + } + }, + { + "nameid_format": { + "description": "The requested `NameId` format. Options available are: - `Unspecified` - `EmailAddress` - `Persistent` - `Transient`", + "required": false, + "one_of": [ + "Unspecified", + "EmailAddress", + "Persistent", + "Transient" + ], + "type": "string", + "default": "EmailAddress" + } + }, + { + "validate_assertion_signature": { + "description": "Enable signature validation for SAML responses.", + "required": false, + "type": "boolean", + "default": true + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer. If not set, a Kong Consumer must exist for the SAML IdP user credentials, mapping the username format to the Kong Consumer username.", + "required": false, + "type": "string" + } + }, + { + "session_secret": { + "description": "The session secret. This must be a random string of 32 characters from the base64 alphabet (letters, numbers, `/`, `_` and `+`). It is used as the secret key for encrypting session data as well as state information that is sent to the IdP in the authentication exchange.", + "required": true, + "len_max": 32, + "match": "^[0-9a-zA-Z/_+]+$", + "referenceable": true, + "type": "string", + "len_min": 32, + "encrypted": true + } + }, + { + "session_audience": { + "description": "The session audience, for example \"my-application\"", + "required": false, + "type": "string", + "default": "default" + } + }, + { + "session_cookie_name": { + "description": "The session cookie name.", + "required": false, + "type": "string", + "default": "session" + } + }, + { + "session_remember": { + "description": "Enables or disables persistent sessions", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "session_remember_cookie_name": { + "description": "Persistent session cookie name", + "required": false, + "type": "string", + "default": "remember" + } + }, + { + "session_remember_rolling_timeout": { + "description": "Persistent session rolling timeout in seconds.", + "required": false, + "type": "number", + "default": 604800 + } + }, + { + "session_remember_absolute_timeout": { + "description": "Persistent session absolute timeout in seconds.", + "required": false, + "type": "number", + "default": 2592000 + } + }, + { + "session_idling_timeout": { + "description": "The session cookie idle time in seconds.", + "required": false, + "type": "number", + "default": 900 + } + }, + { + "session_rolling_timeout": { + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "required": false, + "type": "number", + "default": 3600 + } + }, + { + "session_absolute_timeout": { + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "required": false, + "type": "number", + "default": 86400 + } + }, + { + "session_cookie_path": { + "match_none": [ + { + "pattern": "//", + "err": "must not have empty segments" + } + ], + "required": false, + "starts_with": "/", + "type": "string", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "default": "/" + } + }, + { + "session_cookie_domain": { + "description": "The session cookie domain flag.", + "required": false, + "type": "string" + } + }, + { + "session_cookie_same_site": { + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "required": false, + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "type": "string", + "default": "Lax" + } + }, + { + "session_cookie_http_only": { + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "required": false, + "type": "boolean", + "default": true + } + }, + { + "session_cookie_secure": { + "description": "The cookie is only sent to the server when a request is made with the https:scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "required": false, + "type": "boolean" + } + }, + { + "session_request_headers": { + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "session_response_headers": { + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "session_storage": { + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie. The session cannot be invalidated or revoked without changing the session secret, but is stateless, and doesn't require a database. - `memcached`: stores session data in memcached - `redis`: stores session data in Redis", + "required": false, + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ], + "type": "string", + "default": "cookie" + } + }, + { + "session_store_metadata": { + "description": "Configures whether or not session metadata should be stored. This includes information about the active sessions for the `specific_audience` belonging to a specific subject.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "session_enforce_same_subject": { + "description": "When set to `true`, audiences are forced to share the same subject.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "session_hash_subject": { + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "session_hash_storage_key": { + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "required": false, + "type": "string" + } + }, + { + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "required": false, + "type": "string" + } + }, + { + "session_memcached_host": { + "description": "The memcached host.", + "required": false, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "session_memcached_port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": false, + "between": [ + 0, + 65535 + ], + "type": "integer", + "default": 11211 + } + }, + { + "redis": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer", + "between": [ + 1, + 2147483646 + ], + "default": 256 + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer", + "default": 5 + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "prefix": { + "description": "The Redis session key prefix.", + "required": false, + "type": "string" + } + }, + { + "socket": { + "description": "The Redis unix socket path.", + "required": false, + "type": "string" + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_nodes" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_nodes" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_field": "connection_is_proxied", + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host" + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "translate_backwards": [ + "connect_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "required": true, + "type": "record" + } + } + ], + "required": true, + "shorthand_fields": [ + { + "session_cookie_lifetime": { + "deprecation": { + "message": "openid-connect: config.session_cookie_lifetime is deprecated, please use config.session_rolling_timeout instead", + "removal_in_version": "4.0" + }, + "type": "number" + } + }, + { + "session_cookie_idletime": { + "deprecation": { + "message": "openid-connect: config.session_cookie_idletime is deprecated, please use config.session_idling_timeout instead", + "removal_in_version": "4.0" + }, + "type": "number" + } + }, + { + "session_cookie_samesite": { + "deprecation": { + "message": "openid-connect: config.session_cookie_samesite is deprecated, please use config.session_cookie_same_site instead", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_cookie_httponly": { + "deprecation": { + "message": "openid-connect: config.session_cookie_httponly is deprecated, please use config.session_cookie_http_only instead", + "removal_in_version": "4.0" + }, + "type": "boolean" + } + }, + { + "session_memcache_prefix": { + "deprecation": { + "message": "openid-connect: config.session_memcache_prefix is deprecated, please use config.session_memcached_prefix instead", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_memcache_socket": { + "deprecation": { + "message": "openid-connect: config.session_memcache_socket is deprecated, please use config.session_memcached_socket instead", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_memcache_host": { + "deprecation": { + "message": "openid-connect: config.session_memcache_host is deprecated, please use config.session_memcached_host instead", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_memcache_port": { + "deprecation": { + "message": "openid-connect: config.session_memcache_port is deprecated, please use config.session_memcached_port instead", + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "session_cookie_renew": { + "deprecation": { + "message": "openid-connect: config.session_cookie_renew option does not exist anymore", + "removal_in_version": "4.0" + }, + "type": "number" + } + }, + { + "session_cookie_maxsize": { + "deprecation": { + "message": "openid-connect: config.session_cookie_maxsize option does not exist anymore", + "removal_in_version": "4.0" + }, + "type": "integer" + } + }, + { + "session_strategy": { + "deprecation": { + "message": "openid-connect: config.session_strategy option does not exist anymore", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_compressor": { + "deprecation": { + "message": "openid-connect: config.session_compressor option does not exist anymore", + "removal_in_version": "4.0" + }, + "type": "string" + } + }, + { + "session_auth_ttl": { + "deprecation": { + "message": "openid-connect: config.session_auth_ttl option does not exist anymore", + "removal_in_version": "4.0" + }, + "type": "number" + } + }, + { + "session_redis_prefix": { + "type": "string", + "translate_backwards": [ + "redis", + "prefix" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "prefix" + ] + } + ], + "message": "saml: config.session_redis_prefix is deprecated, please use config.redis.prefix instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_socket": { + "type": "string", + "translate_backwards": [ + "redis", + "socket" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "socket" + ] + } + ], + "message": "saml: config.session_redis_socket is deprecated, please use config.redis.socket instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_host": { + "type": "string", + "translate_backwards": [ + "redis", + "host" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ], + "message": "saml: config.session_redis_host is deprecated, please use config.redis.host instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_port": { + "type": "integer", + "translate_backwards": [ + "redis", + "port" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ], + "message": "saml: config.session_redis_port is deprecated, please use config.redis.port instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_username": { + "type": "string", + "translate_backwards": [ + "redis", + "username" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ], + "message": "saml: config.redis_host is deprecated, please use config.redis.host instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_password": { + "type": "string", + "translate_backwards": [ + "redis", + "password" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ], + "message": "saml: config.session_redis_password is deprecated, please use config.redis.password instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_connect_timeout": { + "type": "integer", + "translate_backwards": [ + "redis", + "connect_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "connect_timeout" + ] + } + ], + "message": "saml: config.session_redis_connect_timeout is deprecated, please use config.redis.connect_timeout instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_read_timeout": { + "type": "integer", + "translate_backwards": [ + "redis", + "read_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "read_timeout" + ] + } + ], + "message": "saml: config.session_redis_read_timeout is deprecated, please use config.redis.read_timeout instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_send_timeout": { + "type": "integer", + "translate_backwards": [ + "redis", + "send_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "send_timeout" + ] + } + ], + "message": "saml: config.session_redis_send_timeout is deprecated, please use config.redis.send_timeout instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_ssl": { + "type": "boolean", + "translate_backwards": [ + "redis", + "ssl" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ], + "message": "saml: config.session_redis_ssl is deprecated, please use config.redis.ssl instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_ssl_verify": { + "type": "boolean", + "translate_backwards": [ + "redis", + "ssl_verify" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ], + "message": "saml: config.session_redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_server_name": { + "type": "string", + "translate_backwards": [ + "redis", + "server_name" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ], + "message": "saml: config.session_redis_server_name is deprecated, please use config.redis.server_name instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_cluster_nodes": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "cluster_nodes" + ] + } + ], + "message": "saml: config.session_redis_cluster_nodes is deprecated, please use config.redis.cluster_nodes instead", + "removal_in_version": "4.0" + }, + "type": "array", + "translate_backwards": [ + "redis", + "cluster_nodes" + ], + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + } + } + }, + { + "session_redis_cluster_max_redirections": { + "type": "integer", + "translate_backwards": [ + "redis", + "cluster_max_redirections" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "cluster_max_redirections" + ] + } + ], + "message": "saml: config.session_redis_cluster_max_redirections is deprecated, please use config.redis.cluster_max_redirections instead", + "removal_in_version": "4.0" + } + } + }, + { + "session_redis_cluster_maxredirections": { + "type": "integer", + "translate_backwards": [ + "redis", + "cluster_max_redirections" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "redis", + "cluster_max_redirections" + ] + } + ], + "message": "saml: config.session_redis_cluster_maxredirections is deprecated, please use config.redis.cluster_max_redirections instead", + "removal_in_version": "4.0" + } + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/saml/3.9.x.json b/schemas/saml/3.9.x.json new file mode 100644 index 00000000..b9a8bf2e --- /dev/null +++ b/schemas/saml/3.9.x.json @@ -0,0 +1,1229 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "shorthand_fields": [ + { + "session_cookie_lifetime": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_lifetime is deprecated, please use config.session_rolling_timeout instead" + }, + "type": "number" + } + }, + { + "session_cookie_idletime": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_idletime is deprecated, please use config.session_idling_timeout instead" + }, + "type": "number" + } + }, + { + "session_cookie_samesite": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_samesite is deprecated, please use config.session_cookie_same_site instead" + }, + "type": "string" + } + }, + { + "session_cookie_httponly": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_httponly is deprecated, please use config.session_cookie_http_only instead" + }, + "type": "boolean" + } + }, + { + "session_memcache_prefix": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_prefix is deprecated, please use config.session_memcached_prefix instead" + }, + "type": "string" + } + }, + { + "session_memcache_socket": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_socket is deprecated, please use config.session_memcached_socket instead" + }, + "type": "string" + } + }, + { + "session_memcache_host": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_host is deprecated, please use config.session_memcached_host instead" + }, + "type": "string" + } + }, + { + "session_memcache_port": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_memcache_port is deprecated, please use config.session_memcached_port instead" + }, + "type": "integer" + } + }, + { + "session_cookie_renew": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_renew option does not exist anymore" + }, + "type": "number" + } + }, + { + "session_cookie_maxsize": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_cookie_maxsize option does not exist anymore" + }, + "type": "integer" + } + }, + { + "session_strategy": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_strategy option does not exist anymore" + }, + "type": "string" + } + }, + { + "session_compressor": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_compressor option does not exist anymore" + }, + "type": "string" + } + }, + { + "session_auth_ttl": { + "deprecation": { + "removal_in_version": "4.0", + "message": "openid-connect: config.session_auth_ttl option does not exist anymore" + }, + "type": "number" + } + }, + { + "session_redis_prefix": { + "deprecation": { + "message": "saml: config.session_redis_prefix is deprecated, please use config.redis.prefix instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "prefix" + ] + } + ] + }, + "type": "string" + } + }, + { + "session_redis_socket": { + "deprecation": { + "message": "saml: config.session_redis_socket is deprecated, please use config.redis.socket instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "socket" + ] + } + ] + }, + "type": "string" + } + }, + { + "session_redis_host": { + "deprecation": { + "message": "saml: config.session_redis_host is deprecated, please use config.redis.host instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "host" + ] + } + ] + }, + "type": "string" + } + }, + { + "session_redis_port": { + "deprecation": { + "message": "saml: config.session_redis_port is deprecated, please use config.redis.port instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "port" + ] + } + ] + }, + "type": "integer" + } + }, + { + "session_redis_username": { + "deprecation": { + "message": "saml: config.redis_host is deprecated, please use config.redis.host instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "username" + ] + } + ] + }, + "type": "string" + } + }, + { + "session_redis_password": { + "deprecation": { + "message": "saml: config.session_redis_password is deprecated, please use config.redis.password instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "password" + ] + } + ] + }, + "type": "string" + } + }, + { + "session_redis_connect_timeout": { + "deprecation": { + "message": "saml: config.session_redis_connect_timeout is deprecated, please use config.redis.connect_timeout instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "connect_timeout" + ] + } + ] + }, + "type": "integer" + } + }, + { + "session_redis_read_timeout": { + "deprecation": { + "message": "saml: config.session_redis_read_timeout is deprecated, please use config.redis.read_timeout instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "read_timeout" + ] + } + ] + }, + "type": "integer" + } + }, + { + "session_redis_send_timeout": { + "deprecation": { + "message": "saml: config.session_redis_send_timeout is deprecated, please use config.redis.send_timeout instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "send_timeout" + ] + } + ] + }, + "type": "integer" + } + }, + { + "session_redis_ssl": { + "deprecation": { + "message": "saml: config.session_redis_ssl is deprecated, please use config.redis.ssl instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "ssl" + ] + } + ] + }, + "type": "boolean" + } + }, + { + "session_redis_ssl_verify": { + "deprecation": { + "message": "saml: config.session_redis_ssl_verify is deprecated, please use config.redis.ssl_verify instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "ssl_verify" + ] + } + ] + }, + "type": "boolean" + } + }, + { + "session_redis_server_name": { + "deprecation": { + "message": "saml: config.session_redis_server_name is deprecated, please use config.redis.server_name instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "server_name" + ] + } + ] + }, + "type": "string" + } + }, + { + "session_redis_cluster_nodes": { + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "type": "array", + "deprecation": { + "message": "saml: config.session_redis_cluster_nodes is deprecated, please use config.redis.cluster_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_nodes" + ] + } + ] + } + } + }, + { + "session_redis_cluster_max_redirections": { + "deprecation": { + "message": "saml: config.session_redis_cluster_max_redirections is deprecated, please use config.redis.cluster_max_redirections instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_max_redirections" + ] + } + ] + }, + "type": "integer" + } + }, + { + "session_redis_cluster_maxredirections": { + "deprecation": { + "message": "saml: config.session_redis_cluster_maxredirections is deprecated, please use config.redis.cluster_max_redirections instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "redis", + "cluster_max_redirections" + ] + } + ] + }, + "type": "integer" + } + } + ], + "required": true, + "fields": [ + { + "assertion_consumer_path": { + "required": true, + "type": "string", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "starts_with": "/" + } + }, + { + "idp_sso_url": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "required": true, + "type": "string" + } + }, + { + "idp_certificate": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "The public certificate provided by the IdP. This is used to validate responses from the IdP. Only include the contents of the certificate. Do not include the header (`BEGIN CERTIFICATE`) and footer (`END CERTIFICATE`) lines.", + "required": false + } + }, + { + "response_encryption_key": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "The private encryption key required to decrypt encrypted assertions.", + "required": false + } + }, + { + "request_signing_key": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "The private key for signing requests. If this parameter is set, requests sent to the IdP are signed. The `request_signing_certificate` parameter must be set as well.", + "required": false + } + }, + { + "request_signing_certificate": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "The certificate for signing requests.", + "required": false + } + }, + { + "request_signature_algorithm": { + "required": false, + "type": "string", + "default": "SHA256", + "description": "The signature algorithm for signing Authn requests. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "one_of": [ + "SHA256", + "SHA384", + "SHA512" + ] + } + }, + { + "request_digest_algorithm": { + "required": false, + "type": "string", + "default": "SHA256", + "description": "The digest algorithm for Authn requests: - `SHA256` - `SHA1`", + "one_of": [ + "SHA256", + "SHA1" + ] + } + }, + { + "response_signature_algorithm": { + "required": false, + "type": "string", + "default": "SHA256", + "description": "The algorithm for validating signatures in SAML responses. Options available are: - `SHA256` - `SHA384` - `SHA512`", + "one_of": [ + "SHA256", + "SHA384", + "SHA512" + ] + } + }, + { + "response_digest_algorithm": { + "required": false, + "type": "string", + "default": "SHA256", + "description": "The algorithm for verifying digest in SAML responses: - `SHA256` - `SHA1`", + "one_of": [ + "SHA256", + "SHA1" + ] + } + }, + { + "issuer": { + "description": "The unique identifier of the IdP application. Formatted as a URL containing information about the IdP so the SP can validate that the SAML assertions it receives are issued from the correct IdP.", + "required": true, + "type": "string" + } + }, + { + "nameid_format": { + "required": false, + "type": "string", + "default": "EmailAddress", + "description": "The requested `NameId` format. Options available are: - `Unspecified` - `EmailAddress` - `Persistent` - `Transient`", + "one_of": [ + "Unspecified", + "EmailAddress", + "Persistent", + "Transient" + ] + } + }, + { + "validate_assertion_signature": { + "default": true, + "description": "Enable signature validation for SAML responses.", + "required": false, + "type": "boolean" + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer. If not set, a Kong Consumer must exist for the SAML IdP user credentials, mapping the username format to the Kong Consumer username.", + "required": false, + "type": "string" + } + }, + { + "session_secret": { + "len_max": 32, + "match": "^[0-9a-zA-Z/_+]+$", + "referenceable": true, + "type": "string", + "required": true, + "description": "The session secret. This must be a random string of 32 characters from the base64 alphabet (letters, numbers, `/`, `_` and `+`). It is used as the secret key for encrypting session data as well as state information that is sent to the IdP in the authentication exchange.", + "encrypted": true, + "len_min": 32 + } + }, + { + "session_audience": { + "default": "default", + "description": "The session audience, for example \"my-application\"", + "required": false, + "type": "string" + } + }, + { + "session_cookie_name": { + "default": "session", + "description": "The session cookie name.", + "required": false, + "type": "string" + } + }, + { + "session_remember": { + "default": false, + "description": "Enables or disables persistent sessions", + "required": false, + "type": "boolean" + } + }, + { + "session_remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name", + "required": false, + "type": "string" + } + }, + { + "session_remember_rolling_timeout": { + "default": 604800, + "description": "Persistent session rolling timeout in seconds.", + "required": false, + "type": "number" + } + }, + { + "session_remember_absolute_timeout": { + "default": 2592000, + "description": "Persistent session absolute timeout in seconds.", + "required": false, + "type": "number" + } + }, + { + "session_idling_timeout": { + "default": 900, + "description": "The session cookie idle time in seconds.", + "required": false, + "type": "number" + } + }, + { + "session_rolling_timeout": { + "default": 3600, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "required": false, + "type": "number" + } + }, + { + "session_absolute_timeout": { + "default": 86400, + "description": "The session cookie absolute timeout in seconds. Specifies how long the session can be used until it is no longer valid.", + "required": false, + "type": "number" + } + }, + { + "session_cookie_path": { + "required": false, + "type": "string", + "default": "/", + "description": "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes).", + "match_none": [ + { + "err": "must not have empty segments", + "pattern": "//" + } + ], + "starts_with": "/" + } + }, + { + "session_cookie_domain": { + "description": "The session cookie domain flag.", + "required": false, + "type": "string" + } + }, + { + "session_cookie_same_site": { + "required": false, + "type": "string", + "default": "Lax", + "description": "Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site request forgery attacks.", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "session_cookie_http_only": { + "default": true, + "description": "Forbids JavaScript from accessing the cookie, for example, through the `Document.cookie` property.", + "required": false, + "type": "boolean" + } + }, + { + "session_cookie_secure": { + "description": "The cookie is only sent to the server when a request is made with the https:scheme (except on localhost), and therefore is more resistant to man-in-the-middle attacks.", + "required": false, + "type": "boolean" + } + }, + { + "session_request_headers": { + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "type": "set" + } + }, + { + "session_response_headers": { + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "type": "set" + } + }, + { + "session_storage": { + "required": false, + "type": "string", + "default": "cookie", + "description": "The session storage for session data: - `cookie`: stores session data with the session cookie. The session cannot be invalidated or revoked without changing the session secret, but is stateless, and doesn't require a database. - `memcached`: stores session data in memcached - `redis`: stores session data in Redis", + "one_of": [ + "cookie", + "memcache", + "memcached", + "redis" + ] + } + }, + { + "session_store_metadata": { + "default": false, + "description": "Configures whether or not session metadata should be stored. This includes information about the active sessions for the `specific_audience` belonging to a specific subject.", + "required": false, + "type": "boolean" + } + }, + { + "session_enforce_same_subject": { + "default": false, + "description": "When set to `true`, audiences are forced to share the same subject.", + "required": false, + "type": "boolean" + } + }, + { + "session_hash_subject": { + "default": false, + "description": "When set to `true`, the value of subject is hashed before being stored. Only applies when `session_store_metadata` is enabled.", + "required": false, + "type": "boolean" + } + }, + { + "session_hash_storage_key": { + "default": false, + "description": "When set to `true`, the storage key (session ID) is hashed for extra security. Hashing the storage key means it is impossible to decrypt data from the storage without a cookie.", + "required": false, + "type": "boolean" + } + }, + { + "session_memcached_prefix": { + "description": "The memcached session key prefix.", + "required": false, + "type": "string" + } + }, + { + "session_memcached_socket": { + "description": "The memcached unix socket path.", + "required": false, + "type": "string" + } + }, + { + "session_memcached_host": { + "default": "127.0.0.1", + "description": "The memcached host.", + "required": false, + "type": "string" + } + }, + { + "session_memcached_port": { + "between": [ + 0, + 65535 + ], + "required": false, + "type": "integer", + "default": 11211, + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "redis": { + "required": true, + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ] + } + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ] + }, + "len_min": 1, + "type": "array" + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ] + }, + "len_min": 1, + "type": "array" + } + } + ], + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "one_of": [ + "master", + "slave", + "any" + ], + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "type": "array", + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ], + "type": "record" + }, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "required": false, + "type": "array", + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ], + "type": "record" + }, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean" + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean" + } + }, + { + "prefix": { + "description": "The Redis session key prefix.", + "required": false, + "type": "string" + } + }, + { + "socket": { + "description": "The Redis unix socket path.", + "required": false, + "type": "string" + } + } + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/service-protection/.foo b/schemas/service-protection/.foo new file mode 100644 index 00000000..e69de29b diff --git a/schemas/service-protection/3.10.x.json b/schemas/service-protection/3.10.x.json new file mode 100644 index 00000000..0050c926 --- /dev/null +++ b/schemas/service-protection/3.10.x.json @@ -0,0 +1,548 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + }, + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "route": { + "reference": "routes", + "description": "A reference to the 'routes' table with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "window_size": { + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "type": "array", + "elements": { + "type": "number" + }, + "required": true + } + }, + { + "window_type": { + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "type": "string", + "one_of": [ + "fixed", + "sliding" + ], + "default": "sliding" + } + }, + { + "limit": { + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "type": "array", + "elements": { + "type": "number" + }, + "required": true + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + } + }, + { + "namespace": { + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same.", + "type": "string", + "auto": true, + "required": true + } + }, + { + "strategy": { + "type": "string", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "one_of": [ + "cluster", + "redis", + "local" + ], + "default": "local", + "required": true + } + }, + { + "dictionary_name": { + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "type": "string", + "default": "kong_rate_limiting_counters", + "required": true + } + }, + { + "lock_dictionary_name": { + "description": "The shared dictionary where concurrency control locks are stored. The default shared dictionary is `kong_locks`. The shared dictionary should be declared in nginx-kong.conf.", + "type": "string", + "default": "kong_locks", + "required": true + } + }, + { + "hide_client_headers": { + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean", + "default": false + } + }, + { + "retry_after_jitter_max": { + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number", + "default": 0 + } + }, + { + "redis": { + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "default": 256, + "type": "integer", + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "default": false, + "type": "boolean", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + } + ], + "required": true + } + }, + { + "disable_penalty": { + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "type": "boolean", + "default": false + } + }, + { + "error_code": { + "gt": 0, + "type": "number", + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded." + } + }, + { + "error_message": { + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string", + "default": "API rate limit exceeded" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/service-protection/3.11.x.json b/schemas/service-protection/3.11.x.json new file mode 100644 index 00000000..ea813216 --- /dev/null +++ b/schemas/service-protection/3.11.x.json @@ -0,0 +1,548 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "route": { + "description": "A reference to the 'routes' table with a null value allowed.", + "eq": null, + "reference": "routes", + "type": "foreign" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "window_size": { + "type": "array", + "required": true, + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "elements": { + "type": "number" + } + } + }, + { + "window_type": { + "one_of": [ + "fixed", + "sliding" + ], + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "default": "sliding", + "type": "string" + } + }, + { + "limit": { + "type": "array", + "required": true, + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "elements": { + "type": "number" + } + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + } + }, + { + "namespace": { + "auto": true, + "required": true, + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same.", + "type": "string" + } + }, + { + "strategy": { + "required": true, + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "one_of": [ + "cluster", + "redis", + "local" + ], + "default": "local", + "type": "string" + } + }, + { + "dictionary_name": { + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "required": true, + "default": "kong_rate_limiting_counters", + "type": "string" + } + }, + { + "lock_dictionary_name": { + "description": "The shared dictionary where concurrency control locks are stored. The default shared dictionary is `kong_locks`. The shared dictionary should be declared in nginx-kong.conf.", + "required": true, + "default": "kong_locks", + "type": "string" + } + }, + { + "hide_client_headers": { + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "default": false, + "type": "boolean" + } + }, + { + "retry_after_jitter_max": { + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "default": 0, + "type": "number" + } + }, + { + "redis": { + "required": true, + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "cluster_nodes": { + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "default": 5, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "default": false, + "type": "boolean" + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "disable_penalty": { + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "default": false, + "type": "boolean" + } + }, + { + "error_code": { + "description": "Set a custom error code to return when the rate limit is exceeded.", + "gt": 0, + "default": 429, + "type": "number" + } + }, + { + "error_message": { + "description": "Set a custom error message to return when the rate limit is exceeded.", + "default": "API rate limit exceeded", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + } +} \ No newline at end of file diff --git a/schemas/service-protection/3.12.x.json b/schemas/service-protection/3.12.x.json new file mode 100644 index 00000000..9bcd6264 --- /dev/null +++ b/schemas/service-protection/3.12.x.json @@ -0,0 +1,548 @@ +{ + "supported_partials": { + "redis-ee": [ + "config.redis" + ] + }, + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "route": { + "type": "foreign", + "reference": "routes", + "description": "A reference to the 'routes' table with a null value allowed.", + "eq": null + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "window_size": { + "type": "array", + "elements": { + "type": "number" + }, + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "required": true + } + }, + { + "window_type": { + "type": "string", + "default": "sliding", + "one_of": [ + "fixed", + "sliding" + ], + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters." + } + }, + { + "limit": { + "type": "array", + "elements": { + "type": "number" + }, + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "required": true + } + }, + { + "sync_rate": { + "type": "number", + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms)." + } + }, + { + "namespace": { + "type": "string", + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same.", + "auto": true, + "required": true + } + }, + { + "strategy": { + "type": "string", + "required": true, + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "default": "local", + "one_of": [ + "cluster", + "redis", + "local" + ] + } + }, + { + "dictionary_name": { + "type": "string", + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "required": true + } + }, + { + "lock_dictionary_name": { + "type": "string", + "default": "kong_locks", + "description": "The shared dictionary where concurrency control locks are stored. The default shared dictionary is `kong_locks`. The shared dictionary should be declared in nginx-kong.conf.", + "required": true + } + }, + { + "hide_client_headers": { + "type": "boolean", + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters." + } + }, + { + "retry_after_jitter_max": { + "type": "number", + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header." + } + }, + { + "redis": { + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "database", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + } + ], + "required": true, + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "type": "string", + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "type": "integer", + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy" + } + }, + { + "keepalive_pool_size": { + "type": "integer", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low." + } + }, + { + "keepalive_backlog": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "type": "boolean", + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "cluster_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + } + ] + } + }, + { + "disable_penalty": { + "type": "boolean", + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type." + } + }, + { + "error_code": { + "type": "number", + "default": 429, + "gt": 0, + "description": "Set a custom error code to return when the rate limit is exceeded." + } + }, + { + "error_message": { + "type": "string", + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded." + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/service-protection/3.9.x.json b/schemas/service-protection/3.9.x.json new file mode 100644 index 00000000..c53e3deb --- /dev/null +++ b/schemas/service-protection/3.9.x.json @@ -0,0 +1,543 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "route": { + "reference": "routes", + "eq": null, + "type": "foreign", + "description": "A reference to the 'routes' table with a null value allowed." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "window_size": { + "elements": { + "type": "number" + }, + "description": "One or more window sizes to apply a limit to (defined in seconds). There must be a matching number of window limits and sizes specified.", + "required": true, + "type": "array" + } + }, + { + "window_type": { + "default": "sliding", + "description": "Sets the time window type to either `sliding` (default) or `fixed`. Sliding windows apply the rate limiting logic while taking into account previous hit rates (from the window that immediately precedes the current) using a dynamic weight. Fixed windows consist of buckets that are statically assigned to a definitive time range, each request is mapped to only one fixed window based on its timestamp and will affect only that window's counters.", + "type": "string", + "one_of": [ + "fixed", + "sliding" + ] + } + }, + { + "limit": { + "elements": { + "type": "number" + }, + "description": "One or more requests-per-window limits to apply. There must be a matching number of window limits and sizes specified.", + "required": true, + "type": "array" + } + }, + { + "sync_rate": { + "description": "How often to sync counter data to the central data store. A value of 0 results in synchronous behavior; a value of -1 ignores sync behavior entirely and only stores counters in node memory. A value greater than 0 will sync the counters in the specified number of seconds. The minimum allowed interval is 0.02 seconds (20ms).", + "type": "number" + } + }, + { + "namespace": { + "auto": true, + "description": "The rate limiting library namespace to use for this plugin instance. Counter data and sync configuration is isolated in each namespace. NOTE: For the plugin instances sharing the same namespace, all the configurations that are required for synchronizing counters, e.g. `strategy`, `redis`, `sync_rate`, `dictionary_name`, need to be the same.", + "required": true, + "type": "string" + } + }, + { + "strategy": { + "required": true, + "type": "string", + "default": "local", + "description": "The rate-limiting strategy to use for retrieving and incrementing the limits. Available values are: `local` and `cluster`.", + "one_of": [ + "cluster", + "redis", + "local" + ] + } + }, + { + "dictionary_name": { + "default": "kong_rate_limiting_counters", + "description": "The shared dictionary where counters are stored. When the plugin is configured to synchronize counter data externally (that is `config.strategy` is `cluster` or `redis` and `config.sync_rate` isn't `-1`), this dictionary serves as a buffer to populate counters in the data store on each synchronization cycle.", + "required": true, + "type": "string" + } + }, + { + "lock_dictionary_name": { + "default": "kong_locks", + "description": "The shared dictionary where concurrency control locks are stored. The default shared dictionary is `kong_locks`. The shared dictionary should be declared in nginx-kong.conf.", + "required": true, + "type": "string" + } + }, + { + "hide_client_headers": { + "default": false, + "description": "Optionally hide informative response headers that would otherwise provide information about the current status of limits and counters.", + "type": "boolean" + } + }, + { + "retry_after_jitter_max": { + "default": 0, + "description": "The upper bound of a jitter (random delay) in seconds to be added to the `Retry-After` header of denied requests (status = `429`) in order to prevent all the clients from coming back at the same time. The lower bound of the jitter is `0`; in this case, the `Retry-After` header is equal to the `RateLimit-Reset` header.", + "type": "number" + } + }, + { + "redis": { + "required": true, + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ] + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ] + }, + "type": "array" + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ] + }, + "type": "array" + } + } + ], + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "type": "string", + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean" + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean" + } + } + ] + } + }, + { + "disable_penalty": { + "default": false, + "description": "If set to `true`, this doesn't count denied requests (status = `429`). If set to `false`, all requests, including denied ones, are counted. This parameter only affects the `sliding` window_type.", + "type": "boolean" + } + }, + { + "error_code": { + "default": 429, + "description": "Set a custom error code to return when the rate limit is exceeded.", + "gt": 0, + "type": "number" + } + }, + { + "error_message": { + "default": "API rate limit exceeded", + "description": "Set a custom error message to return when the rate limit is exceeded.", + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/session/3.10.x.json b/schemas/session/3.10.x.json new file mode 100644 index 00000000..df565cd4 --- /dev/null +++ b/schemas/session/3.10.x.json @@ -0,0 +1,316 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "secret": { + "type": "string", + "referenceable": true, + "description": "The secret that is used in keyed HMAC generation.", + "encrypted": true, + "default": "WKzHLADIGTA9J6nV29ppiqFxmLWstNnPGEtEJ2gQA70z", + "required": false + } + }, + { + "storage": { + "description": "Determines where the session data is stored. `kong`: Stores encrypted session data into Kong's current database strategy; the cookie will not contain any session data. `cookie`: Stores encrypted session data within the cookie itself.", + "type": "string", + "default": "cookie", + "one_of": [ + "cookie", + "kong" + ] + } + }, + { + "audience": { + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string", + "default": "default" + } + }, + { + "idling_timeout": { + "description": "The session cookie idle time, in seconds.", + "type": "number", + "default": 900 + } + }, + { + "rolling_timeout": { + "description": "The session cookie rolling timeout, in seconds. Specifies how long the session can be used until it needs to be renewed.", + "type": "number", + "default": 3600 + } + }, + { + "absolute_timeout": { + "description": "The session cookie absolute timeout, in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number", + "default": 86400 + } + }, + { + "stale_ttl": { + "description": "The duration, in seconds, after which an old cookie is discarded, starting from the moment when the session becomes outdated and is replaced by a new one.", + "type": "number", + "default": 10 + } + }, + { + "cookie_name": { + "description": "The name of the cookie.", + "type": "string", + "default": "session" + } + }, + { + "cookie_path": { + "description": "The resource in the host where the cookie is available.", + "type": "string", + "default": "/" + } + }, + { + "cookie_domain": { + "description": "The domain with which the cookie is intended to be exchanged.", + "type": "string" + } + }, + { + "cookie_same_site": { + "description": "Determines whether and how a cookie may be sent with cross-site requests.", + "type": "string", + "default": "Strict", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "cookie_http_only": { + "description": "Applies the `HttpOnly` tag so that the cookie is sent only to a server.", + "type": "boolean", + "default": true + } + }, + { + "cookie_secure": { + "description": "Applies the Secure directive so that the cookie may be sent to the server only with an encrypted request over the HTTPS protocol.", + "type": "boolean", + "default": true + } + }, + { + "remember": { + "description": "Enables or disables persistent sessions.", + "type": "boolean", + "default": false + } + }, + { + "remember_cookie_name": { + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string", + "default": "remember" + } + }, + { + "remember_rolling_timeout": { + "description": "The persistent session rolling timeout window, in seconds.", + "type": "number", + "default": 604800 + } + }, + { + "remember_absolute_timeout": { + "description": "The persistent session absolute timeout limit, in seconds.", + "type": "number", + "default": 2592000 + } + }, + { + "response_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "request_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "read_body_for_logout": { + "type": "boolean", + "default": false + } + }, + { + "logout_methods": { + "description": "A set of HTTP methods that the plugin will respond to.", + "type": "set", + "default": [ + "POST", + "DELETE" + ], + "elements": { + "type": "string", + "one_of": [ + "GET", + "POST", + "DELETE" + ] + } + } + }, + { + "logout_query_arg": { + "description": "The query argument passed to logout requests.", + "type": "string", + "default": "session_logout" + } + }, + { + "logout_post_arg": { + "description": "The POST argument passed to logout requests. Do not change this property.", + "type": "string", + "default": "session_logout" + } + }, + { + "hash_subject": { + "description": "Whether to hash or not the subject when store_metadata is enabled.", + "type": "boolean", + "default": false + } + }, + { + "store_metadata": { + "description": "Whether to also store metadata of sessions, such as collecting data of sessions for a specific audience belonging to a specific subject.", + "type": "boolean", + "default": false + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "cookie_lifetime": { + "type": "number" + } + }, + { + "cookie_idletime": { + "type": "number" + } + }, + { + "cookie_renew": { + "type": "number" + } + }, + { + "cookie_discard": { + "type": "number" + } + }, + { + "cookie_samesite": { + "type": "string" + } + }, + { + "cookie_httponly": { + "type": "boolean" + } + }, + { + "cookie_persistent": { + "type": "boolean" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/session/3.11.x.json b/schemas/session/3.11.x.json new file mode 100644 index 00000000..2bc46854 --- /dev/null +++ b/schemas/session/3.11.x.json @@ -0,0 +1,316 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "fields": [ + { + "secret": { + "required": false, + "description": "The secret that is used in keyed HMAC generation.", + "encrypted": true, + "referenceable": true, + "default": "M5N0CyFrAZwpB7F72PpY3J4S5n3KL77fs6xMuY8b7SMc", + "type": "string" + } + }, + { + "storage": { + "one_of": [ + "cookie", + "kong" + ], + "default": "cookie", + "description": "Determines where the session data is stored. `kong`: Stores encrypted session data into Kong's current database strategy; the cookie will not contain any session data. `cookie`: Stores encrypted session data within the cookie itself.", + "type": "string" + } + }, + { + "audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + } + }, + { + "idling_timeout": { + "default": 900, + "description": "The session cookie idle time, in seconds.", + "type": "number" + } + }, + { + "rolling_timeout": { + "default": 3600, + "description": "The session cookie rolling timeout, in seconds. Specifies how long the session can be used until it needs to be renewed.", + "type": "number" + } + }, + { + "absolute_timeout": { + "default": 86400, + "description": "The session cookie absolute timeout, in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + } + }, + { + "stale_ttl": { + "default": 10, + "description": "The duration, in seconds, after which an old cookie is discarded, starting from the moment when the session becomes outdated and is replaced by a new one.", + "type": "number" + } + }, + { + "cookie_name": { + "default": "session", + "description": "The name of the cookie.", + "type": "string" + } + }, + { + "cookie_path": { + "default": "/", + "description": "The resource in the host where the cookie is available.", + "type": "string" + } + }, + { + "cookie_domain": { + "description": "The domain with which the cookie is intended to be exchanged.", + "type": "string" + } + }, + { + "cookie_same_site": { + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "default": "Strict", + "description": "Determines whether and how a cookie may be sent with cross-site requests.", + "type": "string" + } + }, + { + "cookie_http_only": { + "default": true, + "description": "Applies the `HttpOnly` tag so that the cookie is sent only to a server.", + "type": "boolean" + } + }, + { + "cookie_secure": { + "default": true, + "description": "Applies the Secure directive so that the cookie may be sent to the server only with an encrypted request over the HTTPS protocol.", + "type": "boolean" + } + }, + { + "remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + } + }, + { + "remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + } + }, + { + "remember_rolling_timeout": { + "default": 604800, + "description": "The persistent session rolling timeout window, in seconds.", + "type": "number" + } + }, + { + "remember_absolute_timeout": { + "default": 2592000, + "description": "The persistent session absolute timeout limit, in seconds.", + "type": "number" + } + }, + { + "response_headers": { + "type": "set", + "description": "List of information to include, as headers, in the response to the downstream.", + "elements": { + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ], + "type": "string" + } + } + }, + { + "request_headers": { + "type": "set", + "description": "List of information to include, as headers, in the response to the downstream.", + "elements": { + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ], + "type": "string" + } + } + }, + { + "read_body_for_logout": { + "default": false, + "type": "boolean" + } + }, + { + "logout_methods": { + "type": "set", + "description": "A set of HTTP methods that the plugin will respond to.", + "default": [ + "POST", + "DELETE" + ], + "elements": { + "one_of": [ + "GET", + "POST", + "DELETE" + ], + "type": "string" + } + } + }, + { + "logout_query_arg": { + "default": "session_logout", + "description": "The query argument passed to logout requests.", + "type": "string" + } + }, + { + "logout_post_arg": { + "default": "session_logout", + "description": "The POST argument passed to logout requests. Do not change this property.", + "type": "string" + } + }, + { + "hash_subject": { + "default": false, + "description": "Whether to hash or not the subject when store_metadata is enabled.", + "type": "boolean" + } + }, + { + "store_metadata": { + "default": false, + "description": "Whether to also store metadata of sessions, such as collecting data of sessions for a specific audience belonging to a specific subject.", + "type": "boolean" + } + } + ], + "required": true, + "shorthand_fields": [ + { + "cookie_lifetime": { + "type": "number" + } + }, + { + "cookie_idletime": { + "type": "number" + } + }, + { + "cookie_renew": { + "type": "number" + } + }, + { + "cookie_discard": { + "type": "number" + } + }, + { + "cookie_samesite": { + "type": "string" + } + }, + { + "cookie_httponly": { + "type": "boolean" + } + }, + { + "cookie_persistent": { + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/session/3.12.x.json b/schemas/session/3.12.x.json new file mode 100644 index 00000000..cae94237 --- /dev/null +++ b/schemas/session/3.12.x.json @@ -0,0 +1,314 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "secret": { + "type": "string", + "required": false, + "description": "The secret that is used in keyed HMAC generation.", + "default": "qIy2DUgDyM6HDlP9lMhdI8h1gmCQCLgBdb0RS0vxLGsp", + "referenceable": true, + "encrypted": true + } + }, + { + "storage": { + "description": "Determines where the session data is stored. `kong`: Stores encrypted session data into Kong's current database strategy; the cookie will not contain any session data. `cookie`: Stores encrypted session data within the cookie itself.", + "default": "cookie", + "one_of": [ + "cookie", + "kong" + ], + "type": "string" + } + }, + { + "audience": { + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "default": "default", + "type": "string" + } + }, + { + "idling_timeout": { + "description": "The session cookie idle time, in seconds.", + "default": 900, + "type": "number" + } + }, + { + "rolling_timeout": { + "description": "The session cookie rolling timeout, in seconds. Specifies how long the session can be used until it needs to be renewed.", + "default": 3600, + "type": "number" + } + }, + { + "absolute_timeout": { + "description": "The session cookie absolute timeout, in seconds. Specifies how long the session can be used until it is no longer valid.", + "default": 86400, + "type": "number" + } + }, + { + "stale_ttl": { + "description": "The duration, in seconds, after which an old cookie is discarded, starting from the moment when the session becomes outdated and is replaced by a new one.", + "default": 10, + "type": "number" + } + }, + { + "cookie_name": { + "description": "The name of the cookie.", + "default": "session", + "type": "string" + } + }, + { + "cookie_path": { + "description": "The resource in the host where the cookie is available.", + "default": "/", + "type": "string" + } + }, + { + "cookie_domain": { + "type": "string", + "description": "The domain with which the cookie is intended to be exchanged." + } + }, + { + "cookie_same_site": { + "description": "Determines whether and how a cookie may be sent with cross-site requests.", + "default": "Strict", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "type": "string" + } + }, + { + "cookie_http_only": { + "description": "Applies the `HttpOnly` tag so that the cookie is sent only to a server.", + "default": true, + "type": "boolean" + } + }, + { + "cookie_secure": { + "description": "Applies the Secure directive so that the cookie may be sent to the server only with an encrypted request over the HTTPS protocol.", + "default": true, + "type": "boolean" + } + }, + { + "remember": { + "description": "Enables or disables persistent sessions.", + "default": false, + "type": "boolean" + } + }, + { + "remember_cookie_name": { + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "default": "remember", + "type": "string" + } + }, + { + "remember_rolling_timeout": { + "description": "The persistent session rolling timeout window, in seconds.", + "default": 604800, + "type": "number" + } + }, + { + "remember_absolute_timeout": { + "description": "The persistent session absolute timeout limit, in seconds.", + "default": 2592000, + "type": "number" + } + }, + { + "response_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "type": "set" + } + }, + { + "request_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "type": "set" + } + }, + { + "read_body_for_logout": { + "type": "boolean", + "default": false + } + }, + { + "logout_methods": { + "description": "A set of HTTP methods that the plugin will respond to.", + "default": [ + "POST", + "DELETE" + ], + "elements": { + "type": "string", + "one_of": [ + "GET", + "POST", + "DELETE" + ] + }, + "type": "set" + } + }, + { + "logout_query_arg": { + "description": "The query argument passed to logout requests.", + "default": "session_logout", + "type": "string" + } + }, + { + "logout_post_arg": { + "description": "The POST argument passed to logout requests. Do not change this property.", + "default": "session_logout", + "type": "string" + } + }, + { + "hash_subject": { + "description": "Whether to hash or not the subject when store_metadata is enabled.", + "default": false, + "type": "boolean" + } + }, + { + "store_metadata": { + "description": "Whether to also store metadata of sessions, such as collecting data of sessions for a specific audience belonging to a specific subject.", + "default": false, + "type": "boolean" + } + } + ], + "shorthand_fields": [ + { + "cookie_lifetime": { + "type": "number" + } + }, + { + "cookie_idletime": { + "type": "number" + } + }, + { + "cookie_renew": { + "type": "number" + } + }, + { + "cookie_discard": { + "type": "number" + } + }, + { + "cookie_samesite": { + "type": "string" + } + }, + { + "cookie_httponly": { + "type": "boolean" + } + }, + { + "cookie_persistent": { + "type": "boolean" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/session/3.4.x.json b/schemas/session/3.4.x.json index ab89e85b..93c9642a 100644 --- a/schemas/session/3.4.x.json +++ b/schemas/session/3.4.x.json @@ -2,8 +2,9 @@ "fields": [ { "consumer": { - "eq": null, "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, @@ -15,6 +16,9 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", "elements": { "one_of": [ "grpc", @@ -28,170 +32,158 @@ "ws", "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "shorthand_fields": [ - { - "cookie_lifetime": { - "type": "number" - } - }, - { - "cookie_idletime": { - "type": "number" - } - }, - { - "cookie_renew": { - "type": "number" - } - }, - { - "cookie_discard": { - "type": "number" - } - }, - { - "cookie_samesite": { - "type": "string" - } - }, - { - "cookie_httponly": { - "type": "boolean" - } - }, - { - "cookie_persistent": { - "type": "boolean" - } - } - ], - "required": true, "fields": [ { "secret": { - "required": false, + "default": "jUVc08J7Ji4ZDXVsLUZRvfCyF1cfFrVZ4rnoj9KTVyAi", "type": "string", - "default": "x8iNgCZK6ujBch4SJzrfXTvxciHURzefZYUqZ0PDyIwr", + "required": false, + "referenceable": true, "encrypted": true, - "referenceable": true + "description": "The secret that is used in keyed HMAC generation." } }, { "storage": { - "type": "string", "default": "cookie", "one_of": [ "cookie", "kong" - ] + ], + "type": "string", + "description": "Determines where the session data is stored. `kong`: Stores encrypted session data into Kong's current database strategy; the cookie will not contain any session data. `cookie`: Stores encrypted session data within the cookie itself." } }, { "audience": { "default": "default", - "type": "string" + "type": "string", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`." } }, { "idling_timeout": { "default": 900, - "type": "number" + "type": "number", + "description": "The session cookie idle time, in seconds." } }, { "rolling_timeout": { "default": 3600, - "type": "number" + "type": "number", + "description": "The session cookie rolling timeout, in seconds. Specifies how long the session can be used until it needs to be renewed." } }, { "absolute_timeout": { "default": 86400, - "type": "number" + "type": "number", + "description": "The session cookie absolute timeout, in seconds. Specifies how long the session can be used until it is no longer valid." } }, { "stale_ttl": { "default": 10, - "type": "number" + "type": "number", + "description": "The duration, in seconds, after which an old cookie is discarded, starting from the moment when the session becomes outdated and is replaced by a new one." } }, { "cookie_name": { "default": "session", - "type": "string" + "type": "string", + "description": "The name of the cookie." } }, { "cookie_path": { "default": "/", - "type": "string" + "type": "string", + "description": "The resource in the host where the cookie is available." } }, { "cookie_domain": { - "type": "string" + "type": "string", + "description": "The domain with which the cookie is intended to be exchanged." } }, { "cookie_same_site": { - "type": "string", "default": "Strict", "one_of": [ "Strict", "Lax", "None", "Default" - ] + ], + "type": "string", + "description": "Determines whether and how a cookie may be sent with cross-site requests." } }, { "cookie_http_only": { "default": true, - "type": "boolean" + "type": "boolean", + "description": "Applies the `HttpOnly` tag so that the cookie is sent only to a server." } }, { "cookie_secure": { "default": true, - "type": "boolean" + "type": "boolean", + "description": "Applies the Secure directive so that the cookie may be sent to the server only with an encrypted request over the HTTPS protocol." } }, { "remember": { "default": false, - "type": "boolean" + "type": "boolean", + "description": "Enables or disables persistent sessions." } }, { "remember_cookie_name": { "default": "remember", - "type": "string" + "type": "string", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter." } }, { "remember_rolling_timeout": { "default": 604800, - "type": "number" + "type": "number", + "description": "The persistent session rolling timeout window, in seconds." } }, { "remember_absolute_timeout": { "default": 2592000, - "type": "number" + "type": "number", + "description": "The persistent session absolute timeout limit, in seconds." } }, { "response_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", "elements": { + "type": "string", "one_of": [ "id", "audience", @@ -200,15 +192,16 @@ "idling-timeout", "rolling-timeout", "absolute-timeout" - ], - "type": "string" + ] }, "type": "set" } }, { "request_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", "elements": { + "type": "string", "one_of": [ "id", "audience", @@ -217,44 +210,87 @@ "idling-timeout", "rolling-timeout", "absolute-timeout" - ], - "type": "string" + ] }, "type": "set" } }, { "logout_methods": { + "default": [ + "POST", + "DELETE" + ], + "description": "A set of HTTP methods that the plugin will respond to.", "type": "set", "elements": { + "type": "string", "one_of": [ "GET", "POST", "DELETE" - ], - "type": "string" - }, - "default": [ - "POST", - "DELETE" - ] + ] + } } }, { "logout_query_arg": { "default": "session_logout", - "type": "string" + "type": "string", + "description": "The query argument passed to logout requests." } }, { "logout_post_arg": { "default": "session_logout", + "type": "string", + "description": "The POST argument passed to logout requests. Do not change this property." + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "cookie_lifetime": { + "type": "number" + } + }, + { + "cookie_idletime": { + "type": "number" + } + }, + { + "cookie_renew": { + "type": "number" + } + }, + { + "cookie_discard": { + "type": "number" + } + }, + { + "cookie_samesite": { "type": "string" } + }, + { + "cookie_httponly": { + "type": "boolean" + } + }, + { + "cookie_persistent": { + "type": "boolean" + } } ], - "type": "record" + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/session/3.5.x.json b/schemas/session/3.5.x.json new file mode 100644 index 00000000..f4ed0e3c --- /dev/null +++ b/schemas/session/3.5.x.json @@ -0,0 +1,302 @@ +{ + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "shorthand_fields": [ + { + "cookie_lifetime": { + "type": "number" + } + }, + { + "cookie_idletime": { + "type": "number" + } + }, + { + "cookie_renew": { + "type": "number" + } + }, + { + "cookie_discard": { + "type": "number" + } + }, + { + "cookie_samesite": { + "type": "string" + } + }, + { + "cookie_httponly": { + "type": "boolean" + } + }, + { + "cookie_persistent": { + "type": "boolean" + } + } + ], + "fields": [ + { + "secret": { + "type": "string", + "required": false, + "default": "KMMFrVmbW8X1AW0JLXrJMpGnBe4tNc3ESBmsKKe7e5Ia", + "referenceable": true, + "encrypted": true, + "description": "The secret that is used in keyed HMAC generation." + } + }, + { + "storage": { + "one_of": [ + "cookie", + "kong" + ], + "default": "cookie", + "type": "string", + "description": "Determines where the session data is stored. `kong`: Stores encrypted session data into Kong's current database strategy; the cookie will not contain any session data. `cookie`: Stores encrypted session data within the cookie itself." + } + }, + { + "audience": { + "default": "default", + "type": "string", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`." + } + }, + { + "idling_timeout": { + "default": 900, + "type": "number", + "description": "The session cookie idle time, in seconds." + } + }, + { + "rolling_timeout": { + "default": 3600, + "type": "number", + "description": "The session cookie rolling timeout, in seconds. Specifies how long the session can be used until it needs to be renewed." + } + }, + { + "absolute_timeout": { + "default": 86400, + "type": "number", + "description": "The session cookie absolute timeout, in seconds. Specifies how long the session can be used until it is no longer valid." + } + }, + { + "stale_ttl": { + "default": 10, + "type": "number", + "description": "The duration, in seconds, after which an old cookie is discarded, starting from the moment when the session becomes outdated and is replaced by a new one." + } + }, + { + "cookie_name": { + "default": "session", + "type": "string", + "description": "The name of the cookie." + } + }, + { + "cookie_path": { + "default": "/", + "type": "string", + "description": "The resource in the host where the cookie is available." + } + }, + { + "cookie_domain": { + "type": "string", + "description": "The domain with which the cookie is intended to be exchanged." + } + }, + { + "cookie_same_site": { + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "default": "Strict", + "type": "string", + "description": "Determines whether and how a cookie may be sent with cross-site requests." + } + }, + { + "cookie_http_only": { + "default": true, + "type": "boolean", + "description": "Applies the `HttpOnly` tag so that the cookie is sent only to a server." + } + }, + { + "cookie_secure": { + "default": true, + "type": "boolean", + "description": "Applies the Secure directive so that the cookie may be sent to the server only with an encrypted request over the HTTPS protocol." + } + }, + { + "remember": { + "default": false, + "type": "boolean", + "description": "Enables or disables persistent sessions." + } + }, + { + "remember_cookie_name": { + "default": "remember", + "type": "string", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter." + } + }, + { + "remember_rolling_timeout": { + "default": 604800, + "type": "number", + "description": "The persistent session rolling timeout window, in seconds." + } + }, + { + "remember_absolute_timeout": { + "default": 2592000, + "type": "number", + "description": "The persistent session absolute timeout limit, in seconds." + } + }, + { + "response_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "request_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "read_body_for_logout": { + "type": "boolean", + "default": false + } + }, + { + "logout_methods": { + "description": "A set of HTTP methods that the plugin will respond to.", + "default": [ + "POST", + "DELETE" + ], + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "GET", + "POST", + "DELETE" + ] + } + } + }, + { + "logout_query_arg": { + "default": "session_logout", + "type": "string", + "description": "The query argument passed to logout requests." + } + }, + { + "logout_post_arg": { + "default": "session_logout", + "type": "string", + "description": "The POST argument passed to logout requests. Do not change this property." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/session/3.6.x.json b/schemas/session/3.6.x.json new file mode 100644 index 00000000..da2c2901 --- /dev/null +++ b/schemas/session/3.6.x.json @@ -0,0 +1,302 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "secret": { + "referenceable": true, + "type": "string", + "default": "rvGfd6EK2RJZmJKuGpYQFuExLl10Qe6069Nvih04wT8o", + "encrypted": true, + "description": "The secret that is used in keyed HMAC generation.", + "required": false + } + }, + { + "storage": { + "one_of": [ + "cookie", + "kong" + ], + "type": "string", + "description": "Determines where the session data is stored. `kong`: Stores encrypted session data into Kong's current database strategy; the cookie will not contain any session data. `cookie`: Stores encrypted session data within the cookie itself.", + "default": "cookie" + } + }, + { + "audience": { + "type": "string", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "default": "default" + } + }, + { + "idling_timeout": { + "type": "number", + "description": "The session cookie idle time, in seconds.", + "default": 900 + } + }, + { + "rolling_timeout": { + "type": "number", + "description": "The session cookie rolling timeout, in seconds. Specifies how long the session can be used until it needs to be renewed.", + "default": 3600 + } + }, + { + "absolute_timeout": { + "type": "number", + "description": "The session cookie absolute timeout, in seconds. Specifies how long the session can be used until it is no longer valid.", + "default": 86400 + } + }, + { + "stale_ttl": { + "type": "number", + "description": "The duration, in seconds, after which an old cookie is discarded, starting from the moment when the session becomes outdated and is replaced by a new one.", + "default": 10 + } + }, + { + "cookie_name": { + "type": "string", + "description": "The name of the cookie.", + "default": "session" + } + }, + { + "cookie_path": { + "type": "string", + "description": "The resource in the host where the cookie is available.", + "default": "/" + } + }, + { + "cookie_domain": { + "description": "The domain with which the cookie is intended to be exchanged.", + "type": "string" + } + }, + { + "cookie_same_site": { + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ], + "type": "string", + "description": "Determines whether and how a cookie may be sent with cross-site requests.", + "default": "Strict" + } + }, + { + "cookie_http_only": { + "type": "boolean", + "description": "Applies the `HttpOnly` tag so that the cookie is sent only to a server.", + "default": true + } + }, + { + "cookie_secure": { + "type": "boolean", + "description": "Applies the Secure directive so that the cookie may be sent to the server only with an encrypted request over the HTTPS protocol.", + "default": true + } + }, + { + "remember": { + "type": "boolean", + "description": "Enables or disables persistent sessions.", + "default": false + } + }, + { + "remember_cookie_name": { + "type": "string", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "default": "remember" + } + }, + { + "remember_rolling_timeout": { + "type": "number", + "description": "The persistent session rolling timeout window, in seconds.", + "default": 604800 + } + }, + { + "remember_absolute_timeout": { + "type": "number", + "description": "The persistent session absolute timeout limit, in seconds.", + "default": 2592000 + } + }, + { + "response_headers": { + "elements": { + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ], + "type": "string" + }, + "type": "set", + "description": "List of information to include, as headers, in the response to the downstream." + } + }, + { + "request_headers": { + "elements": { + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ], + "type": "string" + }, + "type": "set", + "description": "List of information to include, as headers, in the response to the downstream." + } + }, + { + "read_body_for_logout": { + "default": false, + "type": "boolean" + } + }, + { + "logout_methods": { + "elements": { + "one_of": [ + "GET", + "POST", + "DELETE" + ], + "type": "string" + }, + "type": "set", + "description": "A set of HTTP methods that the plugin will respond to.", + "default": [ + "POST", + "DELETE" + ] + } + }, + { + "logout_query_arg": { + "type": "string", + "description": "The query argument passed to logout requests.", + "default": "session_logout" + } + }, + { + "logout_post_arg": { + "type": "string", + "description": "The POST argument passed to logout requests. Do not change this property.", + "default": "session_logout" + } + } + ], + "shorthand_fields": [ + { + "cookie_lifetime": { + "type": "number" + } + }, + { + "cookie_idletime": { + "type": "number" + } + }, + { + "cookie_renew": { + "type": "number" + } + }, + { + "cookie_discard": { + "type": "number" + } + }, + { + "cookie_samesite": { + "type": "string" + } + }, + { + "cookie_httponly": { + "type": "boolean" + } + }, + { + "cookie_persistent": { + "type": "boolean" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/session/3.7.x.json b/schemas/session/3.7.x.json new file mode 100644 index 00000000..db316884 --- /dev/null +++ b/schemas/session/3.7.x.json @@ -0,0 +1,302 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "secret": { + "encrypted": true, + "referenceable": true, + "required": false, + "type": "string", + "description": "The secret that is used in keyed HMAC generation.", + "default": "4Xkz87KN9Mdq3BsyMOndCz3cjxVWxf4ndnK6tPTGKhYd" + } + }, + { + "storage": { + "default": "cookie", + "type": "string", + "description": "Determines where the session data is stored. `kong`: Stores encrypted session data into Kong's current database strategy; the cookie will not contain any session data. `cookie`: Stores encrypted session data within the cookie itself.", + "one_of": [ + "cookie", + "kong" + ] + } + }, + { + "audience": { + "type": "string", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "default": "default" + } + }, + { + "idling_timeout": { + "type": "number", + "description": "The session cookie idle time, in seconds.", + "default": 900 + } + }, + { + "rolling_timeout": { + "type": "number", + "description": "The session cookie rolling timeout, in seconds. Specifies how long the session can be used until it needs to be renewed.", + "default": 3600 + } + }, + { + "absolute_timeout": { + "type": "number", + "description": "The session cookie absolute timeout, in seconds. Specifies how long the session can be used until it is no longer valid.", + "default": 86400 + } + }, + { + "stale_ttl": { + "type": "number", + "description": "The duration, in seconds, after which an old cookie is discarded, starting from the moment when the session becomes outdated and is replaced by a new one.", + "default": 10 + } + }, + { + "cookie_name": { + "type": "string", + "description": "The name of the cookie.", + "default": "session" + } + }, + { + "cookie_path": { + "type": "string", + "description": "The resource in the host where the cookie is available.", + "default": "/" + } + }, + { + "cookie_domain": { + "description": "The domain with which the cookie is intended to be exchanged.", + "type": "string" + } + }, + { + "cookie_same_site": { + "default": "Strict", + "description": "Determines whether and how a cookie may be sent with cross-site requests.", + "type": "string", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "cookie_http_only": { + "type": "boolean", + "description": "Applies the `HttpOnly` tag so that the cookie is sent only to a server.", + "default": true + } + }, + { + "cookie_secure": { + "type": "boolean", + "description": "Applies the Secure directive so that the cookie may be sent to the server only with an encrypted request over the HTTPS protocol.", + "default": true + } + }, + { + "remember": { + "type": "boolean", + "description": "Enables or disables persistent sessions.", + "default": false + } + }, + { + "remember_cookie_name": { + "type": "string", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "default": "remember" + } + }, + { + "remember_rolling_timeout": { + "type": "number", + "description": "The persistent session rolling timeout window, in seconds.", + "default": 604800 + } + }, + { + "remember_absolute_timeout": { + "type": "number", + "description": "The persistent session absolute timeout limit, in seconds.", + "default": 2592000 + } + }, + { + "response_headers": { + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "description": "List of information to include, as headers, in the response to the downstream.", + "type": "set" + } + }, + { + "request_headers": { + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "description": "List of information to include, as headers, in the response to the downstream.", + "type": "set" + } + }, + { + "read_body_for_logout": { + "type": "boolean", + "default": false + } + }, + { + "logout_methods": { + "description": "A set of HTTP methods that the plugin will respond to.", + "elements": { + "type": "string", + "one_of": [ + "GET", + "POST", + "DELETE" + ] + }, + "type": "set", + "default": [ + "POST", + "DELETE" + ] + } + }, + { + "logout_query_arg": { + "type": "string", + "description": "The query argument passed to logout requests.", + "default": "session_logout" + } + }, + { + "logout_post_arg": { + "type": "string", + "description": "The POST argument passed to logout requests. Do not change this property.", + "default": "session_logout" + } + } + ], + "shorthand_fields": [ + { + "cookie_lifetime": { + "type": "number" + } + }, + { + "cookie_idletime": { + "type": "number" + } + }, + { + "cookie_renew": { + "type": "number" + } + }, + { + "cookie_discard": { + "type": "number" + } + }, + { + "cookie_samesite": { + "type": "string" + } + }, + { + "cookie_httponly": { + "type": "boolean" + } + }, + { + "cookie_persistent": { + "type": "boolean" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/session/3.8.x.json b/schemas/session/3.8.x.json new file mode 100644 index 00000000..decea8f5 --- /dev/null +++ b/schemas/session/3.8.x.json @@ -0,0 +1,302 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "secret": { + "description": "The secret that is used in keyed HMAC generation.", + "required": false, + "referenceable": true, + "type": "string", + "encrypted": true, + "default": "7iK18YEanf6i9XHvNwzx4RpdmHdRN6nSpPxC1uQxfsse" + } + }, + { + "storage": { + "description": "Determines where the session data is stored. `kong`: Stores encrypted session data into Kong's current database strategy; the cookie will not contain any session data. `cookie`: Stores encrypted session data within the cookie itself.", + "type": "string", + "default": "cookie", + "one_of": [ + "cookie", + "kong" + ] + } + }, + { + "audience": { + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string", + "default": "default" + } + }, + { + "idling_timeout": { + "description": "The session cookie idle time, in seconds.", + "type": "number", + "default": 900 + } + }, + { + "rolling_timeout": { + "description": "The session cookie rolling timeout, in seconds. Specifies how long the session can be used until it needs to be renewed.", + "type": "number", + "default": 3600 + } + }, + { + "absolute_timeout": { + "description": "The session cookie absolute timeout, in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number", + "default": 86400 + } + }, + { + "stale_ttl": { + "description": "The duration, in seconds, after which an old cookie is discarded, starting from the moment when the session becomes outdated and is replaced by a new one.", + "type": "number", + "default": 10 + } + }, + { + "cookie_name": { + "description": "The name of the cookie.", + "type": "string", + "default": "session" + } + }, + { + "cookie_path": { + "description": "The resource in the host where the cookie is available.", + "type": "string", + "default": "/" + } + }, + { + "cookie_domain": { + "description": "The domain with which the cookie is intended to be exchanged.", + "type": "string" + } + }, + { + "cookie_same_site": { + "description": "Determines whether and how a cookie may be sent with cross-site requests.", + "type": "string", + "default": "Strict", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "cookie_http_only": { + "description": "Applies the `HttpOnly` tag so that the cookie is sent only to a server.", + "type": "boolean", + "default": true + } + }, + { + "cookie_secure": { + "description": "Applies the Secure directive so that the cookie may be sent to the server only with an encrypted request over the HTTPS protocol.", + "type": "boolean", + "default": true + } + }, + { + "remember": { + "description": "Enables or disables persistent sessions.", + "type": "boolean", + "default": false + } + }, + { + "remember_cookie_name": { + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string", + "default": "remember" + } + }, + { + "remember_rolling_timeout": { + "description": "The persistent session rolling timeout window, in seconds.", + "type": "number", + "default": 604800 + } + }, + { + "remember_absolute_timeout": { + "description": "The persistent session absolute timeout limit, in seconds.", + "type": "number", + "default": 2592000 + } + }, + { + "response_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "request_headers": { + "description": "List of information to include, as headers, in the response to the downstream.", + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + } + } + }, + { + "read_body_for_logout": { + "default": false, + "type": "boolean" + } + }, + { + "logout_methods": { + "description": "A set of HTTP methods that the plugin will respond to.", + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "GET", + "POST", + "DELETE" + ] + }, + "default": [ + "POST", + "DELETE" + ] + } + }, + { + "logout_query_arg": { + "description": "The query argument passed to logout requests.", + "type": "string", + "default": "session_logout" + } + }, + { + "logout_post_arg": { + "description": "The POST argument passed to logout requests. Do not change this property.", + "type": "string", + "default": "session_logout" + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "cookie_lifetime": { + "type": "number" + } + }, + { + "cookie_idletime": { + "type": "number" + } + }, + { + "cookie_renew": { + "type": "number" + } + }, + { + "cookie_discard": { + "type": "number" + } + }, + { + "cookie_samesite": { + "type": "string" + } + }, + { + "cookie_httponly": { + "type": "boolean" + } + }, + { + "cookie_persistent": { + "type": "boolean" + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/session/3.9.x.json b/schemas/session/3.9.x.json new file mode 100644 index 00000000..cf9a5e2d --- /dev/null +++ b/schemas/session/3.9.x.json @@ -0,0 +1,302 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "secret": { + "encrypted": true, + "referenceable": true, + "type": "string", + "default": "lt9BJW1n5RfhCxTbNIKqsj8THW7YNdXTA0VW6KQwBUwg", + "description": "The secret that is used in keyed HMAC generation.", + "required": false + } + }, + { + "storage": { + "default": "cookie", + "description": "Determines where the session data is stored. `kong`: Stores encrypted session data into Kong's current database strategy; the cookie will not contain any session data. `cookie`: Stores encrypted session data within the cookie itself.", + "type": "string", + "one_of": [ + "cookie", + "kong" + ] + } + }, + { + "audience": { + "default": "default", + "description": "The session audience, which is the intended target application. For example `\"my-application\"`.", + "type": "string" + } + }, + { + "idling_timeout": { + "default": 900, + "description": "The session cookie idle time, in seconds.", + "type": "number" + } + }, + { + "rolling_timeout": { + "default": 3600, + "description": "The session cookie rolling timeout, in seconds. Specifies how long the session can be used until it needs to be renewed.", + "type": "number" + } + }, + { + "absolute_timeout": { + "default": 86400, + "description": "The session cookie absolute timeout, in seconds. Specifies how long the session can be used until it is no longer valid.", + "type": "number" + } + }, + { + "stale_ttl": { + "default": 10, + "description": "The duration, in seconds, after which an old cookie is discarded, starting from the moment when the session becomes outdated and is replaced by a new one.", + "type": "number" + } + }, + { + "cookie_name": { + "default": "session", + "description": "The name of the cookie.", + "type": "string" + } + }, + { + "cookie_path": { + "default": "/", + "description": "The resource in the host where the cookie is available.", + "type": "string" + } + }, + { + "cookie_domain": { + "description": "The domain with which the cookie is intended to be exchanged.", + "type": "string" + } + }, + { + "cookie_same_site": { + "default": "Strict", + "description": "Determines whether and how a cookie may be sent with cross-site requests.", + "type": "string", + "one_of": [ + "Strict", + "Lax", + "None", + "Default" + ] + } + }, + { + "cookie_http_only": { + "default": true, + "description": "Applies the `HttpOnly` tag so that the cookie is sent only to a server.", + "type": "boolean" + } + }, + { + "cookie_secure": { + "default": true, + "description": "Applies the Secure directive so that the cookie may be sent to the server only with an encrypted request over the HTTPS protocol.", + "type": "boolean" + } + }, + { + "remember": { + "default": false, + "description": "Enables or disables persistent sessions.", + "type": "boolean" + } + }, + { + "remember_cookie_name": { + "default": "remember", + "description": "Persistent session cookie name. Use with the `remember` configuration parameter.", + "type": "string" + } + }, + { + "remember_rolling_timeout": { + "default": 604800, + "description": "The persistent session rolling timeout window, in seconds.", + "type": "number" + } + }, + { + "remember_absolute_timeout": { + "default": 2592000, + "description": "The persistent session absolute timeout limit, in seconds.", + "type": "number" + } + }, + { + "response_headers": { + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "description": "List of information to include, as headers, in the response to the downstream.", + "type": "set" + } + }, + { + "request_headers": { + "elements": { + "type": "string", + "one_of": [ + "id", + "audience", + "subject", + "timeout", + "idling-timeout", + "rolling-timeout", + "absolute-timeout" + ] + }, + "description": "List of information to include, as headers, in the response to the downstream.", + "type": "set" + } + }, + { + "read_body_for_logout": { + "default": false, + "type": "boolean" + } + }, + { + "logout_methods": { + "elements": { + "type": "string", + "one_of": [ + "GET", + "POST", + "DELETE" + ] + }, + "description": "A set of HTTP methods that the plugin will respond to.", + "default": [ + "POST", + "DELETE" + ], + "type": "set" + } + }, + { + "logout_query_arg": { + "default": "session_logout", + "description": "The query argument passed to logout requests.", + "type": "string" + } + }, + { + "logout_post_arg": { + "default": "session_logout", + "description": "The POST argument passed to logout requests. Do not change this property.", + "type": "string" + } + } + ], + "shorthand_fields": [ + { + "cookie_lifetime": { + "type": "number" + } + }, + { + "cookie_idletime": { + "type": "number" + } + }, + { + "cookie_renew": { + "type": "number" + } + }, + { + "cookie_discard": { + "type": "number" + } + }, + { + "cookie_samesite": { + "type": "string" + } + }, + { + "cookie_httponly": { + "type": "boolean" + } + }, + { + "cookie_persistent": { + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/solace-upstream/.gitkeep b/schemas/solace-upstream/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/schemas/solace-upstream/.gitkeep @@ -0,0 +1 @@ + diff --git a/schemas/solace-upstream/3.11.x.json b/schemas/solace-upstream/3.11.x.json new file mode 100644 index 00000000..fd6c8292 --- /dev/null +++ b/schemas/solace-upstream/3.11.x.json @@ -0,0 +1,405 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "required": true, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "session": { + "required": true, + "type": "record", + "fields": [ + { + "host": { + "required": true, + "description": "The IPv4 or IPv6 address or host name to connect to (see: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/index.html#host-entry).", + "referenceable": true, + "type": "string" + } + }, + { + "vpn_name": { + "required": false, + "type": "string", + "description": "The name of the Message VPN to attempt to join when connecting to an event broker." + } + }, + { + "authentication": { + "required": true, + "description": "Session authentication related configuration.", + "fields": [ + { + "scheme": { + "required": true, + "type": "string", + "one_of": [ + "NONE", + "BASIC", + "OAUTH2" + ], + "default": "BASIC", + "description": "The client authentication scheme used when connection to an event broker." + } + }, + { + "username": { + "required": false, + "type": "string", + "description": "The username used with `BASIC` authentication scheme when connecting to an event broker .", + "referenceable": true + } + }, + { + "password": { + "required": false, + "type": "string", + "description": "The password used with `BASIC` authentication scheme when connecting to an event broker.", + "encrypted": true, + "referenceable": true + } + }, + { + "access_token": { + "required": false, + "type": "string", + "description": "The OAuth2 access token used with `OAUTH2` authentication scheme when connecting to an event broker.", + "encrypted": true, + "referenceable": true + } + }, + { + "access_token_header": { + "required": false, + "type": "string" + } + }, + { + "id_token": { + "required": false, + "type": "string", + "description": "The OpenID Connect ID token used with `OAUTH2` authentication scheme when connecting to an event broker.", + "encrypted": true, + "referenceable": true + } + }, + { + "id_token_header": { + "required": false, + "type": "string" + } + } + ], + "type": "record", + "entity_checks": [ + { + "conditional": { + "if_field": "scheme", + "then_match": { + "required": true + }, + "if_match": { + "eq": "BASIC" + }, + "then_field": "username" + } + }, + { + "conditional": { + "if_field": "scheme", + "then_match": { + "required": true + }, + "if_match": { + "eq": "BASIC" + }, + "then_field": "password" + } + }, + { + "conditional_at_least_one_of": { + "if_field": "scheme", + "then_at_least_one_of": [ + "access_token", + "access_token_header", + "id_token", + "id_token_header" + ], + "if_match": { + "eq": "OAUTH2" + }, + "then_err": "must set one of %s when 'scheme' is 'OAUTH2'" + } + } + ] + } + }, + { + "connect_timeout": { + "required": true, + "description": "The timeout period (in milliseconds) for a connect operation to a given host (per host).", + "between": [ + 100, + 100000 + ], + "default": 3000, + "type": "integer" + } + }, + { + "ssl_validate_certificate": { + "required": true, + "type": "boolean", + "description": "Indicates whether the API should validate server certificates with the trusted certificates.", + "default": false + } + }, + { + "properties": { + "required": false, + "type": "map", + "keys": { + "required": true, + "type": "string", + "not_one_of": [ + "SESSION_AUTHENTICATION_SCHEME", + "SESSION_USERNAME", + "SESSION_PASSWORD", + "SESSION_OAUTH2_ACCESS_TOKEN", + "SESSION_OIDC_ID_TOKEN", + "SESSION_HOST", + "SESSION_VPN_NAME", + "SESSION_ACK_EVENT_MODE", + "SESSION_SSL_VALIDATE_CERTIFICATE", + "SESSION_CONNECT_BLOCKING", + "SESSION_CONNECT_TIMEOUT_MS", + "SESSION_SEND_BLOCKING", + "SESSION_SUBSCRIBE_BLOCKING", + "SESSION_BLOCK_WHILE_CONNECTING" + ], + "match": "^SESSION_" + }, + "values": { + "required": true, + "type": "string", + "referenceable": true + }, + "description": "Additional Solace session properties (each setting needs to have `SESSION_` prefix)." + } + } + ], + "description": "Session related configuration." + } + }, + { + "message": { + "required": true, + "type": "record", + "fields": [ + { + "destinations": { + "required": true, + "type": "array", + "elements": { + "fields": [ + { + "name": { + "required": true, + "type": "string", + "description": "The name of the destination. You can use `$(uri_captures['topic_name']` in this field." + } + }, + { + "type": { + "required": true, + "type": "string", + "one_of": [ + "QUEUE", + "TOPIC" + ], + "default": "QUEUE", + "description": "The type of the destination." + } + } + ], + "type": "record" + }, + "len_min": 1, + "description": "The message destinations." + } + }, + { + "delivery_mode": { + "required": true, + "type": "string", + "one_of": [ + "DIRECT", + "PERSISTENT" + ], + "default": "DIRECT", + "description": "Sets the message delivery mode." + } + }, + { + "sender_id": { + "default": "kong", + "type": "string", + "required": false, + "description": "Allows the application to set the content of the sender identifier." + } + }, + { + "priority": { + "required": true, + "type": "integer", + "between": [ + 0, + 255 + ], + "description": "Sets the message priority.", + "default": 4 + } + }, + { + "dmq_eligible": { + "default": false, + "type": "boolean", + "required": true, + "description": "Sets the dead message queue (DMQ) eligible property on the message." + } + }, + { + "ttl": { + "gt": -1, + "type": "integer", + "default": 0, + "required": true, + "description": "Sets the time to live (TTL) in milliseconds for the message. Setting the time to live to zero disables the TTL for the message." + } + }, + { + "ack_timeout": { + "required": true, + "description": "When using a non-DIRECT guaranteed delivery mode, this property sets the message acknowledgement timeout (waiting time).", + "default": 2000, + "between": [ + 1, + 100000 + ], + "type": "integer" + } + }, + { + "tracing": { + "default": false, + "type": "boolean", + "required": true, + "description": "Enable or disable the tracing. This is primarily used for distributed tracing and message correlation, especially in debugging or tracking message flows across multiple systems." + } + }, + { + "tracing_sampled": { + "default": false, + "type": "boolean", + "required": true, + "description": "Indicates whether the message should be included in distributed tracing (i.e., if it should be \"sampled\" for the tracing)" + } + }, + { + "forward_method": { + "default": false, + "type": "boolean", + "required": true, + "description": "Include the request method in the message." + } + }, + { + "forward_uri": { + "default": false, + "type": "boolean", + "required": true, + "description": "Include the request URI and the URI arguments (as in, query arguments) in the message." + } + }, + { + "forward_headers": { + "default": false, + "type": "boolean", + "required": true, + "description": "Include the request headers in the message." + } + }, + { + "forward_body": { + "default": false, + "type": "boolean", + "required": true, + "description": "Include the request body and the body arguments in the message." + } + }, + { + "default_content": { + "required": false, + "type": "string", + "description": "When not using `forward_method`, `forward_uri`, `forward_headers` or `forward_body`, this sets the message content." + } + }, + { + "functions": { + "required": false, + "type": "array", + "elements": { + "type": "string" + }, + "description": "The Lua functions that manipulates (or generates) the message being sent to Solace. The `message` variable can be used to access the current message content, and the function can return a new content." + } + } + ], + "description": "The message related configuration." + } + } + ] + } + } + ], + "entity_checks": [] +} \ No newline at end of file diff --git a/schemas/solace-upstream/3.12.x.json b/schemas/solace-upstream/3.12.x.json new file mode 100644 index 00000000..780b8709 --- /dev/null +++ b/schemas/solace-upstream/3.12.x.json @@ -0,0 +1,406 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "session": { + "description": "Session related configuration.", + "fields": [ + { + "host": { + "type": "string", + "description": "The IPv4 or IPv6 address or host name to connect to (see: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/index.html#host-entry).", + "referenceable": true, + "required": true + } + }, + { + "vpn_name": { + "description": "The name of the Message VPN to attempt to join when connecting to an event broker.", + "type": "string", + "required": false + } + }, + { + "authentication": { + "type": "record", + "entity_checks": [ + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "BASIC" + }, + "then_field": "username", + "if_field": "scheme" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": "BASIC" + }, + "then_field": "password", + "if_field": "scheme" + } + }, + { + "conditional_at_least_one_of": { + "then_at_least_one_of": [ + "access_token", + "access_token_header", + "id_token", + "id_token_header" + ], + "if_match": { + "eq": "OAUTH2" + }, + "then_err": "must set one of %s when 'scheme' is 'OAUTH2'", + "if_field": "scheme" + } + } + ], + "required": true, + "description": "Session authentication related configuration.", + "fields": [ + { + "scheme": { + "type": "string", + "required": true, + "description": "The client authentication scheme used when connection to an event broker.", + "default": "BASIC", + "one_of": [ + "NONE", + "BASIC", + "OAUTH2" + ] + } + }, + { + "username": { + "description": "The username used with `BASIC` authentication scheme when connecting to an event broker.", + "type": "string", + "referenceable": true, + "required": false + } + }, + { + "password": { + "type": "string", + "required": false, + "description": "The password used with `BASIC` authentication scheme when connecting to an event broker.", + "referenceable": true, + "encrypted": true + } + }, + { + "access_token": { + "type": "string", + "required": false, + "description": "The OAuth2 access token used with `OAUTH2` authentication scheme when connecting to an event broker.", + "referenceable": true, + "encrypted": true + } + }, + { + "access_token_header": { + "type": "string", + "required": false + } + }, + { + "id_token": { + "type": "string", + "required": false, + "description": "The OpenID Connect ID token used with `OAUTH2` authentication scheme when connecting to an event broker.", + "referenceable": true, + "encrypted": true + } + }, + { + "id_token_header": { + "type": "string", + "required": false + } + } + ] + } + }, + { + "connect_timeout": { + "type": "integer", + "between": [ + 100, + 100000 + ], + "required": true, + "description": "The timeout period (in milliseconds) for a connect operation to a given host (per host).", + "default": 3000 + } + }, + { + "ssl_validate_certificate": { + "description": "Indicates whether the API should validate server certificates with the trusted certificates.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "properties": { + "type": "map", + "required": false, + "description": "Additional Solace session properties (each setting needs to have `SESSION_` prefix).", + "values": { + "type": "string", + "referenceable": true, + "required": true + }, + "keys": { + "type": "string", + "match": "^SESSION_", + "required": true, + "not_one_of": [ + "SESSION_AUTHENTICATION_SCHEME", + "SESSION_USERNAME", + "SESSION_PASSWORD", + "SESSION_OAUTH2_ACCESS_TOKEN", + "SESSION_OIDC_ID_TOKEN", + "SESSION_HOST", + "SESSION_VPN_NAME", + "SESSION_ACK_EVENT_MODE", + "SESSION_SSL_VALIDATE_CERTIFICATE", + "SESSION_CONNECT_BLOCKING", + "SESSION_CONNECT_TIMEOUT_MS", + "SESSION_SEND_BLOCKING", + "SESSION_SUBSCRIBE_BLOCKING", + "SESSION_BLOCK_WHILE_CONNECTING", + "SESSION_GUARANTEED_WITH_WEB_TRANSPORT" + ] + } + } + } + ], + "type": "record", + "required": true + } + }, + { + "message": { + "type": "record", + "fields": [ + { + "destinations": { + "type": "array", + "len_min": 1, + "required": true, + "description": "The message destinations.", + "elements": { + "type": "record", + "fields": [ + { + "name": { + "type": "string", + "description": "The name of the destination. You can use `$(uri_captures['topic_name']` in this field.", + "required": true + } + }, + { + "type": { + "type": "string", + "required": true, + "description": "The type of the destination.", + "default": "QUEUE", + "one_of": [ + "QUEUE", + "TOPIC" + ] + } + } + ] + } + } + }, + { + "delivery_mode": { + "type": "string", + "required": true, + "description": "Sets the message delivery mode.", + "default": "DIRECT", + "one_of": [ + "DIRECT", + "PERSISTENT" + ] + } + }, + { + "sender_id": { + "type": "string", + "default": "kong", + "description": "Allows the application to set the content of the sender identifier.", + "required": false + } + }, + { + "priority": { + "type": "integer", + "between": [ + 0, + 255 + ], + "required": true, + "description": "Sets the message priority.", + "default": 4 + } + }, + { + "dmq_eligible": { + "type": "boolean", + "default": false, + "description": "Sets the dead message queue (DMQ) eligible property on the message.", + "required": true + } + }, + { + "ttl": { + "type": "integer", + "required": true, + "description": "Sets the time to live (TTL) in milliseconds for the message. Setting the time to live to zero disables the TTL for the message.", + "default": 0, + "gt": -1 + } + }, + { + "ack_timeout": { + "type": "integer", + "between": [ + 1, + 100000 + ], + "required": true, + "description": "When using a non-DIRECT guaranteed delivery mode, this property sets the message acknowledgement timeout in milliseconds (waiting time).", + "default": 2000 + } + }, + { + "tracing": { + "type": "boolean", + "default": false, + "description": "Enable or disable the tracing. This is primarily used for distributed tracing and message correlation, especially in debugging or tracking message flows across multiple systems.", + "required": true + } + }, + { + "tracing_sampled": { + "type": "boolean", + "default": false, + "description": "Indicates whether the message should be included in distributed tracing (i.e., if it should be \"sampled\" for the tracing)", + "required": true + } + }, + { + "forward_method": { + "type": "boolean", + "default": false, + "description": "Include the request method in the message.", + "required": true + } + }, + { + "forward_uri": { + "type": "boolean", + "default": false, + "description": "Include the request URI and the URI arguments (as in, query arguments) in the message.", + "required": true + } + }, + { + "forward_headers": { + "type": "boolean", + "default": false, + "description": "Include the request headers in the message.", + "required": true + } + }, + { + "forward_body": { + "type": "boolean", + "default": false, + "description": "Include the request body and the body arguments in the message.", + "required": true + } + }, + { + "default_content": { + "type": "string", + "description": "When not using `forward_method`, `forward_uri`, `forward_headers` or `forward_body`, this sets the message content.", + "required": false + } + }, + { + "functions": { + "type": "array", + "elements": { + "type": "string" + }, + "description": "The Lua functions that manipulates (or generates) the message being sent to Solace. The `message` variable can be used to access the current message content, and the function can return a new content.", + "required": false + } + } + ], + "description": "The message related configuration.", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/standard-webhooks/3.10.x.json b/schemas/standard-webhooks/3.10.x.json new file mode 100644 index 00000000..9420b097 --- /dev/null +++ b/schemas/standard-webhooks/3.10.x.json @@ -0,0 +1,63 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "secret_v1": { + "type": "string", + "referenceable": true, + "description": "Webhook secret", + "encrypted": true, + "required": true + } + }, + { + "tolerance_second": { + "gt": -1, + "type": "integer", + "description": "Tolerance of the webhook timestamp in seconds. If the webhook timestamp is older than this number of seconds, it will be rejected with a '400' response.", + "default": 300, + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/standard-webhooks/3.11.x.json b/schemas/standard-webhooks/3.11.x.json new file mode 100644 index 00000000..07c572e3 --- /dev/null +++ b/schemas/standard-webhooks/3.11.x.json @@ -0,0 +1,63 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "secret_v1": { + "required": true, + "description": "Webhook secret", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "tolerance_second": { + "gt": -1, + "description": "Tolerance of the webhook timestamp in seconds. If the webhook timestamp is older than this number of seconds, it will be rejected with a '400' response.", + "required": true, + "default": 300, + "type": "integer" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/standard-webhooks/3.12.x.json b/schemas/standard-webhooks/3.12.x.json new file mode 100644 index 00000000..5a7b8c29 --- /dev/null +++ b/schemas/standard-webhooks/3.12.x.json @@ -0,0 +1,61 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "secret_v1": { + "type": "string", + "required": true, + "encrypted": true, + "referenceable": true, + "description": "Webhook secret" + } + }, + { + "tolerance_second": { + "type": "integer", + "required": true, + "description": "Tolerance of the webhook timestamp in seconds. If the webhook timestamp is older than this number of seconds, it will be rejected with a '400' response.", + "default": 300, + "gt": -1 + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/standard-webhooks/3.8.x.json b/schemas/standard-webhooks/3.8.x.json new file mode 100644 index 00000000..c1cb595d --- /dev/null +++ b/schemas/standard-webhooks/3.8.x.json @@ -0,0 +1,63 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "secret_v1": { + "description": "Webhook secret", + "required": true, + "type": "string", + "encrypted": true, + "referenceable": true + } + }, + { + "tolerance_second": { + "description": "Tolerance of the webhook timestamp in seconds. If the webhook timestamp is older than this number of seconds, it will be rejected with a '400' response.", + "required": true, + "type": "integer", + "gt": -1, + "default": 300 + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/standard-webhooks/3.9.x.json b/schemas/standard-webhooks/3.9.x.json new file mode 100644 index 00000000..bf13b5b6 --- /dev/null +++ b/schemas/standard-webhooks/3.9.x.json @@ -0,0 +1,63 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "secret_v1": { + "encrypted": true, + "required": true, + "type": "string", + "description": "Webhook secret", + "referenceable": true + } + }, + { + "tolerance_second": { + "required": true, + "type": "integer", + "gt": -1, + "description": "Tolerance of the webhook timestamp in seconds. If the webhook timestamp is older than this number of seconds, it will be rejected with a '400' response.", + "default": 300 + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/statsd-advanced/3.10.x.json b/schemas/statsd-advanced/3.10.x.json new file mode 100644 index 00000000..302883f1 --- /dev/null +++ b/schemas/statsd-advanced/3.10.x.json @@ -0,0 +1,459 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "localhost", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 8125, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "prefix": { + "description": "String to prefix to each metric's name.", + "type": "string", + "default": "kong" + } + }, + { + "metrics": { + "description": "List of Metrics to be logged.", + "type": "array", + "elements": { + "entity_checks": [ + { + "conditional": { + "if_match": { + "one_of": [ + "unique_users" + ] + }, + "then_field": "stat_type", + "if_field": "name", + "then_match": { + "eq": "set" + } + } + }, + { + "conditional": { + "if_match": { + "one_of": [ + "request_count", + "status_count", + "request_per_user", + "status_count_per_user", + "status_count_per_workspace", + "status_count_per_user_per_route", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ] + }, + "then_field": "stat_type", + "if_field": "name", + "then_match": { + "eq": "counter" + } + } + }, + { + "conditional": { + "if_match": { + "one_of": [ + "shdict_usage" + ] + }, + "then_field": "stat_type", + "if_field": "name", + "then_match": { + "eq": "gauge" + } + } + }, + { + "conditional": { + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "if_field": "stat_type", + "then_match": { + "required": true + } + } + } + ], + "type": "record", + "fields": [ + { + "name": { + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "status_count", + "status_count_per_user", + "unique_users", + "upstream_latency", + "status_count_per_workspace", + "status_count_per_user_per_route", + "shdict_usage", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ], + "type": "string", + "required": true + } + }, + { + "stat_type": { + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string", + "required": true + } + }, + { + "sample_rate": { + "gt": 0, + "type": "number" + } + }, + { + "consumer_identifier": { + "type": "string", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + }, + { + "service_identifier": { + "type": "string", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ] + } + }, + { + "workspace_identifier": { + "type": "string", + "one_of": [ + "workspace_id", + "workspace_name" + ] + } + } + ] + }, + "default": [ + { + "sample_rate": 1, + "name": "request_count", + "stat_type": "counter" + }, + { + "stat_type": "timer", + "name": "latency" + }, + { + "stat_type": "timer", + "name": "request_size" + }, + { + "sample_rate": 1, + "name": "status_count", + "stat_type": "counter" + }, + { + "stat_type": "timer", + "name": "response_size" + }, + { + "stat_type": "set", + "name": "unique_users" + }, + { + "sample_rate": 1, + "name": "request_per_user", + "stat_type": "counter" + }, + { + "stat_type": "timer", + "name": "upstream_latency" + }, + { + "stat_type": "timer", + "name": "kong_latency" + }, + { + "sample_rate": 1, + "name": "status_count_per_user", + "stat_type": "counter" + }, + { + "sample_rate": 1, + "name": "status_count_per_workspace", + "stat_type": "counter" + }, + { + "sample_rate": 1, + "name": "status_count_per_user_per_route", + "stat_type": "counter" + }, + { + "sample_rate": 1, + "name": "shdict_usage", + "stat_type": "gauge" + }, + { + "name": "cache_datastore_hits_total", + "sample_rate": 1, + "stat_type": "counter" + }, + { + "name": "cache_datastore_misses_total", + "sample_rate": 1, + "stat_type": "counter" + } + ] + } + }, + { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "type": "array", + "elements": { + "match": "^[0-9]+-[0-9]+$", + "type": "string" + } + } + }, + { + "udp_packet_size": { + "description": "Combine UDP packet up to the size configured. If zero (0), don't combine the UDP packet. Must be a number between 0 and 65507 (inclusive).", + "type": "number", + "default": 0, + "between": [ + 0, + 65507 + ] + } + }, + { + "use_tcp": { + "description": "Use TCP instead of UDP.", + "type": "boolean", + "default": false + } + }, + { + "hostname_in_prefix": { + "description": "Include the `hostname` in the `prefix` for each metric name.", + "type": "boolean", + "default": false + } + }, + { + "consumer_identifier_default": { + "type": "string", + "description": "The default consumer identifier for metrics. This will take effect when a metric's consumer identifier is omitted. Allowed values are `custom_id`, `consumer_id`, `username`.", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ], + "default": "custom_id", + "required": true + } + }, + { + "service_identifier_default": { + "type": "string", + "description": "The default service identifier for metrics. This will take effect when a metric's service identifier is omitted. Allowed values are `service_name_or_host`, `service_id`, `service_name`, `service_host`.", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ], + "default": "service_name_or_host", + "required": true + } + }, + { + "workspace_identifier_default": { + "type": "string", + "description": "The default workspace identifier for metrics. This will take effect when a metric's workspace identifier is omitted. Allowed values are `workspace_id`, `workspace_name`. ", + "one_of": [ + "workspace_id", + "workspace_name" + ], + "default": "workspace_id", + "required": true + } + }, + { + "queue": { + "type": "record", + "fields": [ + { + "max_batch_size": { + "between": [ + 1, + 1000000 + ], + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time." + } + }, + { + "max_coalescing_delay": { + "between": [ + 0, + 3600 + ], + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." + } + }, + { + "max_entries": { + "between": [ + 1, + 1000000 + ], + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue." + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "default": 60, + "type": "number" + } + }, + { + "initial_retry_delay": { + "between": [ + 0.001, + 1000000 + ], + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch." + } + }, + { + "max_retry_delay": { + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "default": 60, + "type": "number", + "between": [ + 0.001, + 1000000 + ] + } + }, + { + "concurrency_limit": { + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "default": 1, + "type": "integer", + "one_of": [ + -1, + 1 + ] + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/statsd-advanced/3.11.x.json b/schemas/statsd-advanced/3.11.x.json new file mode 100644 index 00000000..2f1c6f4f --- /dev/null +++ b/schemas/statsd-advanced/3.11.x.json @@ -0,0 +1,459 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 8125, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + } + }, + { + "metrics": { + "type": "array", + "description": "List of Metrics to be logged.", + "default": [ + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_count" + }, + { + "stat_type": "timer", + "name": "latency" + }, + { + "stat_type": "timer", + "name": "request_size" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count" + }, + { + "stat_type": "timer", + "name": "response_size" + }, + { + "stat_type": "set", + "name": "unique_users" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_per_user" + }, + { + "stat_type": "timer", + "name": "upstream_latency" + }, + { + "stat_type": "timer", + "name": "kong_latency" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_user" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_workspace" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_user_per_route" + }, + { + "stat_type": "gauge", + "sample_rate": 1, + "name": "shdict_usage" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "cache_datastore_hits_total" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "cache_datastore_misses_total" + } + ], + "elements": { + "entity_checks": [ + { + "conditional": { + "if_match": { + "one_of": [ + "unique_users" + ] + }, + "then_field": "stat_type", + "if_field": "name", + "then_match": { + "eq": "set" + } + } + }, + { + "conditional": { + "if_match": { + "one_of": [ + "request_count", + "status_count", + "request_per_user", + "status_count_per_user", + "status_count_per_workspace", + "status_count_per_user_per_route", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ] + }, + "then_field": "stat_type", + "if_field": "name", + "then_match": { + "eq": "counter" + } + } + }, + { + "conditional": { + "if_match": { + "one_of": [ + "shdict_usage" + ] + }, + "then_field": "stat_type", + "if_field": "name", + "then_match": { + "eq": "gauge" + } + } + }, + { + "conditional": { + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "if_field": "stat_type", + "then_match": { + "required": true + } + } + } + ], + "fields": [ + { + "name": { + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "status_count", + "status_count_per_user", + "unique_users", + "upstream_latency", + "status_count_per_workspace", + "status_count_per_user_per_route", + "shdict_usage", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ], + "required": true, + "type": "string" + } + }, + { + "stat_type": { + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "required": true, + "type": "string" + } + }, + { + "sample_rate": { + "gt": 0, + "type": "number" + } + }, + { + "consumer_identifier": { + "one_of": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + } + }, + { + "service_identifier": { + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ], + "type": "string" + } + }, + { + "workspace_identifier": { + "one_of": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + } + ], + "type": "record" + } + } + }, + { + "allow_status_codes": { + "type": "array", + "description": "List of status code ranges that are allowed to be logged in metrics.", + "elements": { + "match": "^[0-9]+-[0-9]+$", + "type": "string" + } + } + }, + { + "udp_packet_size": { + "description": "Combine UDP packet up to the size configured. If zero (0), don't combine the UDP packet. Must be a number between 0 and 65507 (inclusive).", + "between": [ + 0, + 65507 + ], + "default": 0, + "type": "number" + } + }, + { + "use_tcp": { + "default": false, + "description": "Use TCP instead of UDP.", + "type": "boolean" + } + }, + { + "hostname_in_prefix": { + "default": false, + "description": "Include the `hostname` in the `prefix` for each metric name.", + "type": "boolean" + } + }, + { + "consumer_identifier_default": { + "required": true, + "description": "The default consumer identifier for metrics. This will take effect when a metric's consumer identifier is omitted. Allowed values are `custom_id`, `consumer_id`, `username`.", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ], + "default": "custom_id", + "type": "string" + } + }, + { + "service_identifier_default": { + "required": true, + "description": "The default service identifier for metrics. This will take effect when a metric's service identifier is omitted. Allowed values are `service_name_or_host`, `service_id`, `service_name`, `service_host`.", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ], + "default": "service_name_or_host", + "type": "string" + } + }, + { + "workspace_identifier_default": { + "required": true, + "description": "The default workspace identifier for metrics. This will take effect when a metric's workspace identifier is omitted. Allowed values are `workspace_id`, `workspace_name`. ", + "one_of": [ + "workspace_id", + "workspace_name" + ], + "default": "workspace_id", + "type": "string" + } + }, + { + "queue": { + "required": true, + "fields": [ + { + "max_batch_size": { + "default": 1, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be processed at a time.", + "type": "integer" + } + }, + { + "max_coalescing_delay": { + "default": 1, + "between": [ + 0, + 3600 + ], + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "type": "number" + } + }, + { + "max_entries": { + "default": 10000, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be waiting on the queue.", + "type": "integer" + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "between": [ + 0.001, + 1000000 + ], + "description": "Time in seconds before the initial retry is made for a failing batch.", + "type": "number" + } + }, + { + "max_retry_delay": { + "default": 60, + "between": [ + 0.001, + 1000000 + ], + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "type": "number" + } + }, + { + "concurrency_limit": { + "one_of": [ + -1, + 1 + ], + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "type": "integer" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/statsd-advanced/3.12.x.json b/schemas/statsd-advanced/3.12.x.json new file mode 100644 index 00000000..ea648521 --- /dev/null +++ b/schemas/statsd-advanced/3.12.x.json @@ -0,0 +1,457 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "localhost", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 8125, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "prefix": { + "type": "string", + "default": "kong", + "description": "String to prefix to each metric's name." + } + }, + { + "metrics": { + "type": "array", + "default": [ + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_count" + }, + { + "stat_type": "timer", + "name": "latency" + }, + { + "stat_type": "timer", + "name": "request_size" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count" + }, + { + "stat_type": "timer", + "name": "response_size" + }, + { + "stat_type": "set", + "name": "unique_users" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_per_user" + }, + { + "stat_type": "timer", + "name": "upstream_latency" + }, + { + "stat_type": "timer", + "name": "kong_latency" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_user" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_workspace" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_user_per_route" + }, + { + "stat_type": "gauge", + "sample_rate": 1, + "name": "shdict_usage" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "cache_datastore_hits_total" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "cache_datastore_misses_total" + } + ], + "elements": { + "type": "record", + "fields": [ + { + "name": { + "type": "string", + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "status_count", + "status_count_per_user", + "unique_users", + "upstream_latency", + "status_count_per_workspace", + "status_count_per_user_per_route", + "shdict_usage", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ], + "required": true + } + }, + { + "stat_type": { + "type": "string", + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "required": true + } + }, + { + "sample_rate": { + "gt": 0, + "type": "number" + } + }, + { + "consumer_identifier": { + "type": "string", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + }, + { + "service_identifier": { + "type": "string", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ] + } + }, + { + "workspace_identifier": { + "type": "string", + "one_of": [ + "workspace_id", + "workspace_name" + ] + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_match": { + "eq": "set" + }, + "if_match": { + "one_of": [ + "unique_users" + ] + }, + "then_field": "stat_type", + "if_field": "name" + } + }, + { + "conditional": { + "then_match": { + "eq": "counter" + }, + "if_match": { + "one_of": [ + "request_count", + "status_count", + "request_per_user", + "status_count_per_user", + "status_count_per_workspace", + "status_count_per_user_per_route", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ] + }, + "then_field": "stat_type", + "if_field": "name" + } + }, + { + "conditional": { + "then_match": { + "eq": "gauge" + }, + "if_match": { + "one_of": [ + "shdict_usage" + ] + }, + "then_field": "stat_type", + "if_field": "name" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "if_field": "stat_type" + } + } + ] + }, + "description": "List of Metrics to be logged." + } + }, + { + "allow_status_codes": { + "type": "array", + "elements": { + "type": "string", + "match": "^[0-9]+-[0-9]+$" + }, + "description": "List of status code ranges that are allowed to be logged in metrics." + } + }, + { + "udp_packet_size": { + "type": "number", + "default": 0, + "between": [ + 0, + 65507 + ], + "description": "Combine UDP packet up to the size configured. If zero (0), don't combine the UDP packet. Must be a number between 0 and 65507 (inclusive)." + } + }, + { + "use_tcp": { + "type": "boolean", + "default": false, + "description": "Use TCP instead of UDP." + } + }, + { + "hostname_in_prefix": { + "type": "boolean", + "default": false, + "description": "Include the `hostname` in the `prefix` for each metric name." + } + }, + { + "consumer_identifier_default": { + "type": "string", + "required": true, + "description": "The default consumer identifier for metrics. This will take effect when a metric's consumer identifier is omitted. Allowed values are `custom_id`, `consumer_id`, `username`.", + "default": "custom_id", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + }, + { + "service_identifier_default": { + "type": "string", + "required": true, + "description": "The default service identifier for metrics. This will take effect when a metric's service identifier is omitted. Allowed values are `service_name_or_host`, `service_id`, `service_name`, `service_host`.", + "default": "service_name_or_host", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ] + } + }, + { + "workspace_identifier_default": { + "type": "string", + "required": true, + "description": "The default workspace identifier for metrics. This will take effect when a metric's workspace identifier is omitted. Allowed values are `workspace_id`, `workspace_name`. ", + "default": "workspace_id", + "one_of": [ + "workspace_id", + "workspace_name" + ] + } + }, + { + "queue": { + "type": "record", + "fields": [ + { + "max_batch_size": { + "type": "integer", + "default": 1, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be processed at a time." + } + }, + { + "max_coalescing_delay": { + "type": "number", + "default": 1, + "between": [ + 0, + 3600 + ], + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." + } + }, + { + "max_entries": { + "type": "integer", + "default": 10000, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be waiting on the queue." + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "type": "number", + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." + } + }, + { + "initial_retry_delay": { + "type": "number", + "default": 0.01, + "between": [ + 0.001, + 1000000 + ], + "description": "Time in seconds before the initial retry is made for a failing batch." + } + }, + { + "max_retry_delay": { + "type": "number", + "default": 60, + "between": [ + 0.001, + 1000000 + ], + "description": "Maximum time in seconds between retries, caps exponential backoff." + } + }, + { + "concurrency_limit": { + "type": "integer", + "default": 1, + "one_of": [ + -1, + 1 + ], + "description": "The number of of queue delivery timers. -1 indicates unlimited." + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/statsd-advanced/3.4.x.json b/schemas/statsd-advanced/3.4.x.json index 4e74fce9..6c8078c6 100644 --- a/schemas/statsd-advanced/3.4.x.json +++ b/schemas/statsd-advanced/3.4.x.json @@ -8,6 +8,9 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", "elements": { "one_of": [ "grpc", @@ -21,46 +24,54 @@ "ws", "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "host": { - "type": "string", - "default": "localhost" + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "type": "string" } }, { "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", "between": [ 0, 65535 ], - "type": "integer", - "default": 8125 + "type": "integer" } }, { "prefix": { + "default": "kong", "type": "string", - "default": "kong" + "description": "String to prefix to each metric's name." } }, { "metrics": { - "type": "array", "default": [ { - "stat_type": "counter", + "sample_rate": 1, "name": "request_count", - "sample_rate": 1 + "stat_type": "counter" }, { "name": "latency", @@ -71,9 +82,9 @@ "stat_type": "timer" }, { - "stat_type": "counter", + "sample_rate": 1, "name": "status_count", - "sample_rate": 1 + "stat_type": "counter" }, { "name": "response_size", @@ -84,9 +95,9 @@ "stat_type": "set" }, { - "stat_type": "counter", + "sample_rate": 1, "name": "request_per_user", - "sample_rate": 1 + "stat_type": "counter" }, { "name": "upstream_latency", @@ -97,108 +108,42 @@ "stat_type": "timer" }, { - "stat_type": "counter", + "sample_rate": 1, "name": "status_count_per_user", - "sample_rate": 1 + "stat_type": "counter" }, { - "stat_type": "counter", "name": "status_count_per_workspace", - "sample_rate": 1 + "sample_rate": 1, + "stat_type": "counter" }, { - "stat_type": "counter", + "sample_rate": 1, "name": "status_count_per_user_per_route", - "sample_rate": 1 + "stat_type": "counter" }, { - "stat_type": "gauge", + "sample_rate": 1, "name": "shdict_usage", - "sample_rate": 1 + "stat_type": "gauge" }, { - "stat_type": "counter", "name": "cache_datastore_hits_total", - "sample_rate": 1 + "sample_rate": 1, + "stat_type": "counter" }, { - "stat_type": "counter", "name": "cache_datastore_misses_total", - "sample_rate": 1 + "sample_rate": 1, + "stat_type": "counter" } ], + "description": "List of Metrics to be logged.", + "type": "array", "elements": { - "entity_checks": [ - { - "conditional": { - "if_match": { - "one_of": [ - "unique_users" - ] - }, - "then_field": "stat_type", - "if_field": "name", - "then_match": { - "eq": "set" - } - } - }, - { - "conditional": { - "if_match": { - "one_of": [ - "request_count", - "status_count", - "request_per_user", - "status_count_per_user", - "status_count_per_workspace", - "status_count_per_user_per_route", - "cache_datastore_hits_total", - "cache_datastore_misses_total" - ] - }, - "then_field": "stat_type", - "if_field": "name", - "then_match": { - "eq": "counter" - } - } - }, - { - "conditional": { - "if_match": { - "one_of": [ - "shdict_usage" - ] - }, - "then_field": "stat_type", - "if_field": "name", - "then_match": { - "eq": "gauge" - } - } - }, - { - "conditional": { - "if_match": { - "one_of": [ - "counter", - "gauge" - ] - }, - "then_field": "sample_rate", - "if_field": "stat_type", - "then_match": { - "required": true - } - } - } - ], "fields": [ { "name": { - "type": "string", - "required": true, "one_of": [ "kong_latency", "latency", @@ -215,13 +160,13 @@ "shdict_usage", "cache_datastore_hits_total", "cache_datastore_misses_total" - ] + ], + "required": true, + "type": "string" } }, { "stat_type": { - "type": "string", - "required": true, "one_of": [ "counter", "gauge", @@ -229,43 +174,111 @@ "meter", "set", "timer" - ] + ], + "required": true, + "type": "string" } }, { "sample_rate": { - "gt": 0, - "type": "number" + "type": "number", + "gt": 0 } }, { "consumer_identifier": { + "type": "string", "one_of": [ "consumer_id", "custom_id", "username" - ], - "type": "string" + ] } }, { "service_identifier": { + "type": "string", "one_of": [ "service_id", "service_name", "service_host", "service_name_or_host" - ], - "type": "string" + ] } }, { "workspace_identifier": { + "type": "string", "one_of": [ "workspace_id", "workspace_name" - ], - "type": "string" + ] + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_field": "stat_type", + "if_match": { + "one_of": [ + "unique_users" + ] + }, + "then_match": { + "eq": "set" + }, + "if_field": "name" + } + }, + { + "conditional": { + "then_field": "stat_type", + "if_match": { + "one_of": [ + "request_count", + "status_count", + "request_per_user", + "status_count_per_user", + "status_count_per_workspace", + "status_count_per_user_per_route", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ] + }, + "then_match": { + "eq": "counter" + }, + "if_field": "name" + } + }, + { + "conditional": { + "then_field": "stat_type", + "if_match": { + "one_of": [ + "shdict_usage" + ] + }, + "then_match": { + "eq": "gauge" + }, + "if_field": "name" + } + }, + { + "conditional": { + "then_field": "sample_rate", + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_match": { + "required": true + }, + "if_field": "stat_type" } } ], @@ -275,135 +288,161 @@ }, { "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", "elements": { - "match": "^[0-9]+-[0-9]+$", - "type": "string" + "type": "string", + "match": "^[0-9]+-[0-9]+$" }, "type": "array" } }, { "udp_packet_size": { + "default": 0, + "type": "number", "between": [ 0, 65507 ], - "type": "number", - "default": 0 + "description": "Combine UDP packet up to the size configured. If zero (0), don't combine the UDP packet. Must be a number between 0 and 65507 (inclusive)." } }, { "use_tcp": { + "default": false, "type": "boolean", - "default": false + "description": "Use TCP instead of UDP." } }, { "hostname_in_prefix": { + "default": false, "type": "boolean", - "default": false + "description": "Include the `hostname` in the `prefix` for each metric name." } }, { "consumer_identifier_default": { - "required": true, + "default": "custom_id", + "type": "string", "one_of": [ "consumer_id", "custom_id", "username" ], - "default": "custom_id", - "type": "string" + "description": "The default consumer identifier for metrics. This will take effect when a metric's consumer identifier is omitted. Allowed values are `custom_id`, `consumer_id`, `username`.", + "required": true } }, { "service_identifier_default": { - "required": true, + "default": "service_name_or_host", + "type": "string", "one_of": [ "service_id", "service_name", "service_host", "service_name_or_host" ], - "default": "service_name_or_host", - "type": "string" + "description": "The default service identifier for metrics. This will take effect when a metric's service identifier is omitted. Allowed values are `service_name_or_host`, `service_id`, `service_name`, `service_host`.", + "required": true } }, { "workspace_identifier_default": { - "required": true, + "default": "workspace_id", + "type": "string", "one_of": [ "workspace_id", "workspace_name" ], - "default": "workspace_id", - "type": "string" + "description": "The default workspace identifier for metrics. This will take effect when a metric's workspace identifier is omitted. Allowed values are `workspace_id`, `workspace_name`. ", + "required": true } }, { "queue": { - "required": true, "fields": [ { "max_batch_size": { + "default": 1, + "type": "integer", "between": [ 1, 1000000 ], - "type": "number", - "default": 1 + "description": "Maximum number of entries that can be processed at a time." } }, { "max_coalescing_delay": { + "default": 1, + "type": "number", "between": [ 0, 3600 ], - "type": "number", - "default": 1 + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." } }, { "max_entries": { + "default": 10000, + "type": "integer", "between": [ 1, 1000000 ], - "type": "number", - "default": 10000 + "description": "Maximum number of entries that can be waiting on the queue." } }, { "max_bytes": { - "type": "number" + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." } }, { "max_retry_time": { "default": 60, - "type": "number" + "type": "number", + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." } }, { "initial_retry_delay": { "default": 0.01, - "type": "number" + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "description": "Time in seconds before the initial retry is made for a failing batch." } }, { "max_retry_delay": { "default": 60, - "type": "number" + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "description": "Maximum time in seconds between retries, caps exponential backoff." } } ], - "type": "record" + "type": "record", + "required": true } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/statsd-advanced/3.5.x.json b/schemas/statsd-advanced/3.5.x.json new file mode 100644 index 00000000..f8b7e9e7 --- /dev/null +++ b/schemas/statsd-advanced/3.5.x.json @@ -0,0 +1,448 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "host": { + "default": "localhost", + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 8125, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "prefix": { + "default": "kong", + "type": "string", + "description": "String to prefix to each metric's name." + } + }, + { + "metrics": { + "description": "List of Metrics to be logged.", + "default": [ + { + "name": "request_count", + "stat_type": "counter", + "sample_rate": 1 + }, + { + "stat_type": "timer", + "name": "latency" + }, + { + "stat_type": "timer", + "name": "request_size" + }, + { + "name": "status_count", + "stat_type": "counter", + "sample_rate": 1 + }, + { + "stat_type": "timer", + "name": "response_size" + }, + { + "stat_type": "set", + "name": "unique_users" + }, + { + "name": "request_per_user", + "stat_type": "counter", + "sample_rate": 1 + }, + { + "stat_type": "timer", + "name": "upstream_latency" + }, + { + "stat_type": "timer", + "name": "kong_latency" + }, + { + "name": "status_count_per_user", + "stat_type": "counter", + "sample_rate": 1 + }, + { + "name": "status_count_per_workspace", + "stat_type": "counter", + "sample_rate": 1 + }, + { + "name": "status_count_per_user_per_route", + "stat_type": "counter", + "sample_rate": 1 + }, + { + "name": "shdict_usage", + "stat_type": "gauge", + "sample_rate": 1 + }, + { + "name": "cache_datastore_hits_total", + "stat_type": "counter", + "sample_rate": 1 + }, + { + "name": "cache_datastore_misses_total", + "stat_type": "counter", + "sample_rate": 1 + } + ], + "type": "array", + "elements": { + "fields": [ + { + "name": { + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "status_count", + "status_count_per_user", + "unique_users", + "upstream_latency", + "status_count_per_workspace", + "status_count_per_user_per_route", + "shdict_usage", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ], + "type": "string", + "required": true + } + }, + { + "stat_type": { + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string", + "required": true + } + }, + { + "sample_rate": { + "type": "number", + "gt": 0 + } + }, + { + "consumer_identifier": { + "type": "string", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + }, + { + "service_identifier": { + "type": "string", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ] + } + }, + { + "workspace_identifier": { + "type": "string", + "one_of": [ + "workspace_id", + "workspace_name" + ] + } + } + ], + "type": "record", + "entity_checks": [ + { + "conditional": { + "then_field": "stat_type", + "if_match": { + "one_of": [ + "unique_users" + ] + }, + "then_match": { + "eq": "set" + }, + "if_field": "name" + } + }, + { + "conditional": { + "then_field": "stat_type", + "if_match": { + "one_of": [ + "request_count", + "status_count", + "request_per_user", + "status_count_per_user", + "status_count_per_workspace", + "status_count_per_user_per_route", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ] + }, + "then_match": { + "eq": "counter" + }, + "if_field": "name" + } + }, + { + "conditional": { + "then_field": "stat_type", + "if_match": { + "one_of": [ + "shdict_usage" + ] + }, + "then_match": { + "eq": "gauge" + }, + "if_field": "name" + } + }, + { + "conditional": { + "then_field": "sample_rate", + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_match": { + "required": true + }, + "if_field": "stat_type" + } + } + ] + } + } + }, + { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "type": "array", + "elements": { + "type": "string", + "match": "^[0-9]+-[0-9]+$" + } + } + }, + { + "udp_packet_size": { + "between": [ + 0, + 65507 + ], + "default": 0, + "type": "number", + "description": "Combine UDP packet up to the size configured. If zero (0), don't combine the UDP packet. Must be a number between 0 and 65507 (inclusive)." + } + }, + { + "use_tcp": { + "default": false, + "type": "boolean", + "description": "Use TCP instead of UDP." + } + }, + { + "hostname_in_prefix": { + "default": false, + "type": "boolean", + "description": "Include the `hostname` in the `prefix` for each metric name." + } + }, + { + "consumer_identifier_default": { + "type": "string", + "required": true, + "one_of": [ + "consumer_id", + "custom_id", + "username" + ], + "default": "custom_id", + "description": "The default consumer identifier for metrics. This will take effect when a metric's consumer identifier is omitted. Allowed values are `custom_id`, `consumer_id`, `username`." + } + }, + { + "service_identifier_default": { + "type": "string", + "required": true, + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ], + "default": "service_name_or_host", + "description": "The default service identifier for metrics. This will take effect when a metric's service identifier is omitted. Allowed values are `service_name_or_host`, `service_id`, `service_name`, `service_host`." + } + }, + { + "workspace_identifier_default": { + "type": "string", + "required": true, + "one_of": [ + "workspace_id", + "workspace_name" + ], + "default": "workspace_id", + "description": "The default workspace identifier for metrics. This will take effect when a metric's workspace identifier is omitted. Allowed values are `workspace_id`, `workspace_name`. " + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "between": [ + 1, + 1000000 + ], + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time." + } + }, + { + "max_coalescing_delay": { + "between": [ + 0, + 3600 + ], + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." + } + }, + { + "max_entries": { + "between": [ + 1, + 1000000 + ], + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue." + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "default": 60, + "type": "number", + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." + } + }, + { + "initial_retry_delay": { + "between": [ + 0.001, + 1000000 + ], + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch." + } + }, + { + "max_retry_delay": { + "between": [ + 0.001, + 1000000 + ], + "default": 60, + "type": "number", + "description": "Maximum time in seconds between retries, caps exponential backoff." + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/statsd-advanced/3.6.x.json b/schemas/statsd-advanced/3.6.x.json new file mode 100644 index 00000000..667adb88 --- /dev/null +++ b/schemas/statsd-advanced/3.6.x.json @@ -0,0 +1,448 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "localhost", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "default": 8125, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "prefix": { + "type": "string", + "description": "String to prefix to each metric's name.", + "default": "kong" + } + }, + { + "metrics": { + "elements": { + "entity_checks": [ + { + "conditional": { + "then_field": "stat_type", + "if_field": "name", + "then_match": { + "eq": "set" + }, + "if_match": { + "one_of": [ + "unique_users" + ] + } + } + }, + { + "conditional": { + "then_field": "stat_type", + "if_field": "name", + "then_match": { + "eq": "counter" + }, + "if_match": { + "one_of": [ + "request_count", + "status_count", + "request_per_user", + "status_count_per_user", + "status_count_per_workspace", + "status_count_per_user_per_route", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ] + } + } + }, + { + "conditional": { + "then_field": "stat_type", + "if_field": "name", + "then_match": { + "eq": "gauge" + }, + "if_match": { + "one_of": [ + "shdict_usage" + ] + } + } + }, + { + "conditional": { + "then_field": "sample_rate", + "if_field": "stat_type", + "then_match": { + "required": true + }, + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + } + } + } + ], + "type": "record", + "fields": [ + { + "name": { + "required": true, + "type": "string", + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "status_count", + "status_count_per_user", + "unique_users", + "upstream_latency", + "status_count_per_workspace", + "status_count_per_user_per_route", + "shdict_usage", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ] + } + }, + { + "stat_type": { + "required": true, + "type": "string", + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ] + } + }, + { + "sample_rate": { + "gt": 0, + "type": "number" + } + }, + { + "consumer_identifier": { + "one_of": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string" + } + }, + { + "service_identifier": { + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ], + "type": "string" + } + }, + { + "workspace_identifier": { + "one_of": [ + "workspace_id", + "workspace_name" + ], + "type": "string" + } + } + ] + }, + "type": "array", + "description": "List of Metrics to be logged.", + "default": [ + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_count" + }, + { + "stat_type": "timer", + "name": "latency" + }, + { + "stat_type": "timer", + "name": "request_size" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count" + }, + { + "stat_type": "timer", + "name": "response_size" + }, + { + "stat_type": "set", + "name": "unique_users" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_per_user" + }, + { + "stat_type": "timer", + "name": "upstream_latency" + }, + { + "stat_type": "timer", + "name": "kong_latency" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_user" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_workspace" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_user_per_route" + }, + { + "stat_type": "gauge", + "sample_rate": 1, + "name": "shdict_usage" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "cache_datastore_hits_total" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "cache_datastore_misses_total" + } + ] + } + }, + { + "allow_status_codes": { + "elements": { + "type": "string", + "match": "^[0-9]+-[0-9]+$" + }, + "type": "array", + "description": "List of status code ranges that are allowed to be logged in metrics." + } + }, + { + "udp_packet_size": { + "description": "Combine UDP packet up to the size configured. If zero (0), don't combine the UDP packet. Must be a number between 0 and 65507 (inclusive).", + "type": "number", + "default": 0, + "between": [ + 0, + 65507 + ] + } + }, + { + "use_tcp": { + "type": "boolean", + "description": "Use TCP instead of UDP.", + "default": false + } + }, + { + "hostname_in_prefix": { + "type": "boolean", + "description": "Include the `hostname` in the `prefix` for each metric name.", + "default": false + } + }, + { + "consumer_identifier_default": { + "type": "string", + "default": "custom_id", + "required": true, + "description": "The default consumer identifier for metrics. This will take effect when a metric's consumer identifier is omitted. Allowed values are `custom_id`, `consumer_id`, `username`.", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + }, + { + "service_identifier_default": { + "type": "string", + "default": "service_name_or_host", + "required": true, + "description": "The default service identifier for metrics. This will take effect when a metric's service identifier is omitted. Allowed values are `service_name_or_host`, `service_id`, `service_name`, `service_host`.", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ] + } + }, + { + "workspace_identifier_default": { + "type": "string", + "default": "workspace_id", + "required": true, + "description": "The default workspace identifier for metrics. This will take effect when a metric's workspace identifier is omitted. Allowed values are `workspace_id`, `workspace_name`. ", + "one_of": [ + "workspace_id", + "workspace_name" + ] + } + }, + { + "queue": { + "required": true, + "type": "record", + "fields": [ + { + "max_batch_size": { + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_coalescing_delay": { + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "between": [ + 0, + 3600 + ] + } + }, + { + "max_entries": { + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "type": "number", + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch.", + "between": [ + 0.001, + 1000000 + ] + } + }, + { + "max_retry_delay": { + "default": 60, + "type": "number", + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "between": [ + 0.001, + 1000000 + ] + } + } + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/statsd-advanced/3.7.x.json b/schemas/statsd-advanced/3.7.x.json new file mode 100644 index 00000000..0d0f2104 --- /dev/null +++ b/schemas/statsd-advanced/3.7.x.json @@ -0,0 +1,448 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com.", + "default": "localhost" + } + }, + { + "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "prefix": { + "type": "string", + "description": "String to prefix to each metric's name.", + "default": "kong" + } + }, + { + "metrics": { + "type": "array", + "elements": { + "fields": [ + { + "name": { + "required": true, + "type": "string", + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "status_count", + "status_count_per_user", + "unique_users", + "upstream_latency", + "status_count_per_workspace", + "status_count_per_user_per_route", + "shdict_usage", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ] + } + }, + { + "stat_type": { + "required": true, + "type": "string", + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ] + } + }, + { + "sample_rate": { + "type": "number", + "gt": 0 + } + }, + { + "consumer_identifier": { + "type": "string", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + }, + { + "service_identifier": { + "type": "string", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ] + } + }, + { + "workspace_identifier": { + "type": "string", + "one_of": [ + "workspace_id", + "workspace_name" + ] + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_field": "name", + "if_match": { + "one_of": [ + "unique_users" + ] + }, + "then_field": "stat_type", + "then_match": { + "eq": "set" + } + } + }, + { + "conditional": { + "if_field": "name", + "if_match": { + "one_of": [ + "request_count", + "status_count", + "request_per_user", + "status_count_per_user", + "status_count_per_workspace", + "status_count_per_user_per_route", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ] + }, + "then_field": "stat_type", + "then_match": { + "eq": "counter" + } + } + }, + { + "conditional": { + "if_field": "name", + "if_match": { + "one_of": [ + "shdict_usage" + ] + }, + "then_field": "stat_type", + "then_match": { + "eq": "gauge" + } + } + }, + { + "conditional": { + "if_field": "stat_type", + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "then_match": { + "required": true + } + } + } + ], + "type": "record" + }, + "description": "List of Metrics to be logged.", + "default": [ + { + "stat_type": "counter", + "name": "request_count", + "sample_rate": 1 + }, + { + "name": "latency", + "stat_type": "timer" + }, + { + "name": "request_size", + "stat_type": "timer" + }, + { + "stat_type": "counter", + "name": "status_count", + "sample_rate": 1 + }, + { + "name": "response_size", + "stat_type": "timer" + }, + { + "name": "unique_users", + "stat_type": "set" + }, + { + "stat_type": "counter", + "name": "request_per_user", + "sample_rate": 1 + }, + { + "name": "upstream_latency", + "stat_type": "timer" + }, + { + "name": "kong_latency", + "stat_type": "timer" + }, + { + "stat_type": "counter", + "name": "status_count_per_user", + "sample_rate": 1 + }, + { + "stat_type": "counter", + "name": "status_count_per_workspace", + "sample_rate": 1 + }, + { + "stat_type": "counter", + "name": "status_count_per_user_per_route", + "sample_rate": 1 + }, + { + "stat_type": "gauge", + "name": "shdict_usage", + "sample_rate": 1 + }, + { + "stat_type": "counter", + "name": "cache_datastore_hits_total", + "sample_rate": 1 + }, + { + "stat_type": "counter", + "name": "cache_datastore_misses_total", + "sample_rate": 1 + } + ] + } + }, + { + "allow_status_codes": { + "elements": { + "type": "string", + "match": "^[0-9]+-[0-9]+$" + }, + "type": "array", + "description": "List of status code ranges that are allowed to be logged in metrics." + } + }, + { + "udp_packet_size": { + "default": 0, + "type": "number", + "description": "Combine UDP packet up to the size configured. If zero (0), don't combine the UDP packet. Must be a number between 0 and 65507 (inclusive).", + "between": [ + 0, + 65507 + ] + } + }, + { + "use_tcp": { + "type": "boolean", + "description": "Use TCP instead of UDP.", + "default": false + } + }, + { + "hostname_in_prefix": { + "type": "boolean", + "description": "Include the `hostname` in the `prefix` for each metric name.", + "default": false + } + }, + { + "consumer_identifier_default": { + "default": "custom_id", + "required": true, + "description": "The default consumer identifier for metrics. This will take effect when a metric's consumer identifier is omitted. Allowed values are `custom_id`, `consumer_id`, `username`.", + "type": "string", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + }, + { + "service_identifier_default": { + "default": "service_name_or_host", + "required": true, + "description": "The default service identifier for metrics. This will take effect when a metric's service identifier is omitted. Allowed values are `service_name_or_host`, `service_id`, `service_name`, `service_host`.", + "type": "string", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ] + } + }, + { + "workspace_identifier_default": { + "default": "workspace_id", + "required": true, + "description": "The default workspace identifier for metrics. This will take effect when a metric's workspace identifier is omitted. Allowed values are `workspace_id`, `workspace_name`. ", + "type": "string", + "one_of": [ + "workspace_id", + "workspace_name" + ] + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_coalescing_delay": { + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "between": [ + 0, + 3600 + ] + } + }, + { + "max_entries": { + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "type": "number", + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "default": 60 + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch.", + "between": [ + 0.001, + 1000000 + ] + } + }, + { + "max_retry_delay": { + "default": 60, + "type": "number", + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "between": [ + 0.001, + 1000000 + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/statsd-advanced/3.8.x.json b/schemas/statsd-advanced/3.8.x.json new file mode 100644 index 00000000..ed33f15a --- /dev/null +++ b/schemas/statsd-advanced/3.8.x.json @@ -0,0 +1,459 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "localhost" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 8125 + } + }, + { + "prefix": { + "description": "String to prefix to each metric's name.", + "type": "string", + "default": "kong" + } + }, + { + "metrics": { + "description": "List of Metrics to be logged.", + "type": "array", + "default": [ + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_count" + }, + { + "stat_type": "timer", + "name": "latency" + }, + { + "stat_type": "timer", + "name": "request_size" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count" + }, + { + "stat_type": "timer", + "name": "response_size" + }, + { + "stat_type": "set", + "name": "unique_users" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_per_user" + }, + { + "stat_type": "timer", + "name": "upstream_latency" + }, + { + "stat_type": "timer", + "name": "kong_latency" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_user" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_workspace" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_user_per_route" + }, + { + "stat_type": "gauge", + "sample_rate": 1, + "name": "shdict_usage" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "cache_datastore_hits_total" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "cache_datastore_misses_total" + } + ], + "elements": { + "fields": [ + { + "name": { + "type": "string", + "required": true, + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "status_count", + "status_count_per_user", + "unique_users", + "upstream_latency", + "status_count_per_workspace", + "status_count_per_user_per_route", + "shdict_usage", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ] + } + }, + { + "stat_type": { + "type": "string", + "required": true, + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ] + } + }, + { + "sample_rate": { + "gt": 0, + "type": "number" + } + }, + { + "consumer_identifier": { + "type": "string", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + }, + { + "service_identifier": { + "type": "string", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ] + } + }, + { + "workspace_identifier": { + "type": "string", + "one_of": [ + "workspace_id", + "workspace_name" + ] + } + } + ], + "type": "record", + "entity_checks": [ + { + "conditional": { + "if_field": "name", + "if_match": { + "one_of": [ + "unique_users" + ] + }, + "then_field": "stat_type", + "then_match": { + "eq": "set" + } + } + }, + { + "conditional": { + "if_field": "name", + "if_match": { + "one_of": [ + "request_count", + "status_count", + "request_per_user", + "status_count_per_user", + "status_count_per_workspace", + "status_count_per_user_per_route", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ] + }, + "then_field": "stat_type", + "then_match": { + "eq": "counter" + } + } + }, + { + "conditional": { + "if_field": "name", + "if_match": { + "one_of": [ + "shdict_usage" + ] + }, + "then_field": "stat_type", + "then_match": { + "eq": "gauge" + } + } + }, + { + "conditional": { + "if_field": "stat_type", + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "then_match": { + "required": true + } + } + } + ] + } + } + }, + { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "type": "array", + "elements": { + "type": "string", + "match": "^[0-9]+-[0-9]+$" + } + } + }, + { + "udp_packet_size": { + "description": "Combine UDP packet up to the size configured. If zero (0), don't combine the UDP packet. Must be a number between 0 and 65507 (inclusive).", + "type": "number", + "between": [ + 0, + 65507 + ], + "default": 0 + } + }, + { + "use_tcp": { + "description": "Use TCP instead of UDP.", + "type": "boolean", + "default": false + } + }, + { + "hostname_in_prefix": { + "description": "Include the `hostname` in the `prefix` for each metric name.", + "type": "boolean", + "default": false + } + }, + { + "consumer_identifier_default": { + "description": "The default consumer identifier for metrics. This will take effect when a metric's consumer identifier is omitted. Allowed values are `custom_id`, `consumer_id`, `username`.", + "required": true, + "one_of": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string", + "default": "custom_id" + } + }, + { + "service_identifier_default": { + "description": "The default service identifier for metrics. This will take effect when a metric's service identifier is omitted. Allowed values are `service_name_or_host`, `service_id`, `service_name`, `service_host`.", + "required": true, + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ], + "type": "string", + "default": "service_name_or_host" + } + }, + { + "workspace_identifier_default": { + "description": "The default workspace identifier for metrics. This will take effect when a metric's workspace identifier is omitted. Allowed values are `workspace_id`, `workspace_name`. ", + "required": true, + "one_of": [ + "workspace_id", + "workspace_name" + ], + "type": "string", + "default": "workspace_id" + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "description": "Maximum number of entries that can be processed at a time.", + "type": "integer", + "between": [ + 1, + 1000000 + ], + "default": 1 + } + }, + { + "max_coalescing_delay": { + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "type": "number", + "between": [ + 0, + 3600 + ], + "default": 1 + } + }, + { + "max_entries": { + "description": "Maximum number of entries that can be waiting on the queue.", + "type": "integer", + "between": [ + 1, + 1000000 + ], + "default": 10000 + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number", + "default": 60 + } + }, + { + "initial_retry_delay": { + "description": "Time in seconds before the initial retry is made for a failing batch.", + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "default": 0.01 + } + }, + { + "max_retry_delay": { + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "default": 60 + } + }, + { + "concurrency_limit": { + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "type": "integer", + "default": 1, + "one_of": [ + -1, + 1 + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/statsd-advanced/3.9.x.json b/schemas/statsd-advanced/3.9.x.json new file mode 100644 index 00000000..aafa408b --- /dev/null +++ b/schemas/statsd-advanced/3.9.x.json @@ -0,0 +1,459 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "host": { + "default": "localhost", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 8125, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + } + }, + { + "metrics": { + "default": [ + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_count" + }, + { + "stat_type": "timer", + "name": "latency" + }, + { + "stat_type": "timer", + "name": "request_size" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count" + }, + { + "stat_type": "timer", + "name": "response_size" + }, + { + "stat_type": "set", + "name": "unique_users" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_per_user" + }, + { + "stat_type": "timer", + "name": "upstream_latency" + }, + { + "stat_type": "timer", + "name": "kong_latency" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_user" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_workspace" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_user_per_route" + }, + { + "stat_type": "gauge", + "sample_rate": 1, + "name": "shdict_usage" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "cache_datastore_hits_total" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "cache_datastore_misses_total" + } + ], + "description": "List of Metrics to be logged.", + "elements": { + "entity_checks": [ + { + "conditional": { + "if_match": { + "one_of": [ + "unique_users" + ] + }, + "then_field": "stat_type", + "if_field": "name", + "then_match": { + "eq": "set" + } + } + }, + { + "conditional": { + "if_match": { + "one_of": [ + "request_count", + "status_count", + "request_per_user", + "status_count_per_user", + "status_count_per_workspace", + "status_count_per_user_per_route", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ] + }, + "then_field": "stat_type", + "if_field": "name", + "then_match": { + "eq": "counter" + } + } + }, + { + "conditional": { + "if_match": { + "one_of": [ + "shdict_usage" + ] + }, + "then_field": "stat_type", + "if_field": "name", + "then_match": { + "eq": "gauge" + } + } + }, + { + "conditional": { + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "if_field": "stat_type", + "then_match": { + "required": true + } + } + } + ], + "fields": [ + { + "name": { + "type": "string", + "required": true, + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "status_count", + "status_count_per_user", + "unique_users", + "upstream_latency", + "status_count_per_workspace", + "status_count_per_user_per_route", + "shdict_usage", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ] + } + }, + { + "stat_type": { + "type": "string", + "required": true, + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ] + } + }, + { + "sample_rate": { + "gt": 0, + "type": "number" + } + }, + { + "consumer_identifier": { + "type": "string", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + }, + { + "service_identifier": { + "type": "string", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ] + } + }, + { + "workspace_identifier": { + "type": "string", + "one_of": [ + "workspace_id", + "workspace_name" + ] + } + } + ], + "type": "record" + }, + "type": "array" + } + }, + { + "allow_status_codes": { + "elements": { + "type": "string", + "match": "^[0-9]+-[0-9]+$" + }, + "description": "List of status code ranges that are allowed to be logged in metrics.", + "type": "array" + } + }, + { + "udp_packet_size": { + "default": 0, + "description": "Combine UDP packet up to the size configured. If zero (0), don't combine the UDP packet. Must be a number between 0 and 65507 (inclusive).", + "between": [ + 0, + 65507 + ], + "type": "number" + } + }, + { + "use_tcp": { + "default": false, + "description": "Use TCP instead of UDP.", + "type": "boolean" + } + }, + { + "hostname_in_prefix": { + "default": false, + "description": "Include the `hostname` in the `prefix` for each metric name.", + "type": "boolean" + } + }, + { + "consumer_identifier_default": { + "required": true, + "type": "string", + "default": "custom_id", + "description": "The default consumer identifier for metrics. This will take effect when a metric's consumer identifier is omitted. Allowed values are `custom_id`, `consumer_id`, `username`.", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + }, + { + "service_identifier_default": { + "required": true, + "type": "string", + "default": "service_name_or_host", + "description": "The default service identifier for metrics. This will take effect when a metric's service identifier is omitted. Allowed values are `service_name_or_host`, `service_id`, `service_name`, `service_host`.", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ] + } + }, + { + "workspace_identifier_default": { + "required": true, + "type": "string", + "default": "workspace_id", + "description": "The default workspace identifier for metrics. This will take effect when a metric's workspace identifier is omitted. Allowed values are `workspace_id`, `workspace_name`. ", + "one_of": [ + "workspace_id", + "workspace_name" + ] + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "between": [ + 1, + 1000000 + ], + "type": "integer" + } + }, + { + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "between": [ + 0, + 3600 + ], + "type": "number" + } + }, + { + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "between": [ + 1, + 1000000 + ], + "type": "integer" + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "between": [ + 0.001, + 1000000 + ], + "type": "number" + } + }, + { + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "between": [ + 0.001, + 1000000 + ], + "type": "number" + } + }, + { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "type": "integer", + "one_of": [ + -1, + 1 + ] + } + } + ], + "required": true, + "type": "record" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/statsd/3.10.x.json b/schemas/statsd/3.10.x.json new file mode 100644 index 00000000..ff349530 --- /dev/null +++ b/schemas/statsd/3.10.x.json @@ -0,0 +1,454 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "host": { + "description": "The IP address or hostname of StatsD server to send data to.", + "default": "localhost", + "type": "string" + } + }, + { + "port": { + "description": "The port of StatsD server to send data to.", + "default": 8125, + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "prefix": { + "description": "String to prefix to each metric's name.", + "type": "string", + "default": "kong" + } + }, + { + "metrics": { + "description": "List of metrics to be logged.", + "type": "array", + "elements": { + "entity_checks": [ + { + "conditional": { + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "if_field": "stat_type", + "then_match": { + "required": true + } + } + } + ], + "type": "record", + "fields": [ + { + "name": { + "description": "StatsD metric’s name.", + "type": "string", + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "status_count", + "status_count_per_user", + "unique_users", + "upstream_latency", + "status_count_per_workspace", + "status_count_per_user_per_route", + "shdict_usage", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ], + "required": true + } + }, + { + "stat_type": { + "description": "Determines what sort of event a metric represents.", + "type": "string", + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "required": true + } + }, + { + "sample_rate": { + "description": "Sampling rate", + "type": "number", + "gt": 0 + } + }, + { + "consumer_identifier": { + "description": "Authenticated user detail.", + "type": "string", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + }, + { + "service_identifier": { + "description": "Service detail.", + "type": "string", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ] + } + }, + { + "workspace_identifier": { + "description": "Workspace detail.", + "type": "string", + "one_of": [ + "workspace_id", + "workspace_name" + ] + } + } + ] + }, + "default": [ + { + "sample_rate": 1, + "name": "request_count", + "stat_type": "counter" + }, + { + "stat_type": "timer", + "name": "latency" + }, + { + "sample_rate": 1, + "name": "request_size", + "stat_type": "counter" + }, + { + "name": "status_count", + "sample_rate": 1, + "stat_type": "counter" + }, + { + "sample_rate": 1, + "name": "response_size", + "stat_type": "counter" + }, + { + "stat_type": "set", + "name": "unique_users" + }, + { + "name": "request_per_user", + "sample_rate": 1, + "stat_type": "counter" + }, + { + "stat_type": "timer", + "name": "upstream_latency" + }, + { + "stat_type": "timer", + "name": "kong_latency" + }, + { + "name": "status_count_per_user", + "sample_rate": 1, + "stat_type": "counter" + }, + { + "sample_rate": 1, + "name": "status_count_per_workspace", + "stat_type": "counter" + }, + { + "name": "status_count_per_user_per_route", + "sample_rate": 1, + "stat_type": "counter" + }, + { + "name": "shdict_usage", + "sample_rate": 1, + "stat_type": "gauge" + }, + { + "name": "cache_datastore_hits_total", + "sample_rate": 1, + "stat_type": "counter" + }, + { + "name": "cache_datastore_misses_total", + "sample_rate": 1, + "stat_type": "counter" + } + ] + } + }, + { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "type": "array", + "elements": { + "match": "^[0-9]+-[0-9]+$", + "type": "string" + } + } + }, + { + "udp_packet_size": { + "between": [ + 0, + 65507 + ], + "type": "number", + "default": 0 + } + }, + { + "use_tcp": { + "type": "boolean", + "default": false + } + }, + { + "hostname_in_prefix": { + "type": "boolean", + "default": false + } + }, + { + "consumer_identifier_default": { + "default": "custom_id", + "type": "string", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ], + "required": true + } + }, + { + "service_identifier_default": { + "default": "service_name_or_host", + "type": "string", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ], + "required": true + } + }, + { + "workspace_identifier_default": { + "default": "workspace_id", + "type": "string", + "one_of": [ + "workspace_id", + "workspace_name" + ], + "required": true + } + }, + { + "retry_count": { + "type": "integer", + "deprecation": { + "removal_in_version": "4.0", + "old_default": 10, + "message": "statsd: config.retry_count no longer works, please use config.queue.max_retry_time instead" + } + } + }, + { + "queue_size": { + "type": "integer", + "deprecation": { + "removal_in_version": "4.0", + "old_default": 1, + "message": "statsd: config.queue_size is deprecated, please use config.queue.max_batch_size instead" + } + } + }, + { + "flush_timeout": { + "type": "number", + "deprecation": { + "removal_in_version": "4.0", + "old_default": 2, + "message": "statsd: config.flush_timeout is deprecated, please use config.queue.max_coalescing_delay instead" + } + } + }, + { + "tag_style": { + "one_of": [ + "dogstatsd", + "influxdb", + "librato", + "signalfx" + ], + "type": "string", + "required": false + } + }, + { + "queue": { + "type": "record", + "fields": [ + { + "max_batch_size": { + "between": [ + 1, + 1000000 + ], + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time." + } + }, + { + "max_coalescing_delay": { + "between": [ + 0, + 3600 + ], + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." + } + }, + { + "max_entries": { + "between": [ + 1, + 1000000 + ], + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue." + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "default": 60, + "type": "number" + } + }, + { + "initial_retry_delay": { + "between": [ + 0.001, + 1000000 + ], + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch." + } + }, + { + "max_retry_delay": { + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "default": 60, + "type": "number", + "between": [ + 0.001, + 1000000 + ] + } + }, + { + "concurrency_limit": { + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "default": 1, + "type": "integer", + "one_of": [ + -1, + 1 + ] + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/statsd/3.11.x.json b/schemas/statsd/3.11.x.json new file mode 100644 index 00000000..662f3c5d --- /dev/null +++ b/schemas/statsd/3.11.x.json @@ -0,0 +1,454 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "host": { + "description": "The IP address or hostname of StatsD server to send data to.", + "default": "localhost", + "type": "string" + } + }, + { + "port": { + "description": "The port of StatsD server to send data to.", + "between": [ + 0, + 65535 + ], + "default": 8125, + "type": "integer" + } + }, + { + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + } + }, + { + "metrics": { + "type": "array", + "description": "List of metrics to be logged.", + "default": [ + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_count" + }, + { + "stat_type": "timer", + "name": "latency" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_size" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "response_size" + }, + { + "stat_type": "set", + "name": "unique_users" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_per_user" + }, + { + "stat_type": "timer", + "name": "upstream_latency" + }, + { + "stat_type": "timer", + "name": "kong_latency" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_user" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_workspace" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_user_per_route" + }, + { + "stat_type": "gauge", + "sample_rate": 1, + "name": "shdict_usage" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "cache_datastore_hits_total" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "cache_datastore_misses_total" + } + ], + "elements": { + "entity_checks": [ + { + "conditional": { + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "if_field": "stat_type", + "then_match": { + "required": true + } + } + } + ], + "fields": [ + { + "name": { + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "status_count", + "status_count_per_user", + "unique_users", + "upstream_latency", + "status_count_per_workspace", + "status_count_per_user_per_route", + "shdict_usage", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ], + "required": true, + "description": "StatsD metric’s name.", + "type": "string" + } + }, + { + "stat_type": { + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "required": true, + "description": "Determines what sort of event a metric represents.", + "type": "string" + } + }, + { + "sample_rate": { + "gt": 0, + "description": "Sampling rate", + "type": "number" + } + }, + { + "consumer_identifier": { + "one_of": [ + "consumer_id", + "custom_id", + "username" + ], + "description": "Authenticated user detail.", + "type": "string" + } + }, + { + "service_identifier": { + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ], + "description": "Service detail.", + "type": "string" + } + }, + { + "workspace_identifier": { + "one_of": [ + "workspace_id", + "workspace_name" + ], + "description": "Workspace detail.", + "type": "string" + } + } + ], + "type": "record" + } + } + }, + { + "allow_status_codes": { + "type": "array", + "description": "List of status code ranges that are allowed to be logged in metrics.", + "elements": { + "match": "^[0-9]+-[0-9]+$", + "type": "string" + } + } + }, + { + "udp_packet_size": { + "between": [ + 0, + 65507 + ], + "default": 0, + "type": "number" + } + }, + { + "use_tcp": { + "default": false, + "type": "boolean" + } + }, + { + "hostname_in_prefix": { + "default": false, + "type": "boolean" + } + }, + { + "consumer_identifier_default": { + "one_of": [ + "consumer_id", + "custom_id", + "username" + ], + "required": true, + "default": "custom_id", + "type": "string" + } + }, + { + "service_identifier_default": { + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ], + "required": true, + "default": "service_name_or_host", + "type": "string" + } + }, + { + "workspace_identifier_default": { + "one_of": [ + "workspace_id", + "workspace_name" + ], + "required": true, + "default": "workspace_id", + "type": "string" + } + }, + { + "retry_count": { + "deprecation": { + "old_default": 10, + "removal_in_version": "4.0", + "message": "statsd: config.retry_count no longer works, please use config.queue.max_retry_time instead" + }, + "type": "integer" + } + }, + { + "queue_size": { + "deprecation": { + "old_default": 1, + "removal_in_version": "4.0", + "message": "statsd: config.queue_size is deprecated, please use config.queue.max_batch_size instead" + }, + "type": "integer" + } + }, + { + "flush_timeout": { + "deprecation": { + "old_default": 2, + "removal_in_version": "4.0", + "message": "statsd: config.flush_timeout is deprecated, please use config.queue.max_coalescing_delay instead" + }, + "type": "number" + } + }, + { + "tag_style": { + "one_of": [ + "dogstatsd", + "influxdb", + "librato", + "signalfx" + ], + "required": false, + "type": "string" + } + }, + { + "queue": { + "required": true, + "fields": [ + { + "max_batch_size": { + "default": 1, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be processed at a time.", + "type": "integer" + } + }, + { + "max_coalescing_delay": { + "default": 1, + "between": [ + 0, + 3600 + ], + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "type": "number" + } + }, + { + "max_entries": { + "default": 10000, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be waiting on the queue.", + "type": "integer" + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "between": [ + 0.001, + 1000000 + ], + "description": "Time in seconds before the initial retry is made for a failing batch.", + "type": "number" + } + }, + { + "max_retry_delay": { + "default": 60, + "between": [ + 0.001, + 1000000 + ], + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "type": "number" + } + }, + { + "concurrency_limit": { + "one_of": [ + -1, + 1 + ], + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "type": "integer" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/statsd/3.12.x.json b/schemas/statsd/3.12.x.json new file mode 100644 index 00000000..ab3574f1 --- /dev/null +++ b/schemas/statsd/3.12.x.json @@ -0,0 +1,452 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "host": { + "description": "The IP address or hostname of StatsD server to send data to.", + "default": "localhost", + "type": "string" + } + }, + { + "port": { + "description": "The port of StatsD server to send data to.", + "default": 8125, + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "prefix": { + "type": "string", + "default": "kong", + "description": "String to prefix to each metric's name." + } + }, + { + "metrics": { + "type": "array", + "default": [ + { + "name": "request_count", + "sample_rate": 1, + "stat_type": "counter" + }, + { + "stat_type": "timer", + "name": "latency" + }, + { + "name": "request_size", + "sample_rate": 1, + "stat_type": "counter" + }, + { + "name": "status_count", + "sample_rate": 1, + "stat_type": "counter" + }, + { + "name": "response_size", + "sample_rate": 1, + "stat_type": "counter" + }, + { + "stat_type": "set", + "name": "unique_users" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_per_user" + }, + { + "stat_type": "timer", + "name": "upstream_latency" + }, + { + "stat_type": "timer", + "name": "kong_latency" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_user" + }, + { + "name": "status_count_per_workspace", + "sample_rate": 1, + "stat_type": "counter" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_user_per_route" + }, + { + "name": "shdict_usage", + "sample_rate": 1, + "stat_type": "gauge" + }, + { + "name": "cache_datastore_hits_total", + "sample_rate": 1, + "stat_type": "counter" + }, + { + "name": "cache_datastore_misses_total", + "sample_rate": 1, + "stat_type": "counter" + } + ], + "elements": { + "type": "record", + "fields": [ + { + "name": { + "type": "string", + "description": "StatsD metric’s name.", + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "status_count", + "status_count_per_user", + "unique_users", + "upstream_latency", + "status_count_per_workspace", + "status_count_per_user_per_route", + "shdict_usage", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ], + "required": true + } + }, + { + "stat_type": { + "type": "string", + "description": "Determines what sort of event a metric represents.", + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "required": true + } + }, + { + "sample_rate": { + "type": "number", + "gt": 0, + "description": "Sampling rate" + } + }, + { + "consumer_identifier": { + "type": "string", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ], + "description": "Authenticated user detail." + } + }, + { + "service_identifier": { + "type": "string", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ], + "description": "Service detail." + } + }, + { + "workspace_identifier": { + "type": "string", + "one_of": [ + "workspace_id", + "workspace_name" + ], + "description": "Workspace detail." + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "if_field": "stat_type" + } + } + ] + }, + "description": "List of metrics to be logged." + } + }, + { + "allow_status_codes": { + "type": "array", + "elements": { + "type": "string", + "match": "^[0-9]+-[0-9]+$" + }, + "description": "List of status code ranges that are allowed to be logged in metrics." + } + }, + { + "udp_packet_size": { + "type": "number", + "default": 0, + "between": [ + 0, + 65507 + ] + } + }, + { + "use_tcp": { + "type": "boolean", + "default": false + } + }, + { + "hostname_in_prefix": { + "type": "boolean", + "default": false + } + }, + { + "consumer_identifier_default": { + "type": "string", + "default": "custom_id", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ], + "required": true + } + }, + { + "service_identifier_default": { + "type": "string", + "default": "service_name_or_host", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ], + "required": true + } + }, + { + "workspace_identifier_default": { + "type": "string", + "default": "workspace_id", + "one_of": [ + "workspace_id", + "workspace_name" + ], + "required": true + } + }, + { + "retry_count": { + "type": "integer", + "deprecation": { + "old_default": 10, + "message": "statsd: config.retry_count no longer works, please use config.queue.max_retry_time instead", + "removal_in_version": "4.0" + } + } + }, + { + "queue_size": { + "type": "integer", + "deprecation": { + "old_default": 1, + "message": "statsd: config.queue_size is deprecated, please use config.queue.max_batch_size instead", + "removal_in_version": "4.0" + } + } + }, + { + "flush_timeout": { + "type": "number", + "deprecation": { + "old_default": 2, + "message": "statsd: config.flush_timeout is deprecated, please use config.queue.max_coalescing_delay instead", + "removal_in_version": "4.0" + } + } + }, + { + "tag_style": { + "type": "string", + "one_of": [ + "dogstatsd", + "influxdb", + "librato", + "signalfx" + ], + "required": false + } + }, + { + "queue": { + "type": "record", + "fields": [ + { + "max_batch_size": { + "type": "integer", + "default": 1, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be processed at a time." + } + }, + { + "max_coalescing_delay": { + "type": "number", + "default": 1, + "between": [ + 0, + 3600 + ], + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." + } + }, + { + "max_entries": { + "type": "integer", + "default": 10000, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be waiting on the queue." + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "type": "number", + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." + } + }, + { + "initial_retry_delay": { + "type": "number", + "default": 0.01, + "between": [ + 0.001, + 1000000 + ], + "description": "Time in seconds before the initial retry is made for a failing batch." + } + }, + { + "max_retry_delay": { + "type": "number", + "default": 60, + "between": [ + 0.001, + 1000000 + ], + "description": "Maximum time in seconds between retries, caps exponential backoff." + } + }, + { + "concurrency_limit": { + "type": "integer", + "default": 1, + "one_of": [ + -1, + 1 + ], + "description": "The number of of queue delivery timers. -1 indicates unlimited." + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/statsd/3.4.x.json b/schemas/statsd/3.4.x.json index f0d86dd8..ba900e2b 100644 --- a/schemas/statsd/3.4.x.json +++ b/schemas/statsd/3.4.x.json @@ -8,6 +8,9 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", "elements": { "one_of": [ "grpc", @@ -21,85 +24,82 @@ "ws", "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, - "entity_checks": [ - { - "custom_entity_check": { - "field_sources": [ - "retry_count", - "queue_size", - "flush_timeout" - ] - } - } - ], "fields": [ { "host": { - "type": "string", - "default": "localhost" + "default": "localhost", + "description": "The IP address or hostname of StatsD server to send data to.", + "type": "string" } }, { "port": { + "default": 8125, + "description": "The port of StatsD server to send data to.", "between": [ 0, 65535 ], - "type": "integer", - "default": 8125 + "type": "integer" } }, { "prefix": { "default": "kong", - "type": "string" + "type": "string", + "description": "String to prefix to each metric's name." } }, { "metrics": { - "type": "array", "default": [ { - "stat_type": "counter", + "sample_rate": 1, "name": "request_count", - "sample_rate": 1 + "stat_type": "counter" }, { "name": "latency", "stat_type": "timer" }, { - "stat_type": "counter", + "sample_rate": 1, "name": "request_size", - "sample_rate": 1 + "stat_type": "counter" }, { - "stat_type": "counter", + "sample_rate": 1, "name": "status_count", - "sample_rate": 1 + "stat_type": "counter" }, { - "stat_type": "counter", + "sample_rate": 1, "name": "response_size", - "sample_rate": 1 + "stat_type": "counter" }, { "name": "unique_users", "stat_type": "set" }, { - "stat_type": "counter", + "sample_rate": 1, "name": "request_per_user", - "sample_rate": 1 + "stat_type": "counter" }, { "name": "upstream_latency", @@ -110,58 +110,42 @@ "stat_type": "timer" }, { - "stat_type": "counter", + "sample_rate": 1, "name": "status_count_per_user", - "sample_rate": 1 + "stat_type": "counter" }, { - "stat_type": "counter", + "sample_rate": 1, "name": "status_count_per_workspace", - "sample_rate": 1 + "stat_type": "counter" }, { - "stat_type": "counter", + "sample_rate": 1, "name": "status_count_per_user_per_route", - "sample_rate": 1 + "stat_type": "counter" }, { - "stat_type": "gauge", + "sample_rate": 1, "name": "shdict_usage", - "sample_rate": 1 + "stat_type": "gauge" }, { - "stat_type": "counter", + "sample_rate": 1, "name": "cache_datastore_hits_total", - "sample_rate": 1 + "stat_type": "counter" }, { - "stat_type": "counter", + "sample_rate": 1, "name": "cache_datastore_misses_total", - "sample_rate": 1 + "stat_type": "counter" } ], + "description": "List of metrics to be logged.", + "type": "array", "elements": { - "entity_checks": [ - { - "conditional": { - "if_match": { - "one_of": [ - "counter", - "gauge" - ] - }, - "then_field": "sample_rate", - "if_field": "stat_type", - "then_match": { - "required": true - } - } - } - ], "fields": [ { "name": { - "type": "string", "required": true, "one_of": [ "kong_latency", @@ -179,12 +163,13 @@ "shdict_usage", "cache_datastore_hits_total", "cache_datastore_misses_total" - ] + ], + "type": "string", + "description": "StatsD metric’s name." } }, { "stat_type": { - "type": "string", "required": true, "one_of": [ "counter", @@ -193,13 +178,16 @@ "meter", "set", "timer" - ] + ], + "type": "string", + "description": "Determines what sort of event a metric represents." } }, { "sample_rate": { "gt": 0, - "type": "number" + "type": "number", + "description": "Sampling rate" } }, { @@ -209,6 +197,7 @@ "custom_id", "username" ], + "description": "Authenticated user detail.", "type": "string" } }, @@ -220,6 +209,7 @@ "service_host", "service_name_or_host" ], + "description": "Service detail.", "type": "string" } }, @@ -229,31 +219,50 @@ "workspace_id", "workspace_name" ], + "description": "Workspace detail.", "type": "string" } } ], + "entity_checks": [ + { + "conditional": { + "then_field": "sample_rate", + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_match": { + "required": true + }, + "if_field": "stat_type" + } + } + ], "type": "record" } } }, { "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", "elements": { - "match": "^[0-9]+-[0-9]+$", - "type": "string" + "type": "string", + "match": "^[0-9]+-[0-9]+$" }, "type": "array" } }, { "udp_packet_size": { + "default": 0, "between": [ 0, 65507 ], - "type": "number", - "default": 0 + "type": "number" } }, { @@ -321,80 +330,110 @@ }, { "tag_style": { - "type": "string", - "required": false, "one_of": [ "dogstatsd", "influxdb", "librato", "signalfx" - ] + ], + "required": false, + "type": "string" } }, { "queue": { - "required": true, "fields": [ { "max_batch_size": { + "default": 1, + "type": "integer", "between": [ 1, 1000000 ], - "type": "number", - "default": 1 + "description": "Maximum number of entries that can be processed at a time." } }, { "max_coalescing_delay": { + "default": 1, + "type": "number", "between": [ 0, 3600 ], - "type": "number", - "default": 1 + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." } }, { "max_entries": { + "default": 10000, + "type": "integer", "between": [ 1, 1000000 ], - "type": "number", - "default": 10000 + "description": "Maximum number of entries that can be waiting on the queue." } }, { "max_bytes": { - "type": "number" + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." } }, { "max_retry_time": { "default": 60, - "type": "number" + "type": "number", + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." } }, { "initial_retry_delay": { "default": 0.01, - "type": "number" + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "description": "Time in seconds before the initial retry is made for a failing batch." } }, { "max_retry_delay": { "default": 60, - "type": "number" + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "description": "Maximum time in seconds between retries, caps exponential backoff." } } ], - "type": "record" + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "retry_count", + "queue_size", + "flush_timeout" + ] } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/statsd/3.5.x.json b/schemas/statsd/3.5.x.json new file mode 100644 index 00000000..ff24091c --- /dev/null +++ b/schemas/statsd/3.5.x.json @@ -0,0 +1,439 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "retry_count", + "queue_size", + "flush_timeout" + ] + } + } + ], + "fields": [ + { + "host": { + "default": "localhost", + "type": "string", + "description": "The IP address or hostname of StatsD server to send data to." + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 8125, + "type": "integer", + "description": "The port of StatsD server to send data to." + } + }, + { + "prefix": { + "default": "kong", + "type": "string", + "description": "String to prefix to each metric's name." + } + }, + { + "metrics": { + "description": "List of metrics to be logged.", + "default": [ + { + "name": "request_count", + "stat_type": "counter", + "sample_rate": 1 + }, + { + "name": "latency", + "stat_type": "timer" + }, + { + "name": "request_size", + "stat_type": "counter", + "sample_rate": 1 + }, + { + "name": "status_count", + "stat_type": "counter", + "sample_rate": 1 + }, + { + "name": "response_size", + "stat_type": "counter", + "sample_rate": 1 + }, + { + "name": "unique_users", + "stat_type": "set" + }, + { + "name": "request_per_user", + "stat_type": "counter", + "sample_rate": 1 + }, + { + "name": "upstream_latency", + "stat_type": "timer" + }, + { + "name": "kong_latency", + "stat_type": "timer" + }, + { + "name": "status_count_per_user", + "stat_type": "counter", + "sample_rate": 1 + }, + { + "name": "status_count_per_workspace", + "stat_type": "counter", + "sample_rate": 1 + }, + { + "name": "status_count_per_user_per_route", + "stat_type": "counter", + "sample_rate": 1 + }, + { + "name": "shdict_usage", + "stat_type": "gauge", + "sample_rate": 1 + }, + { + "name": "cache_datastore_hits_total", + "stat_type": "counter", + "sample_rate": 1 + }, + { + "name": "cache_datastore_misses_total", + "stat_type": "counter", + "sample_rate": 1 + } + ], + "type": "array", + "elements": { + "fields": [ + { + "name": { + "description": "StatsD metric’s name.", + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "status_count", + "status_count_per_user", + "unique_users", + "upstream_latency", + "status_count_per_workspace", + "status_count_per_user_per_route", + "shdict_usage", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ], + "type": "string", + "required": true + } + }, + { + "stat_type": { + "description": "Determines what sort of event a metric represents.", + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ], + "type": "string", + "required": true + } + }, + { + "sample_rate": { + "gt": 0, + "type": "number", + "description": "Sampling rate" + } + }, + { + "consumer_identifier": { + "one_of": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string", + "description": "Authenticated user detail." + } + }, + { + "service_identifier": { + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ], + "type": "string", + "description": "Service detail." + } + }, + { + "workspace_identifier": { + "one_of": [ + "workspace_id", + "workspace_name" + ], + "type": "string", + "description": "Workspace detail." + } + } + ], + "type": "record", + "entity_checks": [ + { + "conditional": { + "then_field": "sample_rate", + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_match": { + "required": true + }, + "if_field": "stat_type" + } + } + ] + } + } + }, + { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "type": "array", + "elements": { + "type": "string", + "match": "^[0-9]+-[0-9]+$" + } + } + }, + { + "udp_packet_size": { + "between": [ + 0, + 65507 + ], + "default": 0, + "type": "number" + } + }, + { + "use_tcp": { + "type": "boolean", + "default": false + } + }, + { + "hostname_in_prefix": { + "type": "boolean", + "default": false + } + }, + { + "consumer_identifier_default": { + "one_of": [ + "consumer_id", + "custom_id", + "username" + ], + "default": "custom_id", + "type": "string", + "required": true + } + }, + { + "service_identifier_default": { + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ], + "default": "service_name_or_host", + "type": "string", + "required": true + } + }, + { + "workspace_identifier_default": { + "one_of": [ + "workspace_id", + "workspace_name" + ], + "default": "workspace_id", + "type": "string", + "required": true + } + }, + { + "retry_count": { + "type": "integer" + } + }, + { + "queue_size": { + "type": "integer" + } + }, + { + "flush_timeout": { + "type": "number" + } + }, + { + "tag_style": { + "one_of": [ + "dogstatsd", + "influxdb", + "librato", + "signalfx" + ], + "type": "string", + "required": false + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "between": [ + 1, + 1000000 + ], + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time." + } + }, + { + "max_coalescing_delay": { + "between": [ + 0, + 3600 + ], + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." + } + }, + { + "max_entries": { + "between": [ + 1, + 1000000 + ], + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue." + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "default": 60, + "type": "number", + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." + } + }, + { + "initial_retry_delay": { + "between": [ + 0.001, + 1000000 + ], + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch." + } + }, + { + "max_retry_delay": { + "between": [ + 0.001, + 1000000 + ], + "default": 60, + "type": "number", + "description": "Maximum time in seconds between retries, caps exponential backoff." + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/statsd/3.6.x.json b/schemas/statsd/3.6.x.json new file mode 100644 index 00000000..a817ed71 --- /dev/null +++ b/schemas/statsd/3.6.x.json @@ -0,0 +1,439 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "retry_count", + "queue_size", + "flush_timeout" + ] + } + } + ], + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "localhost", + "description": "The IP address or hostname of StatsD server to send data to." + } + }, + { + "port": { + "default": 8125, + "type": "integer", + "description": "The port of StatsD server to send data to.", + "between": [ + 0, + 65535 + ] + } + }, + { + "prefix": { + "type": "string", + "default": "kong", + "description": "String to prefix to each metric's name." + } + }, + { + "metrics": { + "elements": { + "entity_checks": [ + { + "conditional": { + "then_field": "sample_rate", + "if_field": "stat_type", + "then_match": { + "required": true + }, + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + } + } + } + ], + "type": "record", + "fields": [ + { + "name": { + "required": true, + "type": "string", + "description": "StatsD metric’s name.", + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "status_count", + "status_count_per_user", + "unique_users", + "upstream_latency", + "status_count_per_workspace", + "status_count_per_user_per_route", + "shdict_usage", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ] + } + }, + { + "stat_type": { + "required": true, + "type": "string", + "description": "Determines what sort of event a metric represents.", + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ] + } + }, + { + "sample_rate": { + "gt": 0, + "type": "number", + "description": "Sampling rate" + } + }, + { + "consumer_identifier": { + "one_of": [ + "consumer_id", + "custom_id", + "username" + ], + "type": "string", + "description": "Authenticated user detail." + } + }, + { + "service_identifier": { + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ], + "type": "string", + "description": "Service detail." + } + }, + { + "workspace_identifier": { + "one_of": [ + "workspace_id", + "workspace_name" + ], + "type": "string", + "description": "Workspace detail." + } + } + ] + }, + "type": "array", + "description": "List of metrics to be logged.", + "default": [ + { + "stat_type": "counter", + "name": "request_count", + "sample_rate": 1 + }, + { + "stat_type": "timer", + "name": "latency" + }, + { + "stat_type": "counter", + "name": "request_size", + "sample_rate": 1 + }, + { + "stat_type": "counter", + "name": "status_count", + "sample_rate": 1 + }, + { + "stat_type": "counter", + "name": "response_size", + "sample_rate": 1 + }, + { + "stat_type": "set", + "name": "unique_users" + }, + { + "stat_type": "counter", + "name": "request_per_user", + "sample_rate": 1 + }, + { + "stat_type": "timer", + "name": "upstream_latency" + }, + { + "stat_type": "timer", + "name": "kong_latency" + }, + { + "stat_type": "counter", + "name": "status_count_per_user", + "sample_rate": 1 + }, + { + "stat_type": "counter", + "name": "status_count_per_workspace", + "sample_rate": 1 + }, + { + "stat_type": "counter", + "name": "status_count_per_user_per_route", + "sample_rate": 1 + }, + { + "stat_type": "gauge", + "name": "shdict_usage", + "sample_rate": 1 + }, + { + "stat_type": "counter", + "name": "cache_datastore_hits_total", + "sample_rate": 1 + }, + { + "stat_type": "counter", + "name": "cache_datastore_misses_total", + "sample_rate": 1 + } + ] + } + }, + { + "allow_status_codes": { + "elements": { + "type": "string", + "match": "^[0-9]+-[0-9]+$" + }, + "type": "array", + "description": "List of status code ranges that are allowed to be logged in metrics." + } + }, + { + "udp_packet_size": { + "type": "number", + "default": 0, + "between": [ + 0, + 65507 + ] + } + }, + { + "use_tcp": { + "default": false, + "type": "boolean" + } + }, + { + "hostname_in_prefix": { + "default": false, + "type": "boolean" + } + }, + { + "consumer_identifier_default": { + "required": true, + "type": "string", + "default": "custom_id", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + }, + { + "service_identifier_default": { + "required": true, + "type": "string", + "default": "service_name_or_host", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ] + } + }, + { + "workspace_identifier_default": { + "required": true, + "type": "string", + "default": "workspace_id", + "one_of": [ + "workspace_id", + "workspace_name" + ] + } + }, + { + "retry_count": { + "type": "integer" + } + }, + { + "queue_size": { + "type": "integer" + } + }, + { + "flush_timeout": { + "type": "number" + } + }, + { + "tag_style": { + "required": false, + "type": "string", + "one_of": [ + "dogstatsd", + "influxdb", + "librato", + "signalfx" + ] + } + }, + { + "queue": { + "required": true, + "type": "record", + "fields": [ + { + "max_batch_size": { + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_coalescing_delay": { + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "between": [ + 0, + 3600 + ] + } + }, + { + "max_entries": { + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "type": "number", + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch.", + "between": [ + 0.001, + 1000000 + ] + } + }, + { + "max_retry_delay": { + "default": 60, + "type": "number", + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "between": [ + 0.001, + 1000000 + ] + } + } + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/statsd/3.7.x.json b/schemas/statsd/3.7.x.json new file mode 100644 index 00000000..b2741422 --- /dev/null +++ b/schemas/statsd/3.7.x.json @@ -0,0 +1,443 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "host": { + "description": "The IP address or hostname of StatsD server to send data to.", + "type": "string", + "default": "localhost" + } + }, + { + "port": { + "default": 8125, + "description": "The port of StatsD server to send data to.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "prefix": { + "description": "String to prefix to each metric's name.", + "type": "string", + "default": "kong" + } + }, + { + "metrics": { + "description": "List of metrics to be logged.", + "elements": { + "fields": [ + { + "name": { + "required": true, + "description": "StatsD metric’s name.", + "type": "string", + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "status_count", + "status_count_per_user", + "unique_users", + "upstream_latency", + "status_count_per_workspace", + "status_count_per_user_per_route", + "shdict_usage", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ] + } + }, + { + "stat_type": { + "required": true, + "description": "Determines what sort of event a metric represents.", + "type": "string", + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ] + } + }, + { + "sample_rate": { + "description": "Sampling rate", + "type": "number", + "gt": 0 + } + }, + { + "consumer_identifier": { + "description": "Authenticated user detail.", + "type": "string", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + }, + { + "service_identifier": { + "description": "Service detail.", + "type": "string", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ] + } + }, + { + "workspace_identifier": { + "description": "Workspace detail.", + "type": "string", + "one_of": [ + "workspace_id", + "workspace_name" + ] + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_field": "stat_type", + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "then_match": { + "required": true + } + } + } + ], + "type": "record" + }, + "type": "array", + "default": [ + { + "stat_type": "counter", + "name": "request_count", + "sample_rate": 1 + }, + { + "name": "latency", + "stat_type": "timer" + }, + { + "stat_type": "counter", + "name": "request_size", + "sample_rate": 1 + }, + { + "stat_type": "counter", + "name": "status_count", + "sample_rate": 1 + }, + { + "stat_type": "counter", + "name": "response_size", + "sample_rate": 1 + }, + { + "stat_type": "set", + "name": "unique_users" + }, + { + "stat_type": "counter", + "name": "request_per_user", + "sample_rate": 1 + }, + { + "name": "upstream_latency", + "stat_type": "timer" + }, + { + "name": "kong_latency", + "stat_type": "timer" + }, + { + "stat_type": "counter", + "name": "status_count_per_user", + "sample_rate": 1 + }, + { + "stat_type": "counter", + "name": "status_count_per_workspace", + "sample_rate": 1 + }, + { + "stat_type": "counter", + "name": "status_count_per_user_per_route", + "sample_rate": 1 + }, + { + "stat_type": "gauge", + "name": "shdict_usage", + "sample_rate": 1 + }, + { + "stat_type": "counter", + "name": "cache_datastore_hits_total", + "sample_rate": 1 + }, + { + "stat_type": "counter", + "name": "cache_datastore_misses_total", + "sample_rate": 1 + } + ] + } + }, + { + "allow_status_codes": { + "elements": { + "type": "string", + "match": "^[0-9]+-[0-9]+$" + }, + "description": "List of status code ranges that are allowed to be logged in metrics.", + "type": "array" + } + }, + { + "udp_packet_size": { + "default": 0, + "type": "number", + "between": [ + 0, + 65507 + ] + } + }, + { + "use_tcp": { + "type": "boolean", + "default": false + } + }, + { + "hostname_in_prefix": { + "type": "boolean", + "default": false + } + }, + { + "consumer_identifier_default": { + "required": true, + "default": "custom_id", + "type": "string", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + }, + { + "service_identifier_default": { + "required": true, + "default": "service_name_or_host", + "type": "string", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ] + } + }, + { + "workspace_identifier_default": { + "required": true, + "default": "workspace_id", + "type": "string", + "one_of": [ + "workspace_id", + "workspace_name" + ] + } + }, + { + "retry_count": { + "type": "integer", + "deprecation": { + "old_default": 10, + "removal_in_version": "4.0", + "message": "statsd: config.retry_count no longer works, please use config.queue.max_retry_time instead" + } + } + }, + { + "queue_size": { + "type": "integer", + "deprecation": { + "old_default": 1, + "removal_in_version": "4.0", + "message": "statsd: config.queue_size is deprecated, please use config.queue.max_batch_size instead" + } + } + }, + { + "flush_timeout": { + "type": "number", + "deprecation": { + "old_default": 2, + "removal_in_version": "4.0", + "message": "statsd: config.flush_timeout is deprecated, please use config.queue.max_coalescing_delay instead" + } + } + }, + { + "tag_style": { + "required": false, + "type": "string", + "one_of": [ + "dogstatsd", + "influxdb", + "librato", + "signalfx" + ] + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_coalescing_delay": { + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "between": [ + 0, + 3600 + ] + } + }, + { + "max_entries": { + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "type": "number", + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "default": 60 + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch.", + "between": [ + 0.001, + 1000000 + ] + } + }, + { + "max_retry_delay": { + "default": 60, + "type": "number", + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "between": [ + 0.001, + 1000000 + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/statsd/3.8.x.json b/schemas/statsd/3.8.x.json new file mode 100644 index 00000000..9d9a047a --- /dev/null +++ b/schemas/statsd/3.8.x.json @@ -0,0 +1,454 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "host": { + "description": "The IP address or hostname of StatsD server to send data to.", + "type": "string", + "default": "localhost" + } + }, + { + "port": { + "description": "The port of StatsD server to send data to.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 8125 + } + }, + { + "prefix": { + "description": "String to prefix to each metric's name.", + "type": "string", + "default": "kong" + } + }, + { + "metrics": { + "description": "List of metrics to be logged.", + "type": "array", + "default": [ + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_count" + }, + { + "stat_type": "timer", + "name": "latency" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_size" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "response_size" + }, + { + "stat_type": "set", + "name": "unique_users" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_per_user" + }, + { + "stat_type": "timer", + "name": "upstream_latency" + }, + { + "stat_type": "timer", + "name": "kong_latency" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_user" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_workspace" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_user_per_route" + }, + { + "stat_type": "gauge", + "sample_rate": 1, + "name": "shdict_usage" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "cache_datastore_hits_total" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "cache_datastore_misses_total" + } + ], + "elements": { + "fields": [ + { + "name": { + "description": "StatsD metric’s name.", + "type": "string", + "required": true, + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "status_count", + "status_count_per_user", + "unique_users", + "upstream_latency", + "status_count_per_workspace", + "status_count_per_user_per_route", + "shdict_usage", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ] + } + }, + { + "stat_type": { + "description": "Determines what sort of event a metric represents.", + "type": "string", + "required": true, + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ] + } + }, + { + "sample_rate": { + "description": "Sampling rate", + "type": "number", + "gt": 0 + } + }, + { + "consumer_identifier": { + "description": "Authenticated user detail.", + "type": "string", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + }, + { + "service_identifier": { + "description": "Service detail.", + "type": "string", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ] + } + }, + { + "workspace_identifier": { + "description": "Workspace detail.", + "type": "string", + "one_of": [ + "workspace_id", + "workspace_name" + ] + } + } + ], + "type": "record", + "entity_checks": [ + { + "conditional": { + "if_field": "stat_type", + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "then_match": { + "required": true + } + } + } + ] + } + } + }, + { + "allow_status_codes": { + "description": "List of status code ranges that are allowed to be logged in metrics.", + "type": "array", + "elements": { + "type": "string", + "match": "^[0-9]+-[0-9]+$" + } + } + }, + { + "udp_packet_size": { + "type": "number", + "between": [ + 0, + 65507 + ], + "default": 0 + } + }, + { + "use_tcp": { + "default": false, + "type": "boolean" + } + }, + { + "hostname_in_prefix": { + "default": false, + "type": "boolean" + } + }, + { + "consumer_identifier_default": { + "default": "custom_id", + "type": "string", + "required": true, + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + }, + { + "service_identifier_default": { + "default": "service_name_or_host", + "type": "string", + "required": true, + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ] + } + }, + { + "workspace_identifier_default": { + "default": "workspace_id", + "type": "string", + "required": true, + "one_of": [ + "workspace_id", + "workspace_name" + ] + } + }, + { + "retry_count": { + "type": "integer", + "deprecation": { + "old_default": 10, + "message": "statsd: config.retry_count no longer works, please use config.queue.max_retry_time instead", + "removal_in_version": "4.0" + } + } + }, + { + "queue_size": { + "type": "integer", + "deprecation": { + "old_default": 1, + "message": "statsd: config.queue_size is deprecated, please use config.queue.max_batch_size instead", + "removal_in_version": "4.0" + } + } + }, + { + "flush_timeout": { + "type": "number", + "deprecation": { + "old_default": 2, + "message": "statsd: config.flush_timeout is deprecated, please use config.queue.max_coalescing_delay instead", + "removal_in_version": "4.0" + } + } + }, + { + "tag_style": { + "type": "string", + "required": false, + "one_of": [ + "dogstatsd", + "influxdb", + "librato", + "signalfx" + ] + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "description": "Maximum number of entries that can be processed at a time.", + "type": "integer", + "between": [ + 1, + 1000000 + ], + "default": 1 + } + }, + { + "max_coalescing_delay": { + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "type": "number", + "between": [ + 0, + 3600 + ], + "default": 1 + } + }, + { + "max_entries": { + "description": "Maximum number of entries that can be waiting on the queue.", + "type": "integer", + "between": [ + 1, + 1000000 + ], + "default": 10000 + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number", + "default": 60 + } + }, + { + "initial_retry_delay": { + "description": "Time in seconds before the initial retry is made for a failing batch.", + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "default": 0.01 + } + }, + { + "max_retry_delay": { + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "default": 60 + } + }, + { + "concurrency_limit": { + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "type": "integer", + "default": 1, + "one_of": [ + -1, + 1 + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/statsd/3.9.x.json b/schemas/statsd/3.9.x.json new file mode 100644 index 00000000..042741d2 --- /dev/null +++ b/schemas/statsd/3.9.x.json @@ -0,0 +1,454 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "host": { + "default": "localhost", + "description": "The IP address or hostname of StatsD server to send data to.", + "type": "string" + } + }, + { + "port": { + "default": 8125, + "description": "The port of StatsD server to send data to.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "prefix": { + "default": "kong", + "description": "String to prefix to each metric's name.", + "type": "string" + } + }, + { + "metrics": { + "default": [ + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_count" + }, + { + "stat_type": "timer", + "name": "latency" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_size" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "response_size" + }, + { + "stat_type": "set", + "name": "unique_users" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "request_per_user" + }, + { + "stat_type": "timer", + "name": "upstream_latency" + }, + { + "stat_type": "timer", + "name": "kong_latency" + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_user" + }, + { + "stat_type": "counter", + "name": "status_count_per_workspace", + "sample_rate": 1 + }, + { + "stat_type": "counter", + "sample_rate": 1, + "name": "status_count_per_user_per_route" + }, + { + "stat_type": "gauge", + "sample_rate": 1, + "name": "shdict_usage" + }, + { + "stat_type": "counter", + "name": "cache_datastore_hits_total", + "sample_rate": 1 + }, + { + "stat_type": "counter", + "name": "cache_datastore_misses_total", + "sample_rate": 1 + } + ], + "description": "List of metrics to be logged.", + "elements": { + "entity_checks": [ + { + "conditional": { + "if_match": { + "one_of": [ + "counter", + "gauge" + ] + }, + "then_field": "sample_rate", + "if_field": "stat_type", + "then_match": { + "required": true + } + } + } + ], + "fields": [ + { + "name": { + "type": "string", + "description": "StatsD metric’s name.", + "required": true, + "one_of": [ + "kong_latency", + "latency", + "request_count", + "request_per_user", + "request_size", + "response_size", + "status_count", + "status_count_per_user", + "unique_users", + "upstream_latency", + "status_count_per_workspace", + "status_count_per_user_per_route", + "shdict_usage", + "cache_datastore_hits_total", + "cache_datastore_misses_total" + ] + } + }, + { + "stat_type": { + "type": "string", + "description": "Determines what sort of event a metric represents.", + "required": true, + "one_of": [ + "counter", + "gauge", + "histogram", + "meter", + "set", + "timer" + ] + } + }, + { + "sample_rate": { + "gt": 0, + "description": "Sampling rate", + "type": "number" + } + }, + { + "consumer_identifier": { + "description": "Authenticated user detail.", + "type": "string", + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + }, + { + "service_identifier": { + "description": "Service detail.", + "type": "string", + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ] + } + }, + { + "workspace_identifier": { + "description": "Workspace detail.", + "type": "string", + "one_of": [ + "workspace_id", + "workspace_name" + ] + } + } + ], + "type": "record" + }, + "type": "array" + } + }, + { + "allow_status_codes": { + "elements": { + "type": "string", + "match": "^[0-9]+-[0-9]+$" + }, + "description": "List of status code ranges that are allowed to be logged in metrics.", + "type": "array" + } + }, + { + "udp_packet_size": { + "default": 0, + "between": [ + 0, + 65507 + ], + "type": "number" + } + }, + { + "use_tcp": { + "default": false, + "type": "boolean" + } + }, + { + "hostname_in_prefix": { + "default": false, + "type": "boolean" + } + }, + { + "consumer_identifier_default": { + "default": "custom_id", + "type": "string", + "required": true, + "one_of": [ + "consumer_id", + "custom_id", + "username" + ] + } + }, + { + "service_identifier_default": { + "default": "service_name_or_host", + "type": "string", + "required": true, + "one_of": [ + "service_id", + "service_name", + "service_host", + "service_name_or_host" + ] + } + }, + { + "workspace_identifier_default": { + "default": "workspace_id", + "type": "string", + "required": true, + "one_of": [ + "workspace_id", + "workspace_name" + ] + } + }, + { + "retry_count": { + "type": "integer", + "deprecation": { + "old_default": 10, + "message": "statsd: config.retry_count no longer works, please use config.queue.max_retry_time instead", + "removal_in_version": "4.0" + } + } + }, + { + "queue_size": { + "type": "integer", + "deprecation": { + "old_default": 1, + "message": "statsd: config.queue_size is deprecated, please use config.queue.max_batch_size instead", + "removal_in_version": "4.0" + } + } + }, + { + "flush_timeout": { + "type": "number", + "deprecation": { + "old_default": 2, + "message": "statsd: config.flush_timeout is deprecated, please use config.queue.max_coalescing_delay instead", + "removal_in_version": "4.0" + } + } + }, + { + "tag_style": { + "type": "string", + "required": false, + "one_of": [ + "dogstatsd", + "influxdb", + "librato", + "signalfx" + ] + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "between": [ + 1, + 1000000 + ], + "type": "integer" + } + }, + { + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "between": [ + 0, + 3600 + ], + "type": "number" + } + }, + { + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "between": [ + 1, + 1000000 + ], + "type": "integer" + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "between": [ + 0.001, + 1000000 + ], + "type": "number" + } + }, + { + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "between": [ + 0.001, + 1000000 + ], + "type": "number" + } + }, + { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "type": "integer", + "one_of": [ + -1, + 1 + ] + } + } + ], + "required": true, + "type": "record" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/syslog/3.10.x.json b/schemas/syslog/3.10.x.json new file mode 100644 index 00000000..98f64b13 --- /dev/null +++ b/schemas/syslog/3.10.x.json @@ -0,0 +1,164 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "log_level": { + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "required": true + } + }, + { + "successful_severity": { + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "required": true + } + }, + { + "client_errors_severity": { + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "required": true + } + }, + { + "server_errors_severity": { + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "required": true + } + }, + { + "custom_fields_by_lua": { + "description": "Lua code as a key-value map", + "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "type": "string", + "len_min": 1 + } + } + }, + { + "facility": { + "type": "string", + "description": "The facility is used by the operating system to decide how to handle each log message.", + "one_of": [ + "auth", + "authpriv", + "cron", + "daemon", + "ftp", + "kern", + "lpr", + "mail", + "news", + "syslog", + "user", + "uucp", + "local0", + "local1", + "local2", + "local3", + "local4", + "local5", + "local6", + "local7" + ], + "default": "user", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/syslog/3.11.x.json b/schemas/syslog/3.11.x.json new file mode 100644 index 00000000..e176ffd8 --- /dev/null +++ b/schemas/syslog/3.11.x.json @@ -0,0 +1,164 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "log_level": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "required": true, + "default": "info", + "type": "string" + } + }, + { + "successful_severity": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "required": true, + "default": "info", + "type": "string" + } + }, + { + "client_errors_severity": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "required": true, + "default": "info", + "type": "string" + } + }, + { + "server_errors_severity": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "required": true, + "default": "info", + "type": "string" + } + }, + { + "custom_fields_by_lua": { + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "len_min": 1, + "type": "string" + }, + "description": "Lua code as a key-value map", + "type": "map" + } + }, + { + "facility": { + "required": true, + "description": "The facility is used by the operating system to decide how to handle each log message.", + "one_of": [ + "auth", + "authpriv", + "cron", + "daemon", + "ftp", + "kern", + "lpr", + "mail", + "news", + "syslog", + "user", + "uucp", + "local0", + "local1", + "local2", + "local3", + "local4", + "local5", + "local6", + "local7" + ], + "default": "user", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/syslog/3.12.x.json b/schemas/syslog/3.12.x.json new file mode 100644 index 00000000..0bc59cf9 --- /dev/null +++ b/schemas/syslog/3.12.x.json @@ -0,0 +1,162 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "log_level": { + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "required": true + } + }, + { + "successful_severity": { + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "required": true + } + }, + { + "client_errors_severity": { + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "required": true + } + }, + { + "server_errors_severity": { + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "required": true + } + }, + { + "custom_fields_by_lua": { + "type": "map", + "description": "Lua code as a key-value map", + "values": { + "type": "string", + "len_min": 1 + }, + "keys": { + "type": "string", + "len_min": 1 + } + } + }, + { + "facility": { + "type": "string", + "required": true, + "description": "The facility is used by the operating system to decide how to handle each log message.", + "default": "user", + "one_of": [ + "auth", + "authpriv", + "cron", + "daemon", + "ftp", + "kern", + "lpr", + "mail", + "news", + "syslog", + "user", + "uucp", + "local0", + "local1", + "local2", + "local3", + "local4", + "local5", + "local6", + "local7" + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/syslog/3.4.x.json b/schemas/syslog/3.4.x.json index 68cc12eb..f6f14d64 100644 --- a/schemas/syslog/3.4.x.json +++ b/schemas/syslog/3.4.x.json @@ -8,6 +8,9 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", "elements": { "one_of": [ "grpc", @@ -21,15 +24,21 @@ "ws", "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "log_level": { @@ -44,8 +53,8 @@ "alert", "emerg" ], - "type": "string", - "required": true + "required": true, + "type": "string" } }, { @@ -61,8 +70,8 @@ "alert", "emerg" ], - "type": "string", - "required": true + "required": true, + "type": "string" } }, { @@ -78,8 +87,8 @@ "alert", "emerg" ], - "type": "string", - "required": true + "required": true, + "type": "string" } }, { @@ -95,26 +104,28 @@ "alert", "emerg" ], - "type": "string", - "required": true + "required": true, + "type": "string" } }, { "custom_fields_by_lua": { - "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, "keys": { "len_min": 1, "type": "string" }, - "values": { - "type": "string", - "len_min": 1 - } + "type": "map", + "description": "Lua code as a key-value map" } }, { "facility": { "default": "user", + "required": true, "one_of": [ "auth", "authpriv", @@ -138,12 +149,16 @@ "local7" ], "type": "string", - "required": true + "description": "The facility is used by the operating system to decide how to handle each log message." } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/syslog/3.5.x.json b/schemas/syslog/3.5.x.json new file mode 100644 index 00000000..ce26cb6d --- /dev/null +++ b/schemas/syslog/3.5.x.json @@ -0,0 +1,164 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "log_level": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "default": "info", + "type": "string", + "required": true + } + }, + { + "successful_severity": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "default": "info", + "type": "string", + "required": true + } + }, + { + "client_errors_severity": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "default": "info", + "type": "string", + "required": true + } + }, + { + "server_errors_severity": { + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ], + "default": "info", + "type": "string", + "required": true + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, + "description": "Lua code as a key-value map" + } + }, + { + "facility": { + "type": "string", + "required": true, + "one_of": [ + "auth", + "authpriv", + "cron", + "daemon", + "ftp", + "kern", + "lpr", + "mail", + "news", + "syslog", + "user", + "uucp", + "local0", + "local1", + "local2", + "local3", + "local4", + "local5", + "local6", + "local7" + ], + "default": "user", + "description": "The facility is used by the operating system to decide how to handle each log message." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/syslog/3.6.x.json b/schemas/syslog/3.6.x.json new file mode 100644 index 00000000..b739b7d4 --- /dev/null +++ b/schemas/syslog/3.6.x.json @@ -0,0 +1,164 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "log_level": { + "required": true, + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "successful_severity": { + "required": true, + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "client_errors_severity": { + "required": true, + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "server_errors_severity": { + "required": true, + "type": "string", + "default": "info", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "description": "Lua code as a key-value map", + "values": { + "len_min": 1, + "type": "string" + } + } + }, + { + "facility": { + "type": "string", + "default": "user", + "required": true, + "description": "The facility is used by the operating system to decide how to handle each log message.", + "one_of": [ + "auth", + "authpriv", + "cron", + "daemon", + "ftp", + "kern", + "lpr", + "mail", + "news", + "syslog", + "user", + "uucp", + "local0", + "local1", + "local2", + "local3", + "local4", + "local5", + "local6", + "local7" + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/syslog/3.7.x.json b/schemas/syslog/3.7.x.json new file mode 100644 index 00000000..b6825600 --- /dev/null +++ b/schemas/syslog/3.7.x.json @@ -0,0 +1,164 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "log_level": { + "required": true, + "default": "info", + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "successful_severity": { + "required": true, + "default": "info", + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "client_errors_severity": { + "required": true, + "default": "info", + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "server_errors_severity": { + "required": true, + "default": "info", + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "description": "Lua code as a key-value map", + "values": { + "type": "string", + "len_min": 1 + } + } + }, + { + "facility": { + "default": "user", + "required": true, + "description": "The facility is used by the operating system to decide how to handle each log message.", + "type": "string", + "one_of": [ + "auth", + "authpriv", + "cron", + "daemon", + "ftp", + "kern", + "lpr", + "mail", + "news", + "syslog", + "user", + "uucp", + "local0", + "local1", + "local2", + "local3", + "local4", + "local5", + "local6", + "local7" + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/syslog/3.8.x.json b/schemas/syslog/3.8.x.json new file mode 100644 index 00000000..5daf010a --- /dev/null +++ b/schemas/syslog/3.8.x.json @@ -0,0 +1,164 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "log_level": { + "default": "info", + "required": true, + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "successful_severity": { + "default": "info", + "required": true, + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "client_errors_severity": { + "default": "info", + "required": true, + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "server_errors_severity": { + "default": "info", + "required": true, + "type": "string", + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "values": { + "type": "string", + "len_min": 1 + }, + "description": "Lua code as a key-value map" + } + }, + { + "facility": { + "description": "The facility is used by the operating system to decide how to handle each log message.", + "required": true, + "one_of": [ + "auth", + "authpriv", + "cron", + "daemon", + "ftp", + "kern", + "lpr", + "mail", + "news", + "syslog", + "user", + "uucp", + "local0", + "local1", + "local2", + "local3", + "local4", + "local5", + "local6", + "local7" + ], + "type": "string", + "default": "user" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/syslog/3.9.x.json b/schemas/syslog/3.9.x.json new file mode 100644 index 00000000..27f2ac90 --- /dev/null +++ b/schemas/syslog/3.9.x.json @@ -0,0 +1,164 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "log_level": { + "default": "info", + "type": "string", + "required": true, + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "successful_severity": { + "default": "info", + "type": "string", + "required": true, + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "client_errors_severity": { + "default": "info", + "type": "string", + "required": true, + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "server_errors_severity": { + "default": "info", + "type": "string", + "required": true, + "one_of": [ + "debug", + "info", + "notice", + "warning", + "err", + "crit", + "alert", + "emerg" + ] + } + }, + { + "custom_fields_by_lua": { + "description": "Lua code as a key-value map", + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map" + } + }, + { + "facility": { + "required": true, + "type": "string", + "default": "user", + "description": "The facility is used by the operating system to decide how to handle each log message.", + "one_of": [ + "auth", + "authpriv", + "cron", + "daemon", + "ftp", + "kern", + "lpr", + "mail", + "news", + "syslog", + "user", + "uucp", + "local0", + "local1", + "local2", + "local3", + "local4", + "local5", + "local6", + "local7" + ] + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/tcp-log/3.10.x.json b/schemas/tcp-log/3.10.x.json new file mode 100644 index 00000000..43130c62 --- /dev/null +++ b/schemas/tcp-log/3.10.x.json @@ -0,0 +1,112 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "host": { + "description": "The IP address or host name to send data to.", + "type": "string", + "required": true + } + }, + { + "port": { + "description": "The port to send data to on the upstream server.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "required": true + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number", + "default": 10000 + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number", + "default": 60000 + } + }, + { + "tls": { + "description": "Indicates whether to perform a TLS handshake against the remote server.", + "type": "boolean", + "default": false, + "required": true + } + }, + { + "tls_sni": { + "description": "An optional string that defines the SNI (Server Name Indication) hostname to send in the TLS handshake.", + "type": "string" + } + }, + { + "custom_fields_by_lua": { + "description": "A list of key-value pairs, where the key is the name of a log field and the value is a chunk of Lua code, whose return value sets or replaces the log field value.", + "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "type": "string", + "len_min": 1 + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/tcp-log/3.11.x.json b/schemas/tcp-log/3.11.x.json new file mode 100644 index 00000000..58f59bc8 --- /dev/null +++ b/schemas/tcp-log/3.11.x.json @@ -0,0 +1,112 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "host": { + "required": true, + "description": "The IP address or host name to send data to.", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "required": true, + "description": "The port to send data to on the upstream server.", + "type": "integer" + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "default": 10000, + "type": "number" + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "default": 60000, + "type": "number" + } + }, + { + "tls": { + "description": "Indicates whether to perform a TLS handshake against the remote server.", + "required": true, + "default": false, + "type": "boolean" + } + }, + { + "tls_sni": { + "description": "An optional string that defines the SNI (Server Name Indication) hostname to send in the TLS handshake.", + "type": "string" + } + }, + { + "custom_fields_by_lua": { + "description": "A list of key-value pairs, where the key is the name of a log field and the value is a chunk of Lua code, whose return value sets or replaces the log field value.", + "keys": { + "len_min": 1, + "type": "string" + }, + "values": { + "len_min": 1, + "type": "string" + }, + "type": "map" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/tcp-log/3.12.x.json b/schemas/tcp-log/3.12.x.json new file mode 100644 index 00000000..f083b402 --- /dev/null +++ b/schemas/tcp-log/3.12.x.json @@ -0,0 +1,110 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "host": { + "description": "The IP address or host name to send data to.", + "type": "string", + "required": true + } + }, + { + "port": { + "description": "The port to send data to on the upstream server.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "required": true + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "default": 10000, + "type": "number" + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "default": 60000, + "type": "number" + } + }, + { + "tls": { + "description": "Indicates whether to perform a TLS handshake against the remote server.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "tls_sni": { + "description": "An optional string that defines the SNI (Server Name Indication) hostname to send in the TLS handshake.", + "type": "string" + } + }, + { + "custom_fields_by_lua": { + "description": "A list of key-value pairs, where the key is the name of a log field and the value is a chunk of Lua code, whose return value sets or replaces the log field value.", + "type": "map", + "values": { + "type": "string", + "len_min": 1 + }, + "keys": { + "type": "string", + "len_min": 1 + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/tcp-log/3.4.x.json b/schemas/tcp-log/3.4.x.json index 514c797b..6f7de3c9 100644 --- a/schemas/tcp-log/3.4.x.json +++ b/schemas/tcp-log/3.4.x.json @@ -8,6 +8,9 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", "elements": { "one_of": [ "grpc", @@ -21,18 +24,25 @@ "ws", "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "host": { + "description": "The IP address or host name to send data to.", "type": "string", "required": true } @@ -43,50 +53,60 @@ 0, 65535 ], - "type": "integer", - "required": true + "description": "The port to send data to on the upstream server.", + "required": true, + "type": "integer" } }, { "timeout": { + "default": 10000, "type": "number", - "default": 10000 + "description": "An optional timeout in milliseconds when sending data to the upstream server." } }, { "keepalive": { + "default": 60000, "type": "number", - "default": 60000 + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed." } }, { "tls": { + "default": false, "type": "boolean", - "required": true, - "default": false + "description": "Indicates whether to perform a TLS handshake against the remote server.", + "required": true } }, { "tls_sni": { - "type": "string" + "type": "string", + "description": "An optional string that defines the SNI (Server Name Indication) hostname to send in the TLS handshake." } }, { "custom_fields_by_lua": { - "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, "keys": { "len_min": 1, "type": "string" }, - "values": { - "type": "string", - "len_min": 1 - } + "description": "A list of key-value pairs, where the key is the name of a log field and the value is a chunk of Lua code, whose return value sets or replaces the log field value.", + "type": "map" } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/tcp-log/3.5.x.json b/schemas/tcp-log/3.5.x.json new file mode 100644 index 00000000..d8cc89f0 --- /dev/null +++ b/schemas/tcp-log/3.5.x.json @@ -0,0 +1,112 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "host": { + "required": true, + "type": "string", + "description": "The IP address or host name to send data to." + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "required": true, + "type": "integer", + "description": "The port to send data to on the upstream server." + } + }, + { + "timeout": { + "default": 10000, + "type": "number", + "description": "An optional timeout in milliseconds when sending data to the upstream server." + } + }, + { + "keepalive": { + "default": 60000, + "type": "number", + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed." + } + }, + { + "tls": { + "description": "Indicates whether to perform a TLS handshake against the remote server.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "tls_sni": { + "type": "string", + "description": "An optional string that defines the SNI (Server Name Indication) hostname to send in the TLS handshake." + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "values": { + "len_min": 1, + "type": "string" + }, + "type": "map", + "description": "A list of key-value pairs, where the key is the name of a log field and the value is a chunk of Lua code, whose return value sets or replaces the log field value." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/tcp-log/3.6.x.json b/schemas/tcp-log/3.6.x.json new file mode 100644 index 00000000..6c41ccc6 --- /dev/null +++ b/schemas/tcp-log/3.6.x.json @@ -0,0 +1,112 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "host": { + "required": true, + "type": "string", + "description": "The IP address or host name to send data to." + } + }, + { + "port": { + "required": true, + "type": "integer", + "description": "The port to send data to on the upstream server.", + "between": [ + 0, + 65535 + ] + } + }, + { + "timeout": { + "type": "number", + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server." + } + }, + { + "keepalive": { + "type": "number", + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed." + } + }, + { + "tls": { + "required": true, + "type": "boolean", + "default": false, + "description": "Indicates whether to perform a TLS handshake against the remote server." + } + }, + { + "tls_sni": { + "description": "An optional string that defines the SNI (Server Name Indication) hostname to send in the TLS handshake.", + "type": "string" + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "description": "A list of key-value pairs, where the key is the name of a log field and the value is a chunk of Lua code, whose return value sets or replaces the log field value.", + "values": { + "len_min": 1, + "type": "string" + } + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/tcp-log/3.7.x.json b/schemas/tcp-log/3.7.x.json new file mode 100644 index 00000000..ac50f9ad --- /dev/null +++ b/schemas/tcp-log/3.7.x.json @@ -0,0 +1,112 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "host": { + "required": true, + "type": "string", + "description": "The IP address or host name to send data to." + } + }, + { + "port": { + "required": true, + "description": "The port to send data to on the upstream server.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "timeout": { + "type": "number", + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "default": 10000 + } + }, + { + "keepalive": { + "type": "number", + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "default": 60000 + } + }, + { + "tls": { + "required": true, + "type": "boolean", + "description": "Indicates whether to perform a TLS handshake against the remote server.", + "default": false + } + }, + { + "tls_sni": { + "type": "string", + "description": "An optional string that defines the SNI (Server Name Indication) hostname to send in the TLS handshake." + } + }, + { + "custom_fields_by_lua": { + "values": { + "type": "string", + "len_min": 1 + }, + "description": "A list of key-value pairs, where the key is the name of a log field and the value is a chunk of Lua code, whose return value sets or replaces the log field value.", + "type": "map", + "keys": { + "type": "string", + "len_min": 1 + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/tcp-log/3.8.x.json b/schemas/tcp-log/3.8.x.json new file mode 100644 index 00000000..3edb1e1e --- /dev/null +++ b/schemas/tcp-log/3.8.x.json @@ -0,0 +1,112 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "host": { + "description": "The IP address or host name to send data to.", + "required": true, + "type": "string" + } + }, + { + "port": { + "description": "The port to send data to on the upstream server.", + "required": true, + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number", + "default": 10000 + } + }, + { + "keepalive": { + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number", + "default": 60000 + } + }, + { + "tls": { + "description": "Indicates whether to perform a TLS handshake against the remote server.", + "required": true, + "type": "boolean", + "default": false + } + }, + { + "tls_sni": { + "description": "An optional string that defines the SNI (Server Name Indication) hostname to send in the TLS handshake.", + "type": "string" + } + }, + { + "custom_fields_by_lua": { + "description": "A list of key-value pairs, where the key is the name of a log field and the value is a chunk of Lua code, whose return value sets or replaces the log field value.", + "type": "map", + "values": { + "type": "string", + "len_min": 1 + }, + "keys": { + "type": "string", + "len_min": 1 + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/tcp-log/3.9.x.json b/schemas/tcp-log/3.9.x.json new file mode 100644 index 00000000..e51f9399 --- /dev/null +++ b/schemas/tcp-log/3.9.x.json @@ -0,0 +1,112 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "host": { + "description": "The IP address or host name to send data to.", + "required": true, + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "description": "The port to send data to on the upstream server.", + "required": true, + "type": "integer" + } + }, + { + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + } + }, + { + "keepalive": { + "default": 60000, + "description": "An optional value in milliseconds that defines how long an idle connection lives before being closed.", + "type": "number" + } + }, + { + "tls": { + "default": false, + "description": "Indicates whether to perform a TLS handshake against the remote server.", + "required": true, + "type": "boolean" + } + }, + { + "tls_sni": { + "description": "An optional string that defines the SNI (Server Name Indication) hostname to send in the TLS handshake.", + "type": "string" + } + }, + { + "custom_fields_by_lua": { + "description": "A list of key-value pairs, where the key is the name of a log field and the value is a chunk of Lua code, whose return value sets or replaces the log field value.", + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/tls-handshake-modifier/3.10.x.json b/schemas/tls-handshake-modifier/3.10.x.json new file mode 100644 index 00000000..e2dcbb58 --- /dev/null +++ b/schemas/tls-handshake-modifier/3.10.x.json @@ -0,0 +1,60 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "default": [ + "https", + "grpcs" + ], + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "https", + "grpcs", + "tls" + ] + }, + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "tls_client_certificate": { + "type": "string", + "description": "TLS Client Certificate", + "one_of": [ + "REQUEST" + ], + "default": "REQUEST", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/tls-handshake-modifier/3.11.x.json b/schemas/tls-handshake-modifier/3.11.x.json new file mode 100644 index 00000000..a7200dc4 --- /dev/null +++ b/schemas/tls-handshake-modifier/3.11.x.json @@ -0,0 +1,60 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "https", + "grpcs" + ], + "elements": { + "one_of": [ + "https", + "grpcs", + "tls" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "tls_client_certificate": { + "required": false, + "description": "TLS Client Certificate", + "one_of": [ + "REQUEST" + ], + "default": "REQUEST", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/tls-handshake-modifier/3.12.x.json b/schemas/tls-handshake-modifier/3.12.x.json new file mode 100644 index 00000000..bb8fa0df --- /dev/null +++ b/schemas/tls-handshake-modifier/3.12.x.json @@ -0,0 +1,58 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "default": [ + "https", + "grpcs" + ], + "elements": { + "type": "string", + "one_of": [ + "https", + "grpcs", + "tls" + ] + }, + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "tls_client_certificate": { + "type": "string", + "required": false, + "description": "TLS Client Certificate", + "default": "REQUEST", + "one_of": [ + "REQUEST" + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/tls-handshake-modifier/3.4.x.json b/schemas/tls-handshake-modifier/3.4.x.json index 6520e6ae..199a62e6 100644 --- a/schemas/tls-handshake-modifier/3.4.x.json +++ b/schemas/tls-handshake-modifier/3.4.x.json @@ -2,8 +2,9 @@ "fields": [ { "consumer": { - "eq": null, "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, @@ -13,35 +14,47 @@ "https", "grpcs" ], + "required": true, + "type": "set", "elements": { + "type": "string", "one_of": [ "https", "grpcs", "tls" - ], - "type": "string" - }, - "type": "set", - "required": true + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "tls_client_certificate": { - "type": "string", + "default": "REQUEST", + "required": false, "one_of": [ "REQUEST" ], - "required": false, - "default": "REQUEST" + "description": "TLS Client Certificate", + "type": "string" } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/tls-handshake-modifier/3.5.x.json b/schemas/tls-handshake-modifier/3.5.x.json new file mode 100644 index 00000000..e84d4318 --- /dev/null +++ b/schemas/tls-handshake-modifier/3.5.x.json @@ -0,0 +1,60 @@ +{ + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "default": [ + "https", + "grpcs" + ], + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "https", + "grpcs", + "tls" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "tls_client_certificate": { + "type": "string", + "required": false, + "one_of": [ + "REQUEST" + ], + "default": "REQUEST", + "description": "TLS Client Certificate" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/tls-handshake-modifier/3.6.x.json b/schemas/tls-handshake-modifier/3.6.x.json new file mode 100644 index 00000000..0d81e4ff --- /dev/null +++ b/schemas/tls-handshake-modifier/3.6.x.json @@ -0,0 +1,60 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "https", + "grpcs" + ], + "elements": { + "one_of": [ + "https", + "grpcs", + "tls" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "tls_client_certificate": { + "type": "string", + "default": "REQUEST", + "required": false, + "description": "TLS Client Certificate", + "one_of": [ + "REQUEST" + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/tls-handshake-modifier/3.7.x.json b/schemas/tls-handshake-modifier/3.7.x.json new file mode 100644 index 00000000..b200a2ad --- /dev/null +++ b/schemas/tls-handshake-modifier/3.7.x.json @@ -0,0 +1,60 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "required": true, + "elements": { + "type": "string", + "one_of": [ + "https", + "grpcs", + "tls" + ] + }, + "type": "set", + "default": [ + "https", + "grpcs" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "tls_client_certificate": { + "default": "REQUEST", + "required": false, + "description": "TLS Client Certificate", + "type": "string", + "one_of": [ + "REQUEST" + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/tls-handshake-modifier/3.8.x.json b/schemas/tls-handshake-modifier/3.8.x.json new file mode 100644 index 00000000..0ce0806f --- /dev/null +++ b/schemas/tls-handshake-modifier/3.8.x.json @@ -0,0 +1,60 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "default": [ + "https", + "grpcs" + ], + "required": true, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "https", + "grpcs", + "tls" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "tls_client_certificate": { + "description": "TLS Client Certificate", + "required": false, + "one_of": [ + "REQUEST" + ], + "type": "string", + "default": "REQUEST" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/tls-handshake-modifier/3.9.x.json b/schemas/tls-handshake-modifier/3.9.x.json new file mode 100644 index 00000000..28e50f31 --- /dev/null +++ b/schemas/tls-handshake-modifier/3.9.x.json @@ -0,0 +1,60 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "default": [ + "https", + "grpcs" + ], + "elements": { + "type": "string", + "one_of": [ + "https", + "grpcs", + "tls" + ] + }, + "required": true, + "type": "set" + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "tls_client_certificate": { + "required": false, + "type": "string", + "default": "REQUEST", + "description": "TLS Client Certificate", + "one_of": [ + "REQUEST" + ] + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/tls-metadata-headers/3.10.x.json b/schemas/tls-metadata-headers/3.10.x.json new file mode 100644 index 00000000..b9ea5bb4 --- /dev/null +++ b/schemas/tls-metadata-headers/3.10.x.json @@ -0,0 +1,96 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "protocols": { + "default": [ + "https", + "grpcs" + ], + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "https", + "grpcs", + "tls" + ] + }, + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "inject_client_cert_details": { + "description": "Enables TLS client certificate metadata values to be injected into HTTP headers.", + "type": "boolean", + "default": false + } + }, + { + "client_cert_header_name": { + "description": "Define the HTTP header name used for the PEM format URL encoded client certificate.", + "type": "string", + "default": "X-Client-Cert", + "required": true + } + }, + { + "client_serial_header_name": { + "description": "Define the HTTP header name used for the serial number of the client certificate.", + "type": "string", + "default": "X-Client-Cert-Serial", + "required": true + } + }, + { + "client_cert_issuer_dn_header_name": { + "description": "Define the HTTP header name used for the issuer DN of the client certificate.", + "type": "string", + "default": "X-Client-Cert-Issuer-DN", + "required": true + } + }, + { + "client_cert_subject_dn_header_name": { + "description": "Define the HTTP header name used for the subject DN of the client certificate.", + "type": "string", + "default": "X-Client-Cert-Subject-DN", + "required": true + } + }, + { + "client_cert_fingerprint_header_name": { + "description": "Define the HTTP header name used for the SHA1 fingerprint of the client certificate.", + "type": "string", + "default": "X-Client-Cert-Fingerprint", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/tls-metadata-headers/3.11.x.json b/schemas/tls-metadata-headers/3.11.x.json new file mode 100644 index 00000000..114af750 --- /dev/null +++ b/schemas/tls-metadata-headers/3.11.x.json @@ -0,0 +1,96 @@ +{ + "fields": [ + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "https", + "grpcs" + ], + "elements": { + "one_of": [ + "https", + "grpcs", + "tls" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "inject_client_cert_details": { + "description": "Enables TLS client certificate metadata values to be injected into HTTP headers.", + "default": false, + "type": "boolean" + } + }, + { + "client_cert_header_name": { + "description": "Define the HTTP header name used for the PEM format URL encoded client certificate.", + "required": true, + "default": "X-Client-Cert", + "type": "string" + } + }, + { + "client_serial_header_name": { + "description": "Define the HTTP header name used for the serial number of the client certificate.", + "required": true, + "default": "X-Client-Cert-Serial", + "type": "string" + } + }, + { + "client_cert_issuer_dn_header_name": { + "description": "Define the HTTP header name used for the issuer DN of the client certificate.", + "required": true, + "default": "X-Client-Cert-Issuer-DN", + "type": "string" + } + }, + { + "client_cert_subject_dn_header_name": { + "description": "Define the HTTP header name used for the subject DN of the client certificate.", + "required": true, + "default": "X-Client-Cert-Subject-DN", + "type": "string" + } + }, + { + "client_cert_fingerprint_header_name": { + "description": "Define the HTTP header name used for the SHA1 fingerprint of the client certificate.", + "required": true, + "default": "X-Client-Cert-Fingerprint", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/tls-metadata-headers/3.12.x.json b/schemas/tls-metadata-headers/3.12.x.json new file mode 100644 index 00000000..19f6bb54 --- /dev/null +++ b/schemas/tls-metadata-headers/3.12.x.json @@ -0,0 +1,94 @@ +{ + "entity_checks": [], + "fields": [ + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "type": "set", + "default": [ + "https", + "grpcs" + ], + "elements": { + "type": "string", + "one_of": [ + "https", + "grpcs", + "tls" + ] + }, + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "inject_client_cert_details": { + "description": "Enables TLS client certificate metadata values to be injected into HTTP headers.", + "default": false, + "type": "boolean" + } + }, + { + "client_cert_header_name": { + "type": "string", + "default": "X-Client-Cert", + "description": "Define the HTTP header name used for the PEM format URL encoded client certificate.", + "required": true + } + }, + { + "client_serial_header_name": { + "type": "string", + "default": "X-Client-Cert-Serial", + "description": "Define the HTTP header name used for the serial number of the client certificate.", + "required": true + } + }, + { + "client_cert_issuer_dn_header_name": { + "type": "string", + "default": "X-Client-Cert-Issuer-DN", + "description": "Define the HTTP header name used for the issuer DN of the client certificate.", + "required": true + } + }, + { + "client_cert_subject_dn_header_name": { + "type": "string", + "default": "X-Client-Cert-Subject-DN", + "description": "Define the HTTP header name used for the subject DN of the client certificate.", + "required": true + } + }, + { + "client_cert_fingerprint_header_name": { + "type": "string", + "default": "X-Client-Cert-Fingerprint", + "description": "Define the HTTP header name used for the SHA1 fingerprint of the client certificate.", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/tls-metadata-headers/3.4.x.json b/schemas/tls-metadata-headers/3.4.x.json index 0c234808..83edf9aa 100644 --- a/schemas/tls-metadata-headers/3.4.x.json +++ b/schemas/tls-metadata-headers/3.4.x.json @@ -2,8 +2,9 @@ "fields": [ { "consumer": { - "eq": null, "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, @@ -13,66 +14,83 @@ "https", "grpcs" ], + "required": true, + "type": "set", "elements": { + "type": "string", "one_of": [ "https", "grpcs", "tls" - ], - "type": "string" - }, - "type": "set", - "required": true + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "inject_client_cert_details": { + "default": false, "type": "boolean", - "default": false + "description": "Enables TLS client certificate metadata values to be injected into HTTP headers." } }, { "client_cert_header_name": { "default": "X-Client-Cert", - "required": true, - "type": "string" + "description": "Define the HTTP header name used for the PEM format URL encoded client certificate.", + "type": "string", + "required": true } }, { "client_serial_header_name": { "default": "X-Client-Cert-Serial", - "required": true, - "type": "string" + "description": "Define the HTTP header name used for the serial number of the client certificate.", + "type": "string", + "required": true } }, { "client_cert_issuer_dn_header_name": { "default": "X-Client-Cert-Issuer-DN", - "required": true, - "type": "string" + "description": "Define the HTTP header name used for the issuer DN of the client certificate.", + "type": "string", + "required": true } }, { "client_cert_subject_dn_header_name": { "default": "X-Client-Cert-Subject-DN", - "required": true, - "type": "string" + "description": "Define the HTTP header name used for the subject DN of the client certificate.", + "type": "string", + "required": true } }, { "client_cert_fingerprint_header_name": { "default": "X-Client-Cert-Fingerprint", - "required": true, - "type": "string" + "description": "Define the HTTP header name used for the SHA1 fingerprint of the client certificate.", + "type": "string", + "required": true } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/tls-metadata-headers/3.5.x.json b/schemas/tls-metadata-headers/3.5.x.json new file mode 100644 index 00000000..15f8cd0c --- /dev/null +++ b/schemas/tls-metadata-headers/3.5.x.json @@ -0,0 +1,96 @@ +{ + "fields": [ + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "default": [ + "https", + "grpcs" + ], + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "https", + "grpcs", + "tls" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "inject_client_cert_details": { + "default": false, + "type": "boolean", + "description": "Enables TLS client certificate metadata values to be injected into HTTP headers." + } + }, + { + "client_cert_header_name": { + "description": "Define the HTTP header name used for the PEM format URL encoded client certificate.", + "default": "X-Client-Cert", + "type": "string", + "required": true + } + }, + { + "client_serial_header_name": { + "description": "Define the HTTP header name used for the serial number of the client certificate.", + "default": "X-Client-Cert-Serial", + "type": "string", + "required": true + } + }, + { + "client_cert_issuer_dn_header_name": { + "description": "Define the HTTP header name used for the issuer DN of the client certificate.", + "default": "X-Client-Cert-Issuer-DN", + "type": "string", + "required": true + } + }, + { + "client_cert_subject_dn_header_name": { + "description": "Define the HTTP header name used for the subject DN of the client certificate.", + "default": "X-Client-Cert-Subject-DN", + "type": "string", + "required": true + } + }, + { + "client_cert_fingerprint_header_name": { + "description": "Define the HTTP header name used for the SHA1 fingerprint of the client certificate.", + "default": "X-Client-Cert-Fingerprint", + "type": "string", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/tls-metadata-headers/3.6.x.json b/schemas/tls-metadata-headers/3.6.x.json new file mode 100644 index 00000000..1fe21c3b --- /dev/null +++ b/schemas/tls-metadata-headers/3.6.x.json @@ -0,0 +1,96 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "https", + "grpcs" + ], + "elements": { + "one_of": [ + "https", + "grpcs", + "tls" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "inject_client_cert_details": { + "type": "boolean", + "description": "Enables TLS client certificate metadata values to be injected into HTTP headers.", + "default": false + } + }, + { + "client_cert_header_name": { + "required": true, + "type": "string", + "description": "Define the HTTP header name used for the PEM format URL encoded client certificate.", + "default": "X-Client-Cert" + } + }, + { + "client_serial_header_name": { + "required": true, + "type": "string", + "description": "Define the HTTP header name used for the serial number of the client certificate.", + "default": "X-Client-Cert-Serial" + } + }, + { + "client_cert_issuer_dn_header_name": { + "required": true, + "type": "string", + "description": "Define the HTTP header name used for the issuer DN of the client certificate.", + "default": "X-Client-Cert-Issuer-DN" + } + }, + { + "client_cert_subject_dn_header_name": { + "required": true, + "type": "string", + "description": "Define the HTTP header name used for the subject DN of the client certificate.", + "default": "X-Client-Cert-Subject-DN" + } + }, + { + "client_cert_fingerprint_header_name": { + "required": true, + "type": "string", + "description": "Define the HTTP header name used for the SHA1 fingerprint of the client certificate.", + "default": "X-Client-Cert-Fingerprint" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/tls-metadata-headers/3.7.x.json b/schemas/tls-metadata-headers/3.7.x.json new file mode 100644 index 00000000..507b8f50 --- /dev/null +++ b/schemas/tls-metadata-headers/3.7.x.json @@ -0,0 +1,96 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "protocols": { + "required": true, + "elements": { + "type": "string", + "one_of": [ + "https", + "grpcs", + "tls" + ] + }, + "type": "set", + "default": [ + "https", + "grpcs" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "inject_client_cert_details": { + "description": "Enables TLS client certificate metadata values to be injected into HTTP headers.", + "type": "boolean", + "default": false + } + }, + { + "client_cert_header_name": { + "required": true, + "type": "string", + "description": "Define the HTTP header name used for the PEM format URL encoded client certificate.", + "default": "X-Client-Cert" + } + }, + { + "client_serial_header_name": { + "required": true, + "type": "string", + "description": "Define the HTTP header name used for the serial number of the client certificate.", + "default": "X-Client-Cert-Serial" + } + }, + { + "client_cert_issuer_dn_header_name": { + "required": true, + "type": "string", + "description": "Define the HTTP header name used for the issuer DN of the client certificate.", + "default": "X-Client-Cert-Issuer-DN" + } + }, + { + "client_cert_subject_dn_header_name": { + "required": true, + "type": "string", + "description": "Define the HTTP header name used for the subject DN of the client certificate.", + "default": "X-Client-Cert-Subject-DN" + } + }, + { + "client_cert_fingerprint_header_name": { + "required": true, + "type": "string", + "description": "Define the HTTP header name used for the SHA1 fingerprint of the client certificate.", + "default": "X-Client-Cert-Fingerprint" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/tls-metadata-headers/3.8.x.json b/schemas/tls-metadata-headers/3.8.x.json new file mode 100644 index 00000000..70e69c6b --- /dev/null +++ b/schemas/tls-metadata-headers/3.8.x.json @@ -0,0 +1,96 @@ +{ + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "default": [ + "https", + "grpcs" + ], + "required": true, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "https", + "grpcs", + "tls" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "inject_client_cert_details": { + "description": "Enables TLS client certificate metadata values to be injected into HTTP headers.", + "type": "boolean", + "default": false + } + }, + { + "client_cert_header_name": { + "description": "Define the HTTP header name used for the PEM format URL encoded client certificate.", + "type": "string", + "required": true, + "default": "X-Client-Cert" + } + }, + { + "client_serial_header_name": { + "description": "Define the HTTP header name used for the serial number of the client certificate.", + "type": "string", + "required": true, + "default": "X-Client-Cert-Serial" + } + }, + { + "client_cert_issuer_dn_header_name": { + "description": "Define the HTTP header name used for the issuer DN of the client certificate.", + "type": "string", + "required": true, + "default": "X-Client-Cert-Issuer-DN" + } + }, + { + "client_cert_subject_dn_header_name": { + "description": "Define the HTTP header name used for the subject DN of the client certificate.", + "type": "string", + "required": true, + "default": "X-Client-Cert-Subject-DN" + } + }, + { + "client_cert_fingerprint_header_name": { + "description": "Define the HTTP header name used for the SHA1 fingerprint of the client certificate.", + "type": "string", + "required": true, + "default": "X-Client-Cert-Fingerprint" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/tls-metadata-headers/3.9.x.json b/schemas/tls-metadata-headers/3.9.x.json new file mode 100644 index 00000000..68ca8cad --- /dev/null +++ b/schemas/tls-metadata-headers/3.9.x.json @@ -0,0 +1,96 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "protocols": { + "default": [ + "https", + "grpcs" + ], + "elements": { + "type": "string", + "one_of": [ + "https", + "grpcs", + "tls" + ] + }, + "required": true, + "type": "set" + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "inject_client_cert_details": { + "default": false, + "description": "Enables TLS client certificate metadata values to be injected into HTTP headers.", + "type": "boolean" + } + }, + { + "client_cert_header_name": { + "default": "X-Client-Cert", + "description": "Define the HTTP header name used for the PEM format URL encoded client certificate.", + "required": true, + "type": "string" + } + }, + { + "client_serial_header_name": { + "default": "X-Client-Cert-Serial", + "description": "Define the HTTP header name used for the serial number of the client certificate.", + "required": true, + "type": "string" + } + }, + { + "client_cert_issuer_dn_header_name": { + "default": "X-Client-Cert-Issuer-DN", + "description": "Define the HTTP header name used for the issuer DN of the client certificate.", + "required": true, + "type": "string" + } + }, + { + "client_cert_subject_dn_header_name": { + "default": "X-Client-Cert-Subject-DN", + "description": "Define the HTTP header name used for the subject DN of the client certificate.", + "required": true, + "type": "string" + } + }, + { + "client_cert_fingerprint_header_name": { + "default": "X-Client-Cert-Fingerprint", + "description": "Define the HTTP header name used for the SHA1 fingerprint of the client certificate.", + "required": true, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/udp-log/3.10.x.json b/schemas/udp-log/3.10.x.json new file mode 100644 index 00000000..21c259da --- /dev/null +++ b/schemas/udp-log/3.10.x.json @@ -0,0 +1,91 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number", + "default": 10000 + } + }, + { + "custom_fields_by_lua": { + "description": "Lua code as a key-value map", + "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "type": "string", + "len_min": 1 + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/udp-log/3.11.x.json b/schemas/udp-log/3.11.x.json new file mode 100644 index 00000000..fe7231a3 --- /dev/null +++ b/schemas/udp-log/3.11.x.json @@ -0,0 +1,91 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "host": { + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "required": true, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + } + }, + { + "custom_fields_by_lua": { + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "len_min": 1, + "type": "string" + }, + "description": "Lua code as a key-value map", + "type": "map" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/udp-log/3.12.x.json b/schemas/udp-log/3.12.x.json new file mode 100644 index 00000000..049202a3 --- /dev/null +++ b/schemas/udp-log/3.12.x.json @@ -0,0 +1,89 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "required": true + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "default": 10000, + "type": "number" + } + }, + { + "custom_fields_by_lua": { + "type": "map", + "description": "Lua code as a key-value map", + "values": { + "type": "string", + "len_min": 1 + }, + "keys": { + "type": "string", + "len_min": 1 + } + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/udp-log/3.4.x.json b/schemas/udp-log/3.4.x.json index 5aa0881f..231ce3f9 100644 --- a/schemas/udp-log/3.4.x.json +++ b/schemas/udp-log/3.4.x.json @@ -8,6 +8,9 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", "elements": { "one_of": [ "grpc", @@ -21,18 +24,25 @@ "ws", "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "host": { + "description": "A string representing a host name, such as example.com.", "type": "string", "required": true } @@ -43,32 +53,39 @@ 0, 65535 ], - "type": "integer", - "required": true + "required": true, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" } }, { "timeout": { + "default": 10000, "type": "number", - "default": 10000 + "description": "An optional timeout in milliseconds when sending data to the upstream server." } }, { "custom_fields_by_lua": { - "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, "keys": { "len_min": 1, "type": "string" }, - "values": { - "type": "string", - "len_min": 1 - } + "type": "map", + "description": "Lua code as a key-value map" } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/udp-log/3.5.x.json b/schemas/udp-log/3.5.x.json new file mode 100644 index 00000000..b0315484 --- /dev/null +++ b/schemas/udp-log/3.5.x.json @@ -0,0 +1,91 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "host": { + "required": true, + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "required": true, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "timeout": { + "default": 10000, + "type": "number", + "description": "An optional timeout in milliseconds when sending data to the upstream server." + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "values": { + "len_min": 1, + "type": "string" + }, + "description": "Lua code as a key-value map" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/udp-log/3.6.x.json b/schemas/udp-log/3.6.x.json new file mode 100644 index 00000000..743499c7 --- /dev/null +++ b/schemas/udp-log/3.6.x.json @@ -0,0 +1,91 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "host": { + "required": true, + "type": "string", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "required": true, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ] + } + }, + { + "timeout": { + "type": "number", + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "default": 10000 + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "description": "Lua code as a key-value map", + "values": { + "len_min": 1, + "type": "string" + } + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/udp-log/3.7.x.json b/schemas/udp-log/3.7.x.json new file mode 100644 index 00000000..fd6c991c --- /dev/null +++ b/schemas/udp-log/3.7.x.json @@ -0,0 +1,91 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "host": { + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "required": true, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "timeout": { + "type": "number", + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "default": 10000 + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "description": "Lua code as a key-value map", + "values": { + "type": "string", + "len_min": 1 + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/udp-log/3.8.x.json b/schemas/udp-log/3.8.x.json new file mode 100644 index 00000000..d8176b5d --- /dev/null +++ b/schemas/udp-log/3.8.x.json @@ -0,0 +1,91 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true, + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "timeout": { + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number", + "default": 10000 + } + }, + { + "custom_fields_by_lua": { + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map", + "values": { + "type": "string", + "len_min": 1 + }, + "description": "Lua code as a key-value map" + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/udp-log/3.9.x.json b/schemas/udp-log/3.9.x.json new file mode 100644 index 00000000..eae6394a --- /dev/null +++ b/schemas/udp-log/3.9.x.json @@ -0,0 +1,91 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "required": true, + "type": "integer" + } + }, + { + "timeout": { + "default": 10000, + "description": "An optional timeout in milliseconds when sending data to the upstream server.", + "type": "number" + } + }, + { + "custom_fields_by_lua": { + "description": "Lua code as a key-value map", + "values": { + "len_min": 1, + "type": "string" + }, + "keys": { + "type": "string", + "len_min": 1 + }, + "type": "map" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/upstream-oauth/3.10.x.json b/schemas/upstream-oauth/3.10.x.json new file mode 100644 index 00000000..6b3a3d15 --- /dev/null +++ b/schemas/upstream-oauth/3.10.x.json @@ -0,0 +1,767 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "supported_partials": { + "redis-ee": [ + "config.cache.redis" + ] + }, + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "client": { + "type": "record", + "fields": [ + { + "auth_method": { + "type": "string", + "description": "The authentication method used in client requests to the IdP. Supported values are: `client_secret_basic` to send `client_id` and `client_secret` in the `Authorization: Basic` header, `client_secret_post` to send `client_id` and `client_secret` as part of the request body, or `client_secret_jwt` to send a JWT signed with the `client_secret` using the client assertion as part of the body.", + "default": "client_secret_post", + "one_of": [ + "client_secret_post", + "client_secret_basic", + "client_secret_jwt", + "none" + ], + "required": true + } + }, + { + "client_secret_jwt_alg": { + "type": "string", + "description": "The algorithm to use with JWT when using `client_secret_jwt` authentication.", + "default": "HS512", + "one_of": [ + "HS512", + "HS256" + ], + "required": true + } + }, + { + "http_version": { + "description": "The HTTP version used for requests made by this plugin. Supported values: `1.1` for HTTP 1.1 and `1.0` for HTTP 1.0.", + "type": "number", + "default": 1.1, + "required": false + } + }, + { + "http_proxy": { + "description": "The proxy to use when making HTTP requests to the IdP.", + "type": "string", + "required": false + } + }, + { + "http_proxy_authorization": { + "description": "The `Proxy-Authorization` header value to be used with `http_proxy`.", + "type": "string", + "required": false + } + }, + { + "https_proxy": { + "description": "The proxy to use when making HTTPS requests to the IdP.", + "type": "string", + "required": false + } + }, + { + "https_proxy_authorization": { + "description": "The `Proxy-Authorization` header value to be used with `https_proxy`.", + "type": "string", + "required": false + } + }, + { + "no_proxy": { + "description": "A comma-separated list of hosts that should not be proxied.", + "type": "string", + "required": false + } + }, + { + "timeout": { + "type": "integer", + "description": "Network I/O timeout for requests to the IdP in milliseconds.", + "default": 10000, + "between": [ + 0, + 2147483646 + ], + "required": true + } + }, + { + "keep_alive": { + "description": "Whether to use keepalive connections to the IdP.", + "type": "boolean", + "default": true, + "required": true + } + }, + { + "ssl_verify": { + "description": "Whether to verify the certificate presented by the IdP when using HTTPS.", + "type": "boolean", + "default": false, + "required": false + } + } + ], + "required": true + } + }, + { + "oauth": { + "type": "record", + "fields": [ + { + "token_endpoint": { + "description": "The token endpoint URI.", + "type": "string", + "required": true + } + }, + { + "token_headers": { + "description": "Extra headers to be passed in the token endpoint request.", + "type": "map", + "values": { + "type": "string", + "referenceable": true + }, + "keys": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + } + }, + { + "token_post_args": { + "description": "Extra post arguments to be passed in the token endpoint request.", + "type": "map", + "values": { + "type": "string", + "referenceable": true + }, + "keys": { + "type": "string" + } + } + }, + { + "grant_type": { + "type": "string", + "description": "The OAuth grant type to be used.", + "default": "client_credentials", + "one_of": [ + "client_credentials", + "password" + ], + "required": true + } + }, + { + "client_id": { + "type": "string", + "referenceable": true, + "description": "The client ID for the application registration in the IdP.", + "encrypted": true, + "required": false + } + }, + { + "client_secret": { + "type": "string", + "referenceable": true, + "description": "The client secret for the application registration in the IdP.", + "encrypted": true, + "required": false + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "The username to use if `config.oauth.grant_type` is set to `password`.", + "encrypted": true, + "required": false + } + }, + { + "password": { + "type": "string", + "referenceable": true, + "description": "The password to use if `config.oauth.grant_type` is set to `password`.", + "encrypted": true, + "required": false + } + }, + { + "scopes": { + "type": "array", + "description": "List of scopes to request from the IdP when obtaining a new token.", + "default": [ + "openid" + ], + "elements": { + "type": "string" + }, + "required": false + } + }, + { + "audience": { + "type": "array", + "description": "List of audiences passed to the IdP when obtaining a new token.", + "default": [ + + ], + "elements": { + "type": "string" + }, + "required": false + } + } + ], + "required": true + } + }, + { + "cache": { + "type": "record", + "fields": [ + { + "strategy": { + "type": "string", + "description": "The method Kong should use to cache tokens issued by the IdP.", + "default": "memory", + "one_of": [ + "memory", + "redis" + ], + "required": true + } + }, + { + "memory": { + "type": "record", + "fields": [ + { + "dictionary_name": { + "description": "The shared dictionary used by the plugin to cache tokens if `config.cache.strategy` is set to `memory`.", + "type": "string", + "default": "kong_db_cache", + "required": true + } + } + ], + "required": true + } + }, + { + "redis": { + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "default": "127.0.0.1", + "type": "string" + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "encrypted": true, + "type": "string", + "referenceable": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "default": 256, + "type": "integer", + "between": [ + 1, + 2147483646 + ] + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "type": "string", + "default": "127.0.0.1", + "required": true + } + }, + { + "port": { + "between": [ + 0, + 65535 + ], + "default": 6379, + "type": "integer", + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + }, + "required": false + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "default": false, + "type": "boolean", + "required": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "default": false, + "type": "boolean", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "elements": { + "type": "string" + }, + "len_min": 1 + } + } + ], + "required": true + } + }, + { + "eagerly_expire": { + "gt": -1, + "type": "integer", + "description": "The number of seconds to eagerly expire a cached token. By default, a cached token expires 5 seconds before its lifetime as defined in `expires_in`.", + "default": 5, + "required": true + } + }, + { + "default_ttl": { + "description": "The lifetime of a token without an explicit `expires_in` value.", + "type": "number", + "gt": 0, + "default": 3600 + } + } + ], + "required": true + } + }, + { + "behavior": { + "type": "record", + "fields": [ + { + "upstream_access_token_header_name": { + "type": "string", + "len_min": 0, + "description": "The name of the header used to send the access token (obtained from the IdP) to the upstream service.", + "default": "Authorization", + "required": true + } + }, + { + "idp_error_response_status_code": { + "type": "integer", + "description": "The response code to return to the consumer if Kong fails to obtain a token from the IdP.", + "default": 502, + "between": [ + 500, + 599 + ], + "required": true + } + }, + { + "idp_error_response_content_type": { + "type": "string", + "len_min": 0, + "description": "The Content-Type of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "default": "application/json; charset=utf-8", + "required": true + } + }, + { + "idp_error_response_message": { + "type": "string", + "len_min": 0, + "description": "The message to embed in the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "default": "Failed to authenticate request to upstream", + "required": true + } + }, + { + "idp_error_response_body_template": { + "type": "string", + "len_min": 0, + "description": "The template to use to create the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "default": "{ \"code\": \"{{status}}\", \"message\": \"{{message}}\" }", + "required": true + } + }, + { + "purge_token_on_upstream_status_codes": { + "description": "An array of status codes which will force an access token to be purged when returned by the upstream. An empty array will disable this functionality.", + "type": "array", + "default": [ + 401 + ], + "elements": { + "between": [ + 100, + 599 + ], + "type": "integer" + } + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/upstream-oauth/3.11.x.json b/schemas/upstream-oauth/3.11.x.json new file mode 100644 index 00000000..24f5d8d0 --- /dev/null +++ b/schemas/upstream-oauth/3.11.x.json @@ -0,0 +1,767 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "client": { + "required": true, + "fields": [ + { + "auth_method": { + "required": true, + "description": "The authentication method used in client requests to the IdP. Supported values are: `client_secret_basic` to send `client_id` and `client_secret` in the `Authorization: Basic` header, `client_secret_post` to send `client_id` and `client_secret` as part of the request body, or `client_secret_jwt` to send a JWT signed with the `client_secret` using the client assertion as part of the body.", + "one_of": [ + "client_secret_post", + "client_secret_basic", + "client_secret_jwt", + "none" + ], + "default": "client_secret_post", + "type": "string" + } + }, + { + "client_secret_jwt_alg": { + "required": true, + "description": "The algorithm to use with JWT when using `client_secret_jwt` authentication.", + "one_of": [ + "HS512", + "HS256" + ], + "default": "HS512", + "type": "string" + } + }, + { + "http_version": { + "default": 1.1, + "required": false, + "description": "The HTTP version used for requests made by this plugin. Supported values: `1.1` for HTTP 1.1 and `1.0` for HTTP 1.0.", + "type": "number" + } + }, + { + "http_proxy": { + "required": false, + "description": "The proxy to use when making HTTP requests to the IdP.", + "type": "string" + } + }, + { + "http_proxy_authorization": { + "required": false, + "description": "The `Proxy-Authorization` header value to be used with `http_proxy`.", + "type": "string" + } + }, + { + "https_proxy": { + "required": false, + "description": "The proxy to use when making HTTPS requests to the IdP.", + "type": "string" + } + }, + { + "https_proxy_authorization": { + "required": false, + "description": "The `Proxy-Authorization` header value to be used with `https_proxy`.", + "type": "string" + } + }, + { + "no_proxy": { + "required": false, + "description": "A comma-separated list of hosts that should not be proxied.", + "type": "string" + } + }, + { + "timeout": { + "required": true, + "description": "Network I/O timeout for requests to the IdP in milliseconds.", + "between": [ + 0, + 2147483646 + ], + "default": 10000, + "type": "integer" + } + }, + { + "keep_alive": { + "default": true, + "required": true, + "description": "Whether to use keepalive connections to the IdP.", + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "required": false, + "description": "Whether to verify the certificate presented by the IdP when using HTTPS.", + "type": "boolean" + } + } + ], + "type": "record" + } + }, + { + "oauth": { + "required": true, + "fields": [ + { + "token_endpoint": { + "required": true, + "description": "The token endpoint URI.", + "type": "string" + } + }, + { + "token_headers": { + "description": "Extra headers to be passed in the token endpoint request.", + "keys": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "values": { + "referenceable": true, + "type": "string" + }, + "type": "map" + } + }, + { + "token_post_args": { + "description": "Extra post arguments to be passed in the token endpoint request.", + "keys": { + "type": "string" + }, + "values": { + "referenceable": true, + "type": "string" + }, + "type": "map" + } + }, + { + "grant_type": { + "required": true, + "description": "The OAuth grant type to be used.", + "one_of": [ + "client_credentials", + "password" + ], + "default": "client_credentials", + "type": "string" + } + }, + { + "client_id": { + "required": false, + "description": "The client ID for the application registration in the IdP.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "client_secret": { + "required": false, + "description": "The client secret for the application registration in the IdP.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "username": { + "required": false, + "description": "The username to use if `config.oauth.grant_type` is set to `password`.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "required": false, + "description": "The password to use if `config.oauth.grant_type` is set to `password`.", + "encrypted": true, + "referenceable": true, + "type": "string" + } + }, + { + "scopes": { + "required": false, + "description": "List of scopes to request from the IdP when obtaining a new token.", + "type": "array", + "default": [ + "openid" + ], + "elements": { + "type": "string" + } + } + }, + { + "audience": { + "required": false, + "description": "List of audiences passed to the IdP when obtaining a new token.", + "type": "array", + "default": [ + + ], + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "cache": { + "required": true, + "fields": [ + { + "strategy": { + "required": true, + "description": "The method Kong should use to cache tokens issued by the IdP.", + "one_of": [ + "memory", + "redis" + ], + "default": "memory", + "type": "string" + } + }, + { + "memory": { + "required": true, + "fields": [ + { + "dictionary_name": { + "default": "kong_db_cache", + "required": true, + "description": "The shared dictionary used by the plugin to cache tokens if `config.cache.strategy` is set to `memory`.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "redis": { + "required": true, + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "default": 0, + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_nodes": { + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "host": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "cluster_nodes": { + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1, + "type": "array", + "elements": { + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "required": true, + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer" + } + } + ], + "type": "record" + } + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "default": false, + "type": "boolean" + } + }, + { + "server_name": { + "required": false, + "description": "A string representing an SNI (server name indication) value for TLS.", + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "default": 5, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "default": false, + "type": "boolean" + } + } + ], + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`" + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead" + }, + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + } + } + } + ], + "type": "record" + } + }, + { + "eagerly_expire": { + "gt": -1, + "description": "The number of seconds to eagerly expire a cached token. By default, a cached token expires 5 seconds before its lifetime as defined in `expires_in`.", + "required": true, + "default": 5, + "type": "integer" + } + }, + { + "default_ttl": { + "default": 3600, + "gt": 0, + "description": "The lifetime of a token without an explicit `expires_in` value.", + "type": "number" + } + } + ], + "type": "record" + } + }, + { + "behavior": { + "required": true, + "fields": [ + { + "upstream_access_token_header_name": { + "required": true, + "description": "The name of the header used to send the access token (obtained from the IdP) to the upstream service.", + "len_min": 0, + "default": "Authorization", + "type": "string" + } + }, + { + "idp_error_response_status_code": { + "required": true, + "description": "The response code to return to the consumer if Kong fails to obtain a token from the IdP.", + "between": [ + 500, + 599 + ], + "default": 502, + "type": "integer" + } + }, + { + "idp_error_response_content_type": { + "required": true, + "description": "The Content-Type of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "len_min": 0, + "default": "application/json; charset=utf-8", + "type": "string" + } + }, + { + "idp_error_response_message": { + "required": true, + "description": "The message to embed in the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "len_min": 0, + "default": "Failed to authenticate request to upstream", + "type": "string" + } + }, + { + "idp_error_response_body_template": { + "required": true, + "description": "The template to use to create the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "len_min": 0, + "default": "{ \"code\": \"{{status}}\", \"message\": \"{{message}}\" }", + "type": "string" + } + }, + { + "purge_token_on_upstream_status_codes": { + "type": "array", + "description": "An array of status codes which will force an access token to be purged when returned by the upstream. An empty array will disable this functionality.", + "default": [ + 401 + ], + "elements": { + "type": "integer", + "between": [ + 100, + 599 + ] + } + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "supported_partials": { + "redis-ee": [ + "config.cache.redis" + ] + } +} \ No newline at end of file diff --git a/schemas/upstream-oauth/3.12.x.json b/schemas/upstream-oauth/3.12.x.json new file mode 100644 index 00000000..580ce55b --- /dev/null +++ b/schemas/upstream-oauth/3.12.x.json @@ -0,0 +1,765 @@ +{ + "supported_partials": { + "redis-ee": [ + "config.cache.redis" + ] + }, + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "client": { + "type": "record", + "fields": [ + { + "auth_method": { + "type": "string", + "required": true, + "description": "The authentication method used in client requests to the IdP. Supported values are: `client_secret_basic` to send `client_id` and `client_secret` in the `Authorization: Basic` header, `client_secret_post` to send `client_id` and `client_secret` as part of the request body, or `client_secret_jwt` to send a JWT signed with the `client_secret` using the client assertion as part of the body.", + "default": "client_secret_post", + "one_of": [ + "client_secret_post", + "client_secret_basic", + "client_secret_jwt", + "none" + ] + } + }, + { + "client_secret_jwt_alg": { + "type": "string", + "required": true, + "description": "The algorithm to use with JWT when using `client_secret_jwt` authentication.", + "default": "HS512", + "one_of": [ + "HS512", + "HS256" + ] + } + }, + { + "http_version": { + "type": "number", + "default": 1.1, + "description": "The HTTP version used for requests made by this plugin. Supported values: `1.1` for HTTP 1.1 and `1.0` for HTTP 1.0.", + "required": false + } + }, + { + "http_proxy": { + "description": "The proxy to use when making HTTP requests to the IdP.", + "type": "string", + "required": false + } + }, + { + "http_proxy_authorization": { + "type": "string", + "description": "The `Proxy-Authorization` header value to be used with `http_proxy`.", + "required": false + } + }, + { + "https_proxy": { + "description": "The proxy to use when making HTTPS requests to the IdP.", + "type": "string", + "required": false + } + }, + { + "https_proxy_authorization": { + "type": "string", + "description": "The `Proxy-Authorization` header value to be used with `https_proxy`.", + "required": false + } + }, + { + "no_proxy": { + "type": "string", + "description": "A comma-separated list of hosts that should not be proxied.", + "required": false + } + }, + { + "timeout": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "required": true, + "description": "Network I/O timeout for requests to the IdP in milliseconds.", + "default": 10000 + } + }, + { + "keep_alive": { + "type": "boolean", + "default": true, + "description": "Whether to use keepalive connections to the IdP.", + "required": true + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "Whether to verify the certificate presented by the IdP when using HTTPS.", + "required": false + } + } + ], + "required": true + } + }, + { + "oauth": { + "type": "record", + "fields": [ + { + "token_endpoint": { + "description": "The token endpoint URI.", + "type": "string", + "required": true + } + }, + { + "token_headers": { + "type": "map", + "description": "Extra headers to be passed in the token endpoint request.", + "values": { + "type": "string", + "referenceable": true + }, + "keys": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + }, + { + "token_post_args": { + "type": "map", + "description": "Extra post arguments to be passed in the token endpoint request.", + "values": { + "type": "string", + "referenceable": true + }, + "keys": { + "type": "string" + } + } + }, + { + "grant_type": { + "type": "string", + "required": true, + "description": "The OAuth grant type to be used.", + "default": "client_credentials", + "one_of": [ + "client_credentials", + "password" + ] + } + }, + { + "client_id": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "The client ID for the application registration in the IdP." + } + }, + { + "client_secret": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "The client secret for the application registration in the IdP." + } + }, + { + "username": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "The username to use if `config.oauth.grant_type` is set to `password`." + } + }, + { + "password": { + "type": "string", + "required": false, + "encrypted": true, + "referenceable": true, + "description": "The password to use if `config.oauth.grant_type` is set to `password`." + } + }, + { + "scopes": { + "type": "array", + "required": false, + "description": "List of scopes to request from the IdP when obtaining a new token.", + "default": [ + "openid" + ], + "elements": { + "type": "string" + } + } + }, + { + "audience": { + "type": "array", + "required": false, + "description": "List of audiences passed to the IdP when obtaining a new token.", + "default": [], + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + }, + { + "cache": { + "type": "record", + "fields": [ + { + "strategy": { + "type": "string", + "required": true, + "description": "The method Kong should use to cache tokens issued by the IdP.", + "default": "memory", + "one_of": [ + "memory", + "redis" + ] + } + }, + { + "memory": { + "type": "record", + "fields": [ + { + "dictionary_name": { + "type": "string", + "default": "kong_db_cache", + "description": "The shared dictionary used by the plugin to cache tokens if `config.cache.strategy` is set to `memory`.", + "required": true + } + } + ], + "required": true + } + }, + { + "redis": { + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied" + } + }, + { + "custom_entity_check": { + "field_sources": [ + "database", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + }, + { + "custom_entity_check": { + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ], + "run_with_missing_fields": true + } + } + ], + "required": true, + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com." + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "username": { + "type": "string", + "referenceable": true, + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`." + } + }, + { + "password": { + "type": "string", + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "type": "string", + "referenceable": true, + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+." + } + }, + { + "sentinel_password": { + "type": "string", + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "type": "integer", + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy" + } + }, + { + "keepalive_pool_size": { + "type": "integer", + "default": 256, + "between": [ + 1, + 2147483646 + ], + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low." + } + }, + { + "keepalive_backlog": { + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`." + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ], + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "cluster_nodes": { + "type": "array", + "len_min": 1, + "required": false, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "type": "string", + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true + } + }, + { + "port": { + "type": "integer", + "default": 6379, + "between": [ + 0, + 65535 + ], + "description": "An integer representing a port number between 0 and 65535, inclusive." + } + } + ] + } + } + }, + { + "ssl": { + "type": "boolean", + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false + } + }, + { + "ssl_verify": { + "type": "boolean", + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false + } + }, + { + "server_name": { + "type": "string", + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "default": 5, + "type": "integer", + "required": false + } + }, + { + "connection_is_proxied": { + "type": "boolean", + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + }, + { + "cluster_addresses": { + "type": "array", + "len_min": 1, + "elements": { + "type": "string" + }, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "removal_in_version": "4.0" + } + } + } + ] + } + }, + { + "eagerly_expire": { + "type": "integer", + "required": true, + "description": "The number of seconds to eagerly expire a cached token. By default, a cached token expires 5 seconds before its lifetime as defined in `expires_in`.", + "default": 5, + "gt": -1 + } + }, + { + "default_ttl": { + "type": "number", + "default": 3600, + "gt": 0, + "description": "The lifetime of a token without an explicit `expires_in` value." + } + } + ], + "required": true + } + }, + { + "behavior": { + "type": "record", + "fields": [ + { + "upstream_access_token_header_name": { + "type": "string", + "len_min": 0, + "required": true, + "description": "The name of the header used to send the access token (obtained from the IdP) to the upstream service.", + "default": "Authorization" + } + }, + { + "idp_error_response_status_code": { + "type": "integer", + "between": [ + 500, + 599 + ], + "required": true, + "description": "The response code to return to the consumer if Kong fails to obtain a token from the IdP.", + "default": 502 + } + }, + { + "idp_error_response_content_type": { + "type": "string", + "len_min": 0, + "required": true, + "description": "The Content-Type of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "default": "application/json; charset=utf-8" + } + }, + { + "idp_error_response_message": { + "type": "string", + "len_min": 0, + "required": true, + "description": "The message to embed in the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "default": "Failed to authenticate request to upstream" + } + }, + { + "idp_error_response_body_template": { + "type": "string", + "len_min": 0, + "required": true, + "description": "The template to use to create the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "default": "{ \"code\": \"{{status}}\", \"message\": \"{{message}}\" }" + } + }, + { + "purge_token_on_upstream_status_codes": { + "type": "array", + "default": [ + 401 + ], + "description": "An array of status codes which will force an access token to be purged when returned by the upstream. An empty array will disable this functionality.", + "elements": { + "type": "integer", + "between": [ + 100, + 599 + ] + } + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/upstream-oauth/3.8.x.json b/schemas/upstream-oauth/3.8.x.json new file mode 100644 index 00000000..cb3d6cdc --- /dev/null +++ b/schemas/upstream-oauth/3.8.x.json @@ -0,0 +1,799 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "config": { + "fields": [ + { + "client": { + "fields": [ + { + "auth_method": { + "description": "The authentication method used in client requests to the IdP. Supported values are: `client_secret_basic` to send `client_id` and `client_secret` in the `Authorization: Basic` header, `client_secret_post` to send `client_id` and `client_secret` as part of the request body, or `client_secret_jwt` to send a JWT signed with the `client_secret` using the client assertion as part of the body.", + "required": true, + "one_of": [ + "client_secret_post", + "client_secret_basic", + "client_secret_jwt", + "none" + ], + "type": "string", + "default": "client_secret_post" + } + }, + { + "client_secret_jwt_alg": { + "description": "The algorithm to use with JWT when using `client_secret_jwt` authentication.", + "required": true, + "one_of": [ + "HS512", + "HS256" + ], + "type": "string", + "default": "HS512" + } + }, + { + "http_version": { + "description": "The HTTP version used for requests made by this plugin. Supported values: `1.1` for HTTP 1.1 and `1.0` for HTTP 1.0.", + "required": false, + "type": "number", + "default": 1.1 + } + }, + { + "http_proxy": { + "description": "The proxy to use when making HTTP requests to the IdP.", + "required": false, + "type": "string" + } + }, + { + "http_proxy_authorization": { + "description": "The `Proxy-Authorization` header value to be used with `http_proxy`.", + "type": "string", + "required": false + } + }, + { + "https_proxy": { + "description": "The proxy to use when making HTTPS requests to the IdP.", + "required": false, + "type": "string" + } + }, + { + "https_proxy_authorization": { + "description": "The `Proxy-Authorization` header value to be used with `https_proxy`.", + "type": "string", + "required": false + } + }, + { + "no_proxy": { + "description": "A comma-separated list of hosts that should not be proxied.", + "type": "string", + "required": false + } + }, + { + "timeout": { + "description": "Network I/O timeout for requests to the IdP in milliseconds.", + "required": true, + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "default": 10000 + } + }, + { + "keep_alive": { + "description": "Whether to use keepalive connections to the IdP.", + "type": "boolean", + "required": true, + "default": true + } + }, + { + "ssl_verify": { + "description": "Whether to verify the certificate presented by the IdP when using HTTPS.", + "type": "boolean", + "required": false, + "default": false + } + } + ], + "type": "record", + "required": true + } + }, + { + "oauth": { + "fields": [ + { + "token_endpoint": { + "description": "The token endpoint URI.", + "required": true, + "type": "string" + } + }, + { + "token_headers": { + "description": "Extra headers to be passed in the token endpoint request.", + "type": "map", + "values": { + "type": "string", + "referenceable": true + }, + "keys": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + } + }, + { + "token_post_args": { + "description": "Extra post arguments to be passed in the token endpoint request.", + "type": "map", + "values": { + "type": "string", + "referenceable": true + }, + "keys": { + "type": "string" + } + } + }, + { + "grant_type": { + "description": "The OAuth grant type to be used.", + "required": true, + "one_of": [ + "client_credentials", + "password" + ], + "type": "string", + "default": "client_credentials" + } + }, + { + "client_id": { + "description": "The client ID for the application registration in the IdP.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "client_secret": { + "description": "The client secret for the application registration in the IdP.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "username": { + "description": "The username to use if `config.oauth.grant_type` is set to `password`.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "password": { + "description": "The password to use if `config.oauth.grant_type` is set to `password`.", + "required": false, + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "scopes": { + "description": "List of scopes to request from the IdP when obtaining a new token.", + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + "openid" + ] + } + }, + { + "audience": { + "description": "List of audiences passed to the IdP when obtaining a new token.", + "required": false, + "elements": { + "type": "string" + }, + "type": "array", + "default": [ + + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "cache": { + "fields": [ + { + "strategy": { + "description": "The method Kong should use to cache tokens issued by the IdP.", + "required": true, + "one_of": [ + "memory", + "redis" + ], + "type": "string", + "default": "memory" + } + }, + { + "memory": { + "fields": [ + { + "dictionary_name": { + "description": "The shared dictionary used by the plugin to cache tokens if `config.cache.strategy` is set to `memory`.", + "type": "string", + "required": true, + "default": "kong_db_cache" + } + } + ], + "type": "record", + "required": true + } + }, + { + "redis": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ] + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "type": "string", + "referenceable": true + } + }, + { + "password": { + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "type": "string", + "referenceable": true + } + }, + { + "sentinel_password": { + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "type": "string", + "referenceable": true, + "encrypted": true + } + }, + { + "database": { + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer", + "default": 0 + } + }, + { + "keepalive_pool_size": { + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "type": "integer", + "between": [ + 1, + 2147483646 + ], + "default": 256 + } + }, + { + "keepalive_backlog": { + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "sentinel_master": { + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel.", + "type": "string" + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "host": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "required": false, + "elements": { + "fields": [ + { + "ip": { + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string", + "default": "127.0.0.1" + } + }, + { + "port": { + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "type": "integer", + "between": [ + 0, + 65535 + ], + "default": 6379 + } + } + ], + "type": "record" + }, + "type": "array", + "len_min": 1 + } + }, + { + "ssl": { + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "ssl_verify": { + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean", + "default": false + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer", + "default": 5 + } + }, + { + "connection_is_proxied": { + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean", + "default": false + } + } + ], + "entity_checks": [ + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "cluster_nodes" + ], + "set1": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + } + }, + { + "mutually_exclusive_sets": { + "set2": [ + "host", + "port" + ], + "set1": [ + "cluster_nodes" + ] + } + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_field": "connection_is_proxied", + "if_match": { + "eq": true + }, + "then_field": "host", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "type": "record", + "shorthand_fields": [ + { + "timeout": { + "type": "integer", + "translate_backwards": [ + "connect_timeout" + ], + "deprecation": { + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ], + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0" + } + } + }, + { + "sentinel_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ], + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "cluster_addresses": { + "deprecation": { + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ], + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0" + }, + "len_min": 1, + "type": "array", + "elements": { + "type": "string" + } + } + } + ], + "required": true + } + }, + { + "eagerly_expire": { + "description": "The number of seconds to eagerly expire a cached token. By default, a cached token expires 5 seconds before its lifetime as defined in `expires_in`.", + "required": true, + "type": "integer", + "gt": -1, + "default": 5 + } + }, + { + "default_ttl": { + "description": "The lifetime of a token without an explicit `expires_in` value.", + "type": "number", + "gt": 0, + "default": 3600 + } + } + ], + "type": "record", + "required": true + } + }, + { + "behavior": { + "fields": [ + { + "upstream_access_token_header_name": { + "description": "The name of the header used to send the access token (obtained from the IdP) to the upstream service.", + "len_min": 0, + "type": "string", + "required": true, + "default": "Authorization" + } + }, + { + "idp_error_response_status_code": { + "description": "The response code to return to the consumer if Kong fails to obtain a token from the IdP.", + "required": true, + "between": [ + 500, + 599 + ], + "type": "integer", + "default": 502 + } + }, + { + "idp_error_response_content_type": { + "description": "The Content-Type of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "len_min": 0, + "type": "string", + "required": true, + "default": "application/json; charset=utf-8" + } + }, + { + "idp_error_response_message": { + "description": "The message to embed in the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "len_min": 0, + "type": "string", + "required": true, + "default": "Failed to authenticate request to upstream" + } + }, + { + "idp_error_response_body_template": { + "description": "The template to use to create the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "len_min": 0, + "type": "string", + "required": true, + "default": "{ \"code\": \"{{status}}\", \"message\": \"{{message}}\" }" + } + }, + { + "purge_token_on_upstream_status_codes": { + "description": "An array of status codes which will force an access token to be purged when returned by the upstream. An empty array will disable this functionality.", + "type": "array", + "default": [ + 401 + ], + "elements": { + "between": [ + 100, + 599 + ], + "type": "integer" + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/upstream-oauth/3.9.x.json b/schemas/upstream-oauth/3.9.x.json new file mode 100644 index 00000000..484a5470 --- /dev/null +++ b/schemas/upstream-oauth/3.9.x.json @@ -0,0 +1,762 @@ +{ + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + }, + { + "custom_entity_check": { + "field_sources": [ + "config" + ] + } + } + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "config": { + "fields": [ + { + "client": { + "fields": [ + { + "auth_method": { + "required": true, + "type": "string", + "default": "client_secret_post", + "description": "The authentication method used in client requests to the IdP. Supported values are: `client_secret_basic` to send `client_id` and `client_secret` in the `Authorization: Basic` header, `client_secret_post` to send `client_id` and `client_secret` as part of the request body, or `client_secret_jwt` to send a JWT signed with the `client_secret` using the client assertion as part of the body.", + "one_of": [ + "client_secret_post", + "client_secret_basic", + "client_secret_jwt", + "none" + ] + } + }, + { + "client_secret_jwt_alg": { + "required": true, + "type": "string", + "default": "HS512", + "description": "The algorithm to use with JWT when using `client_secret_jwt` authentication.", + "one_of": [ + "HS512", + "HS256" + ] + } + }, + { + "http_version": { + "default": 1.1, + "description": "The HTTP version used for requests made by this plugin. Supported values: `1.1` for HTTP 1.1 and `1.0` for HTTP 1.0.", + "required": false, + "type": "number" + } + }, + { + "http_proxy": { + "description": "The proxy to use when making HTTP requests to the IdP.", + "required": false, + "type": "string" + } + }, + { + "http_proxy_authorization": { + "description": "The `Proxy-Authorization` header value to be used with `http_proxy`.", + "required": false, + "type": "string" + } + }, + { + "https_proxy": { + "description": "The proxy to use when making HTTPS requests to the IdP.", + "required": false, + "type": "string" + } + }, + { + "https_proxy_authorization": { + "description": "The `Proxy-Authorization` header value to be used with `https_proxy`.", + "required": false, + "type": "string" + } + }, + { + "no_proxy": { + "description": "A comma-separated list of hosts that should not be proxied.", + "required": false, + "type": "string" + } + }, + { + "timeout": { + "between": [ + 0, + 2147483646 + ], + "required": true, + "type": "integer", + "default": 10000, + "description": "Network I/O timeout for requests to the IdP in milliseconds." + } + }, + { + "keep_alive": { + "default": true, + "description": "Whether to use keepalive connections to the IdP.", + "required": true, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "Whether to verify the certificate presented by the IdP when using HTTPS.", + "required": false, + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "oauth": { + "fields": [ + { + "token_endpoint": { + "description": "The token endpoint URI.", + "required": true, + "type": "string" + } + }, + { + "token_headers": { + "values": { + "referenceable": true, + "type": "string" + }, + "description": "Extra headers to be passed in the token endpoint request.", + "keys": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "type": "map" + } + }, + { + "token_post_args": { + "values": { + "referenceable": true, + "type": "string" + }, + "description": "Extra post arguments to be passed in the token endpoint request.", + "keys": { + "type": "string" + }, + "type": "map" + } + }, + { + "grant_type": { + "required": true, + "type": "string", + "default": "client_credentials", + "description": "The OAuth grant type to be used.", + "one_of": [ + "client_credentials", + "password" + ] + } + }, + { + "client_id": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "The client ID for the application registration in the IdP.", + "required": false + } + }, + { + "client_secret": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "The client secret for the application registration in the IdP.", + "required": false + } + }, + { + "username": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "The username to use if `config.oauth.grant_type` is set to `password`.", + "required": false + } + }, + { + "password": { + "encrypted": true, + "referenceable": true, + "type": "string", + "description": "The password to use if `config.oauth.grant_type` is set to `password`.", + "required": false + } + }, + { + "scopes": { + "required": false, + "type": "array", + "default": [ + "openid" + ], + "description": "List of scopes to request from the IdP when obtaining a new token.", + "elements": { + "type": "string" + } + } + }, + { + "audience": { + "required": false, + "type": "array", + "default": [ + + ], + "description": "List of audiences passed to the IdP when obtaining a new token.", + "elements": { + "type": "string" + } + } + } + ], + "required": true, + "type": "record" + } + }, + { + "cache": { + "fields": [ + { + "strategy": { + "required": true, + "type": "string", + "default": "memory", + "description": "The method Kong should use to cache tokens issued by the IdP.", + "one_of": [ + "memory", + "redis" + ] + } + }, + { + "memory": { + "fields": [ + { + "dictionary_name": { + "default": "kong_db_cache", + "description": "The shared dictionary used by the plugin to cache tokens if `config.cache.strategy` is set to `memory`.", + "required": true, + "type": "string" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "redis": { + "required": true, + "type": "record", + "entity_checks": [ + { + "mutually_required": [ + "host", + "port" + ] + }, + { + "mutually_required": [ + "sentinel_master", + "sentinel_role", + "sentinel_nodes" + ] + }, + { + "mutually_required": [ + "connect_timeout", + "send_timeout", + "read_timeout" + ] + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "host", + "if_field": "connection_is_proxied", + "then_match": { + "required": true + } + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "database", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "cluster_nodes", + "connection_is_proxied" + ] + } + }, + { + "custom_entity_check": { + "run_with_missing_fields": true, + "field_sources": [ + "sentinel_role", + "connection_is_proxied" + ] + } + } + ], + "shorthand_fields": [ + { + "timeout": { + "deprecation": { + "message": "redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "connect_timeout" + ] + }, + { + "path": [ + "send_timeout" + ] + }, + { + "path": [ + "read_timeout" + ] + } + ] + }, + "type": "integer" + } + }, + { + "sentinel_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "sentinel_addresses is deprecated, please use sentinel_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "sentinel_nodes" + ] + } + ] + }, + "type": "array" + } + }, + { + "cluster_addresses": { + "elements": { + "type": "string" + }, + "len_min": 1, + "deprecation": { + "message": "cluster_addresses is deprecated, please use cluster_nodes instead", + "removal_in_version": "4.0", + "replaced_with": [ + { + "path": [ + "cluster_nodes" + ] + } + ] + }, + "type": "array" + } + } + ], + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + }, + { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "send_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "read_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "username": { + "description": "Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`.", + "referenceable": true, + "type": "string" + } + }, + { + "password": { + "encrypted": true, + "description": "Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_username": { + "description": "Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+.", + "referenceable": true, + "type": "string" + } + }, + { + "sentinel_password": { + "encrypted": true, + "description": "Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels.", + "referenceable": true, + "type": "string" + } + }, + { + "database": { + "default": 0, + "description": "Database to use for the Redis connection when using the `redis` strategy", + "type": "integer" + } + }, + { + "keepalive_pool_size": { + "default": 256, + "description": "The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low.", + "between": [ + 1, + 2147483646 + ], + "type": "integer" + } + }, + { + "keepalive_backlog": { + "between": [ + 0, + 2147483646 + ], + "description": "Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`.", + "type": "integer" + } + }, + { + "sentinel_master": { + "type": "string", + "description": "Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel." + } + }, + { + "sentinel_role": { + "description": "Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel.", + "type": "string", + "one_of": [ + "master", + "slave", + "any" + ] + } + }, + { + "sentinel_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "host": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "cluster_nodes": { + "required": false, + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "ip": { + "default": "127.0.0.1", + "description": "A string representing a host name, such as example.com.", + "required": true, + "type": "string" + } + }, + { + "port": { + "default": 6379, + "description": "An integer representing a port number between 0 and 65535, inclusive.", + "between": [ + 0, + 65535 + ], + "type": "integer" + } + } + ] + }, + "description": "Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.", + "len_min": 1 + } + }, + { + "ssl": { + "default": false, + "description": "If set to true, uses SSL to connect to Redis.", + "required": false, + "type": "boolean" + } + }, + { + "ssl_verify": { + "default": false, + "description": "If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or server) certificate used by your Redis server. You may also need to configure `lua_ssl_verify_depth` accordingly.", + "required": false, + "type": "boolean" + } + }, + { + "server_name": { + "description": "A string representing an SNI (server name indication) value for TLS.", + "required": false, + "type": "string" + } + }, + { + "cluster_max_redirections": { + "default": 5, + "description": "Maximum retry attempts for redirection.", + "required": false, + "type": "integer" + } + }, + { + "connection_is_proxied": { + "default": false, + "description": "If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address.", + "required": false, + "type": "boolean" + } + } + ] + } + }, + { + "eagerly_expire": { + "required": true, + "type": "integer", + "gt": -1, + "description": "The number of seconds to eagerly expire a cached token. By default, a cached token expires 5 seconds before its lifetime as defined in `expires_in`.", + "default": 5 + } + }, + { + "default_ttl": { + "default": 3600, + "description": "The lifetime of a token without an explicit `expires_in` value.", + "gt": 0, + "type": "number" + } + } + ], + "required": true, + "type": "record" + } + }, + { + "behavior": { + "fields": [ + { + "upstream_access_token_header_name": { + "required": true, + "type": "string", + "default": "Authorization", + "description": "The name of the header used to send the access token (obtained from the IdP) to the upstream service.", + "len_min": 0 + } + }, + { + "idp_error_response_status_code": { + "between": [ + 500, + 599 + ], + "required": true, + "type": "integer", + "default": 502, + "description": "The response code to return to the consumer if Kong fails to obtain a token from the IdP." + } + }, + { + "idp_error_response_content_type": { + "required": true, + "type": "string", + "default": "application/json; charset=utf-8", + "description": "The Content-Type of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "len_min": 0 + } + }, + { + "idp_error_response_message": { + "required": true, + "type": "string", + "default": "Failed to authenticate request to upstream", + "description": "The message to embed in the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "len_min": 0 + } + }, + { + "idp_error_response_body_template": { + "required": true, + "type": "string", + "default": "{ \"code\": \"{{status}}\", \"message\": \"{{message}}\" }", + "description": "The template to use to create the body of the response to return to the consumer if Kong fails to obtain a token from the IdP.", + "len_min": 0 + } + }, + { + "purge_token_on_upstream_status_codes": { + "default": [ + 401 + ], + "description": "An array of status codes which will force an access token to be purged when returned by the upstream. An empty array will disable this functionality.", + "elements": { + "between": [ + 100, + 599 + ], + "type": "integer" + }, + "type": "array" + } + } + ], + "required": true, + "type": "record" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/upstream-timeout/3.10.x.json b/schemas/upstream-timeout/3.10.x.json new file mode 100644 index 00000000..2a5dd3f9 --- /dev/null +++ b/schemas/upstream-timeout/3.10.x.json @@ -0,0 +1,75 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/upstream-timeout/3.11.x.json b/schemas/upstream-timeout/3.11.x.json new file mode 100644 index 00000000..51304947 --- /dev/null +++ b/schemas/upstream-timeout/3.11.x.json @@ -0,0 +1,75 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 1 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 1 and 2^31-2.", + "type": "integer" + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 1 and 2^31-2.", + "type": "integer" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/upstream-timeout/3.12.x.json b/schemas/upstream-timeout/3.12.x.json new file mode 100644 index 00000000..467cb067 --- /dev/null +++ b/schemas/upstream-timeout/3.12.x.json @@ -0,0 +1,73 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 1 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 1 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 1 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/upstream-timeout/3.4.x.json b/schemas/upstream-timeout/3.4.x.json index c28d97dd..bc2d498d 100644 --- a/schemas/upstream-timeout/3.4.x.json +++ b/schemas/upstream-timeout/3.4.x.json @@ -8,22 +8,30 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "read_timeout": { @@ -31,7 +39,8 @@ 0, 2147483646 ], - "type": "integer" + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." } }, { @@ -40,7 +49,8 @@ 0, 2147483646 ], - "type": "integer" + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." } }, { @@ -49,12 +59,17 @@ 0, 2147483646 ], - "type": "integer" + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/upstream-timeout/3.5.x.json b/schemas/upstream-timeout/3.5.x.json new file mode 100644 index 00000000..9ea12fdd --- /dev/null +++ b/schemas/upstream-timeout/3.5.x.json @@ -0,0 +1,75 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/upstream-timeout/3.6.x.json b/schemas/upstream-timeout/3.6.x.json new file mode 100644 index 00000000..35b0cf93 --- /dev/null +++ b/schemas/upstream-timeout/3.6.x.json @@ -0,0 +1,75 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "read_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "send_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "connect_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/upstream-timeout/3.7.x.json b/schemas/upstream-timeout/3.7.x.json new file mode 100644 index 00000000..5db2c5aa --- /dev/null +++ b/schemas/upstream-timeout/3.7.x.json @@ -0,0 +1,75 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "read_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "send_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "connect_timeout": { + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/upstream-timeout/3.8.x.json b/schemas/upstream-timeout/3.8.x.json new file mode 100644 index 00000000..279be9a0 --- /dev/null +++ b/schemas/upstream-timeout/3.8.x.json @@ -0,0 +1,75 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/upstream-timeout/3.9.x.json b/schemas/upstream-timeout/3.9.x.json new file mode 100644 index 00000000..d14b02ad --- /dev/null +++ b/schemas/upstream-timeout/3.9.x.json @@ -0,0 +1,75 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/vault-auth/3.10.x.json b/schemas/vault-auth/3.10.x.json new file mode 100644 index 00000000..7046dcf0 --- /dev/null +++ b/schemas/vault-auth/3.10.x.json @@ -0,0 +1,112 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "consumer": { + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "access_token_name": { + "type": "string", + "description": "Describes an array of comma-separated parameter names where the plugin looks for an access token. The client must send the access token in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "default": "access_token", + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "required": true + } + }, + { + "secret_token_name": { + "type": "string", + "description": "Describes an array of comma-separated parameter names where the plugin looks for a secret token. The client must send the secret in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "default": "secret_token", + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "required": true + } + }, + { + "vault": { + "description": "A reference to an existing `vault` object within the database. `vault` entities define the connection and authentication parameters used to connect to a Vault HTTP(S) API.", + "reference": "vault_auth_vaults", + "type": "foreign", + "required": true + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the header or querystring containing the key) before proxying it.", + "default": false, + "type": "boolean" + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "tokens_in_body": { + "description": "If enabled, the plugin will read the request body (if said request has one and its MIME type is supported) and try to find the key in it. Supported MIME types are `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "default": false, + "type": "boolean" + } + }, + { + "run_on_preflight": { + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "default": true, + "type": "boolean" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/vault-auth/3.11.x.json b/schemas/vault-auth/3.11.x.json new file mode 100644 index 00000000..7304eaa7 --- /dev/null +++ b/schemas/vault-auth/3.11.x.json @@ -0,0 +1,112 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "consumer": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumers", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "access_token_name": { + "required": true, + "description": "Describes an array of comma-separated parameter names where the plugin looks for an access token. The client must send the access token in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "type": "string", + "default": "access_token", + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + } + }, + { + "secret_token_name": { + "required": true, + "description": "Describes an array of comma-separated parameter names where the plugin looks for a secret token. The client must send the secret in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "type": "string", + "default": "secret_token", + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + } + } + }, + { + "vault": { + "required": true, + "reference": "vault_auth_vaults", + "description": "A reference to an existing `vault` object within the database. `vault` entities define the connection and authentication parameters used to connect to a Vault HTTP(S) API.", + "type": "foreign" + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the header or querystring containing the key) before proxying it.", + "default": false, + "type": "boolean" + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "tokens_in_body": { + "description": "If enabled, the plugin will read the request body (if said request has one and its MIME type is supported) and try to find the key in it. Supported MIME types are `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "default": false, + "type": "boolean" + } + }, + { + "run_on_preflight": { + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "default": true, + "type": "boolean" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/vault-auth/3.12.x.json b/schemas/vault-auth/3.12.x.json new file mode 100644 index 00000000..77f79725 --- /dev/null +++ b/schemas/vault-auth/3.12.x.json @@ -0,0 +1,110 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer": { + "type": "foreign", + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "access_token_name": { + "type": "string", + "required": true, + "description": "Describes an array of comma-separated parameter names where the plugin looks for an access token. The client must send the access token in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "default": "access_token", + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + }, + { + "secret_token_name": { + "type": "string", + "required": true, + "description": "Describes an array of comma-separated parameter names where the plugin looks for a secret token. The client must send the secret in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "default": "secret_token", + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + }, + { + "vault": { + "type": "foreign", + "reference": "vault_auth_vaults", + "description": "A reference to an existing `vault` object within the database. `vault` entities define the connection and authentication parameters used to connect to a Vault HTTP(S) API.", + "required": true + } + }, + { + "hide_credentials": { + "type": "boolean", + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the header or querystring containing the key) before proxying it." + } + }, + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "tokens_in_body": { + "type": "boolean", + "default": false, + "description": "If enabled, the plugin will read the request body (if said request has one and its MIME type is supported) and try to find the key in it. Supported MIME types are `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`." + } + }, + { + "run_on_preflight": { + "type": "boolean", + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed." + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/vault-auth/3.4.x.json b/schemas/vault-auth/3.4.x.json index 188b14b5..04c2f822 100644 --- a/schemas/vault-auth/3.4.x.json +++ b/schemas/vault-auth/3.4.x.json @@ -8,53 +8,67 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing HTTP protocols.", + "type": "set", "elements": { + "type": "string", "one_of": [ "grpc", "grpcs", "http", "https" - ], - "type": "string" - }, - "required": true, - "type": "set" + ] + } } }, { - "consumer": { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", "eq": null, + "type": "foreign" + } + }, + { + "consumer": { "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "access_token_name": { "default": "access_token", - "elements": { - "type": "string" - }, + "description": "Describes an array of comma-separated parameter names where the plugin looks for an access token. The client must send the access token in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "type": "string", "required": true, - "type": "string" + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + } } }, { "secret_token_name": { "default": "secret_token", - "elements": { - "type": "string" - }, + "description": "Describes an array of comma-separated parameter names where the plugin looks for a secret token. The client must send the secret in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "type": "string", "required": true, - "type": "string" + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + } } }, { "vault": { "type": "foreign", + "description": "A reference to an existing `vault` object within the database. `vault` entities define the connection and authentication parameters used to connect to a Vault HTTP(S) API.", "reference": "vault_auth_vaults", "required": true } @@ -62,29 +76,37 @@ { "hide_credentials": { "default": false, - "type": "boolean" + "type": "boolean", + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the header or querystring containing the key) before proxying it." } }, { "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", "type": "string" } }, { "tokens_in_body": { "default": false, - "type": "boolean" + "type": "boolean", + "description": "If enabled, the plugin will read the request body (if said request has one and its MIME type is supported) and try to find the key in it. Supported MIME types are `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`." } }, { "run_on_preflight": { "default": true, - "type": "boolean" + "type": "boolean", + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed." } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/vault-auth/3.5.x.json b/schemas/vault-auth/3.5.x.json new file mode 100644 index 00000000..d2be4a55 --- /dev/null +++ b/schemas/vault-auth/3.5.x.json @@ -0,0 +1,112 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer": { + "type": "foreign", + "eq": null, + "reference": "consumers", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "access_token_name": { + "type": "string", + "required": true, + "default": "access_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for an access token. The client must send the access token in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + }, + { + "secret_token_name": { + "type": "string", + "required": true, + "default": "secret_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for a secret token. The client must send the secret in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + }, + { + "vault": { + "description": "A reference to an existing `vault` object within the database. `vault` entities define the connection and authentication parameters used to connect to a Vault HTTP(S) API.", + "type": "foreign", + "reference": "vault_auth_vaults", + "required": true + } + }, + { + "hide_credentials": { + "default": false, + "type": "boolean", + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the header or querystring containing the key) before proxying it." + } + }, + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "tokens_in_body": { + "default": false, + "type": "boolean", + "description": "If enabled, the plugin will read the request body (if said request has one and its MIME type is supported) and try to find the key in it. Supported MIME types are `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`." + } + }, + { + "run_on_preflight": { + "default": true, + "type": "boolean", + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed." + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/vault-auth/3.6.x.json b/schemas/vault-auth/3.6.x.json new file mode 100644 index 00000000..b5926a25 --- /dev/null +++ b/schemas/vault-auth/3.6.x.json @@ -0,0 +1,112 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "access_token_name": { + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "type": "string", + "default": "access_token", + "required": true, + "description": "Describes an array of comma-separated parameter names where the plugin looks for an access token. The client must send the access token in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-]." + } + }, + { + "secret_token_name": { + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "type": "string", + "default": "secret_token", + "required": true, + "description": "Describes an array of comma-separated parameter names where the plugin looks for a secret token. The client must send the secret in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-]." + } + }, + { + "vault": { + "reference": "vault_auth_vaults", + "type": "foreign", + "description": "A reference to an existing `vault` object within the database. `vault` entities define the connection and authentication parameters used to connect to a Vault HTTP(S) API.", + "required": true + } + }, + { + "hide_credentials": { + "type": "boolean", + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the header or querystring containing the key) before proxying it.", + "default": false + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "tokens_in_body": { + "type": "boolean", + "description": "If enabled, the plugin will read the request body (if said request has one and its MIME type is supported) and try to find the key in it. Supported MIME types are `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "default": false + } + }, + { + "run_on_preflight": { + "type": "boolean", + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "default": true + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/vault-auth/3.7.x.json b/schemas/vault-auth/3.7.x.json new file mode 100644 index 00000000..515b0d93 --- /dev/null +++ b/schemas/vault-auth/3.7.x.json @@ -0,0 +1,112 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "consumer": { + "reference": "consumers", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "access_token_name": { + "description": "Describes an array of comma-separated parameter names where the plugin looks for an access token. The client must send the access token in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "required": true, + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "type": "string", + "default": "access_token" + } + }, + { + "secret_token_name": { + "description": "Describes an array of comma-separated parameter names where the plugin looks for a secret token. The client must send the secret in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "required": true, + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + }, + "type": "string", + "default": "secret_token" + } + }, + { + "vault": { + "required": true, + "type": "foreign", + "description": "A reference to an existing `vault` object within the database. `vault` entities define the connection and authentication parameters used to connect to a Vault HTTP(S) API.", + "reference": "vault_auth_vaults" + } + }, + { + "hide_credentials": { + "type": "boolean", + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the header or querystring containing the key) before proxying it.", + "default": false + } + }, + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "tokens_in_body": { + "type": "boolean", + "description": "If enabled, the plugin will read the request body (if said request has one and its MIME type is supported) and try to find the key in it. Supported MIME types are `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "default": false + } + }, + { + "run_on_preflight": { + "type": "boolean", + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "default": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/vault-auth/3.8.x.json b/schemas/vault-auth/3.8.x.json new file mode 100644 index 00000000..9fc64449 --- /dev/null +++ b/schemas/vault-auth/3.8.x.json @@ -0,0 +1,112 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "access_token_name": { + "description": "Describes an array of comma-separated parameter names where the plugin looks for an access token. The client must send the access token in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "required": true, + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "type": "string", + "default": "access_token" + } + }, + { + "secret_token_name": { + "description": "Describes an array of comma-separated parameter names where the plugin looks for a secret token. The client must send the secret in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "required": true, + "elements": { + "description": "A string representing an HTTP header name.", + "type": "string" + }, + "type": "string", + "default": "secret_token" + } + }, + { + "vault": { + "reference": "vault_auth_vaults", + "type": "foreign", + "description": "A reference to an existing `vault` object within the database. `vault` entities define the connection and authentication parameters used to connect to a Vault HTTP(S) API.", + "required": true + } + }, + { + "hide_credentials": { + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the header or querystring containing the key) before proxying it.", + "type": "boolean", + "default": false + } + }, + { + "anonymous": { + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`.", + "type": "string" + } + }, + { + "tokens_in_body": { + "description": "If enabled, the plugin will read the request body (if said request has one and its MIME type is supported) and try to find the key in it. Supported MIME types are `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean", + "default": false + } + }, + { + "run_on_preflight": { + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean", + "default": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/vault-auth/3.9.x.json b/schemas/vault-auth/3.9.x.json new file mode 100644 index 00000000..d42bfd70 --- /dev/null +++ b/schemas/vault-auth/3.9.x.json @@ -0,0 +1,112 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "consumer": { + "reference": "consumers", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "access_token_name": { + "required": true, + "type": "string", + "default": "access_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for an access token. The client must send the access token in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + }, + { + "secret_token_name": { + "required": true, + "type": "string", + "default": "secret_token", + "description": "Describes an array of comma-separated parameter names where the plugin looks for a secret token. The client must send the secret in one of those key names, and the plugin will try to read the credential from a header or the querystring parameter with the same name. The key names can only contain [a-z], [A-Z], [0-9], [_], and [-].", + "elements": { + "type": "string", + "description": "A string representing an HTTP header name." + } + } + }, + { + "vault": { + "description": "A reference to an existing `vault` object within the database. `vault` entities define the connection and authentication parameters used to connect to a Vault HTTP(S) API.", + "reference": "vault_auth_vaults", + "required": true, + "type": "foreign" + } + }, + { + "hide_credentials": { + "default": false, + "description": "An optional boolean value telling the plugin to show or hide the credential from the upstream service. If `true`, the plugin will strip the credential from the request (i.e. the header or querystring containing the key) before proxying it.", + "type": "boolean" + } + }, + { + "anonymous": { + "type": "string", + "description": "An optional string (consumer UUID or username) value to use as an “anonymous” consumer if authentication fails. If empty (default null), the request fails with an authentication failure `4xx`. Note that this value must refer to the consumer `id` or `username` attribute, and **not** its `custom_id`." + } + }, + { + "tokens_in_body": { + "default": false, + "description": "If enabled, the plugin will read the request body (if said request has one and its MIME type is supported) and try to find the key in it. Supported MIME types are `application/www-form-urlencoded`, `application/json`, and `multipart/form-data`.", + "type": "boolean" + } + }, + { + "run_on_preflight": { + "default": true, + "description": "A boolean value that indicates whether the plugin should run (and try to authenticate) on `OPTIONS` preflight requests. If set to `false`, then `OPTIONS` requests will always be allowed.", + "type": "boolean" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/websocket-size-limit/3.10.x.json b/schemas/websocket-size-limit/3.10.x.json new file mode 100644 index 00000000..adf519e3 --- /dev/null +++ b/schemas/websocket-size-limit/3.10.x.json @@ -0,0 +1,68 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "ws", + "wss" + ], + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "client_max_payload", + "upstream_max_payload" + ] + } + ], + "type": "record", + "fields": [ + { + "client_max_payload": { + "between": [ + 1, + 33554432 + ], + "type": "integer", + "required": false + } + }, + { + "upstream_max_payload": { + "between": [ + 1, + 33554432 + ], + "type": "integer", + "required": false + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/websocket-size-limit/3.11.x.json b/schemas/websocket-size-limit/3.11.x.json new file mode 100644 index 00000000..95cc7f92 --- /dev/null +++ b/schemas/websocket-size-limit/3.11.x.json @@ -0,0 +1,68 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "ws", + "wss" + ], + "elements": { + "one_of": [ + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "entity_checks": [ + { + "at_least_one_of": [ + "client_max_payload", + "upstream_max_payload" + ] + } + ], + "fields": [ + { + "client_max_payload": { + "between": [ + 1, + 33554432 + ], + "required": false, + "type": "integer" + } + }, + { + "upstream_max_payload": { + "between": [ + 1, + 33554432 + ], + "required": false, + "type": "integer" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/websocket-size-limit/3.12.x.json b/schemas/websocket-size-limit/3.12.x.json new file mode 100644 index 00000000..c705f10c --- /dev/null +++ b/schemas/websocket-size-limit/3.12.x.json @@ -0,0 +1,66 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "default": [ + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "ws", + "wss" + ] + }, + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "client_max_payload": { + "type": "integer", + "between": [ + 1, + 33554432 + ], + "required": false + } + }, + { + "upstream_max_payload": { + "type": "integer", + "between": [ + 1, + 33554432 + ], + "required": false + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "client_max_payload", + "upstream_max_payload" + ] + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/websocket-size-limit/3.4.x.json b/schemas/websocket-size-limit/3.4.x.json index e77a8035..47ad20fa 100644 --- a/schemas/websocket-size-limit/3.4.x.json +++ b/schemas/websocket-size-limit/3.4.x.json @@ -6,6 +6,7 @@ "ws", "wss" ], + "type": "set", "elements": { "one_of": [ "ws", @@ -13,45 +14,55 @@ ], "type": "string" }, - "required": true, - "type": "set" + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." } }, { "config": { - "required": true, - "entity_checks": [ - { - "at_least_one_of": [ - "client_max_payload", - "upstream_max_payload" - ] - } - ], "fields": [ { "client_max_payload": { + "type": "integer", + "required": false, "between": [ 1, 33554432 - ], - "required": false, - "type": "integer" + ] } }, { "upstream_max_payload": { + "type": "integer", + "required": false, "between": [ 1, 33554432 - ], - "required": false, - "type": "integer" + ] } } ], - "type": "record" + "type": "record", + "required": true, + "entity_checks": [ + { + "at_least_one_of": [ + "client_max_payload", + "upstream_max_payload" + ] + } + ] } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/websocket-size-limit/3.5.x.json b/schemas/websocket-size-limit/3.5.x.json new file mode 100644 index 00000000..8108ed2f --- /dev/null +++ b/schemas/websocket-size-limit/3.5.x.json @@ -0,0 +1,68 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "elements": { + "type": "string", + "one_of": [ + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "ws", + "wss" + ] + } + }, + { + "consumer_group": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumer_groups" + } + }, + { + "config": { + "fields": [ + { + "client_max_payload": { + "required": false, + "type": "integer", + "between": [ + 1, + 33554432 + ] + } + }, + { + "upstream_max_payload": { + "required": false, + "type": "integer", + "between": [ + 1, + 33554432 + ] + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "client_max_payload", + "upstream_max_payload" + ] + } + ], + "type": "record", + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/websocket-size-limit/3.6.x.json b/schemas/websocket-size-limit/3.6.x.json new file mode 100644 index 00000000..0b2e8a8d --- /dev/null +++ b/schemas/websocket-size-limit/3.6.x.json @@ -0,0 +1,68 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "eq": null, + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "client_max_payload": { + "required": false, + "type": "integer", + "between": [ + 1, + 33554432 + ] + } + }, + { + "upstream_max_payload": { + "required": false, + "type": "integer", + "between": [ + 1, + 33554432 + ] + } + } + ], + "type": "record", + "entity_checks": [ + { + "at_least_one_of": [ + "client_max_payload", + "upstream_max_payload" + ] + } + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/websocket-size-limit/3.7.x.json b/schemas/websocket-size-limit/3.7.x.json new file mode 100644 index 00000000..e6aaf3fc --- /dev/null +++ b/schemas/websocket-size-limit/3.7.x.json @@ -0,0 +1,68 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "elements": { + "type": "string", + "one_of": [ + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "ws", + "wss" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "client_max_payload": { + "required": false, + "type": "integer", + "between": [ + 1, + 33554432 + ] + } + }, + { + "upstream_max_payload": { + "required": false, + "type": "integer", + "between": [ + 1, + 33554432 + ] + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "client_max_payload", + "upstream_max_payload" + ] + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/websocket-size-limit/3.8.x.json b/schemas/websocket-size-limit/3.8.x.json new file mode 100644 index 00000000..fab7b3bc --- /dev/null +++ b/schemas/websocket-size-limit/3.8.x.json @@ -0,0 +1,68 @@ +{ + "fields": [ + { + "protocols": { + "default": [ + "ws", + "wss" + ], + "required": true, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "client_max_payload": { + "type": "integer", + "between": [ + 1, + 33554432 + ], + "required": false + } + }, + { + "upstream_max_payload": { + "type": "integer", + "between": [ + 1, + 33554432 + ], + "required": false + } + } + ], + "type": "record", + "entity_checks": [ + { + "at_least_one_of": [ + "client_max_payload", + "upstream_max_payload" + ] + } + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/websocket-size-limit/3.9.x.json b/schemas/websocket-size-limit/3.9.x.json new file mode 100644 index 00000000..6e1e3593 --- /dev/null +++ b/schemas/websocket-size-limit/3.9.x.json @@ -0,0 +1,68 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "default": [ + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "ws", + "wss" + ] + }, + "required": true, + "type": "set" + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "client_max_payload", + "upstream_max_payload" + ] + } + ], + "fields": [ + { + "client_max_payload": { + "between": [ + 1, + 33554432 + ], + "required": false, + "type": "integer" + } + }, + { + "upstream_max_payload": { + "between": [ + 1, + 33554432 + ], + "required": false, + "type": "integer" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/websocket-validator/3.10.x.json b/schemas/websocket-validator/3.10.x.json new file mode 100644 index 00000000..6d173fdb --- /dev/null +++ b/schemas/websocket-validator/3.10.x.json @@ -0,0 +1,220 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "ws", + "wss" + ], + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "client", + "upstream" + ] + } + ], + "type": "record", + "fields": [ + { + "client": { + "entity_checks": [ + { + "at_least_one_of": [ + "text", + "binary" + ] + } + ], + "type": "record", + "required": false, + "fields": [ + { + "text": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "type": "record", + "required": false, + "fields": [ + { + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string", + "one_of": [ + "draft4" + ], + "required": true + } + }, + { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string", + "required": true + } + } + ] + } + }, + { + "binary": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "type": "record", + "required": false, + "fields": [ + { + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string", + "one_of": [ + "draft4" + ], + "required": true + } + }, + { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string", + "required": true + } + } + ] + } + } + ] + } + }, + { + "upstream": { + "entity_checks": [ + { + "at_least_one_of": [ + "text", + "binary" + ] + } + ], + "type": "record", + "required": false, + "fields": [ + { + "text": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "type": "record", + "required": false, + "fields": [ + { + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string", + "one_of": [ + "draft4" + ], + "required": true + } + }, + { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string", + "required": true + } + } + ] + } + }, + { + "binary": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "type": "record", + "required": false, + "fields": [ + { + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string", + "one_of": [ + "draft4" + ], + "required": true + } + }, + { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string", + "required": true + } + } + ] + } + } + ] + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/websocket-validator/3.11.x.json b/schemas/websocket-validator/3.11.x.json new file mode 100644 index 00000000..7e2617ca --- /dev/null +++ b/schemas/websocket-validator/3.11.x.json @@ -0,0 +1,220 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "ws", + "wss" + ], + "elements": { + "one_of": [ + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "entity_checks": [ + { + "at_least_one_of": [ + "client", + "upstream" + ] + } + ], + "fields": [ + { + "client": { + "entity_checks": [ + { + "at_least_one_of": [ + "text", + "binary" + ] + } + ], + "required": false, + "fields": [ + { + "text": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "required": false, + "fields": [ + { + "type": { + "one_of": [ + "draft4" + ], + "required": true, + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string" + } + }, + { + "schema": { + "required": true, + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "binary": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "required": false, + "fields": [ + { + "type": { + "one_of": [ + "draft4" + ], + "required": true, + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string" + } + }, + { + "schema": { + "required": true, + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + }, + { + "upstream": { + "entity_checks": [ + { + "at_least_one_of": [ + "text", + "binary" + ] + } + ], + "required": false, + "fields": [ + { + "text": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "required": false, + "fields": [ + { + "type": { + "one_of": [ + "draft4" + ], + "required": true, + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string" + } + }, + { + "schema": { + "required": true, + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + } + } + ], + "type": "record" + } + }, + { + "binary": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "required": false, + "fields": [ + { + "type": { + "one_of": [ + "draft4" + ], + "required": true, + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string" + } + }, + { + "schema": { + "required": true, + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/websocket-validator/3.12.x.json b/schemas/websocket-validator/3.12.x.json new file mode 100644 index 00000000..0146f851 --- /dev/null +++ b/schemas/websocket-validator/3.12.x.json @@ -0,0 +1,218 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "default": [ + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "ws", + "wss" + ] + }, + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "client": { + "type": "record", + "fields": [ + { + "text": { + "type": "record", + "fields": [ + { + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string", + "one_of": [ + "draft4" + ], + "required": true + } + }, + { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "required": false + } + }, + { + "binary": { + "type": "record", + "fields": [ + { + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string", + "one_of": [ + "draft4" + ], + "required": true + } + }, + { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "required": false + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "text", + "binary" + ] + } + ], + "required": false + } + }, + { + "upstream": { + "type": "record", + "fields": [ + { + "text": { + "type": "record", + "fields": [ + { + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string", + "one_of": [ + "draft4" + ], + "required": true + } + }, + { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "required": false + } + }, + { + "binary": { + "type": "record", + "fields": [ + { + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string", + "one_of": [ + "draft4" + ], + "required": true + } + }, + { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string", + "required": true + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "required": false + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "text", + "binary" + ] + } + ], + "required": false + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "client", + "upstream" + ] + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/websocket-validator/3.4.x.json b/schemas/websocket-validator/3.4.x.json index 5df13fb2..19ec51fd 100644 --- a/schemas/websocket-validator/3.4.x.json +++ b/schemas/websocket-validator/3.4.x.json @@ -6,6 +6,7 @@ "ws", "wss" ], + "type": "set", "elements": { "one_of": [ "ws", @@ -13,70 +14,48 @@ ], "type": "string" }, - "required": true, - "type": "set" + "required": true + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." } }, { "config": { - "required": true, - "entity_checks": [ - { - "at_least_one_of": [ - "client", - "upstream" - ] - } - ], "fields": [ { "client": { + "required": false, "type": "record", - "entity_checks": [ - { - "at_least_one_of": [ - "text", - "binary" - ] - } - ], "fields": [ { "text": { + "required": false, "type": "record", - "entity_checks": [ - { - "custom_entity_check": { - "field_sources": [ - "type", - "schema" - ] - } - } - ], "fields": [ { "type": { - "type": "string", - "required": true, "one_of": [ "draft4" - ] + ], + "type": "string", + "required": true, + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported." } }, { "schema": { + "type": "string", "required": true, - "type": "string" + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`." } } ], - "required": false - } - }, - { - "binary": { - "type": "record", "entity_checks": [ { "custom_entity_check": { @@ -86,34 +65,45 @@ ] } } - ], + ] + } + }, + { + "binary": { + "required": false, + "type": "record", "fields": [ { "type": { - "type": "string", - "required": true, "one_of": [ "draft4" - ] + ], + "type": "string", + "required": true, + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported." } }, { "schema": { + "type": "string", "required": true, - "type": "string" + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`." } } ], - "required": false + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ] } } ], - "required": false - } - }, - { - "upstream": { - "type": "record", "entity_checks": [ { "at_least_one_of": [ @@ -121,44 +111,37 @@ "binary" ] } - ], + ] + } + }, + { + "upstream": { + "required": false, + "type": "record", "fields": [ { "text": { + "required": false, "type": "record", - "entity_checks": [ - { - "custom_entity_check": { - "field_sources": [ - "type", - "schema" - ] - } - } - ], "fields": [ { "type": { - "type": "string", - "required": true, "one_of": [ "draft4" - ] + ], + "type": "string", + "required": true, + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported." } }, { "schema": { + "type": "string", "required": true, - "type": "string" + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`." } } ], - "required": false - } - }, - { - "binary": { - "type": "record", "entity_checks": [ { "custom_entity_check": { @@ -168,34 +151,70 @@ ] } } - ], + ] + } + }, + { + "binary": { + "required": false, + "type": "record", "fields": [ { "type": { - "type": "string", - "required": true, "one_of": [ "draft4" - ] + ], + "type": "string", + "required": true, + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported." } }, { "schema": { + "type": "string", "required": true, - "type": "string" + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`." } } ], - "required": false + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ] } } ], - "required": false + "entity_checks": [ + { + "at_least_one_of": [ + "text", + "binary" + ] + } + ] } } ], - "type": "record" + "type": "record", + "required": true, + "entity_checks": [ + { + "at_least_one_of": [ + "client", + "upstream" + ] + } + ] } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/websocket-validator/3.5.x.json b/schemas/websocket-validator/3.5.x.json new file mode 100644 index 00000000..1643e60c --- /dev/null +++ b/schemas/websocket-validator/3.5.x.json @@ -0,0 +1,220 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "elements": { + "type": "string", + "one_of": [ + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "ws", + "wss" + ] + } + }, + { + "consumer_group": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumer_groups" + } + }, + { + "config": { + "fields": [ + { + "client": { + "required": false, + "fields": [ + { + "text": { + "required": false, + "fields": [ + { + "type": { + "required": true, + "type": "string", + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "required": true, + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + } + } + ], + "type": "record", + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ] + } + }, + { + "binary": { + "required": false, + "fields": [ + { + "type": { + "required": true, + "type": "string", + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "required": true, + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + } + } + ], + "type": "record", + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ] + } + } + ], + "type": "record", + "entity_checks": [ + { + "at_least_one_of": [ + "text", + "binary" + ] + } + ] + } + }, + { + "upstream": { + "required": false, + "fields": [ + { + "text": { + "required": false, + "fields": [ + { + "type": { + "required": true, + "type": "string", + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "required": true, + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + } + } + ], + "type": "record", + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ] + } + }, + { + "binary": { + "required": false, + "fields": [ + { + "type": { + "required": true, + "type": "string", + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "required": true, + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + } + } + ], + "type": "record", + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ] + } + } + ], + "type": "record", + "entity_checks": [ + { + "at_least_one_of": [ + "text", + "binary" + ] + } + ] + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "client", + "upstream" + ] + } + ], + "type": "record", + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/websocket-validator/3.6.x.json b/schemas/websocket-validator/3.6.x.json new file mode 100644 index 00000000..3ba38643 --- /dev/null +++ b/schemas/websocket-validator/3.6.x.json @@ -0,0 +1,220 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "eq": null, + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "client": { + "required": false, + "type": "record", + "fields": [ + { + "text": { + "required": false, + "type": "record", + "fields": [ + { + "type": { + "required": true, + "type": "string", + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "required": true, + "type": "string", + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`." + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ] + } + }, + { + "binary": { + "required": false, + "type": "record", + "fields": [ + { + "type": { + "required": true, + "type": "string", + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "required": true, + "type": "string", + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`." + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ] + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "text", + "binary" + ] + } + ] + } + }, + { + "upstream": { + "required": false, + "type": "record", + "fields": [ + { + "text": { + "required": false, + "type": "record", + "fields": [ + { + "type": { + "required": true, + "type": "string", + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "required": true, + "type": "string", + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`." + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ] + } + }, + { + "binary": { + "required": false, + "type": "record", + "fields": [ + { + "type": { + "required": true, + "type": "string", + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "required": true, + "type": "string", + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`." + } + } + ], + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ] + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "text", + "binary" + ] + } + ] + } + } + ], + "type": "record", + "entity_checks": [ + { + "at_least_one_of": [ + "client", + "upstream" + ] + } + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/websocket-validator/3.7.x.json b/schemas/websocket-validator/3.7.x.json new file mode 100644 index 00000000..635cffa7 --- /dev/null +++ b/schemas/websocket-validator/3.7.x.json @@ -0,0 +1,220 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "elements": { + "type": "string", + "one_of": [ + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "ws", + "wss" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "client": { + "required": false, + "entity_checks": [ + { + "at_least_one_of": [ + "text", + "binary" + ] + } + ], + "type": "record", + "fields": [ + { + "text": { + "required": false, + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "type": "record", + "fields": [ + { + "type": { + "required": true, + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string", + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "required": true, + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + } + } + ] + } + }, + { + "binary": { + "required": false, + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "type": "record", + "fields": [ + { + "type": { + "required": true, + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string", + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "required": true, + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + } + } + ] + } + } + ] + } + }, + { + "upstream": { + "required": false, + "entity_checks": [ + { + "at_least_one_of": [ + "text", + "binary" + ] + } + ], + "type": "record", + "fields": [ + { + "text": { + "required": false, + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "type": "record", + "fields": [ + { + "type": { + "required": true, + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string", + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "required": true, + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + } + } + ] + } + }, + { + "binary": { + "required": false, + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "type": "record", + "fields": [ + { + "type": { + "required": true, + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string", + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "required": true, + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string" + } + } + ] + } + } + ] + } + } + ], + "entity_checks": [ + { + "at_least_one_of": [ + "client", + "upstream" + ] + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/websocket-validator/3.8.x.json b/schemas/websocket-validator/3.8.x.json new file mode 100644 index 00000000..6fb55087 --- /dev/null +++ b/schemas/websocket-validator/3.8.x.json @@ -0,0 +1,220 @@ +{ + "fields": [ + { + "protocols": { + "default": [ + "ws", + "wss" + ], + "required": true, + "type": "set", + "elements": { + "type": "string", + "one_of": [ + "ws", + "wss" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "client": { + "fields": [ + { + "text": { + "fields": [ + { + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string", + "required": true, + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string", + "required": true + } + } + ], + "required": false, + "type": "record", + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ] + } + }, + { + "binary": { + "fields": [ + { + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string", + "required": true, + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string", + "required": true + } + } + ], + "required": false, + "type": "record", + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ] + } + } + ], + "required": false, + "type": "record", + "entity_checks": [ + { + "at_least_one_of": [ + "text", + "binary" + ] + } + ] + } + }, + { + "upstream": { + "fields": [ + { + "text": { + "fields": [ + { + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string", + "required": true, + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string", + "required": true + } + } + ], + "required": false, + "type": "record", + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ] + } + }, + { + "binary": { + "fields": [ + { + "type": { + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "type": "string", + "required": true, + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "type": "string", + "required": true + } + } + ], + "required": false, + "type": "record", + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ] + } + } + ], + "required": false, + "type": "record", + "entity_checks": [ + { + "at_least_one_of": [ + "text", + "binary" + ] + } + ] + } + } + ], + "type": "record", + "entity_checks": [ + { + "at_least_one_of": [ + "client", + "upstream" + ] + } + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/websocket-validator/3.9.x.json b/schemas/websocket-validator/3.9.x.json new file mode 100644 index 00000000..4bbf094d --- /dev/null +++ b/schemas/websocket-validator/3.9.x.json @@ -0,0 +1,220 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "default": [ + "ws", + "wss" + ], + "elements": { + "type": "string", + "one_of": [ + "ws", + "wss" + ] + }, + "required": true, + "type": "set" + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "at_least_one_of": [ + "client", + "upstream" + ] + } + ], + "fields": [ + { + "client": { + "entity_checks": [ + { + "at_least_one_of": [ + "text", + "binary" + ] + } + ], + "type": "record", + "required": false, + "fields": [ + { + "text": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "type": "record", + "required": false, + "fields": [ + { + "type": { + "type": "string", + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "required": true, + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "required": true, + "type": "string" + } + } + ] + } + }, + { + "binary": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "type": "record", + "required": false, + "fields": [ + { + "type": { + "type": "string", + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "required": true, + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "required": true, + "type": "string" + } + } + ] + } + } + ] + } + }, + { + "upstream": { + "entity_checks": [ + { + "at_least_one_of": [ + "text", + "binary" + ] + } + ], + "type": "record", + "required": false, + "fields": [ + { + "text": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "type": "record", + "required": false, + "fields": [ + { + "type": { + "type": "string", + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "required": true, + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "required": true, + "type": "string" + } + } + ] + } + }, + { + "binary": { + "entity_checks": [ + { + "custom_entity_check": { + "field_sources": [ + "type", + "schema" + ] + } + } + ], + "type": "record", + "required": false, + "fields": [ + { + "type": { + "type": "string", + "description": "The corresponding validation library for `config.upstream.binary.schema`. Currently, only `draft4` is supported.", + "required": true, + "one_of": [ + "draft4" + ] + } + }, + { + "schema": { + "description": "Schema used to validate upstream-originated binary frames. The semantics of this field depend on the validation type set by `config.upstream.binary.type`.", + "required": true, + "type": "string" + } + } + ] + } + } + ] + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/xml-threat-protection/3.10.x.json b/schemas/xml-threat-protection/3.10.x.json new file mode 100644 index 00000000..da4fddce --- /dev/null +++ b/schemas/xml-threat-protection/3.10.x.json @@ -0,0 +1,300 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "entity_checks": [ + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "max_namespaces", + "if_field": "namespace_aware", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "prefix", + "if_field": "namespace_aware", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "namespaceuri", + "if_field": "namespace_aware", + "then_match": { + "required": true + } + } + } + ], + "type": "record", + "fields": [ + { + "checked_content_types": { + "type": "set", + "description": "A list of Content-Type values with payloads that must be validated.", + "default": [ + "application/xml" + ], + "elements": { + "type": "string", + "match": "^[^%s]+%/[^ ;]+$", + "required": true + }, + "required": true + } + }, + { + "allowed_content_types": { + "type": "set", + "description": "A list of Content-Type values with payloads that are allowed, but aren't validated.", + "default": [ + + ], + "elements": { + "type": "string", + "match": "^[^%s]+%/[^ ;]+$", + "required": true + }, + "required": true + } + }, + { + "allow_dtd": { + "description": "Indicates whether an XML Document Type Definition (DTD) section is allowed.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "namespace_aware": { + "description": "If not parsing namespace aware, all prefixes and namespace attributes will be counted as regular attributes and element names, and validated as such.", + "default": true, + "type": "boolean", + "required": true + } + }, + { + "max_depth": { + "gt": 0, + "type": "integer", + "description": "Maximum depth of tags. Child elements such as Text or Comments are not counted as another level.", + "default": 50, + "required": true + } + }, + { + "max_children": { + "gt": 0, + "type": "integer", + "description": "Maximum number of children allowed (Element, Text, Comment, ProcessingInstruction, CDATASection). Note: Adjacent text and CDATA sections are counted as one. For example, text-cdata-text-cdata is one child.", + "default": 100, + "required": true + } + }, + { + "max_attributes": { + "gt": 0, + "type": "integer", + "description": "Maximum number of attributes allowed on a tag, including default ones. Note: If namespace-aware parsing is disabled, then the namespaces definitions are counted as attributes.", + "default": 100, + "required": true + } + }, + { + "max_namespaces": { + "gt": 0, + "type": "integer", + "description": "Maximum number of namespaces defined on a tag. This value is required if parsing is namespace-aware.", + "default": 20, + "required": false + } + }, + { + "document": { + "gt": 0, + "type": "integer", + "description": "Maximum size of the entire document.", + "default": 10485760, + "required": true + } + }, + { + "buffer": { + "gt": 0, + "type": "integer", + "description": "Maximum size of the unparsed buffer (see below).", + "default": 1048576, + "required": true + } + }, + { + "comment": { + "gt": 0, + "type": "integer", + "description": "Maximum size of comments.", + "default": 1024, + "required": true + } + }, + { + "localname": { + "gt": 0, + "type": "integer", + "description": "Maximum size of the localname. This applies to tags and attributes.", + "default": 1024, + "required": true + } + }, + { + "prefix": { + "gt": 0, + "type": "integer", + "description": "Maximum size of the prefix. This applies to tags and attributes. This value is required if parsing is namespace-aware.", + "default": 1024, + "required": false + } + }, + { + "namespaceuri": { + "gt": 0, + "type": "integer", + "description": "Maximum size of the namespace URI. This value is required if parsing is namespace-aware.", + "default": 1024, + "required": false + } + }, + { + "attribute": { + "gt": 0, + "type": "integer", + "description": "Maximum size of the attribute value.", + "default": 1048576, + "required": true + } + }, + { + "text": { + "gt": 0, + "type": "integer", + "description": "Maximum text inside tags (counted over all adjacent text/CDATA elements combined).", + "default": 1048576, + "required": true + } + }, + { + "pitarget": { + "gt": 0, + "type": "integer", + "description": "Maximum size of processing instruction targets.", + "default": 1024, + "required": true + } + }, + { + "pidata": { + "gt": 0, + "type": "integer", + "description": "Maximum size of processing instruction data.", + "default": 1024, + "required": true + } + }, + { + "entityname": { + "gt": 0, + "type": "integer", + "description": "Maximum size of entity names in EntityDecl.", + "default": 1024, + "required": true + } + }, + { + "entity": { + "gt": 0, + "type": "integer", + "description": "Maximum size of entity values in EntityDecl.", + "default": 1024, + "required": true + } + }, + { + "entityproperty": { + "gt": 0, + "type": "integer", + "description": "Maximum size of systemId, publicId, or notationName in EntityDecl.", + "default": 1024, + "required": true + } + }, + { + "bla_max_amplification": { + "gt": 1, + "type": "number", + "description": "Sets the maximum allowed amplification. This protects against the Billion Laughs Attack.", + "default": 100, + "required": true + } + }, + { + "bla_threshold": { + "gt": 1024, + "type": "integer", + "description": "Sets the threshold after which the protection starts. This protects against the Billion Laughs Attack.", + "default": 8388608, + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/xml-threat-protection/3.11.x.json b/schemas/xml-threat-protection/3.11.x.json new file mode 100644 index 00000000..cb1db395 --- /dev/null +++ b/schemas/xml-threat-protection/3.11.x.json @@ -0,0 +1,300 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing HTTP protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "entity_checks": [ + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "max_namespaces", + "if_field": "namespace_aware", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "prefix", + "if_field": "namespace_aware", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "namespaceuri", + "if_field": "namespace_aware", + "then_match": { + "required": true + } + } + } + ], + "fields": [ + { + "checked_content_types": { + "required": true, + "description": "A list of Content-Type values with payloads that must be validated.", + "type": "set", + "default": [ + "application/xml" + ], + "elements": { + "match": "^[^%s]+%/[^ ;]+$", + "required": true, + "type": "string" + } + } + }, + { + "allowed_content_types": { + "required": true, + "description": "A list of Content-Type values with payloads that are allowed, but aren't validated.", + "type": "set", + "default": [ + + ], + "elements": { + "match": "^[^%s]+%/[^ ;]+$", + "required": true, + "type": "string" + } + } + }, + { + "allow_dtd": { + "default": false, + "required": true, + "description": "Indicates whether an XML Document Type Definition (DTD) section is allowed.", + "type": "boolean" + } + }, + { + "namespace_aware": { + "default": true, + "required": true, + "description": "If not parsing namespace aware, all prefixes and namespace attributes will be counted as regular attributes and element names, and validated as such.", + "type": "boolean" + } + }, + { + "max_depth": { + "required": true, + "description": "Maximum depth of tags. Child elements such as Text or Comments are not counted as another level.", + "gt": 0, + "default": 50, + "type": "integer" + } + }, + { + "max_children": { + "required": true, + "description": "Maximum number of children allowed (Element, Text, Comment, ProcessingInstruction, CDATASection). Note: Adjacent text and CDATA sections are counted as one. For example, text-cdata-text-cdata is one child.", + "gt": 0, + "default": 100, + "type": "integer" + } + }, + { + "max_attributes": { + "required": true, + "description": "Maximum number of attributes allowed on a tag, including default ones. Note: If namespace-aware parsing is disabled, then the namespaces definitions are counted as attributes.", + "gt": 0, + "default": 100, + "type": "integer" + } + }, + { + "max_namespaces": { + "required": false, + "description": "Maximum number of namespaces defined on a tag. This value is required if parsing is namespace-aware.", + "gt": 0, + "default": 20, + "type": "integer" + } + }, + { + "document": { + "required": true, + "description": "Maximum size of the entire document.", + "gt": 0, + "default": 10485760, + "type": "integer" + } + }, + { + "buffer": { + "required": true, + "description": "Maximum size of the unparsed buffer (see below).", + "gt": 0, + "default": 1048576, + "type": "integer" + } + }, + { + "comment": { + "required": true, + "description": "Maximum size of comments.", + "gt": 0, + "default": 1024, + "type": "integer" + } + }, + { + "localname": { + "required": true, + "description": "Maximum size of the localname. This applies to tags and attributes.", + "gt": 0, + "default": 1024, + "type": "integer" + } + }, + { + "prefix": { + "required": false, + "description": "Maximum size of the prefix. This applies to tags and attributes. This value is required if parsing is namespace-aware.", + "gt": 0, + "default": 1024, + "type": "integer" + } + }, + { + "namespaceuri": { + "required": false, + "description": "Maximum size of the namespace URI. This value is required if parsing is namespace-aware.", + "gt": 0, + "default": 1024, + "type": "integer" + } + }, + { + "attribute": { + "required": true, + "description": "Maximum size of the attribute value.", + "gt": 0, + "default": 1048576, + "type": "integer" + } + }, + { + "text": { + "required": true, + "description": "Maximum text inside tags (counted over all adjacent text/CDATA elements combined).", + "gt": 0, + "default": 1048576, + "type": "integer" + } + }, + { + "pitarget": { + "required": true, + "description": "Maximum size of processing instruction targets.", + "gt": 0, + "default": 1024, + "type": "integer" + } + }, + { + "pidata": { + "required": true, + "description": "Maximum size of processing instruction data.", + "gt": 0, + "default": 1024, + "type": "integer" + } + }, + { + "entityname": { + "required": true, + "description": "Maximum size of entity names in EntityDecl.", + "gt": 0, + "default": 1024, + "type": "integer" + } + }, + { + "entity": { + "required": true, + "description": "Maximum size of entity values in EntityDecl.", + "gt": 0, + "default": 1024, + "type": "integer" + } + }, + { + "entityproperty": { + "required": true, + "description": "Maximum size of systemId, publicId, or notationName in EntityDecl.", + "gt": 0, + "default": 1024, + "type": "integer" + } + }, + { + "bla_max_amplification": { + "required": true, + "description": "Sets the maximum allowed amplification. This protects against the Billion Laughs Attack.", + "gt": 1, + "default": 100, + "type": "number" + } + }, + { + "bla_threshold": { + "required": true, + "description": "Sets the threshold after which the protection starts. This protects against the Billion Laughs Attack.", + "gt": 1024, + "default": 8388608, + "type": "integer" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/xml-threat-protection/3.12.x.json b/schemas/xml-threat-protection/3.12.x.json new file mode 100644 index 00000000..44381b55 --- /dev/null +++ b/schemas/xml-threat-protection/3.12.x.json @@ -0,0 +1,296 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "checked_content_types": { + "type": "set", + "required": true, + "description": "A list of Content-Type values with payloads that must be validated.", + "default": [ + "application/xml" + ], + "elements": { + "type": "string", + "match": "^[^%s]+%/[^ ;]+$", + "required": true + } + } + }, + { + "allowed_content_types": { + "type": "set", + "required": true, + "description": "A list of Content-Type values with payloads that are allowed, but aren't validated.", + "default": [], + "elements": { + "type": "string", + "match": "^[^%s]+%/[^ ;]+$", + "required": true + } + } + }, + { + "allow_dtd": { + "description": "Indicates whether an XML Document Type Definition (DTD) section is allowed.", + "default": false, + "type": "boolean", + "required": true + } + }, + { + "namespace_aware": { + "description": "If not parsing namespace aware, all prefixes and namespace attributes will be counted as regular attributes and element names, and validated as such.", + "default": true, + "type": "boolean", + "required": true + } + }, + { + "max_depth": { + "type": "integer", + "required": true, + "description": "Maximum depth of tags. Child elements such as Text or Comments are not counted as another level.", + "default": 50, + "gt": 0 + } + }, + { + "max_children": { + "type": "integer", + "required": true, + "description": "Maximum number of children allowed (Element, Text, Comment, ProcessingInstruction, CDATASection). Note: Adjacent text and CDATA sections are counted as one. For example, text-cdata-text-cdata is one child.", + "default": 100, + "gt": 0 + } + }, + { + "max_attributes": { + "type": "integer", + "required": true, + "description": "Maximum number of attributes allowed on a tag, including default ones. Note: If namespace-aware parsing is disabled, then the namespaces definitions are counted as attributes.", + "default": 100, + "gt": 0 + } + }, + { + "max_namespaces": { + "type": "integer", + "required": false, + "description": "Maximum number of namespaces defined on a tag. This value is required if parsing is namespace-aware.", + "default": 20, + "gt": 0 + } + }, + { + "document": { + "type": "integer", + "required": true, + "description": "Maximum size of the entire document.", + "default": 10485760, + "gt": 0 + } + }, + { + "buffer": { + "type": "integer", + "required": true, + "description": "Maximum size of the unparsed buffer (see below).", + "default": 1048576, + "gt": 0 + } + }, + { + "comment": { + "type": "integer", + "required": true, + "description": "Maximum size of comments.", + "default": 1024, + "gt": 0 + } + }, + { + "localname": { + "type": "integer", + "required": true, + "description": "Maximum size of the localname. This applies to tags and attributes.", + "default": 1024, + "gt": 0 + } + }, + { + "prefix": { + "type": "integer", + "required": false, + "description": "Maximum size of the prefix. This applies to tags and attributes. This value is required if parsing is namespace-aware.", + "default": 1024, + "gt": 0 + } + }, + { + "namespaceuri": { + "type": "integer", + "required": false, + "description": "Maximum size of the namespace URI. This value is required if parsing is namespace-aware.", + "default": 1024, + "gt": 0 + } + }, + { + "attribute": { + "type": "integer", + "required": true, + "description": "Maximum size of the attribute value.", + "default": 1048576, + "gt": 0 + } + }, + { + "text": { + "type": "integer", + "required": true, + "description": "Maximum text inside tags (counted over all adjacent text/CDATA elements combined).", + "default": 1048576, + "gt": 0 + } + }, + { + "pitarget": { + "type": "integer", + "required": true, + "description": "Maximum size of processing instruction targets.", + "default": 1024, + "gt": 0 + } + }, + { + "pidata": { + "type": "integer", + "required": true, + "description": "Maximum size of processing instruction data.", + "default": 1024, + "gt": 0 + } + }, + { + "entityname": { + "type": "integer", + "required": true, + "description": "Maximum size of entity names in EntityDecl.", + "default": 1024, + "gt": 0 + } + }, + { + "entity": { + "type": "integer", + "required": true, + "description": "Maximum size of entity values in EntityDecl.", + "default": 1024, + "gt": 0 + } + }, + { + "entityproperty": { + "type": "integer", + "required": true, + "description": "Maximum size of systemId, publicId, or notationName in EntityDecl.", + "default": 1024, + "gt": 0 + } + }, + { + "bla_max_amplification": { + "type": "number", + "required": true, + "description": "Sets the maximum allowed amplification. This protects against the Billion Laughs Attack.", + "default": 100, + "gt": 1 + } + }, + { + "bla_threshold": { + "type": "integer", + "required": true, + "description": "Sets the threshold after which the protection starts. This protects against the Billion Laughs Attack.", + "default": 8388608, + "gt": 1024 + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "max_namespaces", + "if_field": "namespace_aware" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "prefix", + "if_field": "namespace_aware" + } + }, + { + "conditional": { + "then_match": { + "required": true + }, + "if_match": { + "eq": true + }, + "then_field": "namespaceuri", + "if_field": "namespace_aware" + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/xml-threat-protection/3.4.x.json b/schemas/xml-threat-protection/3.4.x.json index d052e082..0ac63044 100644 --- a/schemas/xml-threat-protection/3.4.x.json +++ b/schemas/xml-threat-protection/3.4.x.json @@ -2,6 +2,8 @@ "fields": [ { "protocols": { + "type": "set", + "required": true, "default": [ "grpc", "grpcs", @@ -17,91 +19,63 @@ ], "type": "string" }, - "required": true, - "type": "set" + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." } }, { "config": { - "required": true, - "entity_checks": [ - { - "conditional": { - "if_match": { - "eq": true - }, - "then_field": "max_namespaces", - "if_field": "namespace_aware", - "then_match": { - "required": true - } - } - }, - { - "conditional": { - "if_match": { - "eq": true - }, - "then_field": "prefix", - "if_field": "namespace_aware", - "then_match": { - "required": true - } - } - }, - { - "conditional": { - "if_match": { - "eq": true - }, - "then_field": "namespaceuri", - "if_field": "namespace_aware", - "then_match": { - "required": true - } - } - } - ], "fields": [ { "checked_content_types": { + "type": "set", + "required": true, "default": [ "application/xml" ], + "description": "A list of Content-Type values with payloads that must be validated.", "elements": { - "match": "^[^%s]+%/[^ ;]+$", "type": "string", - "required": true - }, - "type": "set", - "required": true + "required": true, + "match": "^[^%s]+%/[^ ;]+$" + } } }, { "allowed_content_types": { + "type": "set", + "required": true, "default": [ ], + "description": "A list of Content-Type values with payloads that are allowed, but aren't validated.", "elements": { - "match": "^[^%s]+%/[^ ;]+$", "type": "string", - "required": true - }, - "type": "set", - "required": true + "required": true, + "match": "^[^%s]+%/[^ ;]+$" + } } }, { "allow_dtd": { - "default": false, "required": true, + "default": false, + "description": "Indicates whether an XML Document Type Definition (DTD) section is allowed.", "type": "boolean" } }, { "namespace_aware": { - "default": true, "required": true, + "default": true, + "description": "If not parsing namespace aware, all prefixes and namespace attributes will be counted as regular attributes and element names, and validated as such.", "type": "boolean" } }, @@ -110,7 +84,8 @@ "type": "integer", "required": true, "gt": 0, - "default": 50 + "default": 50, + "description": "Maximum depth of tags. Child elements such as Text or Comments are not counted as another level." } }, { @@ -118,7 +93,8 @@ "type": "integer", "required": true, "gt": 0, - "default": 100 + "default": 100, + "description": "Maximum number of children allowed (Element, Text, Comment, ProcessingInstruction, CDATASection). Note: Adjacent text and CDATA sections are counted as one. For example, text-cdata-text-cdata is one child." } }, { @@ -126,7 +102,8 @@ "type": "integer", "required": true, "gt": 0, - "default": 100 + "default": 100, + "description": "Maximum number of attributes allowed on a tag, including default ones. Note: If namespace-aware parsing is disabled, then the namespaces definitions are counted as attributes." } }, { @@ -134,7 +111,8 @@ "type": "integer", "required": false, "gt": 0, - "default": 20 + "default": 20, + "description": "Maximum number of namespaces defined on a tag. This value is required if parsing is namespace-aware." } }, { @@ -142,7 +120,8 @@ "type": "integer", "required": true, "gt": 0, - "default": 10485760 + "default": 10485760, + "description": "Maximum size of the entire document." } }, { @@ -150,7 +129,8 @@ "type": "integer", "required": true, "gt": 0, - "default": 1048576 + "default": 1048576, + "description": "Maximum size of the unparsed buffer (see below)." } }, { @@ -158,7 +138,8 @@ "type": "integer", "required": true, "gt": 0, - "default": 1024 + "default": 1024, + "description": "Maximum size of comments." } }, { @@ -166,7 +147,8 @@ "type": "integer", "required": true, "gt": 0, - "default": 1024 + "default": 1024, + "description": "Maximum size of the localname. This applies to tags and attributes." } }, { @@ -174,7 +156,8 @@ "type": "integer", "required": false, "gt": 0, - "default": 1024 + "default": 1024, + "description": "Maximum size of the prefix. This applies to tags and attributes. This value is required if parsing is namespace-aware." } }, { @@ -182,7 +165,8 @@ "type": "integer", "required": false, "gt": 0, - "default": 1024 + "default": 1024, + "description": "Maximum size of the namespace URI. This value is required if parsing is namespace-aware." } }, { @@ -190,7 +174,8 @@ "type": "integer", "required": true, "gt": 0, - "default": 1048576 + "default": 1048576, + "description": "Maximum size of the attribute value." } }, { @@ -198,7 +183,8 @@ "type": "integer", "required": true, "gt": 0, - "default": 1048576 + "default": 1048576, + "description": "Maximum text inside tags (counted over all adjacent text/CDATA elements combined)." } }, { @@ -206,7 +192,8 @@ "type": "integer", "required": true, "gt": 0, - "default": 1024 + "default": 1024, + "description": "Maximum size of processing instruction targets." } }, { @@ -214,7 +201,8 @@ "type": "integer", "required": true, "gt": 0, - "default": 1024 + "default": 1024, + "description": "Maximum size of processing instruction data." } }, { @@ -222,7 +210,8 @@ "type": "integer", "required": true, "gt": 0, - "default": 1024 + "default": 1024, + "description": "Maximum size of entity names in EntityDecl." } }, { @@ -230,7 +219,8 @@ "type": "integer", "required": true, "gt": 0, - "default": 1024 + "default": 1024, + "description": "Maximum size of entity values in EntityDecl." } }, { @@ -238,7 +228,8 @@ "type": "integer", "required": true, "gt": 0, - "default": 1024 + "default": 1024, + "description": "Maximum size of systemId, publicId, or notationName in EntityDecl." } }, { @@ -246,20 +237,64 @@ "type": "number", "required": true, "gt": 1, - "default": 100 + "default": 100, + "description": "Sets the maximum allowed amplification. This protects against the Billion Laughs Attack." } }, { "bla_threshold": { - "required": true, "type": "integer", + "required": true, "gt": 1024, - "default": 8388608 + "default": 8388608, + "description": "Sets the threshold after which the protection starts. This protects against the Billion Laughs Attack." } } ], - "type": "record" + "type": "record", + "required": true, + "entity_checks": [ + { + "conditional": { + "then_field": "max_namespaces", + "if_field": "namespace_aware", + "then_match": { + "required": true + }, + "if_match": { + "eq": true + } + } + }, + { + "conditional": { + "then_field": "prefix", + "if_field": "namespace_aware", + "then_match": { + "required": true + }, + "if_match": { + "eq": true + } + } + }, + { + "conditional": { + "then_field": "namespaceuri", + "if_field": "namespace_aware", + "then_match": { + "required": true + }, + "if_match": { + "eq": true + } + } + } + ] } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/xml-threat-protection/3.5.x.json b/schemas/xml-threat-protection/3.5.x.json new file mode 100644 index 00000000..29f6f914 --- /dev/null +++ b/schemas/xml-threat-protection/3.5.x.json @@ -0,0 +1,300 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed.", + "reference": "consumer_groups" + } + }, + { + "config": { + "fields": [ + { + "checked_content_types": { + "required": true, + "type": "set", + "default": [ + "application/xml" + ], + "elements": { + "required": true, + "type": "string", + "match": "^[^%s]+%/[^ ;]+$" + }, + "description": "A list of Content-Type values with payloads that must be validated." + } + }, + { + "allowed_content_types": { + "required": true, + "type": "set", + "default": [ + + ], + "elements": { + "required": true, + "type": "string", + "match": "^[^%s]+%/[^ ;]+$" + }, + "description": "A list of Content-Type values with payloads that are allowed, but aren't validated." + } + }, + { + "allow_dtd": { + "required": true, + "type": "boolean", + "description": "Indicates whether an XML Document Type Definition (DTD) section is allowed.", + "default": false + } + }, + { + "namespace_aware": { + "required": true, + "type": "boolean", + "description": "If not parsing namespace aware, all prefixes and namespace attributes will be counted as regular attributes and element names, and validated as such.", + "default": true + } + }, + { + "max_depth": { + "required": true, + "type": "integer", + "default": 50, + "description": "Maximum depth of tags. Child elements such as Text or Comments are not counted as another level.", + "gt": 0 + } + }, + { + "max_children": { + "required": true, + "type": "integer", + "default": 100, + "description": "Maximum number of children allowed (Element, Text, Comment, ProcessingInstruction, CDATASection). Note: Adjacent text and CDATA sections are counted as one. For example, text-cdata-text-cdata is one child.", + "gt": 0 + } + }, + { + "max_attributes": { + "required": true, + "type": "integer", + "default": 100, + "description": "Maximum number of attributes allowed on a tag, including default ones. Note: If namespace-aware parsing is disabled, then the namespaces definitions are counted as attributes.", + "gt": 0 + } + }, + { + "max_namespaces": { + "required": false, + "type": "integer", + "default": 20, + "description": "Maximum number of namespaces defined on a tag. This value is required if parsing is namespace-aware.", + "gt": 0 + } + }, + { + "document": { + "required": true, + "type": "integer", + "default": 10485760, + "description": "Maximum size of the entire document.", + "gt": 0 + } + }, + { + "buffer": { + "required": true, + "type": "integer", + "default": 1048576, + "description": "Maximum size of the unparsed buffer (see below).", + "gt": 0 + } + }, + { + "comment": { + "required": true, + "type": "integer", + "default": 1024, + "description": "Maximum size of comments.", + "gt": 0 + } + }, + { + "localname": { + "required": true, + "type": "integer", + "default": 1024, + "description": "Maximum size of the localname. This applies to tags and attributes.", + "gt": 0 + } + }, + { + "prefix": { + "required": false, + "type": "integer", + "default": 1024, + "description": "Maximum size of the prefix. This applies to tags and attributes. This value is required if parsing is namespace-aware.", + "gt": 0 + } + }, + { + "namespaceuri": { + "required": false, + "type": "integer", + "default": 1024, + "description": "Maximum size of the namespace URI. This value is required if parsing is namespace-aware.", + "gt": 0 + } + }, + { + "attribute": { + "required": true, + "type": "integer", + "default": 1048576, + "description": "Maximum size of the attribute value.", + "gt": 0 + } + }, + { + "text": { + "required": true, + "type": "integer", + "default": 1048576, + "description": "Maximum text inside tags (counted over all adjacent text/CDATA elements combined).", + "gt": 0 + } + }, + { + "pitarget": { + "required": true, + "type": "integer", + "default": 1024, + "description": "Maximum size of processing instruction targets.", + "gt": 0 + } + }, + { + "pidata": { + "required": true, + "type": "integer", + "default": 1024, + "description": "Maximum size of processing instruction data.", + "gt": 0 + } + }, + { + "entityname": { + "required": true, + "type": "integer", + "default": 1024, + "description": "Maximum size of entity names in EntityDecl.", + "gt": 0 + } + }, + { + "entity": { + "required": true, + "type": "integer", + "default": 1024, + "description": "Maximum size of entity values in EntityDecl.", + "gt": 0 + } + }, + { + "entityproperty": { + "required": true, + "type": "integer", + "default": 1024, + "description": "Maximum size of systemId, publicId, or notationName in EntityDecl.", + "gt": 0 + } + }, + { + "bla_max_amplification": { + "required": true, + "type": "number", + "default": 100, + "description": "Sets the maximum allowed amplification. This protects against the Billion Laughs Attack.", + "gt": 1 + } + }, + { + "bla_threshold": { + "required": true, + "type": "integer", + "default": 8388608, + "description": "Sets the threshold after which the protection starts. This protects against the Billion Laughs Attack.", + "gt": 1024 + } + } + ], + "entity_checks": [ + { + "conditional": { + "then_field": "max_namespaces", + "if_field": "namespace_aware", + "then_match": { + "required": true + }, + "if_match": { + "eq": true + } + } + }, + { + "conditional": { + "then_field": "prefix", + "if_field": "namespace_aware", + "then_match": { + "required": true + }, + "if_match": { + "eq": true + } + } + }, + { + "conditional": { + "then_field": "namespaceuri", + "if_field": "namespace_aware", + "then_match": { + "required": true + }, + "if_match": { + "eq": true + } + } + } + ], + "type": "record", + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/xml-threat-protection/3.6.x.json b/schemas/xml-threat-protection/3.6.x.json new file mode 100644 index 00000000..2d2d1f7c --- /dev/null +++ b/schemas/xml-threat-protection/3.6.x.json @@ -0,0 +1,300 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "description": "A set of strings representing HTTP protocols." + } + }, + { + "consumer_group": { + "eq": null, + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "checked_content_types": { + "required": true, + "default": [ + "application/xml" + ], + "elements": { + "required": true, + "type": "string", + "match": "^[^%s]+%/[^ ;]+$" + }, + "type": "set", + "description": "A list of Content-Type values with payloads that must be validated." + } + }, + { + "allowed_content_types": { + "required": true, + "default": [ + + ], + "elements": { + "required": true, + "type": "string", + "match": "^[^%s]+%/[^ ;]+$" + }, + "type": "set", + "description": "A list of Content-Type values with payloads that are allowed, but aren't validated." + } + }, + { + "allow_dtd": { + "required": true, + "type": "boolean", + "default": false, + "description": "Indicates whether an XML Document Type Definition (DTD) section is allowed." + } + }, + { + "namespace_aware": { + "required": true, + "type": "boolean", + "default": true, + "description": "If not parsing namespace aware, all prefixes and namespace attributes will be counted as regular attributes and element names, and validated as such." + } + }, + { + "max_depth": { + "required": true, + "default": 50, + "gt": 0, + "type": "integer", + "description": "Maximum depth of tags. Child elements such as Text or Comments are not counted as another level." + } + }, + { + "max_children": { + "required": true, + "default": 100, + "gt": 0, + "type": "integer", + "description": "Maximum number of children allowed (Element, Text, Comment, ProcessingInstruction, CDATASection). Note: Adjacent text and CDATA sections are counted as one. For example, text-cdata-text-cdata is one child." + } + }, + { + "max_attributes": { + "required": true, + "default": 100, + "gt": 0, + "type": "integer", + "description": "Maximum number of attributes allowed on a tag, including default ones. Note: If namespace-aware parsing is disabled, then the namespaces definitions are counted as attributes." + } + }, + { + "max_namespaces": { + "required": false, + "default": 20, + "gt": 0, + "type": "integer", + "description": "Maximum number of namespaces defined on a tag. This value is required if parsing is namespace-aware." + } + }, + { + "document": { + "required": true, + "default": 10485760, + "gt": 0, + "type": "integer", + "description": "Maximum size of the entire document." + } + }, + { + "buffer": { + "required": true, + "default": 1048576, + "gt": 0, + "type": "integer", + "description": "Maximum size of the unparsed buffer (see below)." + } + }, + { + "comment": { + "required": true, + "default": 1024, + "gt": 0, + "type": "integer", + "description": "Maximum size of comments." + } + }, + { + "localname": { + "required": true, + "default": 1024, + "gt": 0, + "type": "integer", + "description": "Maximum size of the localname. This applies to tags and attributes." + } + }, + { + "prefix": { + "required": false, + "default": 1024, + "gt": 0, + "type": "integer", + "description": "Maximum size of the prefix. This applies to tags and attributes. This value is required if parsing is namespace-aware." + } + }, + { + "namespaceuri": { + "required": false, + "default": 1024, + "gt": 0, + "type": "integer", + "description": "Maximum size of the namespace URI. This value is required if parsing is namespace-aware." + } + }, + { + "attribute": { + "required": true, + "default": 1048576, + "gt": 0, + "type": "integer", + "description": "Maximum size of the attribute value." + } + }, + { + "text": { + "required": true, + "default": 1048576, + "gt": 0, + "type": "integer", + "description": "Maximum text inside tags (counted over all adjacent text/CDATA elements combined)." + } + }, + { + "pitarget": { + "required": true, + "default": 1024, + "gt": 0, + "type": "integer", + "description": "Maximum size of processing instruction targets." + } + }, + { + "pidata": { + "required": true, + "default": 1024, + "gt": 0, + "type": "integer", + "description": "Maximum size of processing instruction data." + } + }, + { + "entityname": { + "required": true, + "default": 1024, + "gt": 0, + "type": "integer", + "description": "Maximum size of entity names in EntityDecl." + } + }, + { + "entity": { + "required": true, + "default": 1024, + "gt": 0, + "type": "integer", + "description": "Maximum size of entity values in EntityDecl." + } + }, + { + "entityproperty": { + "required": true, + "default": 1024, + "gt": 0, + "type": "integer", + "description": "Maximum size of systemId, publicId, or notationName in EntityDecl." + } + }, + { + "bla_max_amplification": { + "required": true, + "default": 100, + "gt": 1, + "type": "number", + "description": "Sets the maximum allowed amplification. This protects against the Billion Laughs Attack." + } + }, + { + "bla_threshold": { + "required": true, + "default": 8388608, + "gt": 1024, + "type": "integer", + "description": "Sets the threshold after which the protection starts. This protects against the Billion Laughs Attack." + } + } + ], + "type": "record", + "entity_checks": [ + { + "conditional": { + "then_field": "max_namespaces", + "if_match": { + "eq": true + }, + "then_match": { + "required": true + }, + "if_field": "namespace_aware" + } + }, + { + "conditional": { + "then_field": "prefix", + "if_match": { + "eq": true + }, + "then_match": { + "required": true + }, + "if_field": "namespace_aware" + } + }, + { + "conditional": { + "then_field": "namespaceuri", + "if_match": { + "eq": true + }, + "then_match": { + "required": true + }, + "if_field": "namespace_aware" + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/xml-threat-protection/3.7.x.json b/schemas/xml-threat-protection/3.7.x.json new file mode 100644 index 00000000..56b5cdf3 --- /dev/null +++ b/schemas/xml-threat-protection/3.7.x.json @@ -0,0 +1,300 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "description": "A set of strings representing HTTP protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "checked_content_types": { + "type": "set", + "required": true, + "elements": { + "required": true, + "type": "string", + "match": "^[^%s]+%/[^ ;]+$" + }, + "description": "A list of Content-Type values with payloads that must be validated.", + "default": [ + "application/xml" + ] + } + }, + { + "allowed_content_types": { + "type": "set", + "required": true, + "elements": { + "required": true, + "type": "string", + "match": "^[^%s]+%/[^ ;]+$" + }, + "description": "A list of Content-Type values with payloads that are allowed, but aren't validated.", + "default": [ + + ] + } + }, + { + "allow_dtd": { + "required": true, + "description": "Indicates whether an XML Document Type Definition (DTD) section is allowed.", + "type": "boolean", + "default": false + } + }, + { + "namespace_aware": { + "required": true, + "description": "If not parsing namespace aware, all prefixes and namespace attributes will be counted as regular attributes and element names, and validated as such.", + "type": "boolean", + "default": true + } + }, + { + "max_depth": { + "gt": 0, + "required": true, + "type": "integer", + "description": "Maximum depth of tags. Child elements such as Text or Comments are not counted as another level.", + "default": 50 + } + }, + { + "max_children": { + "gt": 0, + "required": true, + "type": "integer", + "description": "Maximum number of children allowed (Element, Text, Comment, ProcessingInstruction, CDATASection). Note: Adjacent text and CDATA sections are counted as one. For example, text-cdata-text-cdata is one child.", + "default": 100 + } + }, + { + "max_attributes": { + "gt": 0, + "required": true, + "type": "integer", + "description": "Maximum number of attributes allowed on a tag, including default ones. Note: If namespace-aware parsing is disabled, then the namespaces definitions are counted as attributes.", + "default": 100 + } + }, + { + "max_namespaces": { + "gt": 0, + "required": false, + "type": "integer", + "description": "Maximum number of namespaces defined on a tag. This value is required if parsing is namespace-aware.", + "default": 20 + } + }, + { + "document": { + "gt": 0, + "required": true, + "description": "Maximum size of the entire document.", + "type": "integer", + "default": 10485760 + } + }, + { + "buffer": { + "gt": 0, + "required": true, + "description": "Maximum size of the unparsed buffer (see below).", + "type": "integer", + "default": 1048576 + } + }, + { + "comment": { + "gt": 0, + "required": true, + "description": "Maximum size of comments.", + "type": "integer", + "default": 1024 + } + }, + { + "localname": { + "gt": 0, + "required": true, + "description": "Maximum size of the localname. This applies to tags and attributes.", + "type": "integer", + "default": 1024 + } + }, + { + "prefix": { + "gt": 0, + "required": false, + "description": "Maximum size of the prefix. This applies to tags and attributes. This value is required if parsing is namespace-aware.", + "type": "integer", + "default": 1024 + } + }, + { + "namespaceuri": { + "gt": 0, + "required": false, + "description": "Maximum size of the namespace URI. This value is required if parsing is namespace-aware.", + "type": "integer", + "default": 1024 + } + }, + { + "attribute": { + "gt": 0, + "required": true, + "description": "Maximum size of the attribute value.", + "type": "integer", + "default": 1048576 + } + }, + { + "text": { + "gt": 0, + "required": true, + "description": "Maximum text inside tags (counted over all adjacent text/CDATA elements combined).", + "type": "integer", + "default": 1048576 + } + }, + { + "pitarget": { + "gt": 0, + "required": true, + "description": "Maximum size of processing instruction targets.", + "type": "integer", + "default": 1024 + } + }, + { + "pidata": { + "gt": 0, + "required": true, + "description": "Maximum size of processing instruction data.", + "type": "integer", + "default": 1024 + } + }, + { + "entityname": { + "gt": 0, + "required": true, + "description": "Maximum size of entity names in EntityDecl.", + "type": "integer", + "default": 1024 + } + }, + { + "entity": { + "gt": 0, + "required": true, + "description": "Maximum size of entity values in EntityDecl.", + "type": "integer", + "default": 1024 + } + }, + { + "entityproperty": { + "gt": 0, + "required": true, + "description": "Maximum size of systemId, publicId, or notationName in EntityDecl.", + "type": "integer", + "default": 1024 + } + }, + { + "bla_max_amplification": { + "gt": 1, + "required": true, + "type": "number", + "description": "Sets the maximum allowed amplification. This protects against the Billion Laughs Attack.", + "default": 100 + } + }, + { + "bla_threshold": { + "gt": 1024, + "required": true, + "description": "Sets the threshold after which the protection starts. This protects against the Billion Laughs Attack.", + "type": "integer", + "default": 8388608 + } + } + ], + "entity_checks": [ + { + "conditional": { + "if_field": "namespace_aware", + "if_match": { + "eq": true + }, + "then_field": "max_namespaces", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "namespace_aware", + "if_match": { + "eq": true + }, + "then_field": "prefix", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "namespace_aware", + "if_match": { + "eq": true + }, + "then_field": "namespaceuri", + "then_match": { + "required": true + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/xml-threat-protection/3.8.x.json b/schemas/xml-threat-protection/3.8.x.json new file mode 100644 index 00000000..d9f354ae --- /dev/null +++ b/schemas/xml-threat-protection/3.8.x.json @@ -0,0 +1,300 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing HTTP protocols.", + "required": true, + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "checked_content_types": { + "description": "A list of Content-Type values with payloads that must be validated.", + "required": true, + "elements": { + "required": true, + "type": "string", + "match": "^[^%s]+%/[^ ;]+$" + }, + "type": "set", + "default": [ + "application/xml" + ] + } + }, + { + "allowed_content_types": { + "description": "A list of Content-Type values with payloads that are allowed, but aren't validated.", + "required": true, + "elements": { + "required": true, + "type": "string", + "match": "^[^%s]+%/[^ ;]+$" + }, + "type": "set", + "default": [ + + ] + } + }, + { + "allow_dtd": { + "description": "Indicates whether an XML Document Type Definition (DTD) section is allowed.", + "type": "boolean", + "required": true, + "default": false + } + }, + { + "namespace_aware": { + "description": "If not parsing namespace aware, all prefixes and namespace attributes will be counted as regular attributes and element names, and validated as such.", + "type": "boolean", + "required": true, + "default": true + } + }, + { + "max_depth": { + "description": "Maximum depth of tags. Child elements such as Text or Comments are not counted as another level.", + "required": true, + "type": "integer", + "gt": 0, + "default": 50 + } + }, + { + "max_children": { + "description": "Maximum number of children allowed (Element, Text, Comment, ProcessingInstruction, CDATASection). Note: Adjacent text and CDATA sections are counted as one. For example, text-cdata-text-cdata is one child.", + "required": true, + "type": "integer", + "gt": 0, + "default": 100 + } + }, + { + "max_attributes": { + "description": "Maximum number of attributes allowed on a tag, including default ones. Note: If namespace-aware parsing is disabled, then the namespaces definitions are counted as attributes.", + "required": true, + "type": "integer", + "gt": 0, + "default": 100 + } + }, + { + "max_namespaces": { + "description": "Maximum number of namespaces defined on a tag. This value is required if parsing is namespace-aware.", + "required": false, + "type": "integer", + "gt": 0, + "default": 20 + } + }, + { + "document": { + "description": "Maximum size of the entire document.", + "required": true, + "type": "integer", + "gt": 0, + "default": 10485760 + } + }, + { + "buffer": { + "description": "Maximum size of the unparsed buffer (see below).", + "required": true, + "type": "integer", + "gt": 0, + "default": 1048576 + } + }, + { + "comment": { + "description": "Maximum size of comments.", + "required": true, + "type": "integer", + "gt": 0, + "default": 1024 + } + }, + { + "localname": { + "description": "Maximum size of the localname. This applies to tags and attributes.", + "required": true, + "type": "integer", + "gt": 0, + "default": 1024 + } + }, + { + "prefix": { + "description": "Maximum size of the prefix. This applies to tags and attributes. This value is required if parsing is namespace-aware.", + "required": false, + "type": "integer", + "gt": 0, + "default": 1024 + } + }, + { + "namespaceuri": { + "description": "Maximum size of the namespace URI. This value is required if parsing is namespace-aware.", + "required": false, + "type": "integer", + "gt": 0, + "default": 1024 + } + }, + { + "attribute": { + "description": "Maximum size of the attribute value.", + "required": true, + "type": "integer", + "gt": 0, + "default": 1048576 + } + }, + { + "text": { + "description": "Maximum text inside tags (counted over all adjacent text/CDATA elements combined).", + "required": true, + "type": "integer", + "gt": 0, + "default": 1048576 + } + }, + { + "pitarget": { + "description": "Maximum size of processing instruction targets.", + "required": true, + "type": "integer", + "gt": 0, + "default": 1024 + } + }, + { + "pidata": { + "description": "Maximum size of processing instruction data.", + "required": true, + "type": "integer", + "gt": 0, + "default": 1024 + } + }, + { + "entityname": { + "description": "Maximum size of entity names in EntityDecl.", + "required": true, + "type": "integer", + "gt": 0, + "default": 1024 + } + }, + { + "entity": { + "description": "Maximum size of entity values in EntityDecl.", + "required": true, + "type": "integer", + "gt": 0, + "default": 1024 + } + }, + { + "entityproperty": { + "description": "Maximum size of systemId, publicId, or notationName in EntityDecl.", + "required": true, + "type": "integer", + "gt": 0, + "default": 1024 + } + }, + { + "bla_max_amplification": { + "description": "Sets the maximum allowed amplification. This protects against the Billion Laughs Attack.", + "required": true, + "type": "number", + "gt": 1, + "default": 100 + } + }, + { + "bla_threshold": { + "description": "Sets the threshold after which the protection starts. This protects against the Billion Laughs Attack.", + "required": true, + "type": "integer", + "gt": 1024, + "default": 8388608 + } + } + ], + "type": "record", + "entity_checks": [ + { + "conditional": { + "if_field": "namespace_aware", + "if_match": { + "eq": true + }, + "then_field": "max_namespaces", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "namespace_aware", + "if_match": { + "eq": true + }, + "then_field": "prefix", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_field": "namespace_aware", + "if_match": { + "eq": true + }, + "then_field": "namespaceuri", + "then_match": { + "required": true + } + } + } + ], + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/xml-threat-protection/3.9.x.json b/schemas/xml-threat-protection/3.9.x.json new file mode 100644 index 00000000..5a48ae6a --- /dev/null +++ b/schemas/xml-threat-protection/3.9.x.json @@ -0,0 +1,300 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing HTTP protocols.", + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "entity_checks": [ + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "max_namespaces", + "if_field": "namespace_aware", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "prefix", + "if_field": "namespace_aware", + "then_match": { + "required": true + } + } + }, + { + "conditional": { + "if_match": { + "eq": true + }, + "then_field": "namespaceuri", + "if_field": "namespace_aware", + "then_match": { + "required": true + } + } + } + ], + "fields": [ + { + "checked_content_types": { + "required": true, + "type": "set", + "default": [ + "application/xml" + ], + "description": "A list of Content-Type values with payloads that must be validated.", + "elements": { + "match": "^[^%s]+%/[^ ;]+$", + "required": true, + "type": "string" + } + } + }, + { + "allowed_content_types": { + "required": true, + "type": "set", + "default": [ + + ], + "description": "A list of Content-Type values with payloads that are allowed, but aren't validated.", + "elements": { + "match": "^[^%s]+%/[^ ;]+$", + "required": true, + "type": "string" + } + } + }, + { + "allow_dtd": { + "default": false, + "description": "Indicates whether an XML Document Type Definition (DTD) section is allowed.", + "required": true, + "type": "boolean" + } + }, + { + "namespace_aware": { + "default": true, + "description": "If not parsing namespace aware, all prefixes and namespace attributes will be counted as regular attributes and element names, and validated as such.", + "required": true, + "type": "boolean" + } + }, + { + "max_depth": { + "required": true, + "type": "integer", + "gt": 0, + "description": "Maximum depth of tags. Child elements such as Text or Comments are not counted as another level.", + "default": 50 + } + }, + { + "max_children": { + "required": true, + "type": "integer", + "gt": 0, + "description": "Maximum number of children allowed (Element, Text, Comment, ProcessingInstruction, CDATASection). Note: Adjacent text and CDATA sections are counted as one. For example, text-cdata-text-cdata is one child.", + "default": 100 + } + }, + { + "max_attributes": { + "required": true, + "type": "integer", + "gt": 0, + "description": "Maximum number of attributes allowed on a tag, including default ones. Note: If namespace-aware parsing is disabled, then the namespaces definitions are counted as attributes.", + "default": 100 + } + }, + { + "max_namespaces": { + "required": false, + "type": "integer", + "gt": 0, + "description": "Maximum number of namespaces defined on a tag. This value is required if parsing is namespace-aware.", + "default": 20 + } + }, + { + "document": { + "required": true, + "type": "integer", + "gt": 0, + "description": "Maximum size of the entire document.", + "default": 10485760 + } + }, + { + "buffer": { + "required": true, + "type": "integer", + "gt": 0, + "description": "Maximum size of the unparsed buffer (see below).", + "default": 1048576 + } + }, + { + "comment": { + "required": true, + "type": "integer", + "gt": 0, + "description": "Maximum size of comments.", + "default": 1024 + } + }, + { + "localname": { + "required": true, + "type": "integer", + "gt": 0, + "description": "Maximum size of the localname. This applies to tags and attributes.", + "default": 1024 + } + }, + { + "prefix": { + "required": false, + "type": "integer", + "gt": 0, + "description": "Maximum size of the prefix. This applies to tags and attributes. This value is required if parsing is namespace-aware.", + "default": 1024 + } + }, + { + "namespaceuri": { + "required": false, + "type": "integer", + "gt": 0, + "description": "Maximum size of the namespace URI. This value is required if parsing is namespace-aware.", + "default": 1024 + } + }, + { + "attribute": { + "required": true, + "type": "integer", + "gt": 0, + "description": "Maximum size of the attribute value.", + "default": 1048576 + } + }, + { + "text": { + "required": true, + "type": "integer", + "gt": 0, + "description": "Maximum text inside tags (counted over all adjacent text/CDATA elements combined).", + "default": 1048576 + } + }, + { + "pitarget": { + "required": true, + "type": "integer", + "gt": 0, + "description": "Maximum size of processing instruction targets.", + "default": 1024 + } + }, + { + "pidata": { + "required": true, + "type": "integer", + "gt": 0, + "description": "Maximum size of processing instruction data.", + "default": 1024 + } + }, + { + "entityname": { + "required": true, + "type": "integer", + "gt": 0, + "description": "Maximum size of entity names in EntityDecl.", + "default": 1024 + } + }, + { + "entity": { + "required": true, + "type": "integer", + "gt": 0, + "description": "Maximum size of entity values in EntityDecl.", + "default": 1024 + } + }, + { + "entityproperty": { + "required": true, + "type": "integer", + "gt": 0, + "description": "Maximum size of systemId, publicId, or notationName in EntityDecl.", + "default": 1024 + } + }, + { + "bla_max_amplification": { + "required": true, + "type": "number", + "gt": 1, + "description": "Sets the maximum allowed amplification. This protects against the Billion Laughs Attack.", + "default": 100 + } + }, + { + "bla_threshold": { + "required": true, + "type": "integer", + "gt": 1024, + "description": "Sets the threshold after which the protection starts. This protects against the Billion Laughs Attack.", + "default": 8388608 + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file diff --git a/schemas/zipkin/3.10.x.json b/schemas/zipkin/3.10.x.json new file mode 100644 index 00000000..c24af748 --- /dev/null +++ b/schemas/zipkin/3.10.x.json @@ -0,0 +1,426 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set", + "required": true + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "type": "foreign", + "eq": null + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "local_service_name": { + "description": "The name of the service as displayed in Zipkin.", + "type": "string", + "default": "kong", + "required": true + } + }, + { + "http_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "sample_ratio": { + "description": "How often to sample requests that do not contain trace IDs. Set to `0` to turn sampling off, or to `1` to sample **all** requests. ", + "type": "number", + "default": 0.001, + "between": [ + 0, + 1 + ] + } + }, + { + "default_service_name": { + "description": "Set a default service name to override `unknown-service-name` in the Zipkin spans.", + "type": "string" + } + }, + { + "include_credential": { + "description": "Specify whether the credential of the currently authenticated consumer should be included in metadata sent to the Zipkin server.", + "type": "boolean", + "default": true, + "required": true + } + }, + { + "traceid_byte_count": { + "type": "integer", + "description": "The length in bytes of each request's Trace ID.", + "one_of": [ + 8, + 16 + ], + "default": 16, + "required": true + } + }, + { + "header_type": { + "type": "string", + "deprecation": { + "message": "zipkin: config.header_type is deprecated, please use config.propagation options instead", + "old_default": "preserve", + "removal_in_version": "4.0" + }, + "description": "All HTTP requests going through the plugin are tagged with a tracing HTTP request. This property codifies what kind of tracing header the plugin expects on incoming requests", + "default": "preserve", + "one_of": [ + "preserve", + "ignore", + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "datadog", + "gcp", + "instana" + ], + "required": true + } + }, + { + "default_header_type": { + "type": "string", + "deprecation": { + "message": "zipkin: config.default_header_type is deprecated, please use config.propagation.default_format instead", + "old_default": "b3", + "removal_in_version": "4.0" + }, + "description": "Allows specifying the type of header to be added to requests with no pre-existing tracing headers and when `config.header_type` is set to `\"preserve\"`. When `header_type` is set to any other value, `default_header_type` is ignored.", + "default": "b3", + "one_of": [ + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "datadog", + "gcp", + "instana" + ], + "required": true + } + }, + { + "tags_header": { + "description": "The Zipkin plugin will add extra headers to the tags associated with any HTTP requests that come with a header named as configured by this property.", + "type": "string", + "default": "Zipkin-Tags", + "required": true + } + }, + { + "static_tags": { + "description": "The tags specified on this property will be added to the generated request traces.", + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "name": { + "type": "string", + "not_one_of": [ + "error", + "http.method", + "http.path", + "http.status_code", + "kong.balancer.state", + "kong.balancer.try", + "kong.consumer", + "kong.credential", + "kong.node.id", + "kong.route", + "kong.service", + "lc", + "peer.hostname" + ], + "required": true + } + }, + { + "value": { + "required": true, + "type": "string" + } + } + ] + } + } + }, + { + "http_span_name": { + "type": "string", + "description": "Specify whether to include the HTTP path in the span name.", + "one_of": [ + "method", + "method_path" + ], + "default": "method", + "required": true + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 5000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 5000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "http_response_header_for_traceid": { + "type": "string" + } + }, + { + "phase_duration_flavor": { + "type": "string", + "description": "Specify whether to include the duration of each phase as an annotation or a tag.", + "one_of": [ + "annotations", + "tags" + ], + "default": "annotations", + "required": true + } + }, + { + "queue": { + "type": "record", + "fields": [ + { + "max_batch_size": { + "between": [ + 1, + 1000000 + ], + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time." + } + }, + { + "max_coalescing_delay": { + "between": [ + 0, + 3600 + ], + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." + } + }, + { + "max_entries": { + "between": [ + 1, + 1000000 + ], + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue." + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "default": 60, + "type": "number" + } + }, + { + "initial_retry_delay": { + "between": [ + 0.001, + 1000000 + ], + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch." + } + }, + { + "max_retry_delay": { + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "default": 60, + "type": "number", + "between": [ + 0.001, + 1000000 + ] + } + }, + { + "concurrency_limit": { + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "default": 1, + "type": "integer", + "one_of": [ + -1, + 1 + ] + } + } + ], + "required": true + } + }, + { + "propagation": { + "fields": [ + { + "extract": { + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "jaeger", + "ot", + "datadog", + "aws", + "gcp", + "instana", + "w3c", + "b3" + ] + } + } + }, + { + "clear": { + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "inject": { + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "preserve", + "b3-single", + "jaeger", + "ot", + "datadog", + "aws", + "gcp", + "instana", + "w3c", + "b3" + ] + } + } + }, + { + "default_format": { + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "type": "string", + "one_of": [ + "b3-single", + "jaeger", + "ot", + "datadog", + "aws", + "gcp", + "instana", + "w3c", + "b3" + ], + "required": true + } + } + ], + "default": { + "default_format": "b3" + }, + "type": "record", + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/zipkin/3.11.x.json b/schemas/zipkin/3.11.x.json new file mode 100644 index 00000000..9793f93e --- /dev/null +++ b/schemas/zipkin/3.11.x.json @@ -0,0 +1,426 @@ +{ + "fields": [ + { + "protocols": { + "required": true, + "description": "A set of strings representing protocols.", + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string" + }, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "type": "set" + } + }, + { + "consumer_group": { + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "reference": "consumer_groups", + "type": "foreign" + } + }, + { + "config": { + "required": true, + "fields": [ + { + "local_service_name": { + "default": "kong", + "required": true, + "description": "The name of the service as displayed in Zipkin.", + "type": "string" + } + }, + { + "http_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "sample_ratio": { + "default": 0.001, + "between": [ + 0, + 1 + ], + "description": "How often to sample requests that do not contain trace IDs. Set to `0` to turn sampling off, or to `1` to sample **all** requests. ", + "type": "number" + } + }, + { + "default_service_name": { + "description": "Set a default service name to override `unknown-service-name` in the Zipkin spans.", + "type": "string" + } + }, + { + "include_credential": { + "default": true, + "required": true, + "description": "Specify whether the credential of the currently authenticated consumer should be included in metadata sent to the Zipkin server.", + "type": "boolean" + } + }, + { + "traceid_byte_count": { + "required": true, + "description": "The length in bytes of each request's Trace ID.", + "one_of": [ + 8, + 16 + ], + "default": 16, + "type": "integer" + } + }, + { + "header_type": { + "required": true, + "description": "All HTTP requests going through the plugin are tagged with a tracing HTTP request. This property codifies what kind of tracing header the plugin expects on incoming requests", + "one_of": [ + "preserve", + "ignore", + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "datadog", + "gcp", + "instana" + ], + "deprecation": { + "old_default": "preserve", + "removal_in_version": "4.0", + "message": "zipkin: config.header_type is deprecated, please use config.propagation options instead" + }, + "default": "preserve", + "type": "string" + } + }, + { + "default_header_type": { + "required": true, + "description": "Allows specifying the type of header to be added to requests with no pre-existing tracing headers and when `config.header_type` is set to `\"preserve\"`. When `header_type` is set to any other value, `default_header_type` is ignored.", + "one_of": [ + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "datadog", + "gcp", + "instana" + ], + "deprecation": { + "old_default": "b3", + "removal_in_version": "4.0", + "message": "zipkin: config.default_header_type is deprecated, please use config.propagation.default_format instead" + }, + "default": "b3", + "type": "string" + } + }, + { + "tags_header": { + "default": "Zipkin-Tags", + "required": true, + "description": "The Zipkin plugin will add extra headers to the tags associated with any HTTP requests that come with a header named as configured by this property.", + "type": "string" + } + }, + { + "static_tags": { + "type": "array", + "description": "The tags specified on this property will be added to the generated request traces.", + "elements": { + "fields": [ + { + "name": { + "required": true, + "not_one_of": [ + "error", + "http.method", + "http.path", + "http.status_code", + "kong.balancer.state", + "kong.balancer.try", + "kong.consumer", + "kong.credential", + "kong.node.id", + "kong.route", + "kong.service", + "lc", + "peer.hostname" + ], + "type": "string" + } + }, + { + "value": { + "required": true, + "type": "string" + } + } + ], + "type": "record" + } + } + }, + { + "http_span_name": { + "required": true, + "description": "Specify whether to include the HTTP path in the span name.", + "one_of": [ + "method", + "method_path" + ], + "default": "method", + "type": "string" + } + }, + { + "connect_timeout": { + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "send_timeout": { + "default": 5000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "read_timeout": { + "default": 5000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer" + } + }, + { + "http_response_header_for_traceid": { + "type": "string" + } + }, + { + "phase_duration_flavor": { + "required": true, + "description": "Specify whether to include the duration of each phase as an annotation or a tag.", + "one_of": [ + "annotations", + "tags" + ], + "default": "annotations", + "type": "string" + } + }, + { + "queue": { + "required": true, + "fields": [ + { + "max_batch_size": { + "default": 1, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be processed at a time.", + "type": "integer" + } + }, + { + "max_coalescing_delay": { + "default": 1, + "between": [ + 0, + 3600 + ], + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "type": "number" + } + }, + { + "max_entries": { + "default": 10000, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be waiting on the queue.", + "type": "integer" + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "between": [ + 0.001, + 1000000 + ], + "description": "Time in seconds before the initial retry is made for a failing batch.", + "type": "number" + } + }, + { + "max_retry_delay": { + "default": 60, + "between": [ + 0.001, + 1000000 + ], + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "type": "number" + } + }, + { + "concurrency_limit": { + "one_of": [ + -1, + 1 + ], + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "type": "integer" + } + } + ], + "type": "record" + } + }, + { + "propagation": { + "default": { + "default_format": "b3" + }, + "required": true, + "fields": [ + { + "extract": { + "type": "array", + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "elements": { + "one_of": [ + "w3c", + "b3", + "jaeger", + "ot", + "datadog", + "aws", + "gcp", + "instana" + ], + "type": "string" + } + } + }, + { + "clear": { + "type": "array", + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "elements": { + "type": "string" + } + } + }, + { + "inject": { + "type": "array", + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "elements": { + "one_of": [ + "preserve", + "w3c", + "b3", + "b3-single", + "jaeger", + "ot", + "datadog", + "aws", + "gcp", + "instana" + ], + "type": "string" + } + } + }, + { + "default_format": { + "one_of": [ + "w3c", + "b3", + "b3-single", + "jaeger", + "ot", + "datadog", + "aws", + "gcp", + "instana" + ], + "required": true, + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "type": "string" + } + } + ], + "type": "record" + } + } + ], + "type": "record" + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/zipkin/3.12.x.json b/schemas/zipkin/3.12.x.json new file mode 100644 index 00000000..d0dbb128 --- /dev/null +++ b/schemas/zipkin/3.12.x.json @@ -0,0 +1,424 @@ +{ + "entity_checks": [], + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "type": "record", + "fields": [ + { + "local_service_name": { + "description": "The name of the service as displayed in Zipkin.", + "default": "kong", + "type": "string", + "required": true + } + }, + { + "http_endpoint": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "sample_ratio": { + "description": "How often to sample requests that do not contain trace IDs. Set to `0` to turn sampling off, or to `1` to sample **all** requests. ", + "default": 0.001, + "between": [ + 0, + 1 + ], + "type": "number" + } + }, + { + "default_service_name": { + "description": "Set a default service name to override `unknown-service-name` in the Zipkin spans.", + "type": "string" + } + }, + { + "include_credential": { + "description": "Specify whether the credential of the currently authenticated consumer should be included in metadata sent to the Zipkin server.", + "default": true, + "type": "boolean", + "required": true + } + }, + { + "traceid_byte_count": { + "type": "integer", + "required": true, + "description": "The length in bytes of each request's Trace ID.", + "default": 16, + "one_of": [ + 8, + 16 + ] + } + }, + { + "header_type": { + "type": "string", + "required": true, + "description": "All HTTP requests going through the plugin are tagged with a tracing HTTP request. This property codifies what kind of tracing header the plugin expects on incoming requests", + "default": "preserve", + "one_of": [ + "preserve", + "ignore", + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "datadog", + "gcp", + "instana" + ], + "deprecation": { + "old_default": "preserve", + "message": "zipkin: config.header_type is deprecated, please use config.propagation options instead", + "removal_in_version": "4.0" + } + } + }, + { + "default_header_type": { + "type": "string", + "required": true, + "description": "Allows specifying the type of header to be added to requests with no pre-existing tracing headers and when `config.header_type` is set to `\"preserve\"`. When `header_type` is set to any other value, `default_header_type` is ignored.", + "default": "b3", + "one_of": [ + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "datadog", + "gcp", + "instana" + ], + "deprecation": { + "old_default": "b3", + "message": "zipkin: config.default_header_type is deprecated, please use config.propagation.default_format instead", + "removal_in_version": "4.0" + } + } + }, + { + "tags_header": { + "description": "The Zipkin plugin will add extra headers to the tags associated with any HTTP requests that come with a header named as configured by this property.", + "default": "Zipkin-Tags", + "type": "string", + "required": true + } + }, + { + "static_tags": { + "description": "The tags specified on this property will be added to the generated request traces.", + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "name": { + "type": "string", + "required": true, + "not_one_of": [ + "error", + "http.method", + "http.path", + "http.status_code", + "kong.balancer.state", + "kong.balancer.try", + "kong.consumer", + "kong.credential", + "kong.node.id", + "kong.route", + "kong.service", + "lc", + "peer.hostname" + ] + } + }, + { + "value": { + "type": "string", + "required": true + } + } + ] + } + } + }, + { + "http_span_name": { + "type": "string", + "required": true, + "description": "Specify whether to include the HTTP path in the span name.", + "default": "method", + "one_of": [ + "method", + "method_path" + ] + } + }, + { + "connect_timeout": { + "type": "integer", + "default": 2000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "type": "integer", + "default": 5000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "type": "integer", + "default": 5000, + "between": [ + 0, + 2147483646 + ], + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "http_response_header_for_traceid": { + "type": "string" + } + }, + { + "phase_duration_flavor": { + "type": "string", + "required": true, + "description": "Specify whether to include the duration of each phase as an annotation or a tag.", + "default": "annotations", + "one_of": [ + "annotations", + "tags" + ] + } + }, + { + "queue": { + "type": "record", + "fields": [ + { + "max_batch_size": { + "type": "integer", + "default": 1, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be processed at a time." + } + }, + { + "max_coalescing_delay": { + "type": "number", + "default": 1, + "between": [ + 0, + 3600 + ], + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." + } + }, + { + "max_entries": { + "type": "integer", + "default": 10000, + "between": [ + 1, + 1000000 + ], + "description": "Maximum number of entries that can be waiting on the queue." + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "type": "number", + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." + } + }, + { + "initial_retry_delay": { + "type": "number", + "default": 0.01, + "between": [ + 0.001, + 1000000 + ], + "description": "Time in seconds before the initial retry is made for a failing batch." + } + }, + { + "max_retry_delay": { + "type": "number", + "default": 60, + "between": [ + 0.001, + 1000000 + ], + "description": "Maximum time in seconds between retries, caps exponential backoff." + } + }, + { + "concurrency_limit": { + "type": "integer", + "default": 1, + "one_of": [ + -1, + 1 + ], + "description": "The number of of queue delivery timers. -1 indicates unlimited." + } + } + ], + "required": true + } + }, + { + "propagation": { + "type": "record", + "default": { + "default_format": "b3" + }, + "fields": [ + { + "extract": { + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "gcp", + "instana", + "w3c", + "b3", + "jaeger", + "ot", + "datadog", + "aws" + ] + } + } + }, + { + "clear": { + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "inject": { + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "preserve", + "gcp", + "instana", + "w3c", + "b3", + "b3-single", + "jaeger", + "ot", + "datadog", + "aws" + ] + } + } + }, + { + "default_format": { + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "type": "string", + "one_of": [ + "gcp", + "instana", + "w3c", + "b3", + "b3-single", + "jaeger", + "ot", + "datadog", + "aws" + ], + "required": true + } + } + ], + "required": true + } + } + ], + "required": true + } + } + ] +} \ No newline at end of file diff --git a/schemas/zipkin/3.4.x.json b/schemas/zipkin/3.4.x.json index 7b252fc7..bc8ed607 100644 --- a/schemas/zipkin/3.4.x.json +++ b/schemas/zipkin/3.4.x.json @@ -8,6 +8,9 @@ "http", "https" ], + "required": true, + "description": "A set of strings representing protocols.", + "type": "set", "elements": { "one_of": [ "grpc", @@ -21,64 +24,77 @@ "ws", "wss" ], - "type": "string" - }, - "required": true, - "type": "set" + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null, + "type": "foreign" } }, { "config": { - "required": true, "fields": [ { "local_service_name": { "default": "kong", "type": "string", - "required": true + "required": true, + "description": "The name of the service as displayed in Zipkin." } }, { "http_endpoint": { - "type": "string" + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." } }, { "sample_ratio": { + "default": 0.001, + "type": "number", "between": [ 0, 1 ], - "type": "number", - "default": 0.001 + "description": "How often to sample requests that do not contain trace IDs. Set to `0` to turn sampling off, or to `1` to sample **all** requests. " } }, { "default_service_name": { - "type": "string" + "type": "string", + "description": "Set a default service name to override `unknown-service-name` in the Zipkin spans." } }, { "include_credential": { "default": true, "type": "boolean", - "required": true + "required": true, + "description": "Specify whether the credential of the currently authenticated consumer should be included in metadata sent to the Zipkin server." } }, { "traceid_byte_count": { - "required": true, + "default": 16, + "type": "integer", "one_of": [ 8, 16 ], - "type": "integer", - "default": 16 + "required": true, + "description": "The length in bytes of each request's Trace ID." } }, { "header_type": { - "required": true, + "default": "preserve", + "type": "string", "one_of": [ "preserve", "ignore", @@ -87,41 +103,43 @@ "w3c", "jaeger", "ot", + "aws", "datadog" - ], - "type": "string", - "default": "preserve" + ] } }, { "default_header_type": { - "required": true, + "default": "b3", + "type": "string", "one_of": [ "b3", "b3-single", "w3c", "jaeger", "ot", + "aws", "datadog" - ], - "type": "string", - "default": "b3" + ] } }, { "tags_header": { "default": "Zipkin-Tags", "type": "string", - "required": true + "required": true, + "description": "The Zipkin plugin will add extra headers to the tags associated with any HTTP requests that come with a header named as configured by this property." } }, { "static_tags": { + "description": "The tags specified on this property will be added to the generated request traces.", "type": "array", "elements": { "fields": [ { "name": { + "required": true, "not_one_of": [ "error", "http.method", @@ -137,8 +155,7 @@ "lc", "peer.hostname" ], - "type": "string", - "required": true + "type": "string" } }, { @@ -154,43 +171,47 @@ }, { "http_span_name": { - "required": true, + "default": "method", + "type": "string", "one_of": [ "method", "method_path" ], - "type": "string", - "default": "method" + "required": true, + "description": "Specify whether to include the HTTP path in the span name." } }, { "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "between": [ 0, 2147483646 ], - "type": "integer", - "default": 2000 + "type": "integer" } }, { "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "between": [ 0, 2147483646 ], - "type": "integer", - "default": 5000 + "type": "integer" } }, { "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", "between": [ 0, 2147483646 ], - "type": "integer", - "default": 5000 + "type": "integer" } }, { @@ -200,79 +221,99 @@ }, { "phase_duration_flavor": { - "required": true, + "default": "annotations", + "type": "string", "one_of": [ "annotations", "tags" ], - "type": "string", - "default": "annotations" + "required": true, + "description": "Specify whether to include the duration of each phase as an annotation or a tag." } }, { "queue": { - "required": true, "fields": [ { "max_batch_size": { + "default": 1, + "type": "integer", "between": [ 1, 1000000 ], - "type": "number", - "default": 1 + "description": "Maximum number of entries that can be processed at a time." } }, { "max_coalescing_delay": { + "default": 1, + "type": "number", "between": [ 0, 3600 ], - "type": "number", - "default": 1 + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." } }, { "max_entries": { + "default": 10000, + "type": "integer", "between": [ 1, 1000000 ], - "type": "number", - "default": 10000 + "description": "Maximum number of entries that can be waiting on the queue." } }, { "max_bytes": { - "type": "number" + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." } }, { "max_retry_time": { "default": 60, - "type": "number" + "type": "number", + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." } }, { "initial_retry_delay": { "default": 0.01, - "type": "number" + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "description": "Time in seconds before the initial retry is made for a failing batch." } }, { "max_retry_delay": { "default": 60, - "type": "number" + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "description": "Maximum time in seconds between retries, caps exponential backoff." } } ], - "type": "record" + "type": "record", + "required": true } } ], - "type": "record" + "type": "record", + "required": true } } + ], + "entity_checks": [ + ] } \ No newline at end of file diff --git a/schemas/zipkin/3.5.x.json b/schemas/zipkin/3.5.x.json new file mode 100644 index 00000000..878b9194 --- /dev/null +++ b/schemas/zipkin/3.5.x.json @@ -0,0 +1,325 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "type": "foreign", + "reference": "consumer_groups", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "local_service_name": { + "description": "The name of the service as displayed in Zipkin.", + "default": "kong", + "type": "string", + "required": true + } + }, + { + "http_endpoint": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "sample_ratio": { + "between": [ + 0, + 1 + ], + "default": 0.001, + "type": "number", + "description": "How often to sample requests that do not contain trace IDs. Set to `0` to turn sampling off, or to `1` to sample **all** requests. " + } + }, + { + "default_service_name": { + "type": "string", + "description": "Set a default service name to override `unknown-service-name` in the Zipkin spans." + } + }, + { + "include_credential": { + "description": "Specify whether the credential of the currently authenticated consumer should be included in metadata sent to the Zipkin server.", + "default": true, + "type": "boolean", + "required": true + } + }, + { + "traceid_byte_count": { + "type": "integer", + "required": true, + "one_of": [ + 8, + 16 + ], + "default": 16, + "description": "The length in bytes of each request's Trace ID." + } + }, + { + "header_type": { + "type": "string", + "required": true, + "one_of": [ + "preserve", + "ignore", + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "datadog", + "gcp" + ], + "default": "preserve", + "description": "All HTTP requests going through the plugin are tagged with a tracing HTTP request. This property codifies what kind of tracing header the plugin expects on incoming requests" + } + }, + { + "default_header_type": { + "type": "string", + "required": true, + "one_of": [ + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "datadog", + "gcp" + ], + "default": "b3", + "description": "Allows specifying the type of header to be added to requests with no pre-existing tracing headers and when `config.header_type` is set to `\"preserve\"`. When `header_type` is set to any other value, `default_header_type` is ignored." + } + }, + { + "tags_header": { + "description": "The Zipkin plugin will add extra headers to the tags associated with any HTTP requests that come with a header named as configured by this property.", + "default": "Zipkin-Tags", + "type": "string", + "required": true + } + }, + { + "static_tags": { + "description": "The tags specified on this property will be added to the generated request traces.", + "type": "array", + "elements": { + "type": "record", + "fields": [ + { + "name": { + "type": "string", + "not_one_of": [ + "error", + "http.method", + "http.path", + "http.status_code", + "kong.balancer.state", + "kong.balancer.try", + "kong.consumer", + "kong.credential", + "kong.node.id", + "kong.route", + "kong.service", + "lc", + "peer.hostname" + ], + "required": true + } + }, + { + "value": { + "type": "string", + "required": true + } + } + ] + } + } + }, + { + "http_span_name": { + "type": "string", + "required": true, + "one_of": [ + "method", + "method_path" + ], + "default": "method", + "description": "Specify whether to include the HTTP path in the span name." + } + }, + { + "connect_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "send_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 5000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "read_timeout": { + "between": [ + 0, + 2147483646 + ], + "default": 5000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2." + } + }, + { + "http_response_header_for_traceid": { + "type": "string" + } + }, + { + "phase_duration_flavor": { + "type": "string", + "required": true, + "one_of": [ + "annotations", + "tags" + ], + "default": "annotations", + "description": "Specify whether to include the duration of each phase as an annotation or a tag." + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "between": [ + 1, + 1000000 + ], + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time." + } + }, + { + "max_coalescing_delay": { + "between": [ + 0, + 3600 + ], + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler." + } + }, + { + "max_entries": { + "between": [ + 1, + 1000000 + ], + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue." + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "default": 60, + "type": "number", + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." + } + }, + { + "initial_retry_delay": { + "between": [ + 0.001, + 1000000 + ], + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch." + } + }, + { + "max_retry_delay": { + "between": [ + 0.001, + 1000000 + ], + "default": 60, + "type": "number", + "description": "Maximum time in seconds between retries, caps exponential backoff." + } + } + ], + "type": "record", + "required": true + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/zipkin/3.6.x.json b/schemas/zipkin/3.6.x.json new file mode 100644 index 00000000..ba875690 --- /dev/null +++ b/schemas/zipkin/3.6.x.json @@ -0,0 +1,325 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "elements": { + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS." + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "required": true, + "description": "A set of strings representing protocols." + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "eq": null, + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "required": true, + "type": "record", + "fields": [ + { + "local_service_name": { + "required": true, + "type": "string", + "default": "kong", + "description": "The name of the service as displayed in Zipkin." + } + }, + { + "http_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "sample_ratio": { + "default": 0.001, + "type": "number", + "description": "How often to sample requests that do not contain trace IDs. Set to `0` to turn sampling off, or to `1` to sample **all** requests. ", + "between": [ + 0, + 1 + ] + } + }, + { + "default_service_name": { + "description": "Set a default service name to override `unknown-service-name` in the Zipkin spans.", + "type": "string" + } + }, + { + "include_credential": { + "required": true, + "type": "boolean", + "default": true, + "description": "Specify whether the credential of the currently authenticated consumer should be included in metadata sent to the Zipkin server." + } + }, + { + "traceid_byte_count": { + "type": "integer", + "default": 16, + "required": true, + "description": "The length in bytes of each request's Trace ID.", + "one_of": [ + 8, + 16 + ] + } + }, + { + "header_type": { + "type": "string", + "default": "preserve", + "required": true, + "description": "All HTTP requests going through the plugin are tagged with a tracing HTTP request. This property codifies what kind of tracing header the plugin expects on incoming requests", + "one_of": [ + "preserve", + "ignore", + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "datadog", + "gcp" + ] + } + }, + { + "default_header_type": { + "type": "string", + "default": "b3", + "required": true, + "description": "Allows specifying the type of header to be added to requests with no pre-existing tracing headers and when `config.header_type` is set to `\"preserve\"`. When `header_type` is set to any other value, `default_header_type` is ignored.", + "one_of": [ + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "datadog", + "gcp" + ] + } + }, + { + "tags_header": { + "required": true, + "type": "string", + "default": "Zipkin-Tags", + "description": "The Zipkin plugin will add extra headers to the tags associated with any HTTP requests that come with a header named as configured by this property." + } + }, + { + "static_tags": { + "elements": { + "fields": [ + { + "name": { + "required": true, + "type": "string", + "not_one_of": [ + "error", + "http.method", + "http.path", + "http.status_code", + "kong.balancer.state", + "kong.balancer.try", + "kong.consumer", + "kong.credential", + "kong.node.id", + "kong.route", + "kong.service", + "lc", + "peer.hostname" + ] + } + }, + { + "value": { + "required": true, + "type": "string" + } + } + ], + "type": "record" + }, + "type": "array", + "description": "The tags specified on this property will be added to the generated request traces." + } + }, + { + "http_span_name": { + "type": "string", + "default": "method", + "required": true, + "description": "Specify whether to include the HTTP path in the span name.", + "one_of": [ + "method", + "method_path" + ] + } + }, + { + "connect_timeout": { + "default": 2000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "send_timeout": { + "default": 5000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "read_timeout": { + "default": 5000, + "type": "integer", + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "http_response_header_for_traceid": { + "type": "string" + } + }, + { + "phase_duration_flavor": { + "type": "string", + "default": "annotations", + "required": true, + "description": "Specify whether to include the duration of each phase as an annotation or a tag.", + "one_of": [ + "annotations", + "tags" + ] + } + }, + { + "queue": { + "required": true, + "type": "record", + "fields": [ + { + "max_batch_size": { + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_coalescing_delay": { + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "between": [ + 0, + 3600 + ] + } + }, + { + "max_entries": { + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "type": "number", + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch." + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch.", + "between": [ + 0.001, + 1000000 + ] + } + }, + { + "max_retry_delay": { + "default": 60, + "type": "number", + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "between": [ + 0.001, + 1000000 + ] + } + } + ] + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/schemas/zipkin/3.7.x.json b/schemas/zipkin/3.7.x.json new file mode 100644 index 00000000..389af427 --- /dev/null +++ b/schemas/zipkin/3.7.x.json @@ -0,0 +1,410 @@ +{ + "fields": [ + { + "protocols": { + "type": "set", + "required": true, + "elements": { + "type": "string", + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "description": "A set of strings representing protocols.", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed.", + "eq": null + } + }, + { + "config": { + "fields": [ + { + "local_service_name": { + "required": true, + "type": "string", + "description": "The name of the service as displayed in Zipkin.", + "default": "kong" + } + }, + { + "http_endpoint": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "sample_ratio": { + "default": 0.001, + "type": "number", + "description": "How often to sample requests that do not contain trace IDs. Set to `0` to turn sampling off, or to `1` to sample **all** requests. ", + "between": [ + 0, + 1 + ] + } + }, + { + "default_service_name": { + "type": "string", + "description": "Set a default service name to override `unknown-service-name` in the Zipkin spans." + } + }, + { + "include_credential": { + "required": true, + "type": "boolean", + "description": "Specify whether the credential of the currently authenticated consumer should be included in metadata sent to the Zipkin server.", + "default": true + } + }, + { + "traceid_byte_count": { + "default": 16, + "required": true, + "type": "integer", + "description": "The length in bytes of each request's Trace ID.", + "one_of": [ + 8, + 16 + ] + } + }, + { + "header_type": { + "default": "preserve", + "description": "All HTTP requests going through the plugin are tagged with a tracing HTTP request. This property codifies what kind of tracing header the plugin expects on incoming requests", + "required": true, + "deprecation": { + "old_default": "preserve", + "message": "zipkin: config.header_type is deprecated, please use config.propagation options instead", + "removal_in_version": "4.0" + }, + "type": "string", + "one_of": [ + "preserve", + "ignore", + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "datadog", + "gcp" + ] + } + }, + { + "default_header_type": { + "default": "b3", + "description": "Allows specifying the type of header to be added to requests with no pre-existing tracing headers and when `config.header_type` is set to `\"preserve\"`. When `header_type` is set to any other value, `default_header_type` is ignored.", + "required": true, + "deprecation": { + "old_default": "b3", + "message": "zipkin: config.default_header_type is deprecated, please use config.propagation.default_format instead", + "removal_in_version": "4.0" + }, + "type": "string", + "one_of": [ + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "datadog", + "gcp" + ] + } + }, + { + "tags_header": { + "required": true, + "type": "string", + "description": "The Zipkin plugin will add extra headers to the tags associated with any HTTP requests that come with a header named as configured by this property.", + "default": "Zipkin-Tags" + } + }, + { + "static_tags": { + "elements": { + "type": "record", + "fields": [ + { + "name": { + "required": true, + "type": "string", + "not_one_of": [ + "error", + "http.method", + "http.path", + "http.status_code", + "kong.balancer.state", + "kong.balancer.try", + "kong.consumer", + "kong.credential", + "kong.node.id", + "kong.route", + "kong.service", + "lc", + "peer.hostname" + ] + } + }, + { + "value": { + "required": true, + "type": "string" + } + } + ] + }, + "type": "array", + "description": "The tags specified on this property will be added to the generated request traces." + } + }, + { + "http_span_name": { + "default": "method", + "required": true, + "type": "string", + "description": "Specify whether to include the HTTP path in the span name.", + "one_of": [ + "method", + "method_path" + ] + } + }, + { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ] + } + }, + { + "http_response_header_for_traceid": { + "type": "string" + } + }, + { + "phase_duration_flavor": { + "default": "annotations", + "required": true, + "type": "string", + "description": "Specify whether to include the duration of each phase as an annotation or a tag.", + "one_of": [ + "annotations", + "tags" + ] + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "default": 1, + "type": "integer", + "description": "Maximum number of entries that can be processed at a time.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_coalescing_delay": { + "default": 1, + "type": "number", + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "between": [ + 0, + 3600 + ] + } + }, + { + "max_entries": { + "default": 10000, + "type": "integer", + "description": "Maximum number of entries that can be waiting on the queue.", + "between": [ + 1, + 1000000 + ] + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "type": "number", + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "default": 60 + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "type": "number", + "description": "Time in seconds before the initial retry is made for a failing batch.", + "between": [ + 0.001, + 1000000 + ] + } + }, + { + "max_retry_delay": { + "default": 60, + "type": "number", + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "between": [ + 0.001, + 1000000 + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "propagation": { + "fields": [ + { + "extract": { + "elements": { + "type": "string", + "one_of": [ + "b3", + "gcp", + "jaeger", + "aws", + "ot", + "w3c", + "datadog" + ] + }, + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "type": "array" + } + }, + { + "clear": { + "elements": { + "type": "string" + }, + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "type": "array" + } + }, + { + "inject": { + "elements": { + "type": "string", + "one_of": [ + "preserve", + "b3", + "gcp", + "b3-single", + "jaeger", + "aws", + "ot", + "w3c", + "datadog" + ] + }, + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "type": "array" + } + }, + { + "default_format": { + "required": true, + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "type": "string", + "one_of": [ + "b3", + "gcp", + "b3-single", + "jaeger", + "aws", + "ot", + "w3c", + "datadog" + ] + } + } + ], + "required": true, + "type": "record", + "default": { + "default_format": "b3" + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/zipkin/3.8.x.json b/schemas/zipkin/3.8.x.json new file mode 100644 index 00000000..cd177c4e --- /dev/null +++ b/schemas/zipkin/3.8.x.json @@ -0,0 +1,421 @@ +{ + "fields": [ + { + "protocols": { + "description": "A set of strings representing protocols.", + "required": true, + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "type": "string", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ] + }, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ] + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "local_service_name": { + "description": "The name of the service as displayed in Zipkin.", + "required": true, + "type": "string", + "default": "kong" + } + }, + { + "http_endpoint": { + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search.", + "type": "string" + } + }, + { + "sample_ratio": { + "description": "How often to sample requests that do not contain trace IDs. Set to `0` to turn sampling off, or to `1` to sample **all** requests. ", + "type": "number", + "between": [ + 0, + 1 + ], + "default": 0.001 + } + }, + { + "default_service_name": { + "description": "Set a default service name to override `unknown-service-name` in the Zipkin spans.", + "type": "string" + } + }, + { + "include_credential": { + "description": "Specify whether the credential of the currently authenticated consumer should be included in metadata sent to the Zipkin server.", + "required": true, + "type": "boolean", + "default": true + } + }, + { + "traceid_byte_count": { + "description": "The length in bytes of each request's Trace ID.", + "required": true, + "one_of": [ + 8, + 16 + ], + "type": "integer", + "default": 16 + } + }, + { + "header_type": { + "description": "All HTTP requests going through the plugin are tagged with a tracing HTTP request. This property codifies what kind of tracing header the plugin expects on incoming requests", + "required": true, + "one_of": [ + "preserve", + "ignore", + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "datadog", + "gcp" + ], + "type": "string", + "default": "preserve", + "deprecation": { + "old_default": "preserve", + "message": "zipkin: config.header_type is deprecated, please use config.propagation options instead", + "removal_in_version": "4.0" + } + } + }, + { + "default_header_type": { + "description": "Allows specifying the type of header to be added to requests with no pre-existing tracing headers and when `config.header_type` is set to `\"preserve\"`. When `header_type` is set to any other value, `default_header_type` is ignored.", + "required": true, + "one_of": [ + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "datadog", + "gcp" + ], + "type": "string", + "default": "b3", + "deprecation": { + "old_default": "b3", + "message": "zipkin: config.default_header_type is deprecated, please use config.propagation.default_format instead", + "removal_in_version": "4.0" + } + } + }, + { + "tags_header": { + "description": "The Zipkin plugin will add extra headers to the tags associated with any HTTP requests that come with a header named as configured by this property.", + "required": true, + "type": "string", + "default": "Zipkin-Tags" + } + }, + { + "static_tags": { + "description": "The tags specified on this property will be added to the generated request traces.", + "type": "array", + "elements": { + "fields": [ + { + "name": { + "not_one_of": [ + "error", + "http.method", + "http.path", + "http.status_code", + "kong.balancer.state", + "kong.balancer.try", + "kong.consumer", + "kong.credential", + "kong.node.id", + "kong.route", + "kong.service", + "lc", + "peer.hostname" + ], + "required": true, + "type": "string" + } + }, + { + "value": { + "type": "string", + "required": true + } + } + ], + "type": "record" + } + } + }, + { + "http_span_name": { + "description": "Specify whether to include the HTTP path in the span name.", + "required": true, + "one_of": [ + "method", + "method_path" + ], + "type": "string", + "default": "method" + } + }, + { + "connect_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 2000 + } + }, + { + "send_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 5000 + } + }, + { + "read_timeout": { + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "type": "integer", + "between": [ + 0, + 2147483646 + ], + "default": 5000 + } + }, + { + "http_response_header_for_traceid": { + "type": "string" + } + }, + { + "phase_duration_flavor": { + "description": "Specify whether to include the duration of each phase as an annotation or a tag.", + "required": true, + "one_of": [ + "annotations", + "tags" + ], + "type": "string", + "default": "annotations" + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "description": "Maximum number of entries that can be processed at a time.", + "type": "integer", + "between": [ + 1, + 1000000 + ], + "default": 1 + } + }, + { + "max_coalescing_delay": { + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "type": "number", + "between": [ + 0, + 3600 + ], + "default": 1 + } + }, + { + "max_entries": { + "description": "Maximum number of entries that can be waiting on the queue.", + "type": "integer", + "between": [ + 1, + 1000000 + ], + "default": 10000 + } + }, + { + "max_bytes": { + "description": "Maximum number of bytes that can be waiting on a queue, requires string content.", + "type": "integer" + } + }, + { + "max_retry_time": { + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number", + "default": 60 + } + }, + { + "initial_retry_delay": { + "description": "Time in seconds before the initial retry is made for a failing batch.", + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "default": 0.01 + } + }, + { + "max_retry_delay": { + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "type": "number", + "between": [ + 0.001, + 1000000 + ], + "default": 60 + } + }, + { + "concurrency_limit": { + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "type": "integer", + "default": 1, + "one_of": [ + -1, + 1 + ] + } + } + ], + "type": "record", + "required": true + } + }, + { + "propagation": { + "fields": [ + { + "extract": { + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "gcp", + "jaeger", + "aws", + "ot", + "w3c", + "datadog", + "b3" + ] + } + } + }, + { + "clear": { + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "type": "array", + "elements": { + "type": "string" + } + } + }, + { + "inject": { + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "type": "array", + "elements": { + "type": "string", + "one_of": [ + "preserve", + "gcp", + "b3-single", + "jaeger", + "aws", + "ot", + "w3c", + "datadog", + "b3" + ] + } + } + }, + { + "default_format": { + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "type": "string", + "required": true, + "one_of": [ + "gcp", + "b3-single", + "jaeger", + "aws", + "ot", + "w3c", + "datadog", + "b3" + ] + } + } + ], + "type": "record", + "required": true, + "default": { + "default_format": "b3" + } + } + } + ], + "type": "record", + "required": true + } + } + ], + "entity_checks": [ + + ] +} \ No newline at end of file diff --git a/schemas/zipkin/3.9.x.json b/schemas/zipkin/3.9.x.json new file mode 100644 index 00000000..f08c4023 --- /dev/null +++ b/schemas/zipkin/3.9.x.json @@ -0,0 +1,421 @@ +{ + "entity_checks": [ + + ], + "fields": [ + { + "protocols": { + "required": true, + "type": "set", + "default": [ + "grpc", + "grpcs", + "http", + "https" + ], + "description": "A set of strings representing protocols.", + "elements": { + "description": "A string representing a protocol, such as HTTP or HTTPS.", + "one_of": [ + "grpc", + "grpcs", + "http", + "https", + "tcp", + "tls", + "tls_passthrough", + "udp", + "ws", + "wss" + ], + "type": "string" + } + } + }, + { + "consumer_group": { + "reference": "consumer_groups", + "eq": null, + "type": "foreign", + "description": "Custom type for representing a foreign key with a null value allowed." + } + }, + { + "config": { + "fields": [ + { + "local_service_name": { + "default": "kong", + "description": "The name of the service as displayed in Zipkin.", + "required": true, + "type": "string" + } + }, + { + "http_endpoint": { + "type": "string", + "description": "A string representing a URL, such as https://example.com/path/to/resource?q=search." + } + }, + { + "sample_ratio": { + "default": 0.001, + "description": "How often to sample requests that do not contain trace IDs. Set to `0` to turn sampling off, or to `1` to sample **all** requests. ", + "between": [ + 0, + 1 + ], + "type": "number" + } + }, + { + "default_service_name": { + "type": "string", + "description": "Set a default service name to override `unknown-service-name` in the Zipkin spans." + } + }, + { + "include_credential": { + "default": true, + "description": "Specify whether the credential of the currently authenticated consumer should be included in metadata sent to the Zipkin server.", + "required": true, + "type": "boolean" + } + }, + { + "traceid_byte_count": { + "required": true, + "type": "integer", + "default": 16, + "description": "The length in bytes of each request's Trace ID.", + "one_of": [ + 8, + 16 + ] + } + }, + { + "header_type": { + "required": true, + "type": "string", + "default": "preserve", + "description": "All HTTP requests going through the plugin are tagged with a tracing HTTP request. This property codifies what kind of tracing header the plugin expects on incoming requests", + "one_of": [ + "preserve", + "ignore", + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "datadog", + "gcp" + ], + "deprecation": { + "old_default": "preserve", + "message": "zipkin: config.header_type is deprecated, please use config.propagation options instead", + "removal_in_version": "4.0" + } + } + }, + { + "default_header_type": { + "required": true, + "type": "string", + "default": "b3", + "description": "Allows specifying the type of header to be added to requests with no pre-existing tracing headers and when `config.header_type` is set to `\"preserve\"`. When `header_type` is set to any other value, `default_header_type` is ignored.", + "one_of": [ + "b3", + "b3-single", + "w3c", + "jaeger", + "ot", + "aws", + "datadog", + "gcp" + ], + "deprecation": { + "old_default": "b3", + "message": "zipkin: config.default_header_type is deprecated, please use config.propagation.default_format instead", + "removal_in_version": "4.0" + } + } + }, + { + "tags_header": { + "default": "Zipkin-Tags", + "description": "The Zipkin plugin will add extra headers to the tags associated with any HTTP requests that come with a header named as configured by this property.", + "required": true, + "type": "string" + } + }, + { + "static_tags": { + "elements": { + "type": "record", + "fields": [ + { + "name": { + "not_one_of": [ + "error", + "http.method", + "http.path", + "http.status_code", + "kong.balancer.state", + "kong.balancer.try", + "kong.consumer", + "kong.credential", + "kong.node.id", + "kong.route", + "kong.service", + "lc", + "peer.hostname" + ], + "required": true, + "type": "string" + } + }, + { + "value": { + "required": true, + "type": "string" + } + } + ] + }, + "description": "The tags specified on this property will be added to the generated request traces.", + "type": "array" + } + }, + { + "http_span_name": { + "required": true, + "type": "string", + "default": "method", + "description": "Specify whether to include the HTTP path in the span name.", + "one_of": [ + "method", + "method_path" + ] + } + }, + { + "connect_timeout": { + "default": 2000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "send_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "read_timeout": { + "default": 5000, + "description": "An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2.", + "between": [ + 0, + 2147483646 + ], + "type": "integer" + } + }, + { + "http_response_header_for_traceid": { + "type": "string" + } + }, + { + "phase_duration_flavor": { + "required": true, + "type": "string", + "default": "annotations", + "description": "Specify whether to include the duration of each phase as an annotation or a tag.", + "one_of": [ + "annotations", + "tags" + ] + } + }, + { + "queue": { + "fields": [ + { + "max_batch_size": { + "default": 1, + "description": "Maximum number of entries that can be processed at a time.", + "between": [ + 1, + 1000000 + ], + "type": "integer" + } + }, + { + "max_coalescing_delay": { + "default": 1, + "description": "Maximum number of (fractional) seconds to elapse after the first entry was queued before the queue starts calling the handler.", + "between": [ + 0, + 3600 + ], + "type": "number" + } + }, + { + "max_entries": { + "default": 10000, + "description": "Maximum number of entries that can be waiting on the queue.", + "between": [ + 1, + 1000000 + ], + "type": "integer" + } + }, + { + "max_bytes": { + "type": "integer", + "description": "Maximum number of bytes that can be waiting on a queue, requires string content." + } + }, + { + "max_retry_time": { + "default": 60, + "description": "Time in seconds before the queue gives up calling a failed handler for a batch.", + "type": "number" + } + }, + { + "initial_retry_delay": { + "default": 0.01, + "description": "Time in seconds before the initial retry is made for a failing batch.", + "between": [ + 0.001, + 1000000 + ], + "type": "number" + } + }, + { + "max_retry_delay": { + "default": 60, + "description": "Maximum time in seconds between retries, caps exponential backoff.", + "between": [ + 0.001, + 1000000 + ], + "type": "number" + } + }, + { + "concurrency_limit": { + "default": 1, + "description": "The number of of queue delivery timers. -1 indicates unlimited.", + "type": "integer", + "one_of": [ + -1, + 1 + ] + } + } + ], + "required": true, + "type": "record" + } + }, + { + "propagation": { + "default": { + "default_format": "b3" + }, + "fields": [ + { + "extract": { + "elements": { + "type": "string", + "one_of": [ + "gcp", + "jaeger", + "aws", + "ot", + "w3c", + "datadog", + "b3" + ] + }, + "description": "Header formats used to extract tracing context from incoming requests. If multiple values are specified, the first one found will be used for extraction. If left empty, Kong will not extract any tracing context information from incoming requests and generate a trace with no parent and a new trace ID.", + "type": "array" + } + }, + { + "clear": { + "elements": { + "type": "string" + }, + "description": "Header names to clear after context extraction. This allows to extract the context from a certain header and then remove it from the request, useful when extraction and injection are performed on different header formats and the original header should not be sent to the upstream. If left empty, no headers are cleared.", + "type": "array" + } + }, + { + "inject": { + "elements": { + "type": "string", + "one_of": [ + "preserve", + "gcp", + "b3-single", + "jaeger", + "aws", + "ot", + "w3c", + "datadog", + "b3" + ] + }, + "description": "Header formats used to inject tracing context. The value `preserve` will use the same header format as the incoming request. If multiple values are specified, all of them will be used during injection. If left empty, Kong will not inject any tracing context information in outgoing requests.", + "type": "array" + } + }, + { + "default_format": { + "type": "string", + "description": "The default header format to use when extractors did not match any format in the incoming headers and `inject` is configured with the value: `preserve`. This can happen when no tracing header was found in the request, or the incoming tracing header formats were not included in `extract`.", + "required": true, + "one_of": [ + "gcp", + "b3-single", + "jaeger", + "aws", + "ot", + "w3c", + "datadog", + "b3" + ] + } + } + ], + "required": true, + "type": "record" + } + } + ], + "required": true, + "type": "record" + } + } + ] +} \ No newline at end of file